Getting Started with Arduino – Fio

Good! You are here because you wanted to use Arduino. 1st thing 1st, you will need the necessary tools to get started, and this guide is meant for Arduino Fio

Arduino Main Board – Fio

Currently, there are > 10 types of Arduino main board in the market including 3rd party, compatible version, etc. We will not cover all. I will focus on Arduino – Fio. Other types of Arduino main board have the basic operation, with a little tuning and exploring, I am sure you can get the hang of it. So get the Arduino Fio. Please take note, there are several method to load program into Fio, wired or wireless, I will show you the wired method and continue with wireless. Depending on which method you prefer, get the necessary hardware and software. BTW, Fio is 3.3VDC operated, do take note on that. If you have any problem, welcome to discuss in our technical forum. You can also refer to:

Loading Program via Wired method

There are 2 methods to load program/sketch into Arduino Fio. I will be showing the wired method first. Please get the:

UC00A Rev2.0 or Compatible Device

Arduino Fio is an Arduino controller without the programming device installed on it. This is to reduce the cost of Fio because the programming device can be reuse for other Fio and Arduino controller, and is quite common. This is similar to BBFuino and PRO Mini. Therefore, you need to get a tool to load program, we have that tool, the UC00A Rev2.0. Basically it is a USB to UART bridge. Arduino uses serial bootloader to load program into target Arduino board. UC00A Rev2.0 comes with the socket ready for program loading J

But, there are minor changes you need to make on UC00A Rev2.0 to be able to load program into Fio. UC00A Rev2.0 default TTL and power is 5V, while Fio is operating at 3.3V. Connecting the UC00A without modification will likely kill the voltage regulator on Fio. I never try it J. To make sure it works fine, please change it to 3.3V. Simple, just de-solder the pad at the left top corner of UC00A where it labeled “Vsel”, default is 5V. De-solder the 2 pads. Connect the center pad to 3.3V. DONOT solder all 3 pads together, only 2 pads. BTW, you can utilize 3 pin header and mini jumper to make it flexible J

USB cable

UC00A Rev2.0 will require a USB mini B cable. The cable is for connecting UC00A Rev2.0 to computer for loading program to Arduino Fio, some cases for power and also for serial communication. BTW, USB mini B cable is commonly use on UIC00B, GPS, SKXBee Rev2.0 and Motorola phone. Try using those USB cable if you have one.

Arduino IDE

Arduino IDE is the software tool needed to write sketch (code), and load into the Arduino main board. Please go to Arduino website at arduino.cc, under Download, please download the corresponding IDE base on your Operating system (Windows, Mac OS X, Linux). This is the location to download the latest version of Arduino IDE.

Unzip the downloaded file.

Arduino Main Board to Computer (Wired)


Now, since this is your 1st time, it is always going to be painful, right? BTW, I will be showing the steps using Windows XP only πŸ™‚ Connect one end of the Mini B type USB cable to UC00A Rev2.0, and the other end to the computer/laptop USB port. The UC00A Rev2.0 will automatically use the power from USB to start up. The green LED (ON) on UC00A should be ON. 1st time user, you will need to install the USB driver for UC00A Rev2.0. You should also hear sound from the computer and a little popup message box at the bottom right corner of the screen saying Found New Hardware…..FT232…. you will need to install the driver πŸ™‚
The Found New Hardware Wizard will appear and please select No, not this time and click Next >

Select Install from a list of specific location (Advanced) in the next screen. Click Next >

The next screen, make sure you select Include this location and browse to the Arduino IDE folder that you just downloaded and upzipped. Select the drivers -> FTDI USB Drivers folder, and click OK.

The wizard should start searching for necessary files and install the driver, you should get this window, click Finish.

You might get this warning message pop up, just click Continue Anyway.

And it should install successfully and you will get this:

you might need to reboot/restart the computer to get the driver working properly, don’t worry, it’s only one time work! After the computer reboot, please make sure the UC00A Rev2.0 is plugged to the computer through the USB cable. The green LED is ON. We would like to know which COM number is the UC00A Rev2.0 connected to. Go to the Device Manager (from the Start Menu, select Settings -> Control Panel. Double Click on System and select Hardware tab. Then click on Device Manager).

Look for an entry under Ports (COM & LPT) that shows USB Serial Port (COM”X”) where X is a decimal number from 1 to 100. Seriously, I have seen COM250 before! Anyway the X can be any number and it should be a unique number and we need it in Arduino IDE later. So in this case, the COM number is 3. You will need to select the correct COM number to load program/sketch into Arduino Fio later. If you don’t see any USB Serial Port, unplug USB cable and plug in again. The driver for UC00A Rev2.0 is installed. Now connect the UC00A Rev2.0 to Arduino Fio, but where?

Arduino Fio come without any header pin and socket for UC00A Rev2.0 to connect to, you will need to solder it yourself. I will be soldering the header pins for breadboard and add an additional right angle 6-way header for program loading via UC00A. Prepare the header pins needed; it should be 14-way each.


Solder it, and when it is done, add a 6-way right angle header to right top header pin as shown, from GND to DTR pin.


Now, connect the socket of UC00A Rev2.0 (3.3V) to Arduino Fio 6-way bootloader pin which you have just soldered. Remember, there is polarity for this connection. Make sure the GND (Black) on UC00A is connected to GND pin on Fio, and the DTR (Green) is connected to DTR pin on Fio. Double confirm before you plug in.

Once the UC00A is connected to computer (via USB cable) and connected to Arduino Fio properly, the Red LED (very small LED near reset button) on Fio will Blink, this indicate Fio is powered and running program, preloaded program. Arduino Fio is preloaded with bootloader. Now is the time we load 1st sample program/sketch.

Good the pain is over for loading program using wired method πŸ™‚ You can jump to Hello World – Arduino. I will be showing preparation needed for wireless program loading.

Loading Program via Wireless method

Hardware and software needed for wireless program loading to Arduino Fio:

OR

There are many options, the main tools we need are a pair of XBee series 1 module (I have yet to try series 2, but it should works), power to Arduino Fio, and SKXBee to plug XBee to computer for program loading, wirelessly. I will be using option 2 because I have SKXBee Rev2.0 J, and I will also show the modification needed for SKXBee Rev1.0

SKXBee Rev2.0


As highlighted earlier, Arduino Fio is an Arduino controller without the programming device installed on it to reduce the cost of Fio. In wired method, UC00A Rev2.0 provides the loading path. In wireless method, XBee provides that. If you notice, at the back of Arduino Fio, there is a pair of 10-pin socket (2mm pitch to pitch). It is meant for XBee module. Fio is designed to load program wirelessly via XBee J. By now you should have guess, 1 XBee module on Fio, another XBee module should be connected to computer to load sketch. Yup, you are right. The XBee module connected to computer will need SKXBee. Both the XBee series 1 modules need to be configured using X-CTU software before you can use it for wireless program loading.

Download and install the X-CTU, is quite straight forward.

USB cable

SKXBee Rev2.0 will require a USB mini B cable. The cable is for connecting SKXBee Rev2.0 to computer for communication with the XBee module, also to power the SKXBee and XBee module on it. BTW, USB mini B cable is commonly use on UIC00B, GPS, SKXBee Rev2.0 and Motorola phone. Try using the USB cable if you have one. Another USB mini-B cable you going to need it for powering Arduino Fio in wireless method.

If you are using SKXBee Rev1.0, it comes with USB B Cable. Just use it and if you don’t have one, try to get it from your USB printer, B type USB is commonly use on printer J

Now installation of driver, SKXBee has an USB to UART chip and is the same as UC00A Rev2.0 chip. We will utilize the same steps for installing the driver, please refer to earlier steps here. For those that have been using SKXBee or UC00A, you can skip this part.

By now, you should get your SKXBee working with computer (driver installed properly), we need to configure both the XBee modules. Each XBee module has different role, so I will label them as “Remote” with R, and “Base” with B.

  • Remote XBee is referring to XBee module which will be connected to Fio.
  • Base XBee is the XBee module plug on SKXBee connected to computer during program loading.

Since you have only one SKXBee, you will need to swap the XBee module for configuration. Let’s start with the Remote XBee module.

Remote XBee module

To avoid any confusion, label a XBee module with “R” to indicate is Remote XBee. Plug into the SKXBee, connect the SKXBee to computer via USB cable. Open X-CTU. Select the correct COM port. Normally is being labeled as USB Serial Port (COMX) The X can be any number, it is the COM number of SKXBee USB to UART chip, my is COM23. Set the:

  • Baud to 9600
  • Flow Control to None
  • Data bits to 8
  • Parity to None
  • Stop bits to 1

You can verify the working and COM number by press the Test/Query button under Stop Bits. If the settings and XBee are working, after 1 to 2 seconds, you should see this:


If you have a fail message, most likely is the baud rate. Try change the baud rate and test again. If it is working, click Modem Configuration tab on X-CTU, click the Read button, X-CTU will read the current configuration (parameters) on the XBee. Now change the settings accordingly:

  • PAN ID: 3178. Under Networking & Security. This is Personal Area Network ID. We can utilize this ID to provide better security and immunity to interference between other XBee. The Base XBee will need to have same PAN ID. You can put any Hexadecimal number, I will use 3178, the last four digit number of our office number.
  • DL – Destination Address Low: 1234. Under Networking & Security. Destination low address. Factory default is 0. Change it to 1234, this will also be the Base XBee’s MY address.
  • MY – 16-bit Source Address: 4321. Under Networking & Security. MY address. Factory default is 0. Change it to 4321, this will also be the Base XBee’s DL address. DL and MY will be the pairing address of both XBee module.
  • Interface Data Rate: 6 – 57600. Under Serial Interfacing. This is the baud rate of UART interface between computer and XBee module. Since Fio is using 57600 baud, XBee need to be configured to this speed.
  • Packetization Timeout: 10. Under Serial Interfacing. This value determines how long the XBee waits before sending the characters over to another XBee wirelessly. We’re doing some ‘bulk transfer’ when sending 10K programs over, so just try 10.
  • D3 – DIO3 Configuration: 5 – DO HIGH. Under I/O Settings. This is to make D3 pin on XBee (pin 17) as output and default is HIGH. This is use to reset Arduino Fio during bootloader (check the schematic of Fio). It will be paired with Base XBee’s DIO3 pin. When DIO3 from Base XBee detect changes, Remote XBee’s D3 will reset the Fio further enter bootloader.
  • UI – I/O Output Enable: 0 – Disabled. Under I/O Settings. This will prevent the changes to be notified through UART, and instead will change the output pin only.
  • A – I/O Input Address: FFFF. Under I/O Line Passing. Configure this Remote XBee to receive the I/O changes detection from a pairing XBee, FFFF will work fine because it will detect all XBee I/O changes.

Now, click Write button to load this new settings into Remote XBee on SKXBee. Once it is done, the new baud for Remote XBee is 57600bps. BTW, I am using 10CD version of firmware for both my XBee module, you should at least use this version or later.


The new setting for Remote XBee would be:

  • PAN ID = 3178
  • DL = 1234
  • MY = 4321
  • Interface Data Rate = 57600bps
  • Packetization Timeout = 10
  • D3 – DIO3 Configuration = 5 – DO HIGH
  • UI – I/O Output Enable = 0 – Disabled
  • A – I/O Input Address = FFFF

BTW, if you want to read the configuration from the Remote XBee again, you need to change the X-CTU’s baudrate to 57600 under PC Settings tab.

Close the X-CTU, disconnect the SKXBee from USB cable. Un-plug the Remote XBee module from SKXBee, plug it into Fio (the back), mind the orientation, DONOT plug wrongly, you will damage the XBee module.


Base XBee module

Take the other XBee module, label as “B”. Plug into the SKXBee, connect the SKXBee to computer via USB cable. Open X-CTU again. Select the correct COM port, it should be the same as earlier selection because you are using same SKXBee and USB port. Set the:

  • Baud to 9600
  • Flow Control to None
  • Data bits to 8
  • Parity to None
  • Stop bits to 1

You can verify the working and COM number by press the Test/Query button under Stop Bits. Same as what you did for Remote XBee just now.

If you have a fail message, most likely is due to wrong baud rate. Try change the baud rate and test again. If it is working, click Modem Configuration tab on X-CTU, click the Read button, X-CTU will read the current configuration (parameters) on the XBee. Now change the settings accordingly:

  • PAN ID: 3178. Under Networking & Security. This ID must be same as Remote XBee, I am using “3178”, the last four digit of our office number.
  • DL – Destination Address Low: 4321. Under Networking & Security. Destination low address. Factory default is 0. Change it to 4321, this is the Remote XBee’s MY address.
  • MY – 16-bit Source Address: 1234. Under Networking & Security. MY address. Factory default is 0. Change it to 1234, this is the Remote XBee’s DL address.
  • Interface Data Rate: 6 – 57600. Under Serial Interfacing.
  • Packetization Timeout: 10.
  • D3 – DIO3 Configuration: 3 – DI. Under I/O Settings. This is to make D3 pin on XBee (pin 17 on XBee) as input. This will be used for DTR from FT232 (also connected to XBee’s DTR) for resetting Fio at the other end. XBee is capable of detect changes on I/O pin further transmit to the paired XBee and output it.
  • IC – DIO Change Detect: 8. Under I/O Settings. Configure this base XBee to monitor the change of DI3. Value 8 is 0000 1000 in binary. Bit-3 set is to configure XBee to monitor pin DIO3 which we set as input just now.

Now, click Write button to load this new settings into Base XBee on SKXBee. Once it is done, the new baud for Base XBee is 57600bps. Close the X-CTU, we do not need it anymore. Just remember the COM port number, we need it on Arduino IDE later.


The new setting for Base XBee would be:

  • PAN ID = 3178
  • DL = 4321
  • MY = 1234
  • Interface Data Rate = 57600bps
  • Packetization Timeout = 10
  • D3 – DIO3 Configuration = 3 – DI
  • IC – DIO Change Detect: 8

You will need to do some modification on the SKXBee to enable wireless bootloading J.

Take the SKXBee Rev2.0, look carefully, at the right side of XBee module, there are 2 pads labeled as DTR and DIO3, short it using solder lead.


If you are using SKXBee Rev1.0, flip it over; solder a jumper wire to connection pin 9 (DTR) and 17 (DIO3).


Yeah! Is near, don’t worry; this will be one time work J Is pain, but is fun when you can load program wireless, trust me! Last thing to do, to power the Arduino Fio. The wired method uses power from UC00A Rev2.0 (from USB), but for wireless method, there is no UC00A Rev2.0 connected anymore, else it will be no point doing wireless. To power the Fio, there are a few choices. Easiest method, power it from USB. For the sack of demo, you just grab a USB mini B (not from SKXBee) and power it from computer. USB mini-B socket of Fio is meant for power only, not for program. That is the reason why I put 2 units of USB Mini-B cable under Wireless method.


Or you can use single cell Li-po battery to power the Fio. We do not carry single cell li-po battery, but we do have single cell rechargeable Li-ion battery which have similar voltage with Li-po. Get the single cell 18650 battery holder + 18650 Li-ion rechargeable battery, solder some simple connector, and a 2 pin right angle header to Fio, you will get this, fully remote/mobile Arduino Fio.


No to forget the Remote XBee is plug in at the back of Fio and Base XBee stay with SKXBee and connected to computer.


Doesn’t matter how you power it, as long as it is powered properlyJ. We are now going to load program. The ASSO LED on SKXBee will blink when XBee is on it and powered.

Hello World – Arduino


Let’s move to the fun part. For this section, it does not matter whether you use Wired or Wireless method, the steps are same. We will do Hello World in Arduino – LED blinking. Open the folder Arduino that you download and unzipped, you should see a file named arduino.exe, double click it, Arduino IDE will appear, it may take a while to load, ~ 10 seconds. No further installation is needed. Arduino IDE does not require installation.

This is the Arduino IDE:

Make sure the UC00A Rev2.0 if you are using Wired method; SKXBee is connected via USB cable if you are using Wireless method. Arduino IDE supports many Arduino main boards. We will need to select the correct board and microcontroller. Goto Tools -> Board -> Arduino Fio, click it.

Now, make sure Arduino IDE knows which COM Port the Arduino Fio is connected to. Goto Tools -> Serial Port -> COM?, it depends on the COM number you use. If you are using UC00A Rev2.0, select the COM number which you have check previously using device manager. If you are using SKXBee Rev2.0 use back the same PORT number that you choose in X-CTU (X-CTU must be closed). Remember, the number might be different when you use different USB port, change different UC00A, SKXBee and different computer. Again, mine is COM23 as I am using SKXBee for wireless method. Do not follow my COM number, choose yours.

The settings will appear at the bottom right corner of Arduino IDE.
Now, you are ready to load the 1st example code, Blinking πŸ™‚ Goto File -> Examples -> Basic -> Blink, click it. The example sketch/program will appear in a new Arduino IDE window, don’t worry, it’s perfectly normal. You can ignore the empty Arduino IDE that appeared earlier. You can close it or leave it. We will work on the new Arduino IDE with Blink sketch.
You can click the upload icon, Arduino IDE will compile the sketch and upload into Arduino Fio connected to your computer using UC00A Rev2.0 (Wired method) or SKXBee Rev2.0 (Wireless method), further run the sketch on PRO Mini. You will just have to wait until the message box say Upload Done and look at the Arduino Fio. The Red LED (bottom center, below Reset button) will blink at 1 second rate. That LED is connected to D13 of Fio.

So we have downloaded new sketch/program into our Fio, congrats! If you notice, when the IDE is stating Uploading…. The RSSI LED on Fio and SKXBee will ON, and LED of X-RX and X_TX on SKXBee blink indicating the wireless communication started. You have completed the 1st and foremost exercise. To make a little change, I will show you an easy modification. Scroll down the program/sketch, in the loop function. Modify the value fromΒ delay(1000) to delay(100), for both the delay. Click on the Upload icon and sit back, wait until it is done uploading.

Now, look at the Red LED blinking rate, it has become faster πŸ™‚ You have successfully load an example code/sketch and modify it.

Hurray! Now, you can un-plug the XBee on Fio and make it fully standalone. Besides using for bootloading, the system can be used for wireless communication, sensor network, remote control and monitor, etc. You can try the other examples, but most will require additional shields or components. Just a reminder, Fio is designed for compact and intermediate user, and wireless program loading, it is not compatible with shields because of the size and shape, but all the sample code using Arduino IDE can works as long as the interface is correct. We will come out with more tutorials, stay tuned! If you have problem do feel free to discuss in our technical forum as we seldom check comments area in tutorial site.

Buy

, , , ,

Related Post

How to Make your Line Following Robot Faster?

Wireless Communication between Arduino and Computer with RFBee.

Using Cytron XBee Shield

Using BlueBee in Master mode

5 thoughts on “Getting Started with Arduino – Fio

  1. Hi

    I am trying to do the wireless programming of arduino fio, I did follow your instruction step by step but the following error occurs: avrdude: stk500_cmd(): programmer is out of sync
    Can you hep me solve this problem?

  2. Nice tutorial…i wish i can make it…

    I’m trying to make an interactive arduino fio with some button so the button can send signal to computer…
    I’m very thanks if you can show me some suggestion or tutorial…

Leave a Reply

Your email address will not be published. Required fields are marked *