Arduino · 2 July 2013 0

A solution for the issue of the integrated LED ever “on” on the UNO R3

A couple of days ago I’ve received an Arduino UNO R3. The new R3 layout uses the unused half of the op-amp that it has been used on the previous layouts to select the power supply of the board (external or USB) as a voltage follower to driver the “L” LED that is integrated on the board. This solution substitutes the previous one where a line parallel to the D13 line was used, so that the pin won’t be used to source the current to the LED anymore. However, it introduces a strange and random issue where the LED can light on itself, with no change of the D13 pin made by the user.

The user uwefed from the Arduino forum has explained very well this issue that it’s related to the high sensitivity of the op-amp that can read the parasitic current that flows through the pin set in high impedence as an “high” level and light on the LED. So the LED can light on/off due to environmental conditions or just by putting a finger on the back of the board directly on the D13 pin, and not all the boards are affected by this problem: it is the tolerance of the single electronic components that affects it.

This issue doens’t affect the normal usage of the board, however it can’t be desirable. So in the hope that in the future layouts of the board an hardware solution will be introduced, I’ve written a mod bootloader that lights off the led by putting the D13 pin in OUTPUT with a LOW signal. Keep in mind that that pin won’t be in high impedance mode anymore at startup (the default state of all the pins after a reset).

In the attached archive you’ll find a new Optiboot 4.4.1, derived fron the Optiboot 4.4 found into the IDE 1.0.5, as an .hex file ready to be flashed on your board, as well as the source file in case you’ll want to compile the bootloader yourself.

Instructions to install the new bootlaoder:

  1. open the folder that contains the Arduino executable;
  2. surf to /hardware/arduino/bootloaders/optiboot;
  3. rename the file optiboot_atmega328.hex to optiboot_atmega328.orig so that you have a copy of the original file (if you jump this step, you can ever download the IDE again and get the original file from there);
  4. uncompress the archive and copy the .hex in the above folder. This is the new bootloader;
  5. now open the IDE and take another Arduino or an external programmer (i.e.: USBtinyISP) to flash the new bootloader on the chip of you Arduino UNO R3;
  6. upload the bootloader then put the chip with the new bootloader on you Arduino UNO R3.

When you’ll power up the board, you’ll see 4 flashes instead of the usually 3:

  • the first 3 flashes are the ones made by the Optiboot that show the user the start of the bootloader;
  • the 4th flash isn’t a real flash but it’s the quick switch between the condition of “LED on” caused by the op-amp to the condition of “LED off” caused by the pin set as output/low by the new bootloader.

PS:
in case you would try to compile the bootloader trying other changes, keep in mind to not exceed the 512-byte limit for the size of the firmware: with my changes, the bootloader is 506 bytes big, so you still have some bytes free for you.

Optiboot
Optiboot
optiboot-4.4.1.zip
Version: 4.4.1
7.5 KiB
2003 Downloads
Details...