Hi i.m using a acs 714 -30 / 30 amp to read the current between the a inverter/charger and a battery bank...
So when i.m charging i have positive readings when dishcarging i have negative readings... so far so good..
im using this code http://arduino.cc/playground/Main/CurrentSensing, the only part of the code i dont understant is the readdinternalvcc ().
now the problem is that this code is reading like 10amps on one read and 0.34 on the next read and then 9 amps etc no steady reading but i know that the load is steady...
i could understand some diff like 10 , 9,8 etc but how do i get a reading at 10amp and the next one 0.xx..
the only difference for the code is that im using analog pin5
i will check with a fluke amp meter when charging...
but when is discharging working as inverter i have a constant load +- 10amp.
and i have the same behavior -10amp in one read and -0.4 on the following read, some times even a positive read ... strange...
Yes it will fluctuate widely at twice the mains frequency, both charging and discharging. You need to sample the current at say 1kHz and average the readings. Perhaps you don't realize that mains power is delivered in pulses, its not continuous.
Hi. i know that Ac have pulses, but the DC part should
be continous ?
i'm trying to measure the amount of amps/h that my batts
are getting from the charger .
if i measure in average, this will no be acurate....
know that Ac have pulses, but the DC part should
be continous ]
Have you actually looked at it on a scope?
Until we stop making assumptions about what we think may be going on, we're all just wasting each others' time.
...which won't tell you anything at all, because it will have an even slower sampling rate than the Arduino.
So we're back to the same question - what does the charging waveform look like?
Hi. i know that Ac have pulses, but the DC part should
be continous ?
No, energy is conserved so those AC pulses have to come from / go to the battery or other energy storage device like a capacitor. Inverters do have capacitors but the bulk of the power is routed to/from the battery (especially when running at full power). So the DC current will be pulses.
To measure the average DC current you will have to sample at many times the mains frequency and average the readings, or use an analog low-pass filter before the ADC conversion. Multimeters use integrating ADCs that average over time anyway.
HI there i'm back to this project...
I'm measuring the acs714 right (i believe ) but i don't know how to do the watt/meter part...
i get watts doing Amps x Volts for instant read i gues is ok ...
now how do i know how many times should i read and sum ?
like
whatthour=wahtthour+readwatts /3600 seconds
if i do this i must read it once each second ? but i will loose measuring between... i bit lost...
Summary:
how do i get a watthour measure reading amps&volts from a dc source... ??
To help make things as simple as possible. DC current and voltage simply means that the "polarity" +side and the -side do not change back and forth. The voltage "level" however can very from almost 0 to infinity up and down as long as the polarity stays the same.
AC current and voltage "alternates" +to- and -to+ on the terminals. In the USA the alternation is 60HZ or 3600times per minute. It makes it handy for clocks because of the relation of 60 seconds in a minute.
fca:
HI there i'm back to this project...
I'm measuring the acs714 right (i believe ) but i don't know how to do the watt/meter part...
i get watts doing Amps x Volts for instant read i gues is ok ...
now how do i know how many times should i read and sum ?
like
whatthour=wahtthour+readwatts /3600 seconds
if i do this i must read it once each second ? but i will loose measuring between... i bit lost...
Summary:
how do i get a watthour measure reading amps&volts from a dc source... ??
Read the current and voltage many times per mains cycle (lets say 1000 times a second), computing the instantaneous power from each set of samples. Sum these samples and scale the result according to the time between samples and you have a value that is the total energy over time. Sample and reset this value every second and you have measured the average power every second...
If you are only interested in watt-hours, then this is simply the energy (in Joules) divided by 3,600. For kilowatt-hours divide by 3,600,000
Thanks for the info....
My arduino is doing other thinks beside measuring the amps from the acs714, like sensing batt voltage, controlling some relays and outputing to serial the information...
because of this i have some "delays" how can i keep in main loop doing all other stuff and at the same time read "1000/sec" that value ?
ARduino multitasking .. i will have look on how to accomplish this ... any tip will be useful regards.
Can you please explain better "Sum these samples and scale the result according to the time between samples and you have a value that is the total energy over time" ?