i have a hall effect current sensor that puts out 2.5 volts at no load, ~0 volts at -80 amps, and ~5 volts at 80 amps. i have no need for measuring current going the other direction, so im only interested in voltages from 2.5 to 5 volts. does anyone know of any good ways to scale this? i was thinking a couple of diodes to drop the voltage followed by an op-amp to scale it. any better ideas?
Firstly, do not use diodes. These are non linear devices and cannot be used to accurately drop voltage.
Why do you need to scale via an opamp, other than adding complication to what could be an extremely simple circuit.
With 1000:1 resolution (10bit) over the 5 volt span, an effective range of 2.5 to 5 volts will give you a 500:1 resolution of your 0-80 amps. Isn't this not good enough for your purpose. After all, if it was an analogue meter, could you really read 1/500 of scale.
Added to the argument is the question of what will you use to calibrate your 1000:1 circuit (0.1%). Most of us work with cheap DVMs which at best are +-1%.
You set your software to set 2.5 volts as 0 amps and 5 volts as +80 amps, with an effective resolution of around 160ma. No calibration required !
mostly i wanted to scale this because at low amperage (1 or 2 amps) i was getting alot of noise. i dont think it was because of the sensor because i checked the output signal on the scope and it seemed pretty damn clean, but i would rather have smaller signals become more significant bits on the DAC so i can just truncate the lower end if i need to. calibration isnt that bad of a problem, i can handle that, but just for my own personal reference its a nice experiment in using op-amps.
i know i dont need to do it but im going to do it anyway regardless because i can.
Ok then, what you need is a single supply inverting opamp to run off say 9 to 12 volts. You need a bias of 2.5 volts onto the +ve input and an overall gain of 2.0. (If you want a 5 volt output you need a supply somewhat higher than the 5 volts )
Connect the 9 (12) volt negative terminal to the arduino ground point.
Place a 25k multiturn trimmer between the arduino 5 volt supply (a stabilised 5 volt reference point) and ground. With the trimmer set at around 50% (2.5 volts) feed this into the +ve terminal of the opamp.
To the output terminal of the opamp connect a 50k multiturn trimmer and feed this back into the -ve input terminal. Between the hall effect device output and the opamp -ve terminal connect a 12k resistor. With the 50K trimmer set at around 24k you will get the 2.0 gain required.
I suggest mutltiturn trimmers so's you can get the calibration set correctly.
To calibrate your hall sensor + opamp setup you will need a variable power supply that can provide a couple of amps output and a suitable high wattage load resistor.
Wind 40 turns of small gauge insulated wire through the sensor core. Now, if you pass 2 amps through the wire, the sensor will read this as 80 amps (2x40). Use something like a 12 volt 40watt car headlight bulb as a suitable load resistor since at 2amps on the variable supply you will be dumping something in the order of 20+ watts into the load resistor.
Suggest you google for a suitable single supply opamp.
is it the ACS712 sensor? it has been said before but you do want an opamp circuit. Putting a reference voltage of 2.5V on one of the input pins should null the 2.5V in to near 0V output.
I suggest that your opamp should also be a "rail to rail" design so you can scale all the way to 5V if that's what you wish to do. Some op-amps will start to chop the signal as low as ...say 3.7V max output for one example.
That's exactly why I suggest powering the opamp from a 9 or 12 volt supply and why I suggested applying half of the 5 volt line (2.5 volts) to act as an offset
By adjusting the offset trimmer the 0volts output can be set and by adjusting the feedback trimmer the output signal (5 volts at 80 amps) can be set.
jackrae, got it.... I had missed that fact in your excellent advice. one thing I will add though is that for a hobby it might be significant effort to come up with the additional voltage rail.
will a non rail-to-rail opamp be able to get to 0V output?.. .I know it will go up to 5V if you have 9V or 12V on the supply but maybe not down to 0V output. I know you have a trimmer in mind to get the 2.5V adjusted but I am not sure (truly, I am quite new at this) if the opamp will allow an output to 0V.
so... maybe LM358 will work in this case.
Oh dear, you win on that one. I was so busy looking to get a +5 volt signal I overlooked not being able to get down to zero volts with a single supply line. However all is not yet lost.
Three choices are open :
a) Using a single power supply (>9 volts) offset the 0 amps output voltage to give an output of say +1.0 volts and the +80 amps to give an output of +5 volts. This gives a linear range of 4 volts for 80 amps, or 0.05 volts/amp - an easy sum to work with and only requiring a simple circuit and one power supply.
b) Use two power supplies to give a +9 and a -9 volt power rail with the centre grounded such that the opamp can give a true 0 to 5 volts output. This gives a linear output of 0.625volts/amp. Not so clean maths and requires two sources of power.
c) Use a single 18 volt power supply with a 9 volt regulator chip to provide a centre voltage (an artificial ground point) of +9 volts. The +18 now becomes +9 and the true 0 now becomes -9. All a bit messy but gives the same results as (b) above.
Personally, I'd go for option (a)
thank you for the advice!
im working on something else right now, but ill tinker around with this on the weekend. ill get back to you if i find something that works.
much appreciated - andres.