in my project I have to power the Raspberry pi over the GPIO port. I know that the voltage must be regulated to 5V. My input is 24V so I have to convert it to 5V. I'm currently designing a PCB with the power regulation in it. So after research I find 2 chips to do this job: the LM2596 or the 78S05. But I don't know which one use.

My questions are the followings:

  • Which chips is the best and why?
  • If I power the Raspberry pi over the GPIO pin will be I always able to connect USB devices?

Thanks in advance!

2 Answers 2


You can power the Pi through the 5V pins on the expansion header, but should consider isolation (although if you are satisfied with the safety of the supply this is not strictly necessary). See Raspberry Pi Power Limitations.

You cannot use a linear regulator (most of the energy would go as heat), but a switch mode supply would be suitable. The LM2596 is one such, but you mention a "chip". If you purchase a module which uses this (or a similar) chip it should work. Trying to build your own from a chip is not feasible. You would be better to get a module DESIGNED to generate 5V, rather than an adjustable module.

Joan mentions a UBEC and these are suitable, but rather specialised for models. UBEC tend to be more expensive (at least round here) than other modules. 1GBP (1 Giga British Pound?? - not a unit I am familiar with) seems high ;-)

  • I currently designing a PCB with the power supply in it. So I think that the best solution is to use the LM2596 and configure it in order to convert 5V-25V into 5V. Thank for your informations!
    – Majonsi
    Aug 25, 2016 at 7:25
  • @Majonsi unless you are an experienced designer with appropriate test equipment I still suggest a commercial module. Switch mode supplies need careful layout.
    – Milliways
    Aug 25, 2016 at 7:32
  • I agree it will be not easy. According to the [link] (ti.com/lit/ds/symlink/lm2596.pdf#page=22&zoom=auto,-62,437) datasheet of the LM2596 I found that it is possible to use the LM2596 with an unregulated input and a fixed output with not a lot of components. I will try some modification to support 24V and if it works I will add i in the PCB.
    – Majonsi
    Aug 25, 2016 at 7:52
  • If you still intend to go down that road: pay close attention to all hints and design guidelines provided in the datasheet (such as layout of ground planes, type of capacitors and so on). As Milliways already pointed out switching regulators do need carful layout. Without a scope some problems are impossible to detect.
    – Ghanima
    Aug 25, 2016 at 8:17
  • GBP is the standard abbreviation for GB pound.
    – joan
    Aug 25, 2016 at 8:39

Personally I would use neither.

I suggest you use a UBEC.

They cost about 1GBP and will convert a voltage in the range 26-5.5V to 5V.

I use UBECs to power some of my Pis via the expansion header.

Yes, you can power USB devices from the Pi if the Pi is powered via the expansion header.

  • The UBEC looks great but I'm currently designing a PCB and I want to put the converter in it. The Ubec doesnt look practical fo this. Thank for your information!
    – Majonsi
    Aug 25, 2016 at 7:21
  • 2
    Information which may potentially affect answers to a question should be added to the question (otherwise people can get annoyed if they discover they have wasted their time).
    – joan
    Aug 25, 2016 at 8:02
  • the question have been edit. Sorry.
    – Majonsi
    Aug 25, 2016 at 8:45
  • @Majonsi please take the tour and visit the helpcenter to see how things work here.
    – Ghanima
    Aug 25, 2016 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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