0

I have two ACS712 sensors, one rated for 5A, another—for 20A.

I wanted to test how precise they are, and played with different devices (in my case, old PC fans). I copy-pasted the source code from here, and changed only the Vref value as expected, so that I get a measurement of zero when there is no current. I double-checked, the value remains zero for both ACS712 sensors. The sensor (or the multimeter) is connected in series. Only one sensor (or multimeter) is connected at the same time.

Here's the data I get. Values in parenthesis correspond to the percentage of the value compared to the one got with a multimeter.

Setup Measured by
a multimeter
Measured by
ACS712 5A
Measured by
ACS712 20A
Old CPU fan 87 mA 73 mA (84%) 49 mA (56%)
UPS fan rated 1.9 W 174 mA 170 mA (97%) 97 mA (55%)
Two fans together 0.25 A 244 mA (98%) 146 mA (55%)
Server fan rated at 0.6 A 0.49 A 463 mA (95%) 268 mA (55%)
Three server fans 1.35 A 1,293 mA (96%) 683 mA (51%)

While the 5A variant seems to be slightly off (another possibility would be that the multimeter is off and the ACS712 measurements are exact), things are very different for the 20A-rated counterpart: its values are wrong initially, and for higher current, they are getting wronger.

Why is it so? Is it broken, or have I missed something?

1
  • 3
    nothing's wrong with it. Those values actually look very consistent, just double them for better accuracy. Remember that your 20A one can only sense to the nearest 40ma value (20A / 512 levels) where there is no error whatsoever (0LSBs), which is why they are about useless for hobby applications.
    – dandavis
    Commented Jan 27, 2021 at 19:18

1 Answer 1

4

Your problem is that you are trying to measure motes of dust with a yard stick. The yard stick is great at measuring things in inches and feet, but when you want to find the size of something that's around 1mm in size all you can say is "it's less than an inch" or "smaller than an eighth of an inch".

You have to remember that a 20A sensor has to fit that whole range of 0-20A - that's 0-20,000mA into half the range of the ADC. That's at most 512 graduations on an Arduino, and since you can usually count on "±1 LSB quantisation noise" you really only get half that as a usable value. So you're looking at a resolution of about 40mA at best with an accuracy of ±40mA. When you want to measure small currents they're just going to get lost in the lack of resolution. At 100mA you're still only in the range of just "There might be a current there, somewhere".

For measuring current you need to size your sensor / shunt appropriately to the range of the currents you're sensing. If you're working with small variations in a large DC current then pre-conditioning the sensing to change the offset and amplify the interesting part of the signal is required, so that the signal isn't swamped by the underlying offset. If you're working with small currents then you require a sensor / shunt that gives you an appropriate signal for that current range.

Additionally, different variants of the sensor have different sensitivity: 185 mV/A for the 5A model, and 100 mV/A for the 20A model. The code you are using doesn't take this in account. Using the correct sensitivity, the last value in your table, 683 mA, becomes 1,264 mA (683×185/100=1264). This is close enough, if you consider the ±40mA accuracy.

0

Your Answer

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

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