Go Down

Topic: Arduino pin high only 2,68v ??? (Read 771 times) previous topic - next topic

fca

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

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

no resistor
led+ direct to pin11 ground direct to ground..

retrolefty

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 am Last 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

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 am Last 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

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

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