zerotheblackmage
Posts: 2
Joined: Fri Mar 08, 2013 7:57 pm

Using Pin1 for power on system launch

Wed Mar 13, 2013 6:55 pm

Hello all,

I'm working on a raspberry-based project, and am new to this whole thing. I'm the type who prefers finding the information myself, as opposed to asking, but I've come across too many 'be careful with power, or you'll burn your pie' so I would like to confirm a couple of things. Apologies if these have been asked and answered before.

I'm interested in using the Pi to power a group of LEDs (among pother things, but those don't need the pins). If I understand correctly, I'll be able to run a wire from the 3.3v Pin1 to the LEDs to power them. What I would like to confirm is:

- from what I've read, the pin outputs at 50mA. Is this done by default, or does this need to be set?
- If the above needs to be set, how would I tell the Pi to power it on at launch?
- Am I correct in my understanding that the wiring needs to go 3.3v pin > LED > resistor (if applicable) > ground pin?
- Would using the 5v pin be a better choice in this case?
- Is there any forseeable problem in connecting the LEDs in a parallel array?

Thank you for your time.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5623
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Using Pin1 for power on system launch

Wed Mar 13, 2013 9:16 pm

IIRC the figure of 50mA is the absolute maximum current any ONE of the GPIO pins can source or sink. It is not recommended that you use 3.3V power pin (P1) to supply more than a few mA to a connected circuit since, again IIRC, 50mA is also the total current. Depending upon their colour and the forward current LEDs may have a forward voltage drop of between 2 to 3V. Allowing 2mA per GPIO pin/LED combination leads to resistance of say 390 or 470 ohms: GPIO pin "high", sourcing, --> resistor ---> LED anode, LED cathode --> Gnd(0V). If "bright" LEDs are required, ie. higher currents, the GIPO outputs will need buffering transistors, a "high" switching a transistor on, sinking current through the LED/resistor combination which is now connected to the Pi's 5V power pin - this can provide somewhat more current than the 3.3V pin, or an external supply. If you wish to interface with any of the 5V logic families the GPIO pins will need "level-shifting" buffer circuitry. There's more info. in the wiki, and I've examples of using the "Slice of PI/O" board which uses the I2C pins/approach within my webpages - see link on the right.
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
joan
Posts: 14936
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Using Pin1 for power on system launch

Wed Mar 13, 2013 9:48 pm

You are better off using the 5V pin. It can supply more current.

You do need a resistor in line with each LED between 5V and ground. It doesn't matter if it's

5V - LED - resistor - ground or
5V - resistor - LED - ground

If you don't use a resistor the LED will flash briefly and then die.

The 3.3V and 5V pins are always on while the Pi is powered.

You need a resistor for each LED.

zerotheblackmage
Posts: 2
Joined: Fri Mar 08, 2013 7:57 pm

Re: Using Pin1 for power on system launch

Thu Mar 14, 2013 1:52 am

Cool. This info will help a lot. Many thanks!

Return to “Beginners”