Jaluino Medium User Guide



A PIC based Arduino-like board, powered by Jalv2 and Jallib

Version 0.30.

This is the online HTML version of "Jaluino Medium User Guide" PDF version. You can also download the PDF version from Jallib download section, where you'll also find all Jaluino packages.

The Jaluino Team

Jaluino Mainboard

What is Jaluino and why ?

Jaluino is prototyping board, inspired by Arduino. Arduino is defined (from authors themselves) as "an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board". So Jaluino is aimed to provide the same kind of features1.

While Arduino is based on Atmel microncontrollers, Jaluino is based on Microchip PIC microcontrollers. This is one of the main reason why Jaluino exists. Another reason is Jaluino uses jalv2, jallib and other Just Another Language related projects.

One important aspect is shields. Arduino boards provide a common hardware base, the main board. On top of this board, daughter boards, named "shields", can be plugged. This allows to share hardware designs easily, focusing only on new features, not on microcontroller basic setup (crystal speed, communication dedicated modules, etc...).

Jaluino claims to provide the same shield functionality. That's why it's an Arduino-like board. But... shields aren't the same, size is different, pin number and layout are different, pin functionalities are different. That's why it may not be considered as an Arduino clone...

What are the main goals for Jaluino

  • Jaluino is aimed to provide a nice prototyping platform for jalv2 enthousiasts
  • Jaluino is easy and fun to use
  • Jaluino is easy to build
  • Jaluino should be as cheap as possible
  • Jaluino is (aimed to be) well documented, including lots of tutorials

How Jaluino looks like ? How about specs ?

Enough talking, here's a photo showing how Jaluino looks like.

Figure 1. Jaluino Medium v1.3b

Jaluino comes in different flavors and sizes. That's at least our goal at Jaluino Group. For now, one version of Jaluino is available. This version, Jaluino Medium, provides the following:
  • runs a Microchip PIC 18F4550, with a 20MHz crystal, allowing speeds up to 48MHz. This PIC provides:
    • 32KB Flash memory (~16K words for programming), 2KB SRAM, 256B EEPROM
    • 35 I/O pins
    • 13 Analog-Digital channels, 10-bits resolution
    • 2 PWM channels
    • 4 Timers
    • USART, SPI and I²C (master and slave)
    • USB
  • Three power sources: Jack, USB, and serial module
  • Up to three available voltages on board: Vin (when using power source from jack, Vin is DC voltage on Jack minus VF of diode bridge, 1 to 1.1V), 5V and 3.3V.
  • USB connector
  • Serial connector, allowing user to plug his own serial module (MAX232 based, USB-to-serial converter, serial bluetooth module, ...)
  • Reset via RTS serial option, allowing to upload program without having to manually act on board
  • ICSP connector
  • I2C connector, acting either as a master or a slave
  • Five pin headers to expose PIC's pins, reset and power pins to daughter shields
  • Fuse protection
  • Reset Push button
1 For now, most energy is put on hardware design and libraries. Development environment will soon come.

Description

Overview

The following picture shows the different connectors and important parts composing Jaluino Medium.

Figure 1. Jaluino Medium overview

Several power sources options are available, selectable using jumpers. Fuse protection (500mA) helps keeping board safe when handled by distracted users...

PIC 18F4550 is clocked by a 20MHz crystal, allowing speed up to 48MHz using PLL (kind of black magic...).

Most used communication protocols are available from the board: USB, serial, I²C, ICSP. Those connectors are right angle male connectors, so easily plug wires and buses.

Resetting PIC 18F4550 can be done manually, using Reset push button, or using special RTS serial line, without manual intervention. This Reset-via-RTS feature is enabled using a jumper.

Finally, female connectors on the center compose shield connectors, used to expose pins to daughter boards.

See Hardware setup for detailed instructions about using jumpers and enabling/disabling features.

Board and shield sizes

Jaluino Medium board size is rather bigger than Arduino Duemilanove board. This is mainly because microntroller itself is bigger (it has more pins). Jaluino board is also single sided, to be easier to build at home. Finally, Jaluino provides more features, like a serial connector1 and an I²C connector.

Figure 2. Jaluino Medium under construction, compared to Arduino Duemilanove.

Jaluino shield aera is smaller than the board itself, whereas Arduino's shield have quite the same size as the board.

Table 1. Board size specifications
Length 4.53" (or 11.5cm)
Width 3.35" (or 8.5cm)
Table 2. Shield size specifications (minimum)
Length 3.35" (or 8.5cm)
Width 2.95" (or 7.5cm)
Figure 3. Jaluino Medium with Crumboard shield plugged, showing board and shield size differences

Exposed pins through shield connectors

