Pages: [1] 2   Go Down
Author Topic: Pin 13 led circuit conflicts?  (Read 1295 times)
0 Members and 1 Guest are viewing this topic.
LOS GATOS, CA, USA
Offline Offline
Full Member
***
Karma: 3
Posts: 180
The TinkerTech Blog and the MusheenShop
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can anyone give me examples or explain how the LED on pin 13 can conflict or mess up a project using that pin?

What about a status led on a PWM pin what would or could be the loss or conflict?

I know I have seen problems talked about before but looking for pin 13 in search here is like looking up the word the on the internet.
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16458
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can anyone give me examples or explain how the LED on pin 13 can conflict or mess up a project using that pin?

The main problem when using pin 13 for external circuit needs is if it is used as a input pin then the device or component driving the signal would have to be able to source enough current when trying to drive the signal HIGH to power the on-board pin 13 led/resistor. I think most designs use a 1k ohm resistor so there would be a 3-4 ma current source requirement for the signal.

What about a status led on a PWM pin what would or could be the loss or conflict?

As long as the pin is used in output mode the fact that the pin has a status resistor/led should not be a problem. As long as total pin current load is kept at around 20-30ma max there should be no problem. If the pin is used as a input pin then same concern as the pin 13 situation above.

I know I have seen problems talked about before but looking for pin 13 in search here is like looking up the word the on the internet.

?

Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 434
Posts: 23593
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Pin 13 has a 1K resister to an LED to ground in parallel with the shield connector; i.e. the signal does not go thru the LED/resister and then go out the connector.
If the pin is an output, the LED uses up about 3mA of the outputs drive capability.
If the pin is an input, then there is a 3mA load on whatever is driving the pin.
This should not be a problem for standard logic interfacing.

Same for PWM - an LED/resister in parallel with the shield connecter should not cause a problem.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

LOS GATOS, CA, USA
Offline Offline
Full Member
***
Karma: 3
Posts: 180
The TinkerTech Blog and the MusheenShop
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I know I have seen problems talked about before but looking for pin 13 in search here is like looking up the word the on the internet.

?


Thanks Again Lefty, I should probably just put you and few others like westfw, grumpy mike, on some kind of retainer so I can repay you for all the help you guys supply.

The search term "pin 13" in the arduino forum search returns so much signal to noise because pin 13 is more commonly talked about in posts than any other pin on the arduino, that it is practically useless to try to search for that term, GRIN.
Logged

0
Offline Offline
Shannon Member
****
Karma: 159
Posts: 10409
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
This should not be a problem for standard logic interfacing.

No, it _is_ a problem if interfacing to CD4000 series CMOS which can only drive about 0.5mA.  74HC series can just manage it (4mA).
Logged

[ I won't respond to messages, use the forum please ]

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16458
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Thanks Again Lefty, I should probably just put you and few others like westfw, grumpy mike, on some kind of retainer so I can repay you for all the help you guys supply.

Your welcome, and not a problem, just as I rely on Coding Badly, PaulS, and many others for software advice.

Lefty


Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 434
Posts: 23593
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

0.5mA, I am not used to dealing with such wimpy parts.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Dallas, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 861
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some of the more modern boards isolate the LED from the pin through the use of a MOSFET driver. So far, I haven't run into any problems with pin 13 on these boards.

Quote
The main problem when using pin 13 for external circuit needs is if it is used as a input pin then the device or component driving the signal would have to be able to source enough current when trying to drive the signal HIGH to power the on-board pin 13 led/resistor. I think most designs use a 1k ohm resistor so there would be a 3-4 ma current source requirement for the signal.

If you want to get a little more technical, noting that the forward voltage drop of a red LED is typically 1.7V, the current consumed by it will be equal to the minimum logic HIGH input voltage for the processor, e.g. 3V for 5V Vcc, minus 1.7V, divided by the series resistor value, typically 1K.

Vih(min) - Vf(typ) / 1000 = 1.3mA

So, if your driver can supply 3V @ 1.3mA you should be okay. This is at DC, of course. If you are driving the pin at any frequency above zero, things like the non-linear conductance and the impedance of the LED start to come into play. Easier just to avoid using pin 13, usually. smiley-grin
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16458
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Easier just to avoid using pin 13, usually.



That's our usual advice to newcomers, as well as avoiding using pins 0 and 1. The pin 13 thingee has a long and interesting history. Originally the pin 13 led design wired the shield connector pin 13 after a series resistor rather then directly to the avr chip pin, leading to tutorials showing connecting a led directly to shield pin 13 and ground. Of course that caused pin & LED damage to people using such tutorials with newer boards and confusion has continued ever sense.  smiley-grin

And it doesn't help the situation that pin 13 is the SCK signal used by the ICSP six pin connector.

http://arduino.cc/en/uploads/Main/arduino_NG_schematic.png

Lefty
« Last Edit: August 12, 2011, 01:41:50 pm by retrolefty » Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 861
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have one of those early boards. smiley
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 434
Posts: 23593
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

And I think the tutorials are still wrong for later boards ...
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Dallas, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 861
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
And I think the tutorials are still wrong for later boards ...

Well, you know, arduino is Italian for "cast in stone"?  smiley-lol
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16458
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But still, Italy does make some kick ass luxury sports cars, Varoom-Varoom.  smiley-wink
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 861
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But still, Italy does make some kick ass luxury sports cars, Varoom-Varoom.  smiley-wink

Agreed!
Logged

LOS GATOS, CA, USA
Offline Offline
Full Member
***
Karma: 3
Posts: 180
The TinkerTech Blog and the MusheenShop
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well as I told lefty, another discussion in a different section about possible shield ideas lead me to consider adding LED status circuits to each of the digital lines on my Cidekick project http://arduino.cc/forum/index.php/topic,67044.msg493322.html#msg493322 but I was trying to figure out how an isolation circuit would work for each pin or if it was even needed.

The idea was an LED shield that would show the status of each pin high or low and I was thinking RGB for the pwm pins rather than just fade.

The whole idea would only work if it it could be electronically transparent, meaning not affecting other circuits or uses to display the status and if it was low component count.

I would also only use it on outs and make it disconnect on pins being used as input.

Any thoughts, circuits, caveats?
Logged

Pages: [1] 2   Go Up
Jump to: