Current sensor with instrumentation amplifier (LT1167) - Page 1
Forum section: electronics / projects

author: ManfredKao
author_rank: Newbie
timestamp: November 03, 2014, 03:07:23 pm
content: ObjectiveI'm trying to make a current sensor that can accurately measure current up to 5A. In order to do this I'm using an instrumentation amplifier (LT1167) to measure the voltage difference between a current shunt of 0.01 ohm.Description of the schematicSW1, SW2 and SW3 are used to adjusted the gain of the instrumentation amplifier. A voltage divider is implemented for each of the inputs because the current sensor needs to be able to measure current when the load is on the high side as well as on the low side.Without the voltage divider, +IN gets pulled to 14V and a voltage greater than 14V gets produced internally in the LT1167. Since the supply voltage is 14V, the instrumentation amplifier can't generated a voltage greater than 14V. This will cause an error on the output.The voltage divider is used to drop the input voltages by a factor of 4. This will reduce the overall gain by a factor of 4. The reduction of gain is accounted for by carefully choosing values for the gain adjustment resistors.Problem with the circuitWhen R_load is 0 ohm, the circuit behaves as expected.ie. OUTPUT = G · I_shunt,where G = (0.01/4) · (49400/Rg + 1)However when R_load is not 0?, the output is a significantly higher than expected. Why is this happening and how do I fix this problem?

author: nctnico
author_rank: Super Contributor
timestamp: November 03, 2014, 03:19:04 pm
content: What is the tolerance of those divider resistors?

author: ManfredKao
author_rank: Newbie
timestamp: November 03, 2014, 03:24:22 pm
content: Quote from: nctnico on November 03, 2014, 03:19:04 pmHi, all the resistors are rated at 1%.

author: nctnico
author_rank: Super Contributor
timestamp: November 03, 2014, 03:40:02 pm
content: 1% is not good enough for this circuit. Any difference between the resistors adds to the output voltage. With 0.1% resistors you will get some improvement but still accuracy is probably worse than 5%. A better solution is to use a current sensing amplifier chip. These work in the high side of the load but need a minimum voltage to work. Another option is a use a hall-sensor based current sensor. These usually drift a little bit.

author: krivx
author_rank: Frequent Contributor
timestamp: November 03, 2014, 04:18:26 pm
content: Quote from: nctnico on November 03, 2014, 03:40:02 pmIs 1% tolerance really going to matter? The dividers will have a some error in level of attenuation but that can be calibrated out if needed. It sounds as if the circuit is not working as expected, not that accuracy isn't good enough.

author: nctnico
author_rank: Super Contributor
timestamp: November 03, 2014, 04:27:23 pm
content: If the dividers aren't the same then applying a voltage to them causes an extra difference. In other words: the common mode rejection is poor.

author: krivx
author_rank: Frequent Contributor
timestamp: November 03, 2014, 04:42:47 pm
content: Quote from: nctnico on November 03, 2014, 04:27:23 pmThat's true, but is it the problem? I think OP has to give some more info. Voltages on both input pins under test, output voltage etc.

author: void_error
author_rank: Frequent Contributor
timestamp: November 03, 2014, 05:17:31 pm
content: Quote from: nctnico on November 03, 2014, 03:40:02 pmThat's not entirely true. A lot of high side current monitors will have crap accuracy at less than 5% of the maximum current the circuit has been designed for.Also, there are some that have a minimum common mode voltage of 0V.

author: ManfredKao
author_rank: Newbie
timestamp: November 03, 2014, 06:53:09 pm
content: Quote from: krivx on November 03, 2014, 04:42:47 pmHere are some test data. I varied V3 in order to obtain the different values for I_shunt.I guess I was wrong. The current sensor doesn't work when R_load = 0 ohm, the error is just not as bad as when R_load = 125 ohm or 400 ohm.

author: dannyf
author_rank: Super Contributor
timestamp: November 03, 2014, 07:01:49 pm
content: Take a look at high side current sense. Amplifier.

author: rob77
author_rank: Super Contributor
timestamp: November 03, 2014, 07:10:41 pm
content: i would definitely suggest to go for a high side current sensing chip and accept the accuracy of that chipfew weeks ago i was playing around building a "discrete" high side current sensing circuit, and it's not worth iti used a 50mOhm shunt and used the same concept of voltage dividers to bring the common mode voltage down to 1/3 (but that divides the difference by 3 as well) followed by a diff-amp built of OP07 followed by a gain stage - again op07 to have 0-5V output range. op-amps trimmed to zero offset , every resistor trimmed to spot on (combined several sersitors) to achieve maximum possible accuracy and common mode rejection... and guess what.... thermal drift rendered it to useless...

author: diyaudio
author_rank: Frequent Contributor
timestamp: November 03, 2014, 07:31:25 pm
content: Quote from: ManfredKao on November 03, 2014, 03:07:23 pmAlthough im sure you can make a very accurate current measuring system with 1% (low tempco) resistors and compensate (calibrate) the analog loop in software (much more educational and cheaper with a steeper learning curve ) today many solutions and options exists..As dannyf already pointed out see high side current sense options, for $5 current sense amplifier, you get all the bells and whistles factory calibrated.see the link below, ADI sent me a few samples of their Current Sense Amplifiers few months ago I haven't tested them yet, but they look favourable.http://www.analog.com/library/analogdialogue/archives/42-01/high_side_current_sensing.htmlhttp://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/products/index.html

author: ManfredKao
author_rank: Newbie
timestamp: November 03, 2014, 07:43:59 pm
content: Quote from: diyaudio on November 03, 2014, 07:31:25 pmThe circuit I'm designing needs to be able to measure current on the high side as well as the low side. Is there a current sense amplifier chip with adjustable gain that can accurately measure current from both sides?

author: diyaudio
author_rank: Frequent Contributor
timestamp: November 03, 2014, 07:54:58 pm
content: Quote from: ManfredKao on November 03, 2014, 07:43:59 pmNo. you need a bidirectional current sense amplifier.

author: radian
author_rank: Contributor
timestamp: November 03, 2014, 08:14:22 pm
content: Shouldn't measuring current using a differential amp/instrumentation amp be possible using simple amplifier chips instead of some fancy current sense chip? After all, Dave uses a LM358 as a differential amp in his uSupply design (http://www.eevblog.com/files/uSupplyBenchRevC.pdf), or are we just talking about different degrees of precision? At the end of the day, the amplifier just needs to amplify two voltages across the shunt resistor, doesn't seem like it should be that difficult. What I am missing here?

author: dannyf
author_rank: Super Contributor
timestamp: November 03, 2014, 08:19:54 pm
content: Lm358 actually is quite gifted as a high side current sense amplifier due to is pnp input pair.an instrument amp is better, particularly if the common mode goes outside of supply rails.

author: diyaudio
author_rank: Frequent Contributor
timestamp: November 03, 2014, 08:58:41 pm
content: Quote from: radian on November 03, 2014, 08:14:22 pmLM358 only for general purpose use, think of it as the replacement for a 741, for today standards.. OP07 cheaper and more stable, used for low frequency applications like these if you want go the "instrumentation amplifier route."http://www.ti.com/lit/ds/symlink/op07d.pdf

author: rob77
author_rank: Super Contributor
timestamp: November 03, 2014, 09:34:01 pm
content: Quote from: radian on November 03, 2014, 08:14:22 pmLM358's common mode goes to positive rail - and actually that's the ONLY benefit of LM358 in this application (high side current sensing). but in terms of input offset and thermal drift it's just unusable in higher accuracy applications.for example if we consider a small range and 1/100 resolution (e.g. 0-1 Amp with 10mA res.) current sensing and 2-5% accuracy is sufficient and we can afford a significant shunt resistance (0.5 - 1Ohm), then lm358 is usable (a typical small power suply)

author: void_error
author_rank: Frequent Contributor
timestamp: November 03, 2014, 10:01:21 pm
content: Thisapp notemight be useful...