Good evening all!
I am a hobbyist just getting started with electronics (discrete circuits, at least). I am working on
interfacing an Arduino microcontroller with a water heater. One of the things that I absolutely want is a
way to measure power consumed.
The simplest way to do this appears to be with an IC such as an Allegro ACS756 because it'll measure up to
50A, but I am also open to other suggestions! The only issue that I have is to get a halfway accurate sample of
power used is to make a bunch of measurements per cycle (10? 20?) and take the average. I would like to use the
microcontroller for other things also and am worried about overloading the processor.
So far, the best way around this seems to be to use a sample and hold setup (LM398?), but then I still have to
strobe the sample-hold chip while locked to the peak and valley of the AC wave going through the ACS756. Simpler
solution would be a capacitor to just hold the output signal of the ACS756 for a few milliseconds.
1 complete cycle of AC power in the US (60Hz) is 16.6 milliseconds, time from 0 to first peak should be around
4ms. I am VERY willing to sacrifice accuracy over a few cycles between the time the heater turns on and off
because it should be dealing in minutes, while the inaccuracy waiting for the capacitor to charge and
discharge is a few cycles...
The partial circuit that I'm thinking looks kinda like this:
R 1M --/\/\/\--
| |
C .047uf -----||----
| |
R 100K | |
| |
sample >--/\/\-------------------> arduino input
from ACS756
(1.5 - 4.5v)
Calculator at http://hyperphysics.phy-astr.gsu.edu/hbase/electric/capdis.html
gives a discharge time of .047s (about 4 cycles)
Calculator at http://hyperphysics.phy-astr.gsu.edu/hbase/electric/capchg.html#c2
Charge time should be about ten times faster with a resistor between capacitor and input of 1/10th value of discharge resistor.
Does this make any sense at all?
Am I headed down the right path?
Is there an easier or better way that I am missing?
Recommendations for basic learning that I am missing?
Thanks all!
DJ
I am a hobbyist just getting started with electronics (discrete circuits, at least). I am working on
interfacing an Arduino microcontroller with a water heater. One of the things that I absolutely want is a
way to measure power consumed.
The simplest way to do this appears to be with an IC such as an Allegro ACS756 because it'll measure up to
50A, but I am also open to other suggestions! The only issue that I have is to get a halfway accurate sample of
power used is to make a bunch of measurements per cycle (10? 20?) and take the average. I would like to use the
microcontroller for other things also and am worried about overloading the processor.
So far, the best way around this seems to be to use a sample and hold setup (LM398?), but then I still have to
strobe the sample-hold chip while locked to the peak and valley of the AC wave going through the ACS756. Simpler
solution would be a capacitor to just hold the output signal of the ACS756 for a few milliseconds.
1 complete cycle of AC power in the US (60Hz) is 16.6 milliseconds, time from 0 to first peak should be around
4ms. I am VERY willing to sacrifice accuracy over a few cycles between the time the heater turns on and off
because it should be dealing in minutes, while the inaccuracy waiting for the capacitor to charge and
discharge is a few cycles...
The partial circuit that I'm thinking looks kinda like this:
R 1M --/\/\/\--
| |
C .047uf -----||----
| |
R 100K | |
| |
sample >--/\/\-------------------> arduino input
from ACS756
(1.5 - 4.5v)
Calculator at http://hyperphysics.phy-astr.gsu.edu/hbase/electric/capdis.html
gives a discharge time of .047s (about 4 cycles)
Calculator at http://hyperphysics.phy-astr.gsu.edu/hbase/electric/capchg.html#c2
Charge time should be about ten times faster with a resistor between capacitor and input of 1/10th value of discharge resistor.
Does this make any sense at all?
Am I headed down the right path?
Is there an easier or better way that I am missing?
Recommendations for basic learning that I am missing?
Thanks all!
DJ