# Clamping output voltage circuit

#### egmonda

Joined Dec 1, 2018
1
I wonder if there is a circuit that will clamp a constant DC voltage, say at 5VDC, for a variable input voltage from 0 - 12 VDC. My application is to be used for lighting on HO model trains ...

#### wayneh

Joined Sep 9, 2010
17,475
I wonder if there is a circuit that will clamp a constant DC voltage, say at 5VDC, for a variable input voltage from 0 - 12 VDC. My application is to be used for lighting on HO model trains ...
Yes, a 7805 regulator would do the job for input voltages above 8V or so. Otherwise you need a DC-DC buck boost converter. That’s a little more elaborate but quite common these days and would be more efficient than the 7805. How much current (amps) do you need? And nothing will take you down to 0V.

#### ebeowulf17

Joined Aug 12, 2014
3,307
Yes, a 7805 regulator would do the job for input voltages above 8V or so. Otherwise you need a DC-DC buck boost converter. That’s a little more elaborate but quite common these days and would be more efficient than the 7805. How much current (amps) do you need? And nothing will take you down to 0V.
A low dropout (LDO) regulator could also be used so you can get a stable output with inputs starting very close to 5V. The following link is just one example - it has a dropout voltage of 0.015V, so it should work reliably with as little as 5.015V input.

https://www.mouser.com/ProductDetai...9-EJ5BjDcbZhCSxJBRhGnWaBKx1Jec-EaAo5qEALw_wcB

#### ArakelTheDragon

Joined Nov 18, 2016
1,362

#### cmartinez

Joined Jan 17, 2007
8,124
I wonder if there is a circuit that will clamp a constant DC voltage, say at 5VDC, for a variable input voltage from 0 - 12 VDC. My application is to be used for lighting on HO model trains ...
If you find a circuit capable of producing a 5V output from a 0V input please let me know ... it would be nothing short of miraculous. That being said, a DC-DC buck-boost switching regulator module could produce an output of 5V from an input of, say, 2V-35V, but it would be an expensive and cumbersome circuit. On the other hand, it is far easier to bring the input voltage down instead of having to push it up. So a linear regulator such as the 7805 is a simple and cheap solution for an input in the range of 8 to 35V, for instance.

#### MisterBill2

Joined Jan 23, 2018
16,642
An actual CLAMP circuit is very simple. all it needs is a series resistor to limit the current and a non-linear device, such as a zener diode, or just a stack of diodes, to start conducting once the supply voltage rises above the clamp level. The hard part will be finding the diode that starts conduction as the voltage approaches 5 volts. A series string of 7 1N4001 diodes would work in the forward mode, and be good for up to one. amp. AND, for the series resistor, if you have the room, a smaller 12 volt automotive light bulb would serve as a great series resistor because as the current rises the resistance would also rise. There is certainly no need to use a voltage regulator when you only need a clamp circuit.