1

I've been used the ACS712-20A to measure the current flow. Actually I used LIFA program (LabVIEW interface for Arduino).

I used this equation:

current = ((analog read)-2.5 )/ 0.1

But I am still not sure with the result.

Any suggestion?

1 Answer 1

1

According to the datasheet you have 100mV per ampere, and a zero offset voltage of Vcc × 0.5.

So assuming you are correctly converting the ADC reading into a floating point voltage the instantaneous current can be calculated with the formula

i = (Vadc - 2.5) × 10

Or for milliamps,

i = (Vadc - 2.5) × 10000

If you are measuring a DC current that is then all well and good. However, if you are measuring an AC current things get considerably more complex.

To work out an AC current you need to have the peak-to-peak voltage, not the instantaneous voltage. To get that you need to sample the ADC over a number of cycles and find both the maximum and minimum values. You can then subtract the minimum from the maximum to give you the peak-to-peak voltage. That can then give you the peak-to-peak current.

From that you can then calculate the RMS current.

2
  • Wouldnt the peak voltage alone suffice? Aug 17, 2016 at 15:27
  • @TisteAndii If the voltage swings precisely around 0V then yes.
    – Majenko
    Aug 17, 2016 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.