# +/-5V to 0...5V and not failing for +/-12V

I'm trying to convert a voltage that is between -5V and +5V to the range of 0...5V. These voltages can be found in "euroracks"/"doepfer a100"-systems which are modular synthesizers for music.

This conversion is possible with the schematics found at https://masteringelectronicsdesign.com/design-a-bipolar-to-unipolar-converter/

With a TL074 opamp this works fine on my breadboard.

Now there is a problem with that: the input-voltage for my use-case (eurorack/a100 modules) can be -12...12V in some cases. In that case (e.g. anything that is outside -5...5V) I would like to clamp it to -5...5V. Limitting to +5 I can do with a LM336Z-5.0 I think but how can I protect against voltages lower than -5V? (or less than 0V after conversion)

The signal I'm converting is a voltage that represents a frequency. E.g. 3.250V is note C4 see wikipedia

The output will be send to an arduino adc pin.

• @SunnyskyguyEE75 it is for audio so millivolts I think. i'll add that tot the question itself, i get the feeling that that may be important Feb 26, 2019 at 19:36
• TL 074 = Supply voltage –0.3 to 36 so no problem with using Schottky diodes to both rails +5V and 0V then inject 5V offset and gain =1/2 Feb 26, 2019 at 19:39
• ah, so it's not audio then? Feb 26, 2019 at 19:44
• @FolkertvanHeusden the diode isn't in series with the signal: It's just one each in "normally blocking" direction to ground and to supply voltage: in case of overvoltage, that diode would conduct. Feb 26, 2019 at 19:46
• @FolkertvanHeusden so, audio signals are signals in the audible range of frequencies, your's is not :) Feb 26, 2019 at 19:46 simulate this circuit – Schematic created using CircuitLab

No Amp required. This attenuates to Vin/2 with a 5.0V offset to centre the output to V+/2

Anything |Vin| >5.2V clips with low current from 10k//10k effective series resistance.

Otherwise if |Vin| < 5V diode is high impedance (off).

If input impedance is 1M then the actual signal is attenuated 5k/1M*100%=0.5% which is less than 1% tolerance of R1,R2

• The point where the box is with '5.0V' means that I have to insert 5V at that point? Same question for the Vin/2-box. Feb 26, 2019 at 20:13
• If your inputs only accept 0 to 5V input then you need a 5V reference or supply . Vin/2 is just a test point where you see Vin= +/-5 reduced to 2.5 +/-2.5V and anything larger is clipped. Is that what you need? Feb 26, 2019 at 21:00
• Hi, I've simulated it in circuitjs (tinyurl.com/y4woc4en ) and it looks like its output ranges from -0.4 to +5.4. I don't think the arduino adc will like that :-) Is it possible to adjust the minium and maximum voltages? Mar 20, 2019 at 15:49
• @FolkertvanHeusden That's why CMOS uses special Schottky diode pairs to each rail with 10K in between on inputs. Their low current rating of 5mA makes them small and faster than the CMOS and fast enough for ESD. You only have 2 Schottky builtin options in that simulator Mar 20, 2019 at 16:36

A low output impedence version... simulate this circuit – Schematic created using CircuitLab

The LMC6482AIN is a dual rail to rail input and output op amp.

• Hi James. Am I right that without the buffering the schematic is tinyurl.com/y6bpkryn ? In that case: it is clipping the voltage, not shifting and reducing. Mar 20, 2019 at 16:22

I've been spending some time with circuitjs and I think this is what I want:

schematic in circuitjs Any voltage between -5V and +5V is scaled and shifted to 0...5V. Furthermore anything outside that range is clipped.

This is a good solution but I have to give most of the credit to Spehro Pefhany who posted a similar circuit on a different thread. simulate this circuit – Schematic created using CircuitLab

The TL431 is configured to give a 2.5V reference by tying its REF pinto its Cathode pin. simulate this circuit – Schematic created using CircuitLab

• I believe that lower +5V (connected to R1) must be a GND point. But apart from that: this clips voltages below 0v and I would like to have -5...0 to be shifted to 0...2.5V and 0...5V shifted to 2.5...5V. Mar 20, 2019 at 15:54
• Both my circuits function as per your requirements (despite the down-marking). Yours will not do what you want. The reference voltage at the lower end of R1 can be tied to a voltage other than Gnd. This reference voltage is the voltage that the output goes to when the inputs are at the same voltage. Mar 23, 2019 at 14:25
• To determine the output voltage use the two simple rules that the output always goes to a voltage which puts the op amp's inputs at the same voltage and also that the op amp's inputs draw no current. So, Vin at +5V means that the output must go to +5V to make the op amp's inputs at the same voltage (+5V). Vin at -5V means that the +ve input is at 1.6V so the output must go to 0V to make the -ve input also equal to 1.6V. Vin at 0V means that the +ve input is at 3.3V so the output must go to 2.5V to put the -ve input also equal to 3.3V. Mar 23, 2019 at 15:21