how do you removing a voltage offset using an opamp? - Page 1
Forum section: electronics / beginners

author: electronics man
author_rank: Frequent Contributor
timestamp: November 01, 2014, 04:29:26 pm
content: hi, i am designing a power supply which uses a hall effect current sensors to measure the current, this chip outputs half of Vcc at 0A (in my case Vcc = 5v therefore it outputs approximately 2.5v at 0A), the chip has a sensitivity of about 100mV per amp, so if one amp is passing through it it outputs about 2.6V so what i would like to do is remove 2.5V from this to get 0.1V which i can amplify and send to an ADC.so would it be possible to use an opamp as an adder and add -2.5V to the output of the chip to get the current measurement?

author: electr_peter
author_rank: Unknown
timestamp: November 01, 2014, 04:45:28 pm
content: Quote from: electronics man on November 01, 2014, 04:29:26 pmYes, in principle you could do that. Op amps allow to change input to output using this formulaV_out = alpha * V_in + betaalpha (multiplier) can be positive/negative, more than 1 or less than 1 in absolute terms. beta (offset) can also be positive/negative.So choose alpha = 1 (or bigger, or -1 and add inverter), set beta to required offset and find op amp configuration that maches it. There is more than one way to do it.If you are not experienced with op amp math conversions, see some circuits online (TI has a guide on op amps math).Just check that you have enough voltage difference buffer from op amp rails (see data sheet about your op amp min/max output voltages).

author: max_torque
author_rank: Super Contributor
timestamp: November 01, 2014, 05:00:51 pm
content: It sounds like you have Bipolar current sensors, that are capable of measuring current in two directions. Often, you'll find that there is a similar part, with a slightly different part number that is Unipolar and hence has a ratio metric output without a static bias! This also gives you a nice boost in resolution for any given range of current measurement. Worth checking before you get involved in op-amps etc ;-)

author: Neverther
author_rank: Regular Contributor
timestamp: November 01, 2014, 06:37:29 pm
content: If you are using ACS712, note that they drift on startup and take some time to stabilize and not that accurate on low currents.I tried using 20A one (~7A supply) but the tuning was annoying and performance was poor.Ended up using salvaged currentshunt with some low offset opamp and after some tuning reading the current from 5mm led was somewhat accurate (opamp output was on cheapo 1mV resolution panelmeter), high currents were also pretty good.Good enough for DIY slaptogether powersupply.

author: Rolo
author_rank: Regular Contributor
timestamp: November 01, 2014, 06:54:10 pm
content: If you are using a ACS712 you find an example in the datasheet where an opamp is used. It increases the gain but by adjusting the R1/R2 middle you can also shift the offset. I have used this configuration in my PSU, with success. I used a LM358 and tweaked the resistors. You have to keep in mind to stay within the voltage output swing of the opamp for the current range you want.Section from the ACS 712 Datasheet :My configuration, it's designed for 0 to 3.5 Amps using the ACS712/5Amp board.

author: Smokey
author_rank: Super Contributor
timestamp: November 01, 2014, 07:25:56 pm
content: These allegro hall sensors are great chips for certain applications, but there are definitely some things to watch out for.These are all small effects, but still something to keep in mind. If you are using the full range of many 10s of amps, the super low levels shouldn't be as important. If you are concerned with super low levels of current, you might be better off with a shunt solution, but then you have to figure out your own voltage isolation which can make the circuit much more complex very quickly.1) Like was said above, they need some time to thermally settle after power up.2) They are hall sensors that measure magnetic fields so it weakly picks up the earths magnetic field. Turn one of these over while monitoring the output and you can see it change with orientation.3) There is actually a fair bit of noise on the output, so really low currents aren't very accurate. Amplifying the output to get better low current readings doesn't really work because you are just amplifying this noise inherent in the chips.

author: electronics man
author_rank: Frequent Contributor
timestamp: November 02, 2014, 04:28:20 pm
content: i am using the ACS758 not the 712. i was thinking of using a shunt solution for the low level measurements and using a relay to switch the 758 in at higher currents. I'm doing this so that i don't get a large burden voltage. the 758 actually seems rather stable. i may just buy a 712 and use the configuration in the data sheet, and thank you for the much needed support.

author: Neverther
author_rank: Regular Contributor
timestamp: November 02, 2014, 10:26:17 pm
content: How many amps are you pulling out of the supply?If the answer is "a lot" you might want to move your sense feedback to the output terminals after all current measuring and wiring.My thoughts during build: Do I really care about 70mV drop on shunt and a lot more on wiring and connectors at max load? Nah, it was never a precision supply anyway.Measured the actual drop at 80mV at two amps, 20mV from the shunt. Rest from the connections and wiring, so the shunt played a small role in the show.