OP amp and current sensor design challenge/problem

Thread Starter

Peterperkins

Joined Nov 5, 2018
22
I have a hall effect current sensor with a 0-5V output. Zero current flow is 2.5V out.
It is monitoring a 20khz motor drive signal.

I want to pass thru signals from 0-2.5V unmolested but want to reduce signals over 2.5V by an amount lets call it 20%.

What could we do to do that?

I was thinking OP amps, but I can't think of way to only reduce the signal once it is over 2.5V

Any brilliant ideas? Thanks Peter
 

AnalogKid

Joined Aug 1, 2013
11,038
In the series feedback path from an opamp output to its inverting input, in parallel with whatever resistor is setting the circuit gain (gain 1), add another resistor in series with a diode. The diode will conduct only when the voltage across it is greater than its Vf, placing its series resistor in parallel with the main gain setting resistor. This reduces the total resistance and lowers the circuit gain (gain 2) in both the inverting and non-inverting opamp configurations.

Note - the conduction function of a small signal diode is a curve, not a sharp corner. We talk about a diode coming on an 0.6 V, but a typical 1N914 or 1N4148 starts conducting low currents below 0.5 V Vf. So the transition from gain1 to gain 2 will not be like flicking a switch at exactly 2.5 Vpeak output.

With more complexity, such as a comparator and an analog switch. you can get a much smaller transition region between the two gains. With two analog switches (or one SPDT), the two gains and their gain-setting resistor values are now independent.

ak
 
Last edited:

crutschow

Joined Mar 14, 2008
34,420
Below is the LTspice simulation of a circuit to do that.
It uses a programmable TLV431 reference to get a sharp transition at 2.5V and attenuate the signal above that voltage.
The op amp is just used as a buffer follower to give a low output signal impedance.
Note that if your op amp supply is 5V then you need a rail-rail type op amp as shown.

1606850062234.png
 
Last edited:

crutschow

Joined Mar 14, 2008
34,420
Here's the simulation of a circuit using two op amps, which would be fewer parts if you used a dual or quad op amp package.
The threshold as which the gain changes is determined by the supply voltage and the voltage divider consisting of R1 and R4.
The gain above the threshold is determined by the ratio of R2 and R3.

1606876876852.png
 
Last edited:

Thread Starter

Peterperkins

Joined Nov 5, 2018
22
Thanks for those great ideas. Can I add a couple more thoughts.

Lets assume I have five identical channels and I want them all to reduce gain at exactly the same time.
Lets say at 3.5V for instance not 2.5V

Can I share one TLV431 with multiple channels?
 

crutschow

Joined Mar 14, 2008
34,420
Lets assume I have five identical channels and I want them all to reduce gain at exactly the same time.
Do you mean at exactly the same voltage?
Can I share one TLV431 with multiple channels?
Afraid not.
It acts as a clamp for one signal only.
It can't clamp more than one.

If you want to minimize part counts, then you might consider the circuit in post #4.
With a quad op amp, you can do two channels with one op amp package.
You also can share the threshold voltage from R1 and R4.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
11,038
Back to the comparator and analog switch, that can be expanded with the comparator testing one opamp's output, and driving one analog switch for each channel. the gains of all five channels will switch based on the amplitude of one channel.

If you want the gain to change whenever *any* channel exceeds the threshold voltage, then there is one comparator per channel, the five comparator outputs are OF-ed together, and that signal drives all 5 analog switches. Lotsa parts, but not very complicated.

ak
 

Thread Starter

Peterperkins

Joined Nov 5, 2018
22
Hmm thanks for all the ideas. I appreciate the effort.
:)
How about this way. Simpler I think?

We have 5 independent channels of a simple non inverting unity gain voltage buffer. OK
But in response to a single command hi/lo from an external device I want to reduce gain/output voltage by 20% in all 5.

Forget about the opamps themselves detecting and initiating this threshold or switch.

Let's assume an external logic level input maybe driving a switch IC to alter the opamp gain from unity to -20%.

EDIT.

OK I see I can't do that with a non inverting opamp, so will have to have a potential divider on the input to the opamp.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
11,038
We have 5 independent channels of a simple non inverting unity gain voltage buffer. OK
But in response to a single command hi/lo from an external device I want to reduce gain/output voltage by 20% in all 5.
I see I can't do that with a non inverting opamp, so will have to have a potential divider on the input to the opamp.
Correct.

If the input signal never swings below the opamp negative rail, then you can switch the shunt leg of the input attenuator to GND with a small n-channel MOSFET (2N7000, 7002, etc.). Connect all 5 gates directly to the input logic signal. High = attenuated, low = unity gain. Be sure to take the FET ON resistance into account when calculating the attenuator's shunt resistor value.

ak
 
Top