I'm working on an audio project where the Raspberry Pi will be powered off the GPIO. I was trying this using an LM7805 voltage regulator to get 5v from the 9v power supply that is standard in a lot of audio gear, but I noticed that there is a lot more noise when I use this as opposed to the 5v 2a microUSB supply (for which noise is minimal). It seems like this is due to current draw, since I'm powering both the Pi and my circuit board with op-amps an Arduino for midi off the same supply. Am I correct in this assumption?

What kind of current should I give the 5v pin on the GPIO? Is there anything I should avoid that would damage it? I know 5v 2a is recommended for the micro-usb, but I just wanted to see if it was the same before I went plugging stuff in.

  • Why would you think powering via pins is going to require less current than via microUSB? 2A is recommended but it isn't actually necessary in all cases. If there's nothing at all drawing power from the pi itself (no connected USB devices, no display, etc.) you should be able to get by on 700-1000 mA (or perhaps even less). But if you think your problem is due to current draw you should really do yourself a favor and find a way to measure it. Pretty sure ground loops can cause significant noise in audio circuits, BTW. – goldilocks Aug 25 '16 at 18:45
  • 1
    I'm reasonably sure that there are more filtering capacitors in the signal path via the micro USB socket, which should help to cut down the noise. It may be worth snipping a USB cable, wiring it to your regulator and plugging that into the micro USB socket to check whether the 9V supply still causes noise. – goobering Aug 25 '16 at 19:08
  • Or add a filtering capacitor to the LM7805 per the application note. sparkfun.com/datasheets/Components/LM7805.pdf – OyaMist May 30 '18 at 22:22

You can follow the same current requirements as mentioned in power requirements.


2A is max load current for pi2b+, and 2.5A is max load current for pi3b+ - if you want to feed it via the VIN pin from a different voltage, I recommend keeping the step-down/step-up/voltage regulator at least 20cm away from your board. You can feed it from a car battery if you wish, it will only draw the current (amperes) it needs -> ~2A. Be careful and heatsink your step-up/down/voltage regulator module. The aging TIP120 darlington NPN transistor is perfect for this, I use them often to deliver an exact voltage to $_whatever. Attach a small copper heatsink to its frame, and drive the voltage to 5V +/- 20% with a cheap arduino clone and analogWrite() - they aren't noisy like many of those LM* chips. TIP120s can pass 5-6A if moderately heatsinked, and more if severely heatsinked... a good choice for 2A is a 40x40x10mm copper heatsink. The TIP120 + arduino clone + heatsink will be less than 5USD and look AWESOME. (Remember that the arduino likes 7-12V on VIN, so I usually step down from a 12V supply). from arduino to TIP120 base (across a 1kOhm resistor, try analogWrite( tipPin, 107 ). Keep you analogWrite() has 8-bit resolution, so I usually do this: 12÷256 = 0.046875V 0.046875×107 = 5.015625V Nice and clean. Keep load (pi) between the 12V source and the collector pin, and wire emitter to ground. Then measure the output voltage, and increase the value for analogWrite() to offset the voltage drop of ~0.6V. A value of 120 is usually good, but measure it anyway.

I would check if it's okay to pass that high a current to a GPIO pin though. Don't want to fry your VIN pin.

  • I would upvote myself for this awesome solution to a perfectly simple problem that in its simplest form requires only a 5V/2A charger with red and black wires stripped, but I can't upvote myself :/ Edit: HOWEVER, now OP can power his pi from a car battery (60Ah) - that's true rock & roll. – user400344 Aug 26 '16 at 10:22
  • 1
    Welcome to the RPi stack exchange. Please format your question. You have currently delivered a wall of text that is very difficult to read. The help center has a good rundown of how to format text here. – Jacobm001 Aug 26 '16 at 15:11
  • I'll do it tonight, sorry about that. – user400344 Aug 26 '16 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.