0
\$\begingroup\$

Referring to this discussion, I want to ask whether this can be done using single supply?

I have a similar problem where my input is a triangular wave swinging between 130mV and 500mV at 250Hz frequency. I want to scale this signal in 0V to 5V range.

I do not have an option of using a dual supply so using a single supply opamp AD829.

\$\endgroup\$
  • 2
    \$\begingroup\$ don't discount the option of having a dual supply – for small currents, simple inductorless power supplies, for larger inverting power supplies, do exist, and cheaply so. However, the answer to this kind of question is always the same: amplify and shift. \$\endgroup\$ – Marcus Müller Aug 14 at 12:04
  • \$\begingroup\$ Also, if you know you have a triangular wave, you don't have a problem: AC coupling to a virtual ground at 2.5V, amplify, and done. \$\endgroup\$ – Marcus Müller Aug 14 at 12:05
  • 4
    \$\begingroup\$ I do not consider the AD829 a good choice for this. 1) all specifications in the datasheet are using a symmetric supply 2) the input voltage range is roughly Vss + 0.7 V up to Vdd - 0.7 V so far from rail-to-rail (not needed per-sé but could help) 3) this is a video opamp, your signal is 250 Hz, you don't need a fast (video) opamp for that. \$\endgroup\$ – Bimpelrekkie Aug 14 at 12:09
0
\$\begingroup\$

The AD829 is not a rail to rail output op amp and so requires a supply voltage significantly above +5V to enable the output to reach +5V.

Voltage Scaler

Gain of amp = (5-0)/(500mV-130mV) = 13.51

Let R1 = 10k which implies that R2+R3 = 125.1k

(125.1k/10k)+1 = 13.51

To calculate the reference voltage:-

(Vref-0V) * (125.1k)/(125.1k+10k) = 130mV

Vref = 140mV

EDIT

A good improvement - Put a 100uF cap across R4 to smooth Vref and filter out power supply noise.

EDIT

Alternative solution...

Voltage Scaler

Edit:

You may wish to consider the circuit below as an improved version of the 2.5V reference generator now that you have the circuit working. It does away with the pot and 100uF cap. You may not even need the buffer, IC1a.

2.5V Reference Generator

The advantage of the potentiometer base Vref generator circuit is that you can precisely set the DC level of the output waveform (currently it's set to 2.5V). The circuit below will enable a finer (more precise) adjustment to the 2.5V Vref level but bear in mind that the LM358 saturates at a few mVs above ground (with a 0V -ve supply voltage). If you need to get the -ve excursion of the output waveform exactly to 0V then you'll need a -ve supply rail for the op amps. This can easily be generated using a ICL7660A (note the 'A') which will convert the +12V to something approaching -12V.

Voltage Scaler with -ve voltage supply

\$\endgroup\$
  • \$\begingroup\$ Does this also imply that for touching 0V, I need to provide negative supply as well? Also, would you suggest LM358 for this? \$\endgroup\$ – anildadj Aug 15 at 20:37
  • 1
    \$\begingroup\$ Exactly, the AD829 requires a negative supply to enable its output to get down to 0V. The LM358's output is able to get down to 0V (within a few mVs) even with a negative power rail of 0V but still requires a positive rail of at least a couple of volts higher than +5v to enable its output to get up to +5V. The MCP601 has a rail to rail output and can therefore achieve a 0V to +5V output with supply rails of 0V and +5V. \$\endgroup\$ – James Aug 17 at 8:51
  • \$\begingroup\$ …..the power supply of the MCP601 has a limit of a little over +5V. \$\endgroup\$ – James Aug 17 at 10:27
  • \$\begingroup\$ This circuit actually works, but partially for me. The offset is well set near to zero (~ 8mV). But the Vmax of the output at pin 7 of opamp LM358 is leveled at 1V. By reducing the resistance value of R2 and R3, I maintained the shape of the wave and then I tried adding one more non-inverting amplifier stage with a gain of around 7 using another LM358, but still the V max is stuck at 1V. The amplified triangular wave is sort of clipped at 1V, if I can say that. Please comment! \$\endgroup\$ – anildadj Aug 23 at 16:06
  • \$\begingroup\$ I am using a DC supply of 0-12V. \$\endgroup\$ – anildadj Aug 23 at 17:07
0
\$\begingroup\$
  • Calculate the voltage on the inverting input to the amp using a resistor divider equation (they exist for three resistors). Call it \$V_-\$, make it a function of \$V_{out}\$, \$V_{ref}\$, and \$R1\$ through \$R3\$.
  • Note that it's an op-amp, so as long as it's stable, \$V_+ = V_-\$.
  • Write out \$V_{in} = V_-\$ with the function for \$V_-\$, for your low and high voltages (130mV and 0V for one, 500mV and 5V for the other).
  • You have two equations in three unknowns (R1 through R3). Solve them for \$R1\$ and \$R3\$ as a function of \$R2\$.
  • Choose a sensible value for \$R2\$. This depends on your amp; if you use a low-power rail-rail it'll be 10 to 100 kilo-ohms (don't use that video amp).
  • Unless you're using a FET-input amp, choose R4 to equal the parallel combination of R1, R2 and R3.
  • Use the resulting resistor values to find catalog values, and simulate the circuit until it stays in bounds.

I suggest that if your ADC range is 0 to 5V that you choose limits of 100mV to 4.9V, to account for part-part variations in voltage offset in your circuit.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ Vref might be a better name than Vbatt, which kind of implies it varies all over the place. In fact it might be better derived from an LM4040 or whatever. \$\endgroup\$ – Spehro Pefhany Aug 15 at 14:55
  • 1
    \$\begingroup\$ I thought of that when I was walking away from it, and decided I was too lazy to correct it. You've shamed me into good behavior! \$\endgroup\$ – TimWescott Aug 15 at 14:58

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.