The following diagram shows 18F4550 pin layout, beside Jaluino shield connector. This is an important diagram, as it shows relation between PIC's pins and connectors, which pins is exposed2, which is not.

Jaluino Medium also exposes its pins as arbitrary number, following connect J1 to J4. Pins can then be accessed within code as number is necessary.

Figure 4. Jaluino Medium pin layout mapping related to shield connectors, with arbitrary numbering scheme

Power and voltages specifications

Jaluino medium can be sourced in three diverend ways depending on which source is available or which source you want to use:
  • AC/DC adaptor, usually delivering up to 24V. Input voltage must be at least 7Vac or 9Vdc with a maximum of 18Vac or 24Vdc depending on power consumption in your 5V and thus also 3.3V circuit.
  • USB, power is directly taken from USB connector. USB outputs 5V and can deliver 100mA normaly or in special orcasions up to 500mA.
  • serial module, where such modules can also provide power (like a USB-to-serial module). Like USB, serial module has to outputs 5V.
Important: Some more information about powering the board with AC/DC adaptor....

The maximum input current drawn by your 5V and 3.3V circuit depends on input voltage and also if you cool your voltage regulator (MC7805C only necessary).

If you don't cool your voltage regulator you have to look into the specs of your regulator at the therminal resistance, junction to ambient value. For the MC7805 this is 65°C/Watt.

This means that the temperature of your regulator increases 65°C with every 1Watt it consumes. If you add the ambiant temperature of aprox 25°C, your regulator will have an total temperature of 90°C after only consuming 1 Watt.

Although 90°C is not its limitation (the max temperature is 125°C), it warms enough to burn your fingers so lets stay below 1 watt consumption in your regulator.

Power = current x voltage, which gives W=I x U, so with this formula you can calculate your max current consumption in your 5V and 3.3V circuit.

For instance if you use a 9Vdc power supply voltage drop over the regulator is 9V - 1V (drop over bridge) - 5V = 3V.

Max current = W/U = 1/3 = 0.33A (total current in your 5V and thus also 3.3V circuit)

As a result of this, you can understand that if you need much current, it is always best to keep your input voltage as close as possible to the minimum input (9Vdc). If you only have a higher voltage power supply you need to limit your current, or power your board with USB.

If, for any reason, you need more power in your 5V and 3.3V circuit, you need to cool your 5V regulator. In this case you need a very well stabilized 9Vdc power Supply. you can than remove C6 (470uF/35V) which is only necessary for unstabilized or AC voltage input. Use this space to place a heatsink on 5V regulator (U2). (TODO: link to an appendix page explaining this modification, and add picture(s))

CAUTION:
Be carefull when using Vin on your shield because this circuit is not protected by fuse.
Tip: The fuse value mentioned in the drawings and documentations is absolute max value (500mA), you are of course free to place a lighter one, for instance 100mA if you want.

Jaluino Medium can provides three voltages on-board, Vin (only when using AC/DC adaptor on jack), 5V and 3.3V:

  • Vin : voltage is voltage from DC adaptor minus 1V dropout voltage over bridge (DB1) or voltage from AC adapter multiplied with square root of 2 minus 1V dropout voltage over bridge (DB1).
  • 5V : when using AC/DC adaptor, input voltage is regulated by 7805. This component outputs regulated 5V, which is a typical voltage used to power a microcontroller such as PIC 18F4550. When using USB or serial as power sources, no 5V regulation is done: this means there should be 5V as output (USB outputs 5V, if you use your serial module to power the board, make sure it outputs 5V).
  • 3.3V : whatever the power sources, another voltage regulator produces 3.3V from 5V. Jaluino Medium makes your life easier and provides this common voltage, which is sometime used by some specific components.

Jaluino Medium version a and version b

3.3V voltage regulator is kind of a special component: there are different regulators, not that easily available, quite expensive and not using the same pin layout. That's why Jaluino Medium comes in two flavors, depending on the pin layout3:
  • Version a: this version uses pin layout Ground/Output/Input.

    Figure 5. 3.3V regulator pin layout for version a

    The following components use this pin layout, and can be used to build Jaluino Medium version a: LD1117V33, LM1117T, LM1086.

  • Version b: this version uses pin layout Input/Ground/Ouput.

    Figure 6. 3.3V regulator pin layout for version b

    The following components use this pin layout, and can be used to build Jaluino Medium version b: LM3940, LF33V.

Choosing version a or version b really is just about selecting which regulator you mostly can find, at lowest price. Other Jaluino features remain the same.

1 Arduino only provides USB, or serial only on older versions, but not both
2 "Exposed" means pin available on shields.
3 Having two versions actually adds complexity to maintenance and designs. We, at Jaluino Group, wanted to provide both options at the beginning, until we can make a final decision... Which one would you prefer ?

Schematics

Jaluino Medium comes in two versions, a and b. See section "Description" to understand why. This section simply describes schematics for these two versions. For better readability, you may also have a look at PDF versions.

All schematics, as well as PCBs, are available at Jaluino SVN repository. If you have troubles with following links, please directly have a look this repository.

Jaluino Medium version a

Version a schematic is also available on Jaluino SVN repository as a PDF file.

Figure 1. Jaluino Medium version a schematic

Jaluino Medium version b

Version b schematic is also available on Jaluino SVN repository as a PDF file.

Figure 2. Jaluino Medium version b schematic

Hardware setup

As previously described (see here), Jaluino Medium can be configured on board, with several jumpers. This section describes how to setup these jumpers, showing the different combinations.

Power sources selection

Jaluino can be powered using different sources (see here for power specifications): a classical AC/DC adaptor, using USB connector or through a serial module (typically a USB-to-serial adaptor). These different possibilities can be configured with jumpers JP1, JP2, JP3 and JP4.

JP1, JP2 and JP3 jumpers are located on top left and JP4 is located on top right of the board, near serial connector.

Figure 1. Four jumpers allow to setup power sources

Valid combinations are the following:
  • One jumper can be plugged on JP1, JP2 or JP3.
    • JP1: power source comes from AC/DC adaptor, plugged on jack
    • JP2: power source comes from USB connector
    • JP3: power source comes from serial module
  • If power source comes jack or USB (JP1 or JP2), power can be used to power the serial module itself, by plugging a jumper on JP4 ("source serial"). It doesn't make any sense to put a jumper on JP3 and JP4.
CAUTION:
putting a jumper on JP3 and another JP4 is an invalid combination. Don't do this, as your Jaluino board won't be protected by fuse anymore !
Important: You have to select one of these combinations, this is a mandatory setup. Or your board won't be powered...
Figure 2. Serial jumpers setup

Serial setup

Two jumpers can be used to setup serial, basically to configure RTS and CTS. Involved jumpers are JP7 and J7, they are located on top right of the board, near serial connector.

Figure 3. Two jumpers are involved in serial setup (RTS and CTS)

  • JP7: if enabled (jumper plugged), then CTS line is connected to pin RD5. This feature is usually not needed for basic serial communications, but if you need to deal with CTS logic (hardware flow control), you can enable this and handle CTS line using this pin in your program.
    Figure 4. CTS jumper setup

  • J7: this jumper is a tri-state trigger. You can plug a jumper on the left side (segment 1-2), on the right side (segment 2-3), or no jumper at all.
    • Reset-via-RTS (segment 1-2): a jumper is plugged, covering the two left pins. In this configuration, Reset-via-RTS is active. This means acting on RTS, for example from a PC, will actually perform a reset (PIC is restarted). This feature is mostly important when using a bootloader, and if you want to upload programs and control your board without having to manually push the Reset button.
    • RTS line (segment 2-3): in this configuration, RTS line gets connected to pin RD4, so you can have access to RTS logic from your program. Just like enabling CTS line, this configuration is rarely used in most serial communication, but might be useful if you need to perform some hardware flow control.
    • no jumper: this configuration disables any of the two configurations above. Neither Reset-via-RTS nor RTS line are enabled.
    Figure 5. RTS jumper setup

I²C setup

Jaluino Medium has built-in, ready-to-use I²C bus. Jaluino can act as a master or a slave. This behavior is under control of jumpers JP5 and JP6. These jumpers always go by pair: either you plug JP5 and JP6, either you don't plug any jumper at all.1.

Figure 6. Two jumpers, going by pair, control I²C master/slave behavior

  • When jumpers are plugged on JP5 and JP6, Jaluino acts as an I²C master.
  • When no jumper at all is plugged, Jaluino acts as an I²C slave. If you don't want to care about I²C, use this setup.
Figure 7. I²C jumpers setup

1 Behind the scene, making Jaluino acting as a master requires to connect two resistors to +5V, one for SDA line, another for SCL line. Jumpers JP5 and JP6 actually make these two resistors active.

Building Jaluino Medium board

"Where can I get Jaluino Medium ?"

Before explaining how to build Jaluino Medium board, one may say: "I don't want to build it, where can I get it ?". Good question ! There's currently no way to get Jaluino Medium other than building it.

In other words, you can't buy a PCB, nor a kit, nor a ready-to-use board, there's no such things to sell... Why ? Because most of this is still very new. In order to buy such a board, a big enough user base is needed. So ? Well, if you're interested in buying a PCB, kit or board, please share your interest with Jaluino Group1 ! By collecting such message, we, Jaluino Team, will be able to have a realistic overview of the need, and may then providing PCB, kit or even the board itself, for a decent price.

Until that time comes, you'll have to build the board. This kind of means it would better if you've already experienced PCB creation, not a pre-requisite, but almost to be honest. Fortunately, Jaluino Medium is designed to be easily built, at home, by average user. Nothing difficult here, it's mostly about having the right tools.

Building the PCB

Building the PCB can be done in different ways, depending on available tools, time, budget, easiness,... One easy way, and probably the cheapest one related to good results it provides, is to create PCB using toner transfert technique. The idea is to print the mirrored PCB on a paper, then tranferring it a copper board, most of the time using an iron (the same used for your shirts... well... maybe not the same !). PCB tracks are thus sticked to the copper board. Put it in echant, and you'll get your PCB. Most variations come from the different papers used.

Figure 1. Jaluino Medium PCB and component view
Important: don't use these images to build your PCB, as they may not be scaled appropriately. 1:1 scale PDF files are available on Jaluino repository, for version A and version B.

Labels (bonus)

When building Jaluino Medium board, you want it to be as beautiful as possible. That's normal. In order to add a nice finished and polished look, you can add labels on the component side. Before soldering components, think about it, after it'll be too late... or you'll have to unsolder all components and possibly damage them.

Figure 2. Jaluino Medium labels

Labels can be printed on paper, and sticked onto the component side. If you decide to go this way (which I strongly suggest if you want to impress your wife, friends, co-workers, dog, cat, yourself), follow the guideline here. (TODO: link to "Put labels on your board to make it awesome" tutorial).

Figure 3. Awesome results :)

Soldering components

Once your PCB is ready, use your faithful solder iron, and start soldering components. The following list shows all required components:

Component name Description
R1 1.2K resistor 1/4W
R2, R3 4.7K resistors 1/4W
R4 1.5K resistor 1/4W
C1, C4, C7, C8, C11 100nF capacitors
C2, C3 15pF capacitors
C5 220nF ceramic capacitor2
C6 470µF/35V capacitor
C9, C12 47µF/35V capacitor
C10 220nF capacitor
DB1 DF04M diode rectifier
U1 Microchip PIC 18F4550, with 40pins large tulipe support
U2 7805 voltage regulator
U3 3.3V regulator, see this section for more about this component
X1 20MHz crystal
J1, J2, J3, J4 1x8 female pin headers
J5 1x6 female pin header
J6, J8 1x6 male pin headers
J7 1x3 male pin headers
J9 Power supply connector
J10 1x4 male pin headers
D1 1N4148 diode
D3 1N4001 diode
D4 3" green LED
F1 500mA fuse and support
CON1 B-Type USB connector
SW2 Push-button (switch)
JP1, JP2, JP3, JP4, JP5, JP6 Jumper connectors (1x2 male pin headers)

Almost all components look like this, to give a rough idea (some are missing, like 3.3V regulator)

Figure 4. Rough overview of Jaluino Medium components

Finally, you may find these links interesting when building Jaluino Medium. They come from Jaluino blog and show some kind of step-by-step building of old (first) Jaluino Medium boards:
1 Jaluino Group can be reached at http://groups.google.com/group/jaluino
2 This is a ceramic capacitor, dedicated to USB

Links

Following are hopefully useful links to several important websites and documentation related to Jaluino.

Jaluino licensing

Jaluino boards and shields

Following Arduino's original licensing, Jaluino reference designs for boards and shields, including schematics and PCBs, are released under Creative Common Attribution-Share Alike 3.0 license.



Basically (and repeating what's on Creative Common website), you are free:
  • to Share - to copy, distribute, and transmit the work
  • to Remix - to adapt the work
Under the following conditions:
  • Attribution - You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
  • Share Alike - If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license.

Full license lecal code can be read at: http://creativecommons.org/licenses/by-sa/3.0/legalcode

Just like Arduino, you can build your own version of Jaluino derived from original reference designs. But we'd like to keep the name "Jaluino" strictly related to original designs, those coming from Jaluino Team/Group, in order to maintain our own official standards.

Jaluino books and documentation

Jaluino user guide, tutorials and documentation in general is released under a more restrictive license related to commercial usage, the Creative Common Attribution-Noncommercial-Share Alike 3.0 license.



Basically (and repeating what's on Creative Common website), you are free:
  • to Share - to copy, distribute, and transmit the work
  • to Remix - to adapt the work
Under the following conditions:
  • Attribution - You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
  • Noncommercial - You may not use this work for commercial purposes.
  • Share Alike - If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license.

If any questions, suggestions or doubts, please reach Jaluino Group at http://groups.google.com/group/jaluino.