I'm working on updating our products, but there are a number of constraints. TL;DR I can't change the parts that would make this really easy.

We have devices that interface to our control panel using a three wire system. +24 VDC, 0 VDC and a signal line (bi-directional) that roughly varies 0 to 5 VDC. People do all kinds of fun things in the field and we get more then the allotted voltage on the signal line (~ > 5 VDC). I can't protect against everything but I know what the common failures are and I can work to stop that from being an issue. I'm thinking I can use an op-amp diode clamping circuit to get what I want (a peak clipper/clamper). I want the voltage to vary 0 VDC to 7 VDC, and anything over 7 VDC to + 24 VDC just gives me 7 VDC out of the op amp. I can scale that back down to the 0 VDC to 3.3 VDC range for the micro ADC. This allows me a number of things:

  1. I have sufficient resolution to distinguish the voltage levels I need.
  2. +24 VDC on the signal line is no longer an issue.
  3. By extending the range of the diode clamping and down scaling, I have a new state where we can determine that the installer did it wrong (and certain other failure modes can be seen).

So I built this circuit on a bread board today, the voltages are not the exact ones, it just a proof-of-concept and I'm limited in power supplies on hand (I'm not going to get into the failure to equip the shop correctly).


simulate this circuit – Schematic created using CircuitLab

From what I found on-line this should work just dandy, but it doesn't. The op-amp is rail-to-rail in and out. All literature shows that this should vary from 0 VDC to 12 VDC smoothly then clamp at 12 VDC and not change beyond that up until the rails. I get about 7 VDC out of the op-amp with no input.

I'm doing something wrong or this isn't even right and I'm not smart enough to understand why. My knowledge is meh as my education was alright and it's been almost a decade between graduating and having to do any work that requires understanding.


  • 1
    \$\begingroup\$ Does "with no input" mean grounded (0V) input or floating input? \$\endgroup\$ – brhans Jul 27 '16 at 19:50
  • \$\begingroup\$ Nearly ground. I have a linear bench supply I was using for the input to sweep from 0 to 18 volts. \$\endgroup\$ – EscapingBlueSmoke Jul 27 '16 at 20:21

A different approach might be to use a zener to limit/clamp the maximum voltage and the op amp as a unity gain follower (buffer).

enter image description here

The op amp output will simply follow any input voltage below 6V8 (ie Vout = Vin) because the zener does not conduct. Under the fault condition (V > 7) the zener clamps the voltage to its rated voltage. Between 6V8 and 24 V the non-inverting input 'sees' only a small change in voltage around 6V8 and the output of the op amp stays at the same level.

C1 is a small capacitor to smooth out any noise.

I'm assuming here that 7 V is an arbitary and not critical figure somewhere above the 5V but not much more. Zeners come in particular voltage/power ratings so a 6V8, 400mW type should suffice.

If you wanted to get closer to the 5V level just replace the zener with an appropriate value (e.g. 5V1)

|improve this answer|||||
  • \$\begingroup\$ I'll go with this. I liked the idea of the ideal diode/clamp, but clearly there is something about implementation I don't get. The 7 wasn't a hard figure, correct. I was kinda avoiding Zeners because they can vary wildly within a given value but I was approaching the problem wrong. My upper limit doesn't need to be accurate. I need my lower voltage range accurate (0 to 5) and if the upper isn't quite right it doesn't matter. Thanks \$\endgroup\$ – EscapingBlueSmoke Jul 28 '16 at 13:08
  • \$\begingroup\$ @EscapingBlueSmoke Even at 20% accuracy the 6V8 zener bottom end's voltage would still be about 5.5 V, allowing the first 5V through unaffected. You could always preselect the zeners used if necessary ( a very quick voltage test with series resistor) \$\endgroup\$ – JIm Dearden Jul 28 '16 at 13:40

The circuit will clamp to the reference voltage when the Schottky diode in the original circuit is reversed in polarity.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.