Author Options:

How to build a 12v to 5v conversor with a zener? Answered

I'm developing a shield for my Arduino Uno and I want to add in it an external power supply. The power source I want to plug in it has four connectors: 5v, gnd, gnd and 12v. The 5v and the gnd pin goes to their respective pins in Arduino, while the 12v pin goes to a 7805 on the shield or to Vin, and the selection is made with a jumper. The only problem is that the connector can be plugged inverted, swapping 5v and 12, which would damage the AT mega. I know zener diodes are useful for limiting power, but I don't know how to use it. I need a simple circuit in which I can plug my 5v supply and it gets 5v to the chip, and in case I plug the connector inverted, to limit its power to 5v to prevent damage or to shut down the power. I can’t use the 7805 on both pins, because it would deliver something like 4v or less if powered with 5v. And something like a led to indicate that the connector is at a wrong position would be nice too. Thank you.


please how can I use a 12v zener diode to stabilize 12v

A Zener diode will absorb current to MAINTAIN the Zener voltage across the zener anode with respect to the cathode.. The design trick is to use a resistor to limit the maximum allowable zener current at no load and still have enough regulation range to feed the load.

Read this 2 year old thread to understand more.

From source voltage connect a current limiting resistor to a 1N4729A or similar zener and a transistor collector then to the base of a transistor connect the Anode of the zener and shunt off the overvoltage through the transistor out the emitter to ground.

Without the exact specks I can't tell you the current limiting resistor value or the transistor


Thanks, I'm testing this circuit, but I think it wont be the best because the zener will get the 5v in the base of the transistor, but it may trigger the circuit in undesirable cases. Of course, I know that it can be an error made by me, but if I can make it work than I'll came back here to tell. Thank you.

That is a 3.6 volt zener depending on the voltage drop of the transistor base to emitter it should give you about 5 to 5.1 volts.

You can get zener's down to 2 volts.

You may need to balance the circuit with the load to do that the limiting resistor may need to be adjusted.



4 years ago

Sorry a zener cannot do what you want.

Even an LDO low drop out regulator does not do 5V to 5V.

BTW a zener is a diode in the forward direction and a constant voltage in reverse.

This component works like a voltage level overflow, the zener shunts current to accomplish the zener set voltage.

A designer must place a resistor in series with the zener to limit the maximum current the zener wattage allows it to handle without self destruction

( very much like an LED ).

Actually almost any circuit will have a voltage drop, but what I meant is that I need it to be as low as possible. for example, if I connect 5v in the input of a 5v regulator, the output would be lower than 3,5v, which is not enough for the Arduino Uno.

what I want to do is some kind of an overflow circuit, and I'm testing the circuit you send. By now, it works nicely, and I will be testing for a while before deciding. Thanks for the help.

Vin is your 12 volts.

Vout is your 5 volts.

To size your 5v zener power and R1, I must know your min/max load current !


Cut off one of the GND pins of the connector. Glue the pin into the female receptor into the slot it did go before. No the connector is coded and can't be any more plugged in in reverse.

Thanks for the idea, but mapping the conector is not suitable for this case, because I'm making like a universal plug, there are some conectors in parallel, and I need an electric protection layer for precaution, but thank you.

This is probably going to seem like its too easy, but, would it be possible to replace the 4-pin power connector that can be plugged in upside-down, with one that is shaped so it can only be plugged in one way?

As an example, there is a power connector commonly found dangling from computer power supplies. It has four wires, {5V, GND, GND, 12}, and it is made to be plugged in just one way.

If you've seen the power supply for a desktop computer, you've probably seen this connector. If you haven't. I think its official name is Molex(r) 8981, and this Wikipedia article


has a picture of it.

I guess what I'm saying here is that shape of connector is convenient for things to which you might want to supply +5V and +12V with a common ground. Also that connector itself is pretty easy to find, if your junk collection includes an old ATX power supply.

The old power supply will have several female connectors of that shape, Molex(r) 8981. The corresponding male connector can be found soldered to the bottom of an old IDE hard drive, or in the little short adapter cable that changes Molex(r) 8981, which fits old IDE hard drives, to whatever that new shape


is for the power connectors on desktop SATA hard drives.

Thanks jack, but its not the best for my case because I'm making it like a "universal power plug". the 12v is the main issue, but the conector I'm using also allow for some kinds of bateries, all with the same risk. anyway, thank you.


4 years ago

A better way of dissipating current Joe.

But, I don't believe the robot senitram knows he can carry on a conversation with us !

A conversor is hard to explain ;-)