LED 13 turns on unexpected

Hello!

I have a new Arduino Uno R3 and I'm a little bit surprised...

Even I let setup() and loop() empty or I call digitalWrite(13, 0) in setup(),
the onboard LED turns on a little bit / sometimes bright if I put my finger on the back of the board or
if I just put the board on my desk.

Can please somebody explain this? Is my board defect or it's a known problem
with capacity?

Thank you for suggestions

A little bit more information - the board have a plastic cover on the back. If I put the bord an my desk, the led turn on bright. They turns off slowly, within approx. 1 minute.

Thanks

Hello again,

I have found the reason. It's the plastic cover on the back. So I will remove it and I suggest to everyone to do also....

Cheers

Did you also have a pinMode(13,OUTPUT); ?

The led is driven by an op-amp and if the pin is floating the opamp can amplify the unreliable voltage enough to light the led.

If you don’t configure it as an output, you can use the pin as a hardware logic probe, jumpering pin 13 to circuit nodes of interest.

Ok, you are right, thank you very much. Configuring the pin as an output solves this issue. But why this do not happen by firmware at initial?
Best regards

"Button" people want the pins set as "INPUT_PULLUP."
"LED" people want the pins set as "OUTPUT."

2 Likes

I'm not a button nor a led people, but I'm wondering that a simple plastic shield can affect the output state of a pin. Not very secure. You can't read about it anywhere, why? This arduino circuit is a little bit too sensitive, my opinion...

Unconfigured, the LED pin a high impedence, open circuit, and like all of the rest of the pins it is in an undefined state controlled by whatever the external world is imposing on the pins. In this way, an unconfigured chip hooked up to an external circuit won't attempt to force the pins into doing something dangerous, such as if in input pin was jumpered to +5V, and a pinMode(pin,OUTPUT) tried to sink it to LOW.

The Op-amp amplifies the pin 13 high-impedance floating input, so if it was configured as an INPUT or INPUT_PULLUP, you'd see what level the input pin is reflected on the LED.

Ok, thank you for your explanation.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.