I have interfaced it with the arduino board, and LED has been connected in series with a potentiometer as the load, the output of current deflection is observed on the serial monitor of the arduino page.
but there is no deflection in the serial monitor, when there is change in the potentiometer. this is the programing I am using.
float Sensitivity = 0.66 ; // sensitivity in Volts / Amp for 5A sensor
//int voltage = 0;
//int current = 0;
void setup ( )
{
Serial . begin ( 9600 ) ;
Serial.println("ACS712 Current Sensor");
}
void loop ( )
{
float voltage = analogRead ( A3);
float current = ( voltage - 2.5 ) / Sensitivity ;
Serial.print("V: ");
Serial.print(voltage,3); // print voltage with 3 decimal places
Serial.print("V, I: ");
Serial.print(current,3); // print the current with 2 decimal places
Serial.println("A");
The ACS712 is noisy and not accurate. It could be 10% or even 20% inaccurate, depending on how it is used.
If it is 10% inaccurate and you have a 5A version, then the measurement is ±500 mA.
You potentiometer with the led might draw 5 mA.
That means you are measuring 5 mA which can vary ±500 mA.
To really measure 5 mA with, for example, 1% accuracy, it must be ±0.05 mA. So you need a factor 10000 more accuracy.
Please do not use a potentiometer for a LED. Use a resistor. A potentiometer is for low currents, and both the potentiometer and the led can be damaged.
Actually that's a cermet preset pot, they are pretty tough compared to carbon, but the point is valid.
The hall-sensor current sensors in the ACS line are for large currents only, they rely on the magnetic
field from the current in a copper strip being much stronger than the Earth's magnetic field to start
registering meaningful measurements, a few 10's of mA through an LED is not suitable for measurement
with such a sensor (whereas the current in a medium/large electric motor winding typically would be).