Novice seeking help with basic electronics


6 posts
by HB » Sun Jul 01, 2012 11:43 am
As part of a project for fitting a RasPi into a NES case, I want to have the NES's power LED functional for showing if the Pi is being powered. Based on the LED output tutorial on the wiki, I believe hooking the LED along with a 270 Ohm resistor up to the 3.3V pin on the GPIO should work and not burn anything out. Is this correct, or is there something else I need to take into account?
Posts: 43
Joined: Sun Jan 01, 2012 9:49 am
by domesday » Sun Jul 01, 2012 12:51 pm
Yes that will work fine.
Posts: 258
Joined: Fri Oct 21, 2011 5:53 pm
Location: UK
by HB » Sun Jul 01, 2012 1:39 pm
Thanks!
Posts: 43
Joined: Sun Jan 01, 2012 9:49 am
by rpdom » Sun Jul 01, 2012 2:04 pm
I was building and testing a circuit like that at the time you were starting this thread :D

I put an LED and resistor between pin 6 and 7 on the gpio header. I soldered the LED and resistor directly onto the connectors of a 26 pin IDC plug, so no cable required and I can unplug it when I want to use the gpio for something else.

A couple of lines of code in /etc/rc.local to set gpio4 to output and turn it on. So the LED shows the Pi has completed startup.

To turn the LED off again after shutdown, I created an executable /etc/init.d/ups-monitor script and put the code in there to turn the LED off.
User avatar
Posts: 3752
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK
by gordon@drogon.net » Sun Jul 01, 2012 2:39 pm
HB wrote:As part of a project for fitting a RasPi into a NES case, I want to have the NES's power LED functional for showing if the Pi is being powered. Based on the LED output tutorial on the wiki, I believe hooking the LED along with a 270 Ohm resistor up to the 3.3V pin on the GPIO should work and not burn anything out. Is this correct, or is there something else I need to take into account?


Should be fine. Have a look at this if you want conformation - you just need to look at the first paragraph or 2 though:

https://projects.drogon.net/raspberry-pi/gpio-examples/tux-crossing/gpio-examples-1-a-single-led/

-Gordon
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1541
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
by HB » Mon Jul 02, 2012 1:39 pm
Thanks for the info guys - it's working great.

Wiring it up and programming it so it lights up when it's finished booting is an interesting idea. Not something that suits my needs here, but I'll be keeping it in mind for possible future projects. Potentially quite useful.
Posts: 43
Joined: Sun Jan 01, 2012 9:49 am