Hi!
I'm currently working on a project that involves interfacing an ESP8266 with an ACS712-20A sensor to measure AC current. I've consulted various forums on the Internet, and it seems that the midpoint oscillates around 512. However, my sensor is returning a value around 800.
My code:
#define Current_sensor A0
float i;
void setup() {
Serial.begin(9600);
pinMode(Current_sensor, INPUT);
}
void loop() {
i = analogRead(Current_sensor);
Serial.println(i);
delay(100);
}
Is my sensor possibly damaged? I've also attempted to write code for AC current measurement, but it's not accurate. Can someone assist me with this issue?