Measuring Amps with CAI webcontrol

CAI_Support said:
What its output is 60Hz AC signal from ACS712, through a diode being rectified as DC, with additional C1 capacitor to smooth out the AC jitter, just like old transformer power supply.  The diode they specified is a switching signal diode, which has very small leakage current.  If the capacitor is big enough, the DC voltage on the capacitor will reach very close to the peak of the rectified AC.
 
You will need to add another resistor like I mentioned before to "drain" the voltage from the capacitor, so that when primary side AC current reduced, its AC voltage output will also reduce proportionally, the rectified DC without load resistor will remain high.  You will need to adjust this resistor to discharge the DC voltage on the ADC input fast enough to follow the AC change. 
 
Except my understanding is that the output is never negative, so I diode won't rectify it.  As the specs report, the signal is 2.5v at 0 current.  As current moves one direction, the value goes up toward 5v, as the current reverses the output goes down toward 0v.  But it is always between 0 and 5v.  In other words, a sine wave shifted upward where the "0 crossing" actually occurs at 2.5v.
 
Yes, the voltage is always positive and is as you describe.  So technically you could say the diode doesn't rectify, it peak detects.  The need for resistors and the operation is still basically the same.  Without the diode (and cap) you would need to take repeated samples and figure out the peak value in software.  Not that difficult to do but if you prefer  to sample at any time and get a valid reading then the diode/cap circuit allows that. 
 
JimS said:
Yes, the voltage is always positive and is as you describe.  So technically you could say the diode doesn't rectify, it peak detects.  The need for resistors and the operation is still basically the same.  Without the diode (and cap) you would need to take repeated samples and figure out the peak value in software.  Not that difficult to do but if you prefer  to sample at any time and get a valid reading then the diode/cap circuit allows that. 
 
I'm not a EE so probably my understand is wrong on this.  But I though a capacitor would just even out the highs and lows and a diode would just clip off the negatives.  Neither of those concepts leads me to understand how they would take a fluctuating sinusoidal signal that is centered at 2.5 volts and give you a reading of anything but 2.5, no matter how big or small the sine wave was.
 
Lou Apo said:
I'm not a EE so probably my understand is wrong on this.  But I though a capacitor would just even out the highs and lows and a diode would just clip off the negatives.  Neither of those concepts leads me to understand how they would take a fluctuating sinusoidal signal that is centered at 2.5 volts and give you a reading of anything but 2.5, no matter how big or small the sine wave was.
 
Lets assume for a moment we have 2.5V @ 0A, and we're going 1V above and below that due to the AC current.
So voltage out is +1.5V to +3.5V
 
If you used a large enough RC filter, the average will be..... 2.5V!
 
The Diode will drop a small amount (lets say 0.5V for convenience, it is likely much less because of the low currents)
on the WC (capacitor side) of the diode, we're going to be 2V @ 0A, +1V to +3V with the AC
However the diode will prevent any discharge of the capacitor back through the source, so the voltage on the capacitor will be the peak voltage (maximum positive excursion, less diode drop) - but will be slowly discharged via any parallel resistor and of course the loading of the WC board itself (about 200K)
 
rossw said:
Lets assume for a moment we have 2.5V @ 0A, and we're going 1V above and below that due to the AC current.
So voltage out is +1.5V to +3.5V
 
If you used a large enough RC filter, the average will be..... 2.5V!
 
The Diode will drop a small amount (lets say 0.5V for convenience, it is likely much less because of the low currents)
on the WC (capacitor side) of the diode, we're going to be 2V @ 0A, +1V to +3V with the AC
However the diode will prevent any discharge of the capacitor back through the source, so the voltage on the capacitor will be the peak voltage (maximum positive excursion, less diode drop) - but will be slowly discharged via any parallel resistor and of course the loading of the WC board itself (about 200K)
 
OK, starting to get it.  Your using the diode like a check valve to "pressurize" the capacitor.  Kind of like a piston pump filling an air compressor tank.
 
