# Active analog attenuation with OPA2340

I wish to have active analog attenuation circuit. Following this page, I got myself some OPA2340. I use the B-side to keep the numbering somewhat intact.

I go with the design on Figure 16-2 (p. 14/20).

Here are the connections I made:

(a) Pin 8 (V+) to source's positive (+5V)

(b) Pin 4 (V-) to source's ground

(c) Pin 6 (Out B) to pin 7 (-In B) - as in Fig. 16-2

(d) Pin 6 (Out B) to R1 (1.7x / 102Ω)

(e) R1 (1.7x) in series to R2 (3.3x / 198Ω)

(f) R2 (3.3x) to source's ground

(g) Pin 6 (-In B) to source's ground

(h) Pin 5 (+In B) to source's positive (+5V)

Connections (g) and (h) are made to yield a 3.3V from a 5V input. To my surprise, measurement between R2 and source's ground does not yield 3.3V as expected. What have I done wrong?

• remove (g). In your schematic there is NO connection from -IN_B to ground, so remove it! – Batuu Sep 4 '18 at 11:03
• Your voltage divider is at the output of the opamp while in the original schematic it is connected to the input! – Bimpelrekkie Sep 4 '18 at 11:29
• Thanks, guys. I go back to the first circuit in Fig. 16-2, and it works nicely. – J. Doe Sep 4 '18 at 12:32

It is pretty straight forward:

You didn't build the circuit as given in the example. What you have built is a different circuit entirely.

You have the voltage divider on the output of the amplifier instead of the input.

The point of the original circuit was to set the voltage using the divider and then use the opamp to provide current so as to keep the output steady when loaded. The output voltage is then pretty much independent of the load (as long as the opamp can supply enough current.)

Opamp output current is usually measured milliamperes - you shouldn't expect to power a microprocessor from it.

Your circuit is using the the amplifier to provide the voltage and then using the divider to lower it. That means the voltage will depend on the load - you could just leave out the amplifier because it isn't doing anything useful.

Connect R1 and R2 in series as they are now, but from +5V to ground.

Connect the junction of R1 and R2 to pin 5 of the opamp.

You ought to get 3.3V out at pin 7.

This is more or less how it ought to be, except that the input to the voltage divider goes to +5V:

This is what you built:

The first has the voltage divider at the input to the opamp.

Yours has the voltage divider at the output. This is incorrect for reasons explained above.

• I go back to first circuit in Fig. 16-2, and it works as you say. I went with the second circuit because I thought they were the same. Can you explain what I got wrong? – J. Doe Sep 4 '18 at 12:16
• I thought I had explained what was wrong. 🤔 – JRE Sep 4 '18 at 14:35
• Thanks @JRE. I saw the OR on Fig. 16-2 and thought they were interchangeable. – J. Doe Sep 15 '18 at 7:41