Simplest way to measure current ?

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
I'm searching the simplest way to measure current with (of course) a shunt and any built-in AVR ADC.
The current would be 0 to 2 A over a Shunt Resistor of 0,47E.
I only need the hardware schematic !
Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm sorry I have not enough time to post an schematic, but, if this is useful to you, all you need is to connect one node of the resistor to both the current 'input' (the current you want to measure) and the AVR pin (try any pin of the PORTA of an ATMega16, for example). The other node of resistor should be connected to ground.

Hope this works!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You mean the Resistor is placed in the GND Path - back from the Load, right?
I always thought of using it in the (24VDC) path right after the Line Regulator !
Thanks very much !

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I'm not sure I understand "back from the load". In fact, you should think about the current-sensing resistor as a load. The key point here is to connect a load as small as possible in series with the path of the current you want to measure, then you measure the voltage drop in this small load and use Ohm's law to estimate the current.

If all you need is a measure without much precision, my proposal would do the job. However, for a precise current measuring, you shoud consider the use of bridge circuits, and instrumentation amplifiers. There's a very boring theory behind metrology... ;)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

like LeoNoAioria describes it's the simplest way to measure current in the
GND path. If you want to measure in the supply path, then you have to bring your level down to avr adc level and then you need further circuits.

What precision do you need and why do want to use this special 0.47 Ohm resistor ?

Regards,
Armin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you really want to measure the high-side current, look at the Maxim parts, I can't remember the part number off-hand, but they work very well.

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, also look to LinearTechnology or TI (INAxxx from BB)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi!
Using 0.47 Ohm resistor in series with the load and with current 2A, gives almost a 1V drop. If It is connected to GND path, then the LOAD'S GND will be with that offset 1V. And if the device is digital you will have a problems with logical levels, if there is any communication with It. Using serial resistor with the load in the VCC path, is more acceptable, but this limits the device supply voltage, the supply voltage will vary with the current. Using small resistor than 0.47 will reduce that effects, but you will need an amplifier for the low currents, because for 12-bit ADC with 5V reference the resolution is 1.2mV, so around 3mA is the lowest current that you can measure with 0.47 Ohm resistor. With lower resistor that the lowest current increase.
There is an aplication note I think It's AVR450 for battery charger, where you can see how you can measure the current, using differntial OpAmp.
I suggest you, if your target device is supplied from Linear Regulator to put the resistor in the INPUT of the regulator, if you have enough input voltage of cource. That will elimanate the influence of the current to target's supply voltage, and also will reduce power dissipation over the regulator. But you must subtract regulator's quescent current from the result!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The simplest in terms of parts count and ease of use is probably the MAX4372.

Some general points on current measurement:

Check the power dissipation in the current sense resistor. At 2A with a 0.47 ohm resistor you will be generating 1.88W

Checkt he voltage drop across the sense resistor with your values it will drop 0.94V. That's not very good for a current meter.

Check the common mode voltaage. Are both terminals of your current meter above ground potential? How are you removing the common mode component?

Do you need to measure current in one or both directions?
The MAX part can only be used to measure current in one direction. If you want to measure current in the other direction, you would need to manually switch the leads.

Search the posts in the forum for the MAX4372 there is a long thread about current measurement using this part. Or just get the datasheet and see if it meets your requirements.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Watch out for power dissipation. 2A through 0.47ohm makes 1V. And that makes 2W. Can your resistor dissipate 2W?

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What's wrong with using one of the AVR's that is specially designed for this purpose. Some of the devices have differential analog inputs with gain that was made to read sense resistors in battery charger applications. Or look at the ATmega406, it has a high resolution sigma-delta ADC for Coulomb measuring. So why won't thesework?

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If i want to measure V & I over an existing PSU (0..24v / 3Amp ) should i put the current through a R (value ??)
and use 2 adc's to measure the voltage drop before and after ??

Or i there another cheap way ??

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using two ADC as you are proposing would give you only a couple of bits of resolution for the current measurement. Check smileymicros's post or look at the MAX part if you do not want to build your own diff-amp. Look on the web for circuits used for measuring current. Look for terms like instrumentation amplifier and difference amplifier. You don't need a full instrumentation amp with only a 10bit ADC but it's good to look at one to see how they work if you are not familiar with them. You will be familiar with the diff-amp after you are done with the project.

Read the post "Amp Hour Meter Circuit" (links always seem to get lost so no link, sorry).

When you say cheap, do you mean money, time or effort?