I am using an Arduino Mega and an LCD to measure, log and display the current through a typical AC 120V 60Hz wire. I'm not concerned with the logging or display I can handle that.
I am using a non invasive CSLA2CD Honeywell current sensor: http://www.mouser.com/Search/ProductDetail.aspx?R=CSLA2CDvirtualkey67810000virtualkey785-CSLA2CD
The sensor: - Currently set up using the 5V and GND from the Arduino with the output pin directly to A0.
At zero current it reads a nice and happy 512 or half of the 5V (it's more like 4.89V according to the multimeter so half is actually slightly less than 2.5V)
Using a 1V current source and a 1Ohm 10W resistor I put approximately 1 Amp through the loop and depending on the direction of the current it will happily jump to 517 or 507.
The problems: - Resolution, I need no where near 72A. I want a maximum of approximately 15A.
I don't really NEED to measure current in either direction for typical 120V AC wall current as long as I have it wired correctly right?
Amplifying the output from the current sensor and keeping 0 current at 2.5V or at least half of AREF.
Noise, perhaps I need a LPF, adding gain seems to significantly increase noise in the reading.
What I need: - Resolution of approximate a tenth of an Amp from 0 - 15A. More would be nice, but I'd be content with that.
Desired solutions: - The solution I'd like to use is with an op amp or two to give a gain of approximately 5 to the output and keep it centered at 2.5V, I'm considering a circuit similar to the one outlined for the inverted pendulum potentiometer by Microchip: http://ww1.microchip.com/downloads/en/AppNotes/00964A.pdf See top diagram on Figure 8.
Alternative solutions/thoughts: - I've currently been playing with the internal AREF as well which when I used the internal 1.1V or 2.6V produced unacceptable amounts of noise and variations which changed drastically from input voltage (plugging in another USB device in to the same computer was enough to through it off by 20 points) however using an EXTERNAL AREF with a simple voltage divider from the Arduinos 5V produced much better results, I'm not sure it's quite what I want, besides I still need to shift it.
Solutions I don't want: - Get another sensor, the CSLH3A45 is only 45A, however it is an interesting package I'd rather not mess with.
- Another interesting and slightly cheaper sensor I could try, http://www.seeedstudio.com/depot/noninvasive-ac-current-sensor-30a-max-p-519.html?cPath=84_91
Ok enough, pictures!
The little black board is the voltage divider for Aref, I tried to keep it away from all of the interesting things to the right. I'm using .5K on the 5V side and 1K on the GND side giving me ~ 2/3 * 5V = 3.33V for an AREF or about a 50% gain on our signal (512 * 1.5 = 768, I'm hovering around 778-779 with no current which is within tolerance from resistors).
And try your best not to cringe at the LCD connections, I have a PCB coming to clean that up nicely which I spent quite a bit of time on.
Also interesting, oversampling for more resolution...