LEDs on GPIO


7 posts
by JP_Godfrey » Thu Jun 14, 2012 9:28 pm
Not sure if this is the right place for this but I couldn't see a general hardware or GPIO section.

I want to have a go at running LEDs from the GPIO port using something like this (link) however I want to be sure not to cook my pi with too much current. I read somewhere else that the GPIO can sink more current then it can source and that it can be programmed at different current values. If I just go on the defaults then what LEDs and resistors do I need to run on the Pi safely?
Posts: 7
Joined: Mon Jun 11, 2012 10:01 pm
by RaspberryPiBeginners » Thu Jun 14, 2012 9:46 pm
Hey dude check out my how to video should be exactly what your after.
https://www.youtube.com/watch?v=q_NvDTZIaS4
Click here for my unofficial YouTube Channel > http://goo.gl/oFYBD
User avatar
Posts: 217
Joined: Fri May 11, 2012 6:54 am
Location: Soham, Cambridgeshire
by Grumpy Mike » Thu Jun 14, 2012 10:02 pm
I built a buffer board for this:-
http://www.thebox.myzen.co.uk/Raspberry/Buffer_Board.html
You don't have to worry too much about the current and your Pi is isolated from the load.

The problem with driving them directly is that you are only on a 3V3 system so you are best keeping to red LEDs only. That will allow you to have sufficient voltage drop across the resistor. With 1.7V drop across the diode and an LED current of 8mA then you could use a 200R resistor. So you can see it but unless it is a high efficiency LED it is not going to be too bright.
User avatar
Posts: 784
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
by RaspberryPiBeginners » Thu Jun 14, 2012 10:06 pm
Mike your electronic skills are awesome man. What do you do for a job or have you been tinkering with electronics for years?
Click here for my unofficial YouTube Channel > http://goo.gl/oFYBD
User avatar
Posts: 217
Joined: Fri May 11, 2012 6:54 am
Location: Soham, Cambridgeshire
by Grumpy Mike » Thu Jun 14, 2012 10:10 pm
RaspberryPiBeginners wrote:Mike your electronic skills are awesome man. What do you do for a job or have you been tinkering with electronics for years?

Thanks.

Retired now, done electronics since I was 14, so not exactly a beginner. :D
User avatar
Posts: 784
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
by JP_Godfrey » Thu Jun 14, 2012 10:18 pm
Thanks to both of you. I actually came across your page Mike earlier via Google so I will take a closer look at both the page and the video tomorrow.
I have some breadboard on it's way so I should be good to get some LEDs at the weekend.
Posts: 7
Joined: Mon Jun 11, 2012 10:01 pm
by WPsites » Fri Jun 15, 2012 8:21 am
When I first got my Pi I couldn't wait to take my programming from the web and into the real world, activating LEDs, servos, sensors etc. and although the Raspberry Pi is sold as a $25 piece of kit that can easily be replaced if you break it. The fact is right now they are like gold dust and you're probably better of breaking your arm, much easier to replace!

So I purchased an Arduino nano http://arduino.cc/en/Main/ArduinoBoardNano

It has 14 IO pins and plugs directly into a breadboard making it easy to hook up to other components.

You can hook up the nano to your Pi with a simple USB cable. You can also plug the nano into your PC directly. The output pins are well documented and the Arduino site has lots of documentation, coding examples and IDE software that will run on most OS's.

Once I get more comfortable with electronics I will interface directly with the GPIO pins on the Pi and hopefully by then the Pi will be easier to source/replace.

I'm expecting a delivery today of:
2 medium servos and a pan+tilt bracket so that I can mount my camera (or a laser which is also arriving or IR thermometer to create a basic thermal camera).
1 small servo so that I can try make a remote shutter release for my camera
Some LED's and a 74HC595 Serial to Parallel Shift register so that I can create an LED matrix.
A light sensitive diode to turn things on and off when it gets dark

Can't believe it's taken me this long to get into hardware.
Posts: 17
Joined: Sun Jun 10, 2012 11:05 am
Location: Southport, Merseyside, UK