A diode allows current flow in only one direction.  A capacitor will even out the highs and lows but that is when it is fed with a resistor rather than a diode.  With a diode (and a big enough capacitor) the capacitor charges to the peak voltage and holds that voltage.  The resistor across the cap is to slowly discharge it so it will follow lower peaks that occur later.  Here are some examples.  The input waveforms are centered around zero but anything lower than the positive peaks really doesn't matter.  It will follow the peaks just the same on a waveform that is all positive.
 
http://www.allaboutcircuits.com/vol_3/chpt_3/5.html
 
http://www.st-andrews.ac.uk/~www_pa/Scots_Guide/RadCom/part9/page2.html
 
There is a drop due to the diode.  The software would give more accuracy.  But the diode circuit may be accurate enough.
 
Thanks, Jim.
By reading the ACS712 datasheet, it stated the output load is a 4.,7K resistor value. With 5V supply voltage, that is 1mA output max.  If load resistor is greater than 4.7K, the charging current (max 1mA) will be greater than discharge current, so that voltage across the capacitor will be close to the max like your first URL pointed.
 
In the ACS712 datasheet, it has a 2K resistor before diode. I think that resistor can be omitted due to that will limit the charge current. I think they put that in there to avoid short the output to ground.  From the little PCB Out pin, you can directly connect to a !N4448, please make sure follow the polarity of the diode and capacitor, if diode is reversed, you will get range near zero. Once you measured the positive voltage after the diode, Please see attached picture
 

Attachments

  • ACS712toADC.jpg
    ACS712toADC.jpg
    91.4 KB · Views: 10
Think again, I added 1K resistor before diode, so that charge current is limited.
 

Attachments

  • ACS712toADC.jpg
    ACS712toADC.jpg
    89.6 KB · Views: 13
We received the diodes so we made a little test today. Without adding 1K current limiting resistor, nor 10K discharge resistor. Just D1 with a 10uF6V tantalum capacitor. I connected an inkjet printer as load. With printer is off, reading is 198-199. When printer is on, the reading is 199-200. When printer motor starts, the reading is 200-201.  Since the ACS712 board we purchased is 20A version, the printer load only has very small change in reading.  But it is working with only two added components.
 
Sorry the picture is not very sharp due to light is not very bright at my desk.
 

Attachments

  • ACS712toWC8.jpg
    ACS712toWC8.jpg
    84.8 KB · Views: 5
Okay,
I tested with a 60W lamp and a 1800W heater on 120VAC. When load is off, WebControl reading is close to 200.
60W load gets the reading going up by 4, 1800W load getting the reading  to 360.
When the load turn on, the WebControl reading is reached to that load's max reading in two seconds.
When the load turn off, the WebControl reading is slowly going down in 15 seconds.
 
I also noticed the sensor board has some power-on drifting.  When it first turned on without any load, WebControl reading was 205, which over the time  drifted down to 199.  I don't know if that drifting was from the chip on board, or from added diode and capacitor.
 
To get best result, it is probably worth to get amperage rating closer to the load you try to measure. For example, if your load is small, get 5A version of ACS712 board.
 
CAI_Support said:
Okay,
I tested with a 60W lamp and a 1800W heater on 120VAC. When load is off, WebControl reading is close to 200.
60W load gets the reading going up by 4, 1800W load getting the reading  to 360.
When the load turn on, the WebControl reading is reached to that load's max reading in two seconds.
When the load turn off, the WebControl reading is slowly going down in 15 seconds.
 
I also noticed the sensor board has some power-on drifting.  When it first turned on without any load, WebControl reading was 205, which over the time  drifted down to 199.  I don't know if that drifting was from the chip on board, or from added diode and capacitor.
 
To get best result, it is probably worth to get amperage rating closer to the load you try to measure. For example, if your load is small, get 5A version of ACS712 board.
So 1800w is 15 amps.  The webcontrol went from 200 to 360 which is 1.95v to 3.51v or 1.56v rise.  The specs say .1v per amp, which would be 1.50v rise.  So it would appear to be pretty close to spec.  The variance may be that the heater is not exactly 1800w.  But we for sure know we are in the ballpark.
 
Back
Top