Go Down

Topic: What voltage is given out on the digital out pins? (Read 602 times) previous topic - next topic

Newb question :

I know the digital output pins can be high or low, but what voltage is the high?    Could a digital out go to a led and then just to ground? Or does it need to go to the 5v pin?

Thanks
Chris

MAS3

It's all in the specifications.
You can not put the output directly to a LED.
The reason is not the Voltage, but the Amperage.
The Voltage is 5 volts.
A LED is seldomly meant for 5 Volts, but more important is the Amperage.
You should limit this Amperage using a resistor, 270 Ohms is an often seen value for that.
This way you can drive a LED by your output pin.
But you cannot drive every output with a LED because there is a maximum Amperage for the whole processor.

You'll find these things sooner if you just look them up instead of asking here and wait for an answer, but dont let that keep you from asking questions.
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Grumpy_Mike

Quote
Could a digital out go to a led and then just to ground?

No you always need a resistor.
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

The output voltage of an arduino pin drops the more current you pull from it. It can drop to as low as 4.2V when you pull 20mA down the output.

dhenry

Quote
but what voltage is the high?   


That voltage varies based on the load / power supply. Typically, it is close to 5v (the power supply), but with a heavier load, it goes down from there.

Quote
Could a digital out go to a led and then just to ground?


Yes, it can. It can also go from the 5v to the led and then to the mcu pin.

If it is small led,  you can put a resistor there to help define the current. For large leds,  you typically u se dedicated drivers.

Quote
Or does it need to go to the 5v pin?


That works as well.


Grumpy_Mike

Please ignore dhenery. He has a stupid notion that LEDs do not need resistors. He must take a delight in ruining people's arduinos or something. Call it an illness of some sort I don't know. But he gives out advice like this all the time and thus contribuites to the wrong advice you find on the Internet.

liudr

Not having current-limiting resistors for LEDs is simply wrong. To quantitatively answer your answer, see this diagram:

Osgeld


Please ignore dhenery. He has a stupid notion that LEDs do not need resistors.


well they dont ... if you make a more complicated constant current source

I wish I made a video of it, but the marketing guy at my work insisted that they dont need a current limiting device as well, so I just let him go ahead and hook that panel of LED's right up to that 10 amp supply with the current limit all the way up ... it was like flash paper
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

Go Up