# Clamping diodes

I am trying to clamp a 100V sine wave into an approximately +/- 4V signal for measurement purposes (zero crossing detection). I have simulated a circuit with 4 diodes (4 times the forward voltage is approximately 4V.)

I find that I need to add a current limiting resistor in order to clamp the voltage. Why is that so?

I don't understand why the diodes are not clamping without R3 on the schematic below.

• Keep in mind that the ground and the point marked "OUT" are not isolated from the source. In a real circuit, that means that any point in that circuit could kill you. Maybe your 100VP source can't provide much current - but if it can then you need to treat this circuit like a killer.
– JRE
Commented Oct 19, 2023 at 13:28

You are getting strange results in the first test (without the resistor) because in real life, the diodes would have exploded. The simulator can't show you exploding diodes, so it just does something - and that something is misleading.

The diodes act like a (near) short circuit when they are forward biased. Without the resistor, they will try to short circuit the voltage source.

Since you are using (simulated) 1N4148 diodes, you are only allowed about 300mA. Your 1k resistor reduces the current through the diodes to around 100mA.

Try your simulation without the resistor again, but measure the current through the diodes. It'll be something crazy, probably hundreds of amperes.

Here's what it looks like in the CircuitLab simulator:

simulate this circuit – Schematic created using CircuitLab

Note that there's 40A of current through those dinky little diodes - in real life, they'd explode.

Now with the 1k resistor:

simulate this circuit

The current is much more reasonable, and the clamping works like you expect:

You need a current limitig resistor because the sine voltage source in your simulation is an ideal voltage source.

An ideal voltage source will provide as much current as needed to maintain the voltage; no matter how much current that will be. If you would display the traces of the current going through the (simulated) diodes you would see that it gets unrealistically large; in reality the diodes would be destroyed immediately.

TL;DR: The voltage of an ideal voltage source cannot be clamped.

• The breakdown is that a voltage source is an ideal device in this circuit simulator, the diode isn't. An ideal device will win over a non-ideal device every time. Replace that diode with an ideal short, and you get a battle of ideals. My guess is that the simulator would then hand you a formal notice of protest. Commented Oct 20, 2023 at 9:29