I am not getting a change of the input signal from the ACS712 [20A model] when pulling two amps @ 110v through the Hall Effect terminals. The signal into the analog input of the Uno Wifi Rev2 is around 2.475 volts DC. Which is real close to the 2.50 v baseline it is supposed to work from.
I have an ammeter on the circuit and pull right at 2 amps with an angle grinder for a load. I had a friend lend me his ACS712 [20A] to try. It was new still in the packaging. I get the same result with no change on the AI. The ACS might vary a few thousands of a volt but nothing close to what it should be doing with 2 amps running through it. I also changed the analog inputs and verified the supply voltage is over 4.9vdc. The fact that two different sensors are exhibiting the same result makes me wonder where the probelm actually is.
Time for a current relay I guess. More expensive but less headaches probably.
By the six sigma principle, the odds might be about 1,000 billion to 1.
"The goal of Six Sigma is to achieve a level of quality that is nearly perfect, with only 3.4 defects per million opportunities." LOL.....maybe I need to go buy one of those megamillions lottery tickets. ![]()
...or some insurance. ![]()
It’s probably a good time to show your schematic and a photo of your assembly
The sensor outputs an AC voltage when measuring AC current, from which you have to extract the average or peak voltage by sampling the wave many times.
My guess is that you're expecting a DC voltage from the sensor, and you're only taking one snapshot.
Leo..
That is very interesting, since the data sheet for your device shows 100mV per Ampere.
The sensor outputs VCC/2 when idle, and about 100mv/A deviating from that.
Both idle voltage and output sensivity are depending on the supply voltage.
Which is a good thing if you use the ratiometric A/D of a common Arduino.
Leo..
AC or DC...?
...and once again...schematic.
Post the code you have tried.
Leo..
Try this (untested).
It produces an A/D value that can be converted into a current value.
The sketch only shows the principle of peak measurement.
Leo..
const byte sensorPin = A0;
int minPeak, maxPeak; // peak values
int rawValue; // peak to peak
unsigned long startMillis;
void setup() {
Serial.begin(9600);
}
void loop() {
maxPeak = 0; // reset
minPeak = 1023; // reset
startMillis = millis(); // mark
while (millis() - startMillis < 16) { // 15ms is 3/4 of 50Hz wave
rawValue = analogRead(sensorPin); // sample
if (rawValue > maxPeak) maxPeak = rawValue;
if (rawValue < minPeak) minPeak = rawValue;
}
rawValue = maxPeak - minPeak; // final peak to peak value
Serial.println(rawValue);
delay(500); // dirty delay
}
In addition to @Wawa code here is a good tutorial on measuring AC curent:
Just a warning.
Those ACS712 boards are IMHO not safe for measuring mains voltage.
The trace separation between mains voltage and your Arduino ground is maybe 1 mm.
The Instructables dude made it worse by removing the screw terminal, and soldering the wires flat against the Arduino ground plane of the board.
Mains current should be measured with a current transformer.
Use those ACS712 boards for low voltage only.
Leo..
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.