Updating the Atmega8U2 on an Uno without soldering

Hi
I just updated the 8U2 serial firmware of my arduinos according to http://arduino.cc/en/Hacking/DFUProgramming8U2.

If you don't like soldering directly on your arduino board (or better: below your board) you can follow the folowing steps.

Material needed:

  • One piece of cardboard larger than the arduino.
  • A piece of aluminium foil. I was very successful with the candy wrapper of some Lubecker Marzipan.
  • One or more arduinos - of course.
  • A breadboard connector cable.
  • Tools: a pair of scissors.

Preparation

  • Cut a hole in the cardboard so that you can view the connectors near the map of Italy. For details see http://arduino.cc/en/Hacking/DFUProgramming8U2.
  • Put the cardboard on the back of the arduino with the hole in place and cut the cardboard to exactly the size of the arduino. Do not move the cardboard's hole position!
  • Stuff the aluminium foil in the hole and smooth it at the other side.
  • Turn it over and put the arduino on top. Align cardboard and arduino.
  • Connect the cable to Gnd at the arduino board.
  • While holding cardboard and arduino steady with some pressure together connect arduino to USB. If you need both hands to establish the connection, you can do so, but take care not to move cardboard or arduino - or at least don't move them too far, 5mm is still OK.
  • Touch with the cable the reset pin as indicated on the picture.
  • Disconnect the cable and continue updating the firmware according to http://arduino.cc/en/Hacking/DFUProgramming8U2.

Good luck
Christoph

Or the really easy way :

Hi,
well THAT's really an easy way! However isn't "touch" and "hold" to be exchanged?

Christoph

I think you're right, Christoph: there should be a rising edge on the reset pin whilst HWB is held low.

Note that grounding the ATmega328's "Reset" is enough to hold HWB low for ~1 second, via the capacitor 'C5' (see Uno schematic). This means that you can put the ATmega8U2 into DFU mode with the following sequence:

  • Hold ATmega8U2 Reset to ground (wire 1)
  • Connect "Normal" Reset to ground (wire 2)
  • Immediately release wire 1
  • Remove wire 2

Requires less spatial precision, but more temporal precision. I make no claim as to which is easier :slight_smile:

Keep Windows Device manager open to check that it worked: the "Arduino UNO (COMx)" entry should disappear and be replaced by "ATmel USB Devices, AT90USB82". One thing that the Arduino "Hacking" pages don't make clear is that you'll need to install the ATmel driver that comes with the Flip installation (/Program Files/Atmel/Flip 3.4.2/usb).

Christoph:
Hi,
well THAT's really an easy way! However isn't "touch" and "hold" to be exchanged?

Christoph

No. The reason is that when the firmware runs it makes the HWB pin an output (DTR) and it may be high, and connecting it to GND may cause a short.

Holding the first wire on reset makes the HWB pin become a high impedance input. Briefly touching the second wire against the capacitor charges the capacitor, making the HWB input low, so when the first wire is removed HWB is still low and the 8u2 goes into DFU mode. And in case the user has got things wrong, briefly touching the second wire is potentially less damaging than holding it somewhere which might be at +5v.

tim7: Originally I tried to use a method like the one you suggest (you don't of course need the second wire, you can just use the reset button on the uno) but I could never get it to work reliably. Actually I found it more reliable at getting the 8u2 out of DFU mode than getting it into DFU mode. I don't know why that was, maybe it was just my board, or Linux. Now I've soldered on the resistor that the Arduino team suggest so I can't try it any more.

stimmer:
when the firmware runs it makes the HWB pin an output (DTR) and it may be high, and connecting it to GND may cause a short.

Thanks for pointing that out. It sounds like the non-soldering section of the tutorial at http://arduino.cc/en/Hacking/DFUProgramming8U2 could do with an update.

With the extra 10k resistor in place HWB is held low whenever it is configured as an input. Does this mean the 8U2 chip goes into DFU mode on powerup? And how do you get it out of DFU mode?

tim7:
With the extra 10k resistor in place HWB is held low whenever it is configured as an input. Does this mean the 8U2 chip goes into DFU mode on powerup? And how do you get it out of DFU mode?

My guess is that on powerup the capacitor hasn't had time to charge, so the voltage at the pin would be about 2.5v due to the other 10k resistor to +5v on the other side of the capacitor. 2.5v must be high enough for it not to go into DFU mode straight away. When the 8u2 is then reset manually, I guess that the capacitor must charge up enough in the length of time someone holds reset low for the voltage to go low enough for DFU mode.

To get it back out of DFU mode the suggestion is to unplug and plug back in again. But it is actually possible to do this in software - on Linux, the command sudo dfu-programmer at90usb82 start will take the 8u2 out of DFU mode although the command returns an error which can be ignored.