Now that some of the JeeNode/JeeLink boards from JeeLabs come pre-loaded with the OptiBoot boot loader, it’s time to start thinking about switching everything over. Having to constantly switch the Arduino IDE between “Arduino Uno” (OptiBoot) and “Arduino Duemilanove w/ 328” (original 2009 boot) is quickly going to become very tiresome …
See this weblog post for a quick summary of what all this uploading and boot loader stuff is about, and why you should care. In a nutshell: you need a boot loader on the ATmega to save sketches onto it via FTDI and USB.
There’s a nasty detail, though: to upload sketches you need a boot loader, but how does that boot loader end up on the ATmega in the first place? The good news is that this is usually done in the factory, well, ehm… at JeeLabs, in my case. The good thing is, it’s all taken care of, and the boot loader doesn’t normally get damaged or need to be replaced. It just works.
Except when the boot loader itself needs to be changed, as in the case of OptiBoot. Note that it’s quite worthwhile to switch to OptiBoot: the uploads are twice as fast, and you get 1.5 Kb of extra memory for your own sketches.
So how do you go about updating the boot loader on a JeeNode when you don’t have a special hardware tool called an “ISP Programmer”?
Fortunately, there is a simple trick to do this using a second JeeNode (or Arduino). I’ve written about this in a previous post. There’s an isp_repair.pde sketch in the Ports library which does everything (it emulates an ISP programmer, basically).
I’ve just updated the isp_repair.pde sketch to use OptiBoot.
Here’s the setup to upgrade a target JeeNode to OptiBoot using another JeeNode:
Six wires need to be connected as follows:
And then it’s a matter of attaching the target to the programming JeeNode, and then powering up the whole assembly.
If you happen to have the serial port connected to the programming JeeNode, you’ll see this info:
I made a permanent setup using a JeeNode USB, because I’ve got a pile of JeeNodes to reprogram here at JeeLabs:
The connector was constructed from a 2×4 header, with the pins bent in such a way that the whole thing stays in place when pressed into the 2×4 holes of the SPI/ISP header. And then the whole thing was sealed off with a few pieces of heat-shrink tubing:
To program a board (in this case another JeeNode USB), just power it all up and wait 3 seconds:
That’s it – you could call this an “opti-rebooter” :)
Well, Let’s now dream of a bootloader alternative using the RFM12B, being able to also flash a jeenode wireless…
One step at a time, please. Now that there is OptiBoot, fitting the entire RF12 driver in the boot section becomes a possibility…
See also http://forum.jeelabs.net/node/210
Good job JC! Do you think it’s possible to convert a Jeenode into a “standlone programmer” too? For instance, sometimes I need to do an update of a jeenode which is installed in the roof… it will be great to program it with an other Jeenode : only need to climb on the roof 1 time (not twice : fetch the jeenode, program it with a PC, a climb again to set it on the roof…). It could be a good alternative before the wireless update ;-)
See https://jeelabs.org/2010/05/05/a-capturing-isp-programmer/, https://jeelabs.org/2010/04/26/meet-the-flash-board/, and https://jeelabs.org/2010/05/18/multi-isp-programmer/
I thought this was a standalone programmer (other than needing power, of course). Have I misunderstood?