1
\$\begingroup\$

I have an ±15 V AC output that needs to be level-shifted to 0-1.2 V level to be read by a microcontroller ADC input. It needs a rather decent resolution so that the ADC can be quite accurate.

My circuit only has a 3.3 V supply.

What's the best way to achieve this?

  • The input is actually ± 15 V AC sine wave from a three-phase alternator with frequency ranging from 100 Hz to 2000 Hz.
  • I am designing a three-phase synchronous rectifier. I compare the voltage levels of each phase of the input to get the timing for the three-phase MOSFET bridge rectifier switching.
  • So far I am a bit successful by using a rudimentary resistor divider to level-shift the ± 15 V input to 0-1.2 V as I can use the positive-half of the sine wave at low frequency.
  • My intention is to get robust level-shifted inputs so that the signal doesn't get attenuated across low to high frequency.
\$\endgroup\$
13
  • 1
    \$\begingroup\$ Does this answer your question? Negative Voltage Level Shifting to an ADC \$\endgroup\$
    – devnull
    Jan 14, 2022 at 11:27
  • 1
    \$\begingroup\$ What is the frequency? \$\endgroup\$
    – bobflux
    Jan 14, 2022 at 11:32
  • 2
    \$\begingroup\$ Does this answer your question? Analog voltage level conversion (level shift) \$\endgroup\$
    – tobalt
    Jan 14, 2022 at 12:53
  • 1
    \$\begingroup\$ Do you want to level shift an instantaneous +15V to 1.2V and an instantaneous -15V to 0V? Or do you want a sine wave input of 15V peak converted to a constant 1.2V output? \$\endgroup\$ Jan 14, 2022 at 13:49
  • 1
    \$\begingroup\$ Please describe in more detail what the signal is, where it comes from and what you expect to do with it. \$\endgroup\$ Jan 14, 2022 at 17:04

4 Answers 4

5
\$\begingroup\$

enter image description here

Hi,

We want to convert single-ended bipolar to single-ended unipolar to feed the ADC. This can be done by attenuating the input signal while also adding a DC offset equal to half of the adc reference voltage. This way the original signal will swing around the mid-point of your ADC's input range in attenuated form.

I assume the ADC has a full scale range of 1,2V. We find both the positive and negative swing of the input signal equally important, so we offset the signal to 0.6V. You can just generate this voltage any way you like. It is more accurate to take this potential directly from the adc by dividing the reference voltage. A good converter IC usually has this available. If it is perhaps build into an uC that has no pins for analog reference, just take the AVDD and AVCC signals instead.

I selected TLV9002 for this. It's low cost and has reasonable specs for general purpose applications. If you are after precision, definitely get a better amplifier. Its inputs and outputs needs some headroom from the supplies to work. So instead of a 1/25 gain I chose 1/30 gain to match the signal to the adc, this way we leave 100mV on both ends of the signal.

I added a bi-directional Zener to protect the input. I’m not sure what you are measuring. The resistor is there to protect in combination with the Zener. This resistor is added on the grounded side of the input as well, in order to keep it balanced. The gain is going to be off by a bit though, if that’s a problem then lower this series protection resistor or account for it with the gain setting. I selected the resistors based on calculation, find some values that are appropriate for ordering and your circuit

Now this output signal can be fed to your ADC. It will always be biased exactly to mid-range (with small offsets)

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for the detailed circuit and explanation. As I would understand it, U1_A is in differential amplifier mode. Thus, wouldn't Vout be inverted as compared to VIN based on the formula of Vout = [R4/(R3+R4)]*[1+R2/R1]*Vref - [R2/R1]*VIN where R1=R4=100.1k and R2=R3=3.33k? For example, when VIN=+15V the resulting Vout=0V, while VIN=-15V the resulting Vout=1.1V. \$\endgroup\$ Jan 19, 2022 at 8:06
  • \$\begingroup\$ Hi, no worries glad to help. Yes now you mention it I hooked up the signal to the negative input of the differential amplifier, so the signal is indeed inverted. I'll edit this for correctness. Either swap the inputs or you could also try some tricks in firmware. As for the gain, this output amplitude should be 0.6V +- 499mV for +-15Vin, when working with 1.2Vref. It should not go to 0V output, because no opamp can output exactly 0V on a single supply. Rail to rail opamps can get close, but AC performance takes a hit. Thats why the gain is set to this level \$\endgroup\$
    – Thijs
    Jan 19, 2022 at 10:10
2
\$\begingroup\$

As you wrote that your ADC input impedance is high (Gigaohm), you can use a simple 3-resistor voltage translator, to get an accurate, linear, passive voltage level translation (that also protects your ADC input):

+15..-15 V input to 0..1.2 V output

schematic

simulate this circuit – Schematic created using CircuitLab

Here is an excellent breakdown of how to calculate the values by user @jonk.

\$\endgroup\$
0
0
\$\begingroup\$

Level Shifter + & - 15 V to 0 - 1.2 V

Level Shifter

IC1a, although it could be described as being configured as a non-inverting summing amp, I would prefer to refer to it as being configured as a differencing amplifier with one input having the input signal applied to it and the other input tied to ground (into R2). The reference voltage for this differencing amplifier is held at a constant 0.6 V.

The gain of the differencing amp (IC1a) must be equal to :-

(Vout pk to pk)/(Vin pk to pk) = 1.2/30 = R1/R2 = R4/R3 = 1/25 = 3k/75k

I have found out, by playing with these circuits over the years, that to get a certain output swing for a certain input swing that R2 (the inverting input) needs to be connected to the mid-range of the input swing (0V in this case) and that R4 (the reference) needs to be connected to the mid-range of the output voltage swing (0.6 V in this case).

The 0.6V reference is generated by a resistive divider consisting of R5, R6, R7 & VR1. VR1 would need to be set to a value of approximately 5k to provide the 0.6 V reference. This 0.6 V reference is filtered from power rail noise by C1 and buffered by IC1b. The buffer is necessary to prevent the voltage genereted by the resistive divider being affected by the load of R3 & R4. The potentiometer, VR1 is included in the design so as to be able to compensate for (when setting the 0.6 V reference voltage) any inaccuracy in the 3.3 V supply voltage

R8 is equal to the parallel combination of (R5+R6+VR1)//R7 and is included to remove offset at the output of IC1b which could otherwise be caused by IC1b's input bias currents.

The output of a LM358 will not swing quite as low as 0V (when the negative rail is 0V) but it will get pretty close to it.

Finally it's a matter of consulting the LM358's data sheet and checking the design to make sure that the common mode input range is not violated and that IC1a's inputs do not swing beyond the maximum allowed negative voltage. Also need to check that, when considering the output's positive saturation voltage, that there is enough headroom with a +1.2 V output.

\$\endgroup\$
1
  • \$\begingroup\$ OP, have a look at "Analog Engineer's Circuit Cookbook: Op Amps". Thats a pdf file that has some circuits and what you need is "Inverting Op Amp With Non-Inverting Positive Reference Voltage Circuit" which is the circuit in the answer. You can find it on google. \$\endgroup\$
    – Hedgehog
    Jan 15, 2022 at 14:35
-1
\$\begingroup\$

As OP added more information and wants output to be a sine wave this answer is not correct. Not sure if I should delete it or leave it be

Assuming you have a sine wave. Then, negative part can be ignored. Try this and see how it works. It's a peak detector circuit. Diode is used to pass positive voltage, capacitors are then charged and disharged by resistors.You would have to calculate values by yourself since your question is quite vague.

Circuit

Here are some simulations enter image description here

enter image description here

\$\endgroup\$
6
  • \$\begingroup\$ The OP didn't ask about a peak detector but about a signal level shifter. Also when loaded with the ADC, your circuit output would change considerably. \$\endgroup\$
    – tobalt
    Jan 14, 2022 at 12:49
  • \$\begingroup\$ @tobalt The op vaguely asked for ± 15V to 0-1.2V voltage conversion. This does that. Like I said, "Assuming you have a sine wave", peak detector is fine. Post a better question get a better answer. Let's see your answer tobalt. \$\endgroup\$
    – Hedgehog
    Jan 14, 2022 at 12:57
  • \$\begingroup\$ @tobalt About loading, connect a buffer. \$\endgroup\$
    – Hedgehog
    Jan 14, 2022 at 12:59
  • \$\begingroup\$ @Hedgehog yes, it does shift the voltage but, if the OP has a 0-15vac signal, it is likely audio frequencies. Also, you got it only half correct, because you elected to ignore the negative half wave. What is the frequency response of your circuit (answer is "not good"). \$\endgroup\$ Jan 14, 2022 at 13:47
  • 1
    \$\begingroup\$ I retract my downvote as the question could be indeed interpreted in this way. Btw my "answer" in comments to the OP was seemingly deleted without clarification what was the issue. \$\endgroup\$
    – tobalt
    Jan 14, 2022 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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