## Measure current

17 posts / 0 new
Author
Message

Hello,
I need to measure the current with an AVR. The problem is that I need to measure the current between 1mA and 250mA and that I need the entire 5V on the output. That means I can't have any resistor in the way.
Is there a method for doing this?

Thanks, Regards

A transimpedance amplifier?

Leon Heller G1HSM

There are some hall effect current sensors (see Allegro).

Also, Linear Tech, Maxim, and others, make current sense ICs that use series resistors in the milli-ohm range. Consider: 250ma and 100mOhm will give a 25mV drop. Your wires will have a larger drop than that. Why are you so concerned?

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!

How accurate do you need it to be?

Are you using a 5V regulator? In which case can you measure the current on the input to the regulator? Then if you also measure voltage on the input to the regulator you can deduce the current (=(Vin/5)*Iin).

Hall-effect devices aren't suitable for such low currents.

Leon Heller G1HSM

OK...

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!

Thanks for the replies!

I though of building an active "sensor" that regulates a voltage source infront of a resistor to always supply 5V. I could then read the current from the PWM of the switching supplie. Would that work?

Hmm, in retrospect that was stupid. If you are using a 5V switching regulator with 100% efficiency, that would apply. (i.e. Vout = (Vin*Iin)/5)

However with a linear 5V regulator the current on output would be the same as that on the input, so as long as you have an input voltage that's sufficiently larger than 5V (>= 7V would do for most LDOs) then that would be simplest.

@neldim: in retrospect you missed the point.
The voltage for the switching regulator would obviously be higher that 5V, like 12V or so. Otherwise it would be impossible to compensate the voltage drop.

But I do like the Idea of sensing the current on the input of a 5V regulator. Thanks!

You can pull your REFERENCE for switching regulator (or linear one), from the output side of the shunt resistor (load terminals), so you can measure the output current without disturbing the regulated voltage.

You want one of these:

They're about a dollar each. Use a 0.1 Ohm sense resistor in series with the regulator and hang the input of the '1009 across it. Connect the output to a resistor connected to ground and the voltage across it is directly proportional to the current through the sense resistor.

The '1009 is "self powered" in the sense that you don't have separate power supply and ground connections therefore no worries about getting too close to the power supply supply rails.

Greg

What are you driving that will work using 5.000 V but not 4.975 V?
If it is really that sensitive, you have much bigger problems than this.

And regulators have a 5% tolerance.

Leon Heller G1HSM

dalpilot wrote:
You want one of these:

They're about a dollar each. Use a 0.1 Ohm sense resistor in series with the regulator and hang the input of the '1009 across it. Connect the output to a resistor connected to ground and the voltage across it is directly proportional to the current through the sense resistor.

The '1009 is "self powered" in the sense that you don't have separate power supply and ground connections therefore no worries about getting too close to the power supply supply rails.

Greg

or one of these (Formerly Burr-Brown, now TI):

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-17163-1-ND

Andreas

diaforic wrote:

The problem is that I need to measure the current between 1mA and 250mA and that I need the entire 5V on the output. That means I can't have any resistor in the way.

I'm planning to do about the same, but for 1 mA to 300 A. You can do that with a good 24 bit ADC. I use Linear LTC24XX. You can measure down to a few uV (offset + noise) with those, thus you can use say 0.01 ohm resistor, that would give only 10 uV - 2.5 mV voltage drop at your currents. You can use a short peace of wire or a PCB trace as a 0.01 ohm "resistor". Obviously you need some calibration, since you will not be able to make a 0.01000 ohm shunt and the resistance will change with temperature unless you use constantan.

I'm planning to use a 1 m 16 mm2 battery cable as a shunt resistor.

Greg,

Cool chip, I'd not seen it before. Took a bit to understand the data sheet. Will have to add it to the list of devices to tinker with.

JC