TL/DR: when using clamping circuits in conjunction with reverse polarity protection you need to check whether the clamping circuit’s working is not negated by the presence of a reverse polarity protection diode.
Let’s assume we are building a new module which has one input.
See diagram. The signal is sent to 2 opamps. For the following discussion it is not of real importance what the circuit does. Imagine we would like to protect the input of this module for high positive voltage spikes and we do not want any negative voltages to enter the module. What is often seen in circuits is that 2 clamping diodes are used. One is connected to the positive rail of the module and the other to 0V or GND. Note: in the diagram you see an input source of 18VAC sent into a module with opamps powered by +12V and -12V.
That should work. And it does. Unless … there is a reverse polarity protection diode used in the power line (guess how I found out). Then there is no path for the current (the reverse polarity diode blocks any current going to the power supply) to go and the input voltage of the module will go up to the max value of the source. So the input might be damaged! In the simulation you see a switch (left top). It was set to the top position connecting the clamping diode to the reverse polarity diode in the first part of the scope trace. As you can see the input voltage goes up to about 18 V and is not clamped at all. The second part of the trace shows what happens if the switch is connected to the 12V supply directly thus omitting the reverse polarity diode. The voltage is then clamped to about 12V.
Clamping to the 12V supply works in this simulation but in actual practice it may not be so that the power supply is able to sync current at all. It may contain an output diode, it may happily allow you to raise the voltage of its output capacitor etc. So relying on the power supply to get rid of the current may not be the sensible thing to do without checking the power supply’s working.
Getting rid of the reverse polarity diode is an option, but then you would want to have some sort of guarantee that the polarity can not be swapped e.g. by using shrouded headers.
Leaving in the reverse protection diode calls for extra measures to block excessive input voltages. That can be done using a zener diode with a break down voltage higher than 12V (otherwise it will always draw current from the power supply) and put that from the cathode of the reverse protection diode to GND (shown in the schematic but not connected). This zener diode will prevent the positive power rail to be raised via the clamping diode. One could also opt for putting the zener diode in parallel with the module’s input and leave out the clamping diode to the positive power supply.
In the schematic below I’ve added the zener diode. Also I’ve added an extention to the schematic showing a solution if you want to clamp to -12V and keep the protection diode in the negative power supply line. Then a zener from the anode of the clamping diode to GND will restrict the input voltage to about -12 V.
From the many schematics that I’ve seen on the net I get the impression that lots of them have ineffective input protection circuitry because of the reverse polarity protection. You may want to check the design patterns you use.
Interesting. I am not sure I follow the example and demonstration. In the example it shows a voltage regulator (assuming 5V into the microcontroller, so something like LM7805), but claims that sourcing current will get the microcontroller to increase the voltage output to 11.5V. Honestly, I can’t see how a LM7805 can output 11.5V before shutting down itself, and therefore protecting the microcontroller. Then in the example, it shows an Arduino nano destruct like this, but we can’t see the power source that the diodes are clamped onto. I cannot see an external regulator there, so I assume he used the Nano onboard regulator? If so, duh, yes, that regulator cannot handle the current so I see why it descructs, but its not the problem he described previously (overvoltage). It’s an overcurrent issue on a regulator that is not supposed to be used like this.
The idea behind a voltage clamp is that the excess current that will arise because of the high voltage on the input will need to do somewhere. If it can than the clamping idea works and the voltage will not rise above the clamping voltage. If however you try to send the excess current to e.g. a LM7805 then that will not sink the current. Because of its circuitry It can only work as a current source explains the video. Therefore the current does not flow away to GND via the LM7805 but will flow through the capacitor effectively loading it to a high voltage (as long as there is a DC current flowing through a capacitor its voltage will continue to go up in theory), in the example 11.5V which exceeds what the MPU can bear and therefore it goes bust. So the claim is not that the LM7805 produces the 11.5V, the elco/capacitor does.
I got that, but the burnout in the video went under the completely unrealistic scenario that we have a Nano in the wild, without anything else connected to it to draw current, AND we have a tiny 50Ω resistor as a current limiting at the input. LM7805 cannot sink current, but the rest of the circuit can. At least 15mA for the Nano alone, likely much more if you have a couple of LEDs connected at least.
If we make the more realistic assumption that the current limiting at the Nano input is 1k, as it almost always is, at least in the dozens designs that I have seen, and assuming the Nano is unconnected to anything else, with 15mA current draw, you will need an input of excess 20V to burn out the microcontroller. Who has over 20V in their patching cables? Hainbach with his 1950s test equipment maybe?
If we make the even more realistic assumption, that we are not testing a Nano by itself, but handling a Nano based module that draws 30 to 50mA, then we will need about 30 to 50V at the patch cables to destroy it. Now, if I had 30 to 50V at my patch cables, destroying a Nano module would be the least of my worries!
So before we all panic and stard adding Zeners and transistors in our circuits, let’s think first whether we have a super low current limiting resistor in the input while not having our microcontroller draw any other current, and/or plan to connect some unreasonable (i.e. well over +/-12V) voltage at the input.
I came to this topic because I was trying to clamp the output of an opamp powered by ±12V. In the circuit I was working on that output was fed to the input of a CMOS chip which was powered by 5V. The clamping did not work as intended and I found that the reverse polarity protection diodes were the cause. I resolved this by adding a zener. But this made me think of the other places I had seen clamping diodes used in schematics I’d been studying the past few years.
If the clamping is not effective then at least it is a waste of parts.
He uses a lot of Arduino Nano’s in his modules. The Nano is powered by +12V, but he uses the 5V output from the Nano to power other components. Also the BAT43 Diodes are connected to 5V to protect the inputs or outputs of the Arduino Nano in case you accidentally plug in an hot signal.
There are many legit uses for Zener diodes, as you rightly pointed out, and I sometimes use them as well. I only argued that they are unecessary in the clamping circuit for a microcontroller given the typical use of a microcontroller in hobby electronics (incl. synthesizers). For a Zener to be necessary, in such a circuit, one would have to have at least two of the following three conditions:
use a tiny resistor to limit the current to the microcontroller input (e.g. only 50Ω vs the minimum 1k we see)
have a circuit that doesn’t draw any current besides the minimum microcontroller idle current (i.e. don’t have a circuit, just a plain microcontroller not connected to anything else)
have an unecessary large input voltage (e.g. 40V)
These are wildly unrealistic situations in typical modular synthesizers, and you’ll need to satisfy two of those at the same time to destroy an Arduino Nano! In the video, he used 50Ω and had a Nano that was not connected to anything.
To make an analogy. Yes it is possible to drown in a bathtub, but under normal use, it’s not necessary to wear a lifejacket when taking a bath.
Note that clamping depends on the implementation of the 5V supply. All I was stating in my initial post is that if there is a reverse polarity diode in the 5V feed leading to the clamping diode then the clamping won’t work. The voltage may go up to the opamp’s max. Without said reverse polarity diode it will. The content of the video illustrates this in part. The rest of the video I would suggest you can discuss with its author..
This is all great but I think there’s another potential risk if you have modules in two cases, but one of the cases isn’t powered.
I discovered this when an Arduino module which wasn’t itself plugged into any power started flashing its LEDs in time with a control voltage from another module - that input was actually powering the module’s 5V rail through the clamping diode.
I realised that if you accidently connect a rogue CV to a module that doesn’t have power there is no heavy power supply to clamp to, no 5V limit.
My solution was a 5.1V zenor across the 5V/0V power rails.
Essentially, this is the same problem mentioned in the video, but reframed. The microcontroller that is not connected to a supply is not drawing any current. So, insufficient current limiting and/or insufficient current draw and/or excessive voltage on the input. When you have at least two out of three, there could be a disaster.
Importantly, the same issue will occur even if one does not have two cases with different supplies, but one case with two different supplies and one forgets to turn on the supply feeding the microcontroller module.
I think the key here is to ensure that you have a sufficiently high value resistor between the input to the module and the protection diodes. For a microcontroller input not using the built in pull-up resistors that could be 100k or more. A lower value, e.g. ~10k, is probably needed if the microcontroller’s pull-up resistors are used, but that still limits the maximum current into the 5V rail to 1.2mA even with the input shorted to +12V. The microcontroller should be able to sink that without any problems.
The video uses a very artificial situation with a 50R input resistor - I can’t think of any circumstances where that would be required.
There’s a risk putting a 5.1V zener diode on the 5V power rail. If the output voltage from your on-board regulator (or cabinet 5V bus) is in reality a little high you’ve basically got a short circuit. I wouldn’t do this myself.
I thought so myself. But then again, the unrealistic assumptions can easily lead to an impressive bang with smoke and with some sweeping generalizations on top you get a viral video that gets people discussing
So I went to write a comment in the video and mention this and, guess what, the poster has pinned a comment of his where he essentially backpedalled, saying that there are many cases that we should use the clamping diodes and that for them not to work “many factors actually have to align”… So yes, that’s basically a retraction of the sweeping claim in the title and the video thumbnail, but the video is still on and we are still discussing it… so mission accomplished