firstly please forgive any confused terminology, I'm not an electrical engineer by trade!

I have a Raspberry Pi which is operating a series of relays via its GPIO pins. On the other side of the relays are a number of devices; a mixture of mains supply and 12v.

I would like to have a single 12v power supply for all the 12v devices that also powers the RPi, so with a little research it seems I need a switching regulator to convert the 12v into 5v.

My question then is this: given that the load drawn from my 12v supply with be jumping around as the RPi operates the relays is this likely to cause spikes/dips in the 5v supply coming from the regulator or should it be able to cope with this?

For the sake of giving more info:

Is there anything else I should take into consideration before putting this together?

Thanks in advance


1 Answer 1


I would not worry about the spikes on the supplies. Assuming your 12V supply is any good (properly regulated) the switching of some relais will not cause much spikes. Also, that LM2596 board will suppress most of these spikes.

The 5V output of the LM2596 will have some supply ripple (since it's a switching regulator, which is a good choice in this situation !) but nothing the Raspberry Pi cannot handle.

I think it will just work without any problems !

One note: don't forget to adjust the LM2596 board to output 5V before connecting the RP.

  • \$\begingroup\$ Brilliant, just what I wanted to hear! Thanks for the quick reply. I assume the ripple from the regulator which you mention relates to its switching frequency (in this case 150KHz)? \$\endgroup\$
    – milks
    Jun 8, 2015 at 13:46
  • \$\begingroup\$ Yes, the switching frequency of the (LM2596 based) regulator board you proposed is around 150 kHz. But don't worry about it. This ripple is small enough for a RP board, no worries. All switching regulators have ripple on their output. But digital circuits (like RP) don't care about this, they also create ripple on their own supplies ! BTW, I also use these LM2596 boards, they're cheap and very convenient ! \$\endgroup\$ Jun 8, 2015 at 13:55

Your Answer

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

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