Loading...
Pages: [1]   Go Down
Author Topic: Pin 13 LED always on  (Read 877 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everybody,

I just received my UNO yesterday. I tried the blink example and it works without any problems. I then tried the fade example - the LED on pin 9 fades as it should, but the on-board LED (pin 13) is always on. It is the same with other examples as well (AnalogReadSerial, even BareMinimum).

Is this normal behavior? Shouldn't the on-board LED be turned off?

I am able to switch it off by adding the DigitalWrite(13, LOW) in the example sketch.
« Last Edit: March 15, 2012, 06:36:33 pm by blablatros » Logged

Global Moderator
Melbourne, Australia
Offline Offline
Shannon Member
*****
Karma: 218
Posts: 13897
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Mine seems to do that too. I can't offhand see where in the initialization code it is turned off. It is turned on during the bootloading process.

Looks like the pin isn't set to output, so they have left the weak pull-up on it seems. I am measuring 0.7V on pin 13, and even then, plugging in the meter draws enough current to extinguish the LED.
Logged


0
Offline Offline
Tesla Member
***
Karma: 50
Posts: 6549
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If the pin 13 LED is somewhat dim when lit then it is probably in a timing circuit. When using an ethernet shield, the LED is dim as it is being used as the timing pin for the shield.
Logged

Why I like my 2005 rio yellow Honda S2000 with the top down, and more!
GOOGLE ADVANCED FORUM SEARCH BELOW!  
Go to:  http://www.google.com/advanced_search?hl=en
put in key search words,
use site or domain:  http://arduino.cc/forum
or in a google search box put key words site:http://arduino.cc/forum

WV
Offline Offline
Full Member
***
Karma: 0
Posts: 160
Arduino, Helps With the ADD
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could always throw in the code for setup of
Code:
pinMode(13, OUTPUT);
and then use
Code:
digitalWrite(13,LOW);
from loop if you didn't want to see it on smiley
But im not sure if thats what you were looking for smiley
Logged

Global Moderator
Melbourne, Australia
Offline Offline
Shannon Member
*****
Karma: 218
Posts: 13897
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just this is all that's required:

Code:
digitalWrite(13,LOW);

It's already input. What you are seeing is the internal pull-ups putting a weak current on the pin.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for replies.

@Nick - I too am measuring around 0.7V on pin 13.

@Woody - That is exactly what I did, and it does work. I just assumed that the LED would be turned off unless explicitly set to HIGH.

@Nick - putting
Code:
digitalWrite(13, LOW)
in the loop without
Code:
pinMode(13, OUTPUT)
in the setup does not change anything - the LED stays lit.

However, putting just
Code:
pinMode(13, OUTPUT)
in the setup, and nothing else in the loop works - LED is turned off.

So, it seems that it is normal for pin 13 LED to be dimly lit. I just did not perceive it as dim - it is almost as bright as ON, TX or RX LEDs. I do not see any difference when lighting it with 5V (pin 13 set as OUTPUT and set to HIGH) or 0.7V (pin 13 in its default INPUT state).

Logged

Global Moderator
Melbourne, Australia
Offline Offline
Shannon Member
*****
Karma: 218
Posts: 13897
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am able to switch it off by adding the DigitalWrite(13, LOW) in the example sketch.

@Nick - putting
Code:
digitalWrite(13, LOW)
in the loop without
Code:
pinMode(13, OUTPUT)
in the setup does not change anything - the LED stays lit.

Your earlier post suggested that doing the digitalWrite(13, LOW) was all that was needed.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, I realize now that I haven't specified in my first post that I also put
Code:
pinMode(13, OUTPUT)
in the setup.

---

I measured the voltage at pin 13 again, and now I am getting around 1.4V instead of previously measured 0.7V. Plugging the meter does not extinguish the LED as it did earlier, it just make it dimmer. Now I am puzzled...
Logged

Pages: [1]   Go Up
Print
 
Jump to: