Arm Mbed and Pelion Device Management support forum

Convert ADC values in Amps - Current Sensor Allegro ACS722-20AB

Hi to all! I’m using an ACS722 current sensor and I have to transform the adc values in amps. How can I do it?

When I use the function read(), on CoolTerm I see values around 0,500. How can I convert this values in amps? Can you help me?

PS: I’m using a board NUCLEO_F401RE with ADC 12 bit resolution, and the sensor has 66 mV/A of sensibility (20 A version in AC current).

Let me know,

Hi Raffaele,

AnalogIn() reads the voltage as a fraction of the system voltage. The value is a floating point from 0.0 (VSS) to 1.0 (VCC). For example, if you have a 3.3V system and the applied voltage is 1.65V, then AnalogIn() reads 0.5 as the value.

So if your system is using 3.3V, then the amps should be (0.53.31000)/66 = 25A.

But it looks incorrect, would you use a multi-meter to first check the value read from ADC is correct?
And please also check the sensitivity again in the datasheet.


Hi Raffaele,

I know this thread is relatively old, but just for the sake of correctness.

You say, you’ re using the ACS722 in the 20A AC version, which indicates that you are working with the bidirectional device ACS722LLCTR-20AB. Furthermore, assuming your system voltage for the ACS722 and the ADC is 3.3V, following is the correct explanation:

If you read 0.5 with the AnalogIn read function, it means half the supply voltage. With the ACS722 connected to the analog input it means 0A ( zero amps ). This sounds reasonable if no current is flowing.
The formular for this situation should be like (( - 0.5)*VCC)/0.066. Result is in Ampere with a range of +/- 20A. This works for other supply voltage, too. If you use a unidirectional device, just remove the “-0.5” and it should work. If you use a different sensitivity, replace the 0.066 by the appropriate value.


1 Like

Nice one, thanks for the correctness!