LED L

I can't figure out why the "L" LED on my Arduino is always lit up. I even deleted my program and it's still on. Does that mean the Arduino is broken?

From what I read it's supposed to turn on when you add power to pin 13.

even deleted my program and it's still on.

what do you mean by that? did you upload some other sketch to arduino?

I uploaded a blank sketch.

Try the blink sketch and see whether it blinks.

Or try the following sketch which writes low to digital pin 13 (I hope yours is an UNO):

void setup()
{
  pinMode(13,OUTPUT);
  digitalWrite(13,0);
}

void loop() {
  // put your main code here, to run repeatedly: 
  
}

if neither of it works properly,there is some problem with the Micro Controller or the Board traces(short).

The blink sketch works. The light flashes.

I get the same problem on several Arduinos. The L light always stays on when it's not being used. I would think it should always be off unless pin 13 is high.

I found some YouTube video that appears to claim it's a problem with Arduino's design... I don't know if that's true. But the video seems to work. The video claims you're supposed to glue the 13 pin to the ground pin.

http://www.youtube.com/watch?v=franFBXgG-A

i still dont know, where the problem is with the L-led?!? i doesnt matter, if the led is on or off!

L LED is driven by an op-amp on later rev Unos, from the SCK/D13 line. If the '328P floating output is seen as high enough, the op amp can go high and turn on the LED. You can add a 10K resistor to Gnd to keep the output from floating.

As stated by CR the latest Uno and Mega boards use a op-amp stage to buffer and drive the pin 13 led. Many users have reported this pin 13 led defaulting to on even with no sketch code setting the pin to a High. This is because pin 13 defaults to input mode and no pull-up once the bootloader code completes and jumps to your sketch. The op-amp buffer addition was a good idea but they should have maybe wired a high value pull-down resistor on pin 13 to keep the op-amp from seeing a 'floating' input pin condition, keeping the led off. I suspect that this problem is very sensitive to the specific op-amp chip on your board and the reason that not all new Uno or Mega boards show this symptom.

One simple software fix is to place the following in your setup function: pinMode(13, OUTPUT); digitalWrite(13, LOW);

Thanks for the details. I never noticed this before, and I thought that maybe I had damaged the Arduino in some way.

I would rather take the software solution to fix the problem, rather than trying to glue pin 13 to ground, even though it seems that his solution worked.

Speaking of uploading sketches... I read on one of the forum posts that the number of writes to EEPROM is limited for some reason. I don't know why that is. But is there a limit to the number of times I can upload a sketch to Arduino before it stops working?

I find myself uploading very often since I'm still learning how to use it. I need to make constant changes. I wonder if that is taking a toll on the Arduino.

Yes there is a limit, from the Atmel '328P datasheet:

– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM 10,000 would be 27 writes a day, every day for a year. Think you'll need that many?

This is a decent article on Flash/EEPROM, but doesn't really say why the writes may stop working http://en.wikipedia.org/wiki/Flash_memory

I don't think I would need that much, idk.

Can the chip be replaced? I see that Mouser sells ATMEGA328P-PU for $3.

Is that were all the writing is done? Could I just buy one of those and replace the existing chip? What would that do?

Can the chip be replaced? I

Yes.

Is that were all the writing is done?

Yes.

Could I just buy one of those and replace the existing chip?

Yes.

What would that do?

Set the ‘clock’ back to zero writes.

You'll likely damage the chip from a wiring mistake first tho. Blank chips do not have bootloaders. Perhaps 1st task should be to bootload a couple so you're not left hanging: http://www.gammon.com.au/forum/?id=11635 Scroll down to the bottom. When you order the chips, also order thru hole parts: 16 MHz crystal in H49US form factor 10K, 1/4 resistor (cheap one) two 22 pF ceramic capacitor four 100nF (0.1uF) ceramic capacitors protoboard if you don't have one already jumper wires if you don't have some already.

www.dipmicro.com is also a good place to order from - not the huge plethora of parts to choose from that makes finding parts difficult for beginners at mouser.com and digikey.com. Inexpensive US mailing from Niagara Falls. www.taydaelectronics is another somewhat limited selection site that is good for beginners. I order from both frequently.

Even if mine isn't damaged, it might be good for me to keep a few on hand, since I don't know what I'm doing yet. It could also be fun to try and program the chip and see what happens.

Are you talking about the section: Programming a breadboard Atmega328P?

I see a breadboard with the chip and a Mega in that picture. But I don't see all the parts you suggested that I order on that breadboard.

There was another link for making a breadboard Atmega328P, but I didn't understand all of that page.

Edit: I posted my shopping cart below. I think I got the parts you were talking about, but I'm not sure because there were extra options. I used Mouser just because I'm used to ordering from there. Even though they are a little harder to order from right now.

Could you check to see if I picked the right things?

http://www.mouser.com/ProjectManager/ProjectDetail.aspx?AccessID=c87c831b36

You have 0.01uF. Looking for 0.1uF.

OK, I got that fixed. I will see if I can figure out how to do this without blowing up the universe or sending myself back in time.

CSGuy: I found some YouTube video that appears to claim it's a problem with Arduino's design ... I don't know if that's true.

It is in fact, not a problem at all. It is a consequence of an absolutely deliberate design. An Arduino pin that is not connected or defined as an output or as "INPUT_PULLUP" is by definition, floating - that is what it is supposed to to; that it is a very high impedance (hundreds of megohms) is what makes it possible to measure capacitance and function as a proximity sensor.

What the op-amp is doing is accurately reflecting the state of pin 13. Nothing more, nothing less. There is no need to make any modification whatsoever. In actual fact, it serves as a reminder that it is actually a good idea to define unused ports in all sketches (used for serious purposes) as "INPUT_PULLUP" because floating inputs may cause "sneaker" currents in the input logic, mostly harmless unless you are wishing to minimise power consumption, especially on "sleep". If however you wish the "L" LED not to be lit and you are not using it otherwise in the sketch, by all means set it as an output and LOW.

CSGuy: But the video seems to work. The video claims you're supposed to glue the 13 pin to the ground pin.

This is truly sad but - this is the Internet after all. The video is bogus - insofar as it talks of this behaviour as a "problem" when it simply is not. The worst is yet to come however.

Now what is shown, is applying some liquid PVC glue to the two adjacent pins. PVC glue of course uses water as a solvent and is ever so slightly conductive. As it dries, the water evaporates and it ceases being conductive. Do you see?

Thanks for all the help.

It doesn't really matter to me that the LED was lit up. I just never noticed it before. I was playing around trying to get some servos working and I know that once or twice I hooked wires up in the wrong place.

So I thought maybe I damaged the Arduino and that's why the light was staying on. But now that I know it was designed to be that way, I'm not worried about it being broken.

Someone should give the guy that made the YouTube video a link to this thread. Because he states in the video that it's "unsolved issue on the Arduino forums".

When i searched for it , it was unsolved, and i knew what was the reason for that. It was just kind of funny solution, i dint claim it as solution. And FYI : i also mentioned , you can add a resistor across its pin to prevent the floating condition in the same video, But you guys got glued to the GLUE part ...