# Single-supply DC amplifier circuit with “gain” of 0.66?

I have a DC voltage source $V_{in}$ which slowly varies in the range 2.5…4.8V.
I need to linearly scale it down by ⅔, to feed into a 3.3V ADC pin.
For a voltage divider, the source has too high output impedance (it's HIH4030, an analog sensor).

I thought that an LM358 from my box would come out handy. However, I'm not ready for dual power supply in this application, and I can't figure out the needed feedback network for the less-than-unity gain of ~0.66.

What's worse, the non-inverting configuration has gain of $1 + \frac {R_f} {R_g} > 1$; the inverting configuration OTOH must be biased — and this is where my ground starts to feel shaky.

Perhaps something like this would kinda work?..

I'm not even remotely sure that the biasing and feedback will actually work that way. The idea is to chain two inverters biased around 2.5V, one with gain $- \frac {R2} {R1} \approx - 0.66$, and another with gain unity.

Would be thankful for any kind of canonical advice or circuit for this kind of purpose.

• Wow that schematic is very much convoluted. But yes, you can use a simple inverting amplifier with the appropriate gain and then chain another in series to negative the first stage's inversion. – sherrellbc Apr 1 '15 at 18:15
• Yeah, sorry for that, I tried to be the most clear I can.. – ulidtko Apr 1 '15 at 18:19
• Be aware of opamps like this one AD8538/AD8539 - Utterly awesome - as lone as VERY low bandwidth and slew rate are acceptable. 13 uV input offset max and 5 uV typical. 0/5 Vin range. Output 0-5 within a gnats breath either end. $1.51/1 and$3.59/1 for dual at Digikey. Not for everyday use at the \$ but very handy on occasion. – Russell McMahon Apr 2 '15 at 11:54

Something like this should do you. Note that the input common mode voltage range of the LM358 amplifier only goes to 3V so you can't just buffer a divider with voltage follower (which would be the easiest way, and would typically work around room temperature, but this is engineering so we have to consider worst-case and temperature).

The output range, with load of more than 2K, goes to within 3.5V so it's fine.

The input divider has a ratio of 0.50 (and it loads the input with 40K)

The amplifier has a gain of 1 + 10K/27K

Total gain is 0.5 (1+10/27) = 0.685, so 4.8V -> 3.28V.

simulate this circuit – Schematic created using CircuitLab

Ideally, pick values such that R3||R4 ~= R1||R2 to cancel the effect of input bias current. In the above schematic they are about 30% different.

• Well, why not unity gain buffer first, and then 2/3 divider? Hmm, that's an idea! – ulidtko Apr 1 '15 at 18:21
• @ulidtko Well, that's an even worse idea than George's. ;-) Please re-read the top paragraph. Neither the input or the output works at 4.8V. – Spehro Pefhany Apr 1 '15 at 18:22
• @GeorgeHerold :) I need better understanding of common-mode voltage characteristics, and to re-read the datasheet. But the basic idea is... visible – ulidtko Apr 1 '15 at 18:24
• Oops my bad... Sorry Spehro.. I'm deleting my comments. – George Herold Apr 1 '15 at 18:32

A problem of amplifier gain less than unity is loss of usable number of bits (UNOB), since the full input range of the ADC will not be used. In fact, if the ADC has input range of 0V to 3.3V then any gain less than 1.44 will result in loss of UNOB. Gain actually needs to be increased.

Here's a circuit for reference:

With the proper voltage reference value and gain (alpha), the range of $V_{\text{in}}$ can be made to fill the input range of the ADC.

$V_{\text{ref}}$ = $\frac{V_{\text{inmax}} V_{\text{outmax}}-V_{\text{inmin}} V_{\text{outmin}}}{V_{\text{inmax}}-V_{\text{inmin}}+V_{\text{outmax}}-V_{\text{outmin}}}$ = $\frac{\text{(4.8V)(3.3V)}-\text{(2.5V)(0V)}}{-\text{0V}-\text{2.5V}+\text{3.3V}+\text{4.8V}}$ = 2.83V

$V_{\text{out}}$ = $(\text{alpha}+1) V_{\text{ref}}-\text{alpha} V_{\text{in}}$

for $V_{\text{inmin}}$ for example, $V_{\text{out}}$= (2.44)(2.83)-(1.44)(2.5) = 3.3V,
while, for $V_{\text{in}}$ of 4.8V, $V_{\text{out}}$ = 0V

Advantage is you get the full range of the ADC. It is necessary to provide a 2.83V reference voltage, but that fits well with the common mode range of the LM358. Operation may get sketchy around $V_{\text{out}}$ of 0 volts, because the LM358 doesn't pull down very well and a pull down resistor (10kOhm or so) may be needed. Of course, $V_{\text{out}}$ is inverted, but that is easily corrected in micro-code by subtracting the converted value of $V_{\text{out}}$ from the max range value of the ADC.

According to the HIH4030 datasheet, it doesn't have a high-impedance output; in fact, Figure 9 shows an 80kΩ minimum load. It should be easy to build a 2/3 (or 1/2, or whatever) voltage divider that adds up to this value.

However, the datasheet shows that the output is ratiometric to the supply voltage. In other words, if your 5V supply is actually 5.5V, the sensor output will be 10% high. You can correct for this by using the ADC to measure the 5V supply voltage using another voltage divider attached to the supply, then dividing.

The better way is to use an ADC that's powered from 5V. It can use the 5V supply as its reference. Then, your accuracy won't be degraded by voltage dividers.

• If 80kΩ isn't high, what is then? Perhaps I worded that incorrectly, but notice that max current consumption of the device is 500 μA. This means that regardless of load, the sensor won't be able to push more than 0.5 mA through the load. In case when the load is a voltage divider to ground, it's midpoint will be saturated by current from ground rail [into the ADC pin], and sensor voltage will have almost unnoticable effect. I built this (using 5.1kΩ and 10kΩ) and it works exactly like I describe. – ulidtko Apr 1 '15 at 20:39
• Sorry, I'm accustomed to "high" impedances being in the MΩ or GΩ range. Using a 5.1kΩ and 10kΩ divider, the divider's output impedance (the impedance presented to the ADC) will be 5.1kΩ||10kΩ=3.4kΩ. If the ADC's input impedance is 1MΩ, it will cause <1% error. Most ADCs present an impedance somewhere in this ballpark. For example, the Arduino has >100MΩ DC impedance on its analog inputs, so it's an easy load to drive as long as you give the internal sample/hold capacitor time to settle before performing the conversion. This is a slowly moving signal, so this should be no problem. – Zulu Apr 1 '15 at 21:17
• Excellent analysis! Yet still, experiment suggests you're wrong somewhere. Having replaced the divider for 47kΩ and 100kΩ, I see the needed voltages. – ulidtko Apr 1 '15 at 23:46
• What ADC are you using? – Zulu Apr 2 '15 at 1:08