Pages: 1 [2] 3   Go Down
Author Topic: Measuring Current/Voltage with arduino ?  (Read 34017 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, I'll give it a shot tonight and see how it works. Thanks for everybodies help and especially Mem  smiley
Logged

USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 73
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

« Last Edit: April 06, 2008, 12:02:17 pm by AVRman » Logged


0
Offline Offline
Full Member
***
Karma: 0
Posts: 140
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Logged

Connecticut, US
Offline Offline
Edison Member
*
Karma: 2
Posts: 1036
Whatduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley )
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 smiley



hope this helps,
Lieven
« Last Edit: October 05, 2009, 03:53:15 pm by lievenstandaert » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34146
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

do u hav the complete circuit diagram for this project ?
Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1389
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1389
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Leicester, MA USA
Offline Offline
Jr. Member
**
Karma: 1
Posts: 88
Arduino newbie
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27088
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: December 18, 2010, 12:19:01 am by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Leicester, MA USA
Offline Offline
Jr. Member
**
Karma: 1
Posts: 88
Arduino newbie
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks a ton! I'll see what I can come up with. it's always nice getting help from a local smiley
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27088
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: 1 [2] 3   Go Up
Jump to: