## gumstix-users

 [Gumstix-users] Can I drive a low current led with a gpio? From: jetienne - 2010-07-15 01:51:42 ```This may be an absolutely stupid question but ... I was wondering if it is possible to drive an led with a gpio. The led in question has a forward voltage of 1.6v and a min current requirement of 1mA. I can see the led turn on slightly when I connect it to the gpio, but it is way too dim. I measured the current the gpio was sourcing and it was .1mA is this right or is there something wrong with the gpio? By the way I was trying this with low value resistors such as 1ohm and 10ohms. I feel like I should have connected these as a pull up and sink the current with the gpio although I am afraid of the unbuffered input. Any advice or comments would be greatly appreciated. Regards, Jetienne -- View this message in context: http://old.nabble.com/Can-I-drive-a-low-current-led-with-a-gpio--tp29168430p29168430.html Sent from the Gumstix mailing list archive at Nabble.com. ```
 Re: [Gumstix-users] Can I drive a low current led with a gpio? From: Joshua Brown - 2010-07-15 04:46:43 ```Yes. Reference the cpu datasheet here, http://www.ti.com/lit/gpn/omap3530. Page 120: The logic on the Overo Gumstix is 1.8 volts. An individual pin can clamp a maximum of 20 mA either sourced or sunk but this is a high Maximum amps! 1.6 volts forward means the LED will leave 0.2 volts for the load resistor to handle. Using Ohm's Law R=V/I you could say 1 milliamp for your LED means a 200 ohm resistor. If you put a 1 ohm resistor in series with your LED you are getting 200 mA through your output pin, which isn't recommended. The Overo might survive an accident like that, but maybe not. To debug your LED brightness you can use pin 26 or 16 on the 40 pin expansion header (Summit, Tobi, Chestnut etc...) which is a 1.8 volt power supply. Connect your LED in series with some different values o resistors to find the perfect brightness. Check your amp meter readings using this set-up to make sure you aren't exceeding 20 mA. Sinking or sourcing are both acceptable. You just pick which one that works with your software. In software I like to have 1 be "ON" and the 0 be "OFF". I try it both ways since I can't keep in straight in the real world. jetienne wrote: > > I was wondering if it is possible to drive an led with a gpio. The led in > question has a forward voltage of 1.6v and a min current requirement of > 1mA. > -- View this message in context: http://old.nabble.com/Can-I-drive-a-low-current-led-with-a-gpio--tp29168430p29169219.html Sent from the Gumstix mailing list archive at Nabble.com. ```
 Re: [Gumstix-users] Can I drive a low current led with a gpio? From: jetienne - 2010-07-15 17:51:10 ```Thanks for your reply! I actually figured out that the problem (other than what you already stated) was with the gpios on the j5 connector, and had to change the uboot configuration options. Now it is working like a champ! Thanks for your help again. Regards, Joshua Etienne Joshua Brown wrote: > > Yes. > > Reference the cpu datasheet here, http://www.ti.com/lit/gpn/omap3530. > Page 120: The logic on the Overo Gumstix is 1.8 volts. An individual pin > can clamp a maximum of 20 mA either sourced or sunk but this is a high > Maximum amps! 1.6 volts forward means the LED will leave 0.2 volts for > the load resistor to handle. Using Ohm's Law R=V/I you could say 1 > milliamp for your LED means a 200 ohm resistor. If you put a 1 ohm > resistor in series with your LED you are getting 200 mA through your > output pin, which isn't recommended. The Overo might survive an accident > like that, but maybe not. > > To debug your LED brightness you can use pin 26 or 16 on the 40 pin > expansion header (Summit, Tobi, Chestnut etc...) which is a 1.8 volt power > supply. Connect your LED in series with some different values o resistors > to find the perfect brightness. Check your amp meter readings using this > set-up to make sure you aren't exceeding 20 mA. > > Sinking or sourcing are both acceptable. You just pick which one that > works with your software. In software I like to have 1 be "ON" and the 0 > be "OFF". I try it both ways since I can't keep in straight in the real > world. > > > jetienne wrote: >> >> I was wondering if it is possible to drive an led with a gpio. The led in >> question has a forward voltage of 1.6v and a min current requirement of >> 1mA. >> > > -- View this message in context: http://old.nabble.com/Can-I-drive-a-low-current-led-with-a-gpio--tp29168430p29175913.html Sent from the Gumstix mailing list archive at Nabble.com. ```