Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

Wireless Arduino programming

I have recently been experimenting with some XRFs from Ciseco Plc. The firmware (v0.36) on these XRFs is beta but I understand it is about to be released.
I have tested this on a Nanode and also on a Ciseco Xino for Atmel, it should work with a standard Arduino but I have not tested it.

The new features of the firmware are:
1) reduced delays when continuously sending or receiving data
2) Support for remote reset

These when taken together allow Arduinos to be remote programmed.

So to set this up we need an XRF connected to the Arduino (I’ll call this the remote XRF) and an XRF connected to your PC (the host XRF).

Wiring, the remote XRF needs GND, PWR, Rx, Tx and pin 17 hooked up – see the fritzing diagram below,
the host XRF needs to be connected serially to the host PC – e.g. by using a FTDI cable; GND, PWR Rx, Tx and pin 16 need connecting.

Remote XRF setup:
You need to give the remote XRF an ID (command ATMY) e.g. to give the ID “NN” to the node enter the AT command “ATMY NN”.
You also need to set up the baud rate to match that expected by the bootloader. This is 115200 for a UNO bootloader and 57600 for a standard ATMega386 bootloader.
For the Uno
ATBD 1C200
and for the standard Arduino
ATBD E100

Host XRF setup:
You need to tell the host XRF the ID of the remote XRF to program.
To set a remote ID of NN
ATRI NN
you also need to enable the remote reset (1 to enable and 0 to disable)
ATRP 1
Finally you need to set the baud rate as for the remote XRF.
ATBD 1C200 or ATBD E100

Now you are all set up – run the Arduino IDE, select the board type and the port for the host XRF and program.

Note: This method of programming is intolerant of any radio noise or other XRF radio traffic on the same frequency/panID. I understand future firmware updates may improve this, but at the moment you may need to try and upload more than once – the Arduino IDE will tell you if it succeeded.

 

Images:

Host XRF to PC.

 

Remote XRF to Arduino. Note Pin 17 of the XRF should be connected to the DTR line if the Arduino has a FTDI connector, also if used the capacitor value is 100nF.

I built this onto a small XRF module board that Ciseco produce. Miles assures me that these will be available soon. The boards contain a 3v3 regulator as well as sufficient prototyping space for the connections needed.

Photo of the remote setup, Nanode, XRF and XRF module board

P8176762

 

Photo of the host setup – SparkFun FTDI board, AdaFruit XBee board and XRF

P8176763

Videos:


Disclosure: Miles (Ciseco) lives near to me, we met at the Nottingham Hackspace. In return for beta testing Miles supplies me with some of his kit.

3 comments to Wireless Arduino programming

  • … so I can get an XRF module into config mode with minicom at baud 9600 – +++ returns “OK”
    After that, most commands appear to do nothing. Hitting Enter returns ERR, after entering any AT command I appear to go into a black hole of unresponsiveness… I am guessing I’m driving something incorrectly?

  • If five seconds go by without a character being entered then the XRF will leave AT mode.
    Getting the OK is good, try immediately entering AT followed by enter. You should get another OK.
    Now try another command such as ATBD followed by enter. You should see a response.
    If there is no response then likely you have been too slow, start again with +++.
    The XRF config program is designed to help with this, details are here. http://openmicros.org/index.php/articles/84-xrf-basics/105-xcm-software-config-for-the-xrf
    You can get help from the forums on openmicros.org and there are several helpful articles.

  • Ah I see – I was indeed being too slow! thanks John!