Sunday, May 23, 2021

Current sensor ACS712 Interfacing with Arduino

 


Hi here one more new little project of My large Project of Home Power Management. I am reading current value using ACS712 current sensor by using Arduino Uno.
Here is little bit calculation for calibration of reading which is very simple.
So first of all we will see the datasheet of ACS712 for specifications of current sensor.

To show Vcc value

Here is important to note the mv/A value mean that sensor produce the output how many mv on 1A. See under datasheets screen shorts that 5A produce 185mv/A, 20B produce 100mv/A and 30B produce 66mv/A.
ACS712 5A ()
ACS712 20B
ACS712 30B

ACS712 Module:  

Circuit Diagram:
One more thing that this sensor give offset value 2.5v at output, So in reading we will minus this value.
Now we know first thing is that ADC of Arduino has 10 bits length. 
So Arduino will convert input into 2^10 values means 1024. So find the mini voltage on which ADC change one bit. (0000000000 to 0000000001)
= 5v/1024 = 0.004883 = 4.883mv or 
= 2.5/ 512 = 0.004883 = 4.883mv
Now 100mv/A in case of ACS712 20B
Now calculate the factor to Convert input reading into current value.
for example 100mv/4.883mv = 20.8 
after that do this 
value = analog.Read(A1) 
I (current) = value / factor (20.8)
now Display this on LCD or serial out or use in any where, where you want.

See the Simulation here:


Download the code and Proteus simulation here: Github link

Click me for code

If you like my work then denote my effort
at JazzCash 03455913812


1 comment:
Write comments

I am very thankful for your precious time

Important Artical

Popular Articals

Total Page views in This Month

© 2019-20 Electronics Garage. Designed by Uzma 0101 & Distributed by elektronicsgarage1.blogspot.com