Wednesday, February 8, 2012

The Burn & Go

(From brainspace to prototype in a couple of hours…)

Burn & Go Burn & Go meets Arduino Burn & Go with Arduino (tail showing) Quick and dirty breadboarding

What is it?

The Burn & Go is a semi-shield for Arduino. It acts as a zero-insertion-force pass-through adapter for the 28-pin Atmel chip.

What does it do?

It has two modes, one for each state of the “tail” switch. They are:

  1. Go mode
    Complete pass-through. There is literally no difference in this mode between having the Burn & Go attached and having the Atmel chip inserted directly. Sketches can be uploaded and all inputs and outputs of the chip can be used as normal.

  2. Burn mode
    Optiloader mode. When this mode is entered with a chip locked into the Zippy socket, the chip will be loaded with the Optiboot bootloader that corresponds to the chip type. For compatible chips, see the listing below.

How do you use it?

  • You flip the switch one way, the bootloader is burned (you don’t even have to disconnect it from the computer or whatever it’s doing at the time) and a green light flashes (red if there’s a problem)

  • Flip the switch the other way, the Arduino functions entirely as normal (it will be a clean sketch-slate if it’s just been in the other position with the power on)

How does it work (the short, short version)?

The two-way switch extends power and ground from the Arduino to the onboard Atmel chip (with Optiloader on it). It also moves the reset control from the Arduino board to the onboard chip.

So in position one, everything is as normal because the onboard chip has no power and no ground, so the connections to its digital pins are irrelevant (open). In position two, we move the reset control away from the Arduino board (and the hair-trigger watchdog circuit) and give power and ground to the onboard chip.

In position one, it’s like the extra circuitry doesn’t exist (all power and ground connections are tied to the switch) and in position two, only the onboard circuit is in full control (wired up very similar to the way one Arduino can be used to program another - see the references below).

Why did you make it?

I wanted a no-fuss integrated method that would allow me to take a blank Atmel chip (which are more expensive if you buy them with a bootloader), burn the bootloader and then proceed to load it with a sketch. I also wanted a way to ensure that with the many projects that I had in mind, I wouldn’t end up bending pins so often when moving the Atmels around.

What are the benefits of it?

Well, it… :

  • … can detect and burn the appropriate bootloader for your blank Atmel chip in mere seconds (see the list of compatible chips below)
  • … can protect your pins if you are intending to do a lot of chip swapping (like for standalone project development)
  • … eliminates the need for a seperate bootloader and sketch programmer (and the need to move the chip at all in the process)
  • … fits on the Arduino UNO without obstructing any pins (but I will have to invent some high headers OR make it into a full shield if I wish to put shields on it)
  • … reduces standalone project costs and times by allowing the fast use of entirely blank Atmel chips and at the flick of a switch, allowing them to be loaded with sketches too
  • … doesn’t need to be connected to a computer or set up in any way (except powered) to burn a boot loader
  • … is powered entirely by the Arduino itself
  • … does not require disabling of the Arduino’s auto-reset feature and hence the UNO works fine with this
  • … doesn’t affect the completely normal functioning of your Arduino so it can stay attached at all times

Any down sides?

  • It currently obstructs some of the onboard LEDs (I will eventually either redesign the board to be smaller or make pass-through LEDs for it)
  • It currently uses header pins to connect with the Arduino DIP socket so it makes them irrepairably larger, however this can be rectified by using a DIP socket to do this instead
  • It currently can only be used without shields, as it requires header extensions (due to the height of the Zippy socket)

Parts & Tools List

  1. 1 x Vero-style protoboard (cut to 50mm x 40mm)
  2. 2 x 3mm LED (I used red and green)
  3. 1 x 16MHz Ceramic Resonator (but any Atmel-compatible value can be used - up to 20MHz)
  4. 1 x 10KOhm Resistor (for the reset pulldown)
  5. 1 x 100Ohm Resistor (for the LEDs)
  6. 1 x 28-pin Zippy Socket
  7. 2 x 14-pin DIP Sockets (they form the 28 pin socket for the on-board Atmel328P)
  8. 1 x Atmel328P (loaded with a custom derivative of the very excellent Optiloader sketch - more details below)
  9. 1 x 2-Way 3 or 4 contacts switch (isolated contacts)
  10. A few lengths of proto-wire
  11. Heatshrink tubing of various sizes
  12. Solder (and flux for tinning)
  13. Soldering Iron
  14. Hacksaw or Dremel
  15. Stanley knife (very sharp, for trace cutting)
  16. Arduino UNO (with Atmel chip)
  17. Either 28 standard header pins in two strips of 14 or two more lots of 14-pin DIP Sockets

Reference Information

  • Optiloader @ github - This project would be nothing without this awesome sketch by Bill Westfield (“WestfW”). The only changes I needed to make to his sketch were pin and notification related (so that LEDs do certain things when successful or failed). The sketch includes the hex-encoded Optiboot (Arduino UNO) boatloaders for the following chips:
    • Atmega328P
    • Atmega328
    • Atmega168
    • Atmega8
  • The Arduino UNO schematic - this came in handy when devising the circuit (I have R1 and R3)
  • Arduino To Breadboard - how to use your Arduino to program an Atmel chip on a breadboard
  • Building an Arduino on a Breadboard - this article I found after making the Burn & Go but it seems like a useful resource

Downloadable Content

I didn’t bother running this through a schematic or designer first. As the caption above says, I did it straight from head to breadboard. Later on I might do a retrospective one if there’s enough interest. This is, however, only the first revision. I may also do another revision in future that does away with the switch in favour of transistor or opto-coupled switching, but this was the quickest and easiest method.

Disclaimer

I’ve probably made an ommission or error in this post. Bite me. :) No, seriously, if there’s a mistake or oversight by all means contact me and I’ll make the correction. I try to be as thorough as possible but sometimes I just don’t have time to double check everything. I could do better, I’m sure, but I’d rather be playing with toys.

No comments:

Post a Comment