Go Down

### Topic: Arduino pin high only 2,68v ??? (Read 1 time)previous topic - next topic

#### fca

##### Dec 23, 2010, 12:37 am
Hi there i have led connected to pin 11 i tested this small blink example :

void setup() {

pinMode(11, OUTPUT);
}

void loop() {
digitalWrite(11, HIGH);   // set the LED on
delay(10000);              // wait for a second
digitalWrite(11, LOW);    // set the LED off
delay(1000);              // wait for a second
}

when the pin is high i only get 2,68v measured with multimeter ...
Is this normal ? should be 5v ? right ??

my arduino is connected to 12v power supply (no usb)...

#### James C4S

#1
##### Dec 23, 2010, 12:40 am
What value resistor are you using with the LED?
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

#### fca

#2
##### Dec 23, 2010, 12:42 am
no resistor
led+ direct to pin11 ground direct to ground..

#### retrolefty

#3
##### Dec 23, 2010, 12:47 am
Quote
no resistor
led+ direct to pin11 ground direct to ground..

That is your problem. There [glow]must[/glow] be a current limiting resistor wired in series with the LED, 1k ohm will work or calculate the needed resistance to run the led at it's recommend current level.

The way you are doing it will or has damaged the output pin and shorten the life of the led.

#### fca

#4
##### Dec 23, 2010, 12:58 amLast Edit: Dec 23, 2010, 01:00 am by fca Reason: 1
maybe you are right and the pin 11 is damaged   i tested with pin5 and it gives 4.94v when high...
Why would the led direct to pin be a problem ? (dummy question)

i have here som 390k resistor is this enough ?

thanks

#### James C4S

#5
##### Dec 23, 2010, 01:00 am
LEDs (diodes) are nearly short-circuits when enough voltage is dropped across them.  A current limiting resistor sets that voltage and limits the amount of current that runs through them.

http://www.cmiyc.com/blog/2010/09/19/led-basics/

Keep using LEDs without limiting resistors and you'll keep blowing I/O pins.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

#### retrolefty

#6
##### Dec 23, 2010, 01:16 amLast Edit: Dec 23, 2010, 01:19 am by retrolefty Reason: 1
Quote
i have here som 390k resistor is this enough ?

Much too high a value, it would only allow like 10 microamps to flow, not enough to cause the led to light. You must master ohm's law calculations or use a automated program to calculate it for you. You must know what current the LED is rated for continous operation, most want around 10-20ma of current flow.

By the way you can buy replacement processor chips for around \$6 as if you continue to burn out output pins it will become faily useless.

http://www.sparkfun.com/products/9217

LED resistor calculator:
http://www.hebeiltd.com.cn/?p=zz.led.resistor.calculator

Lefty

#### fca

#7
##### Dec 23, 2010, 01:39 am
thanks, so far only one pin seems broken 11, where i have led connected for some time now... so this board will be like this ..
In this one no need for resistor any more will stay like it is..

Question: Does this affect the behaviour of the processor, or this is isolate fault of the pin will only affect this pin voltage ?

thanks

#### James C4S

#8
##### Dec 23, 2010, 02:26 am
Quote
Does this affect the behaviour of the processor, or this is isolate fault of the pin will only affect this pin voltage ?

There is no way to tell.  Most likely only that pin will be affected.  Take retrofly's suggestion and buy a new ATmega328 chip.  Use this one until your new one arrives.

(I also suggest ordering more than one, because you never know...)
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up

Please enter a valid email to subscribe

To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy