0

I'm putting a Raspberry pi zero on a model train. The train tracks supply 12V DC which I step down to 5v with a Pi Jack. However, because the power is being supplied via the tracks, I can't be certain of the polarity of the DC power.

How can I invert DC polarity if it's reversed from what I expect?

Gregology
  • 103
  • 3

1 Answers1

4

If the train power supply is a relatively-constant 12 Vdc supply, simply feed the two 12V terminals into a bridge rectifier. The output of the bridge will be the same polarity no matter what the input polarity is.

If you are concerned about the voltage drop in the bridge, create your own bridge rectifier using 4- Schottky diodes. Choose appropriate diodes for both voltage and current.

Dwayne Reid
  • 23,390
  • 2
  • 35
  • 67