MEASUREMENT OF DIRECT CURRENT IN BATTERY USING ACS712 CURRENT SENSOR CIRCUIT
CODE ::::
void
setup()
{
Serial.begin(9600);
}
void
loop()
{
float
average = 0; //SET initially average value or dc value of current to zero
for
(
int
i = 0; i < 1000; i++)
{
average = average + (.0264 * analogRead(A0) -13.51);
delay(1);
}
Serial.println("Direct Current Value = ");
Serial.print(average);
Serial.println(
" mA"
);
}
Keep Watching my YouTube Channel.
No comments:
Post a Comment