SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By ezflyr
Hi All,

I'm trying to get a signal conditioner circuit working for a hall effect current sensor. The sensor, a Honeywell CSLA2CD, is powered by +8V, and the output of the sensor is +4V with no current sensed, and increases by ~32mV per amp. I designed the differential amplifier shown below, but it's not working as expected.

Hall Signal Conditioner.jpg

I believe the following should be applicable for this circuit: Isense(v) = (60K/10K)(Vin - 4)

Thus, when there is zero current, the output should be 0V, but it's about 3.8V

My goal is to use a simple op-amp circuit, powered from a single supply, to compensate for the 4V sensor offset, and to modestly scale the input. Max. current to be sensed is 20A. What am I missing?


You do not have the required permissions to view the files attached to this post.
By UhClem
Did you notice the common mode input voltage range for that opamp? With a 5V supply 4V is at the edge of its range.

But you have misunderstood the operation of the circuit. An opamp has a huge excess of open loop gain so with negative feedback like you have here, the output voltage will be driven so that the difference between the input voltages is zero.

Think of the 4V applied to the non-inverting input as a virtual ground with the output referenced to it.
By ezflyr

I'm not wedded to that op-amp, it's just one I had on a bread-board for a quick-n-dirty test!

OK, I kind of get what you are driving at, but I'm primarily a 'digital guy', and not an 'analog guy'. Is the solution to put a 10K in series with the '+' input? If not, can you suggest a topology that will do what I want?


By UhClem
ezflyr wrote: Wed Aug 29, 2018 12:25 pm Is the solution to put a 10K in series with the '+' input?
No. It is already working as expected. Or at least as well as can be expected so close to the limit of the common mode input voltage range.

Try applying a test current and watch as the output voltage decreases.

The 10K resistor would do nothing because the current into that pin is nearly zero. 11nA typical is close enough to zero in this case as makes no difference.
By mdancer
When I analyze your circuit I get that your output voltage should be Vout = 7*Vref - 6*Vin where Vref = 4 V. So if your sensor outputs 4 volts with no current, I'd expect your output voltage to be 7*4 - 6*4 = 4 volts. So it seems to me it's working per design but not per intent.

I think if you replace resisters R5 and R6 with R5 = 120k and R6 = 160k, that will put Vref at about 3.43 V which should give you the theoretical output of Vout = 6*(4-Vin). That's theoretical mind you!
By UhClem
Analysis using the traditional concepts of the virtual open and the virtual short:

Input current is next to nothing so the inputs to the opamp are open circuits. Feedback assures that V+ = V- just as if they were shorted together. But they aren't, see virtual open.

Using the virtual short the current in R13 is: i = (4V-Vin)/10K

Because of the virtual open this same current flows through R14:

Vout = 4V + i *60K = 4V + 60K * (4V-Vin)/10K = 4V + 6*(4V-Vin)
By jremington
That single-ended supply approach won't work for the general case, because the op amp can't output a negative voltage.
You will need split power supplies, if you want to subtract off the sensor midpoint voltage before amplification.

What, exactly, do you want to do?
By ezflyr
jremington wrote: Thu Aug 30, 2018 8:06 am What, exactly, do you want to do?
From my original post:
My goal is to use a simple op-amp circuit, powered from a single supply, to compensate for the 4V sensor offset, and to modestly scale the input.
Original goal was a single supply, as I don't have a split power supply available.... But, I do have a 'negative' voltage (the Vee pin on a GLCD display) that could provide a negative reference. Does that help? So, goal is actually an output voltage, always positive, proportional to the current in the hall sensor. Scaled up from 32mV/Amp to improve resolution.

By UhClem
The only problem with your circuit is the common mode range of the opamp. Try it out in Spice (LTSpice is what I use) if you don't believe me. You could fix that by increasing the opamp supply voltage except that your particular part can't take much more than 5V.

(One minor complication is that the gain calculation assumes a very low output impedance from your sensor. If this isn't much less than 10K, then it has to be added to R13 for the gain calculation.)
By ezflyr

Yeah, I tried the circuit as shown with a range of currents thru the hall sensor, and it IS working, just not as I originally assumed. I found another op-amp, the TS931ILT, which has the same footprint and can be powered by the same +8V as the sensor. That should solve the common mode issue.

I really don't do much with op-amps (obviously!), but I think I am going to get LTSpice and play around a bit!