Go Down

### Topic: Measuring Current/Voltage with arduino ? (Read 63524 times)previous topic - next topic

#### tvdbon

#15
##### Mar 18, 2008, 11:04 am
Thanks, I'll give it a shot tonight and see how it works. Thanks for everybodies help and especially Mem

#### AVRman

#16
##### Apr 06, 2008, 06:46 pmLast Edit: Apr 06, 2008, 07:02 pm by AVRman Reason: 1
Once you get the voltage/current in the Arduino,

Here is a video displaying it on an OLED,
http://www.liquidware.org/view.php?id=76&phase=idea

#### skatun

#17
##### Apr 15, 2008, 04:41 pm
I kinda wanna do the same. I have a rc el glider with an brush less motor with regulator. I would like to measure the current, voltage and rpm of the motor. The output effect is around 600W, which yields that the voltage divider needs to scale down 3 Lipo cell = 12 voltage, and around 60 amp for the current.
Is it possible to connect one wire to one of the 3 wires of the regulator to measure  the rpm?
Any suggestion of how I can do this?

Kim Skatun

#### halley

#18
##### Sep 02, 2009, 07:54 pm
Repeating the (unanswered) question above:  I would like to have a 3.3V Arduino board on a vehicle, and the current to be measured is up to 120 amps for about 22 volts.

I understand the idea of a shunt, but I don't know how to scale up the concept to deal with the circuit.  Of course, I also don't want to burn up much power in the measurement function.

#### lievenstandaert

#19
##### Oct 05, 2009, 10:52 pmLast Edit: Oct 05, 2009, 10:53 pm by lievenstandaert Reason: 1
halley:

you would need a really accurate, really small resisitor. The main circuit has a resistance of 0,18 Ohm, if you make a shunt 1/100th f that it will have a voltage drop of 0,22V. But that means a shunt of 0,0018 Ohm.  I see 2 ways you could try.

1- take 50 meter of copper wire (i would take my roll of extension cord, though I'm not sure that could take 120A) . Measure the resistance of this ( say that's 2,0 Ohm)  Then make a linear interpolation and cut a short piece from the wire. Use this as resistor (in my example, this would be a piece of 4,5 cm )
Now, this would still give 120A*0,22V=26W ! of heat dissipation in this wire, which is probably too much. And if the wire gets hot, the resistance will change... Hm. Cutting the short wire in 2 isn't very practical, so lets use 10 equally sized pieces in parallel to build the shunt. This divides the resistance by 10, voltage drop is now 0,022V.

You can use the above multiplying method to build a 'radiator' of wires and build op a resistor that has a small resistance and enough surface to be cooled.

Also, if you can get your hands on a spool of constantan wire, that's very good to make resistors from. This is an alloy designed to have the same resistance as temperature increases.

Method 2: For this method you need an Amp-meter that can measure 120 Amp (mine sure can't)
Just use a piece of the regular wire in the circuit as shunt. Measure the voltage across this wiie with the circuit described above while you place the Amp-meter in the circuit. You can now see what voltage drop across this wire corresponds to what Amperage. Basically, if you have an amp-meter, you can build one

hope this helps,
Lieven

#### Neil

#20
##### Oct 06, 2009, 12:44 am
Quote
Repeating the (unanswered) question above:  I would like to have a 3.3V Arduino board on a vehicle, and the current to be measured is up to 120 amps for about 22 volts.

I understand the idea of a shunt, but I don't know how to scale up the concept to deal with the circuit.  Of course, I also don't want to burn up much power in the measurement function.

You can buy shunts on eBay - typically they drop 50 or 75 mV at full load.

Or, you can buy a DC clamp ammeter attachment - uses a Hall effect sensor to measure DC current. They are used by auto mechanics.

#### Pepe34

#21
##### Oct 06, 2009, 03:34 pm
It depends, how much \$ you are ready to invest into this.
Cheap - self made shunt from a copper wire (inaccurate, large temp coeficient). All shunts needs a low offset, low drift op-amp to convert mV levels to Volts for Arduino analog input pin.
Expensive - Hall efect based current probe for DC current.

#### Grumpy_Mike

#22
##### Oct 06, 2009, 04:17 pm
http://uk.farnell.com/jsp/search/browse.jsp?N=500006+1004254&Ntk=gensearch_001&Ntt=hall&Ntx=
Is a link to a Hall current sensor that measures up to 75Amps.

However if you down load the data sheet you will see they also do a CSLA2DG which measures current up to 150A.

I think they are quite reasonably priced.

#### pandanator

#23
##### Aug 20, 2010, 10:03 am
do u hav the complete circuit diagram for this project ?

#### jackrae

#24
##### Aug 20, 2010, 07:58 pm
As Mike says, the way to go is to use a hall sensor.  The beauty of a hall device is that there is NO loss of voltage in the sensor circuit so full power goes to the load.

Even if you cannot find one with a high enough range, you can get around it by shunting only half of the current around the sensor.

Say you want to measure 150A and you can only get hold of a 75A unit.  Simply make up two lengths of insulated wire of identical length.  Solder them together into a parallel link, after first threading one of them through the sensor.  Because the wire sizes and length are the same, they act as identical parallel "resistors".  Half the current goes through the sensor and half bypasses it.  Simple double the sensor reading to get the full circuit current.

jack

#### jackrae

#25
##### Aug 20, 2010, 11:22 pm
I should also have mentioned that you can decrease the sensitivity of a high capacity hall effect sensor.

Say you have a 200A sensor unit and you only want to measure 0-5 amps.   With a typical 1000:1 resolution, the minimal current increment would be 200/1000 or 200mA.   On a 5 amp range this represents 4%, which isn't very good.

Hall sensors are based upon having only 1 wire running through the coil.  If you loop the wire back around the outside of the sensor and feed it back through the sensor you now have 2 wires each carrying the same current value so the sensor "thinks" there is twice the actual current flowing.

In the above example if the 5A circuit is looped through the sensor 10 times it's range is reduced by a factor of 10 so it effectively becomes a 20 amp sensor.  The incremental resolution factor remains at the example of 1000:1 so the minimum measured increment is now 20/1000 or 20mA.   With 5A flowing this represents 1/4% which is very much better.

I recently had to calibrate a 250A sensor and achieved this by using a 3amp power supply by winding 90 turns of fine wire through the sensor to reduce its range to 250/90 or 2.78amps.

Trust you managed to follow that and appreciate that a hall sensor is much more adaptable than a simple shunt resistor when it comes to measuring current.

Jack

#### SXRguyinMA

#26
##### Dec 18, 2010, 01:57 am
I want to do something similar to this. I've already got this project working 100%:

http://www.thebestcasescenario.com/forum/showthread.php?t=25092

I want to add a current and/or wattage screen to this. This way I'll be able to push a button and cycle through the voltage screen, amperage screen and wattage screen. How would I go about using the remaining input pins and resistor shunts to accomplish this?
http://www.computersandcircuits.com

#### CrossRoads

#27
##### Dec 18, 2010, 06:17 amLast Edit: Dec 18, 2010, 06:19 am by CrossRoads Reason: 1
You get yourself a very low resistance shunt like this

http://www.vishay.com/docs/30135/wsms5515.pdf
http://se.mouser.com/Search/Refine.aspx?Keyword=power+shunt

and run your current thru it. Then you take a voltage measurement across it.
Current (I) is then Voltage (V)/Shunt Resistance (R).
Power in watts is then I^2 x R, or V^2/R, or I*V.

Size the shunt to accomodate the current range you are measuring. You may need to run the voltage thru an op-amp to give it some gain to bring it up in the range where the arduino can get a reading.
For example, say you are trying to measure an amp of current from a 12V source. The arduino wants to measure from 0 to 5V - but you don't want to drop 5V across your shunt, that'd be wasting a lot of power (5V*1A = 5W). You want it smaller, like 5mV, so the power is 5mW. However, that would only be a reading of between 0 and 1 on the arduino ADC (5V/2^10) = 4.88mV. (2^10 = 0-1023 samples). So you would run it thru an op-amp stage or two with a total gain of 1,000 so the arduino can measure 4.88V and provide some dynamic range to your readings.
Of course, the gain is dependent on the tolerance of the op amp and the resistors you choose.

Or, you could add an A/D converter with more bits. Say a 16 bit A/D converter (2^16 = 0-65535 samples) so 1 bit represents 5/65535 = 0.076mV. Then the 5mV would represent an A/D reading of 66 or so.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### SXRguyinMA

#28
##### Dec 18, 2010, 01:42 pm
thanks a ton! I'll see what I can come up with. it's always nice getting help from a local
http://www.computersandcircuits.com

#### CrossRoads

#29
##### Dec 18, 2010, 03:38 pm
No problem, there's a couple of us in the area, focalist is another.
I had to look up Leicester, see you're over the other side of Worcester.
What does SXR stand for?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up

Please enter a valid email to subscribe

### Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy