Why is the output of ACS712 current measurement module unchanged?
-
Why is the output of [ACS712](
link url) current measurement module unchanged? I connected 5.0V to VCC, and the output is always 2.56V. After connecting the current of 2-5A in series, the output has not changed. I use an AC power supply, and I directly use an AC voltage regulator to connect the thermal, serial current. Does anyone know the reason?
-
I think you need to post a clear drawing or photos of the setup and the code you are using.
I donlt know what you mean by "connecting the current in series" nor what "AC regulator" you are using or what "thermal serial currenr" is.
-
It seems the ACS712 current measurement module may not show expected changes due to setup issues, like incorrect wiring or misunderstanding of signal interpretation. Checking if you're measuring the right type of current (AC vs. DC) and ensuring your connections are correct can often resolve this.
-
@ZenBlizzard in case you are measuring the output with a multimeter, you will get an averaged level, since AC current waveform should be sinusoidal and overlapped with the Vcc/2->2.56V in your case.
To measure the current you need a decently high sampling and some math.#define SENSITIVITY 66 // mV/A const float readings = 5; const float alpha = 2.0 / (2 * readings + 1); for (ifor = 0; ifor < 250; ifor++) { // Voltage voltageSampleRead = analogRead(V) * vccRead / 1023 - vccRead / 2; /* read the sample value including offset value*/ voltageSampleSum = voltageSampleSum + sq(voltageSampleRead); /* accumulate total analog values for each sample readings*/ voltageSampleOffsetSum = voltageSampleOffsetSum + voltageSampleRead; // Current currentSampleRead = analogRead(I) * vccRead / 1023 - vccRead / 2; /* read the sample value including offset value*/ currentSampleSum = currentSampleSum + currentSampleRead * currentSampleRead; /* accumulate total analog values for each sample readings*/ currentSampleOffsetSum = currentSampleOffsetSum + currentSampleRead; wait(1); } voltageMean = voltageSampleSum / ifor; /* calculate average value of all sample readings taken*/ voltageOffset = voltageSampleOffsetSum / ifor; reading = (sqrt(voltageMean) - voltageOffset) * 230.0 / 1.0; // read voltage / reported voltage. voltage = round_to_dp(alpha * reading + (1 - alpha) * voltage,1); Serial.println(voltage); if (voltage < 25) voltage = 0; currentMean = currentSampleSum / ifor; /* calculate average value of all sample readings taken*/ currentOffset = currentSampleOffsetSum / ifor; reading = (sqrt(currentMean) - currentOffset) / SENSITIVITY * 1000 - currentZeroOffset; // subtract no load current. if (reading < 0) reading = 0; current = round_to_dp( alpha * reading + (1 - alpha) * current,2);
Suggested Topics
-
💬 LED RGBW Controller
OpenHardware.io • 18 Feb 2018, 01:19 • openhardware.io 26 Mar 2018, 21:20 -
💬 MP3 player with RGB-signal LED (optionally battery powered)
OpenHardware.io • 17 Apr 2017, 19:22 • openhardware.io 16 Aug 2018, 06:25 -
Washing machine and Tumbler Alarm
OpenHardware.io • 28 Feb 2016, 17:03 • openhardware.io 28 Feb 2016, 17:03 -
💬 NModule ADXL accelerometer sensor shield
OpenHardware.io • 28 May 2017, 18:10 • openhardware.io 25 Jul 2017, 19:39 -
💬 Jukebox design journal
OpenHardware.io • 24 Apr 2017, 11:17 • openhardware.io 23 Jul 2017, 21:02 -
💬 In-wall scene controller OLED keypad
OpenHardware.io • 1 Jan 2018, 03:23 • openhardware.io 29 Feb 2024, 03:55 -
2 or more DHT11 - Sensors on one Arduino NANO MYSENSOR
Development • 12 May 2015, 14:11 • michlb1982 13 May 2015, 13:57 -
Mysensors Uno shield
OpenHardware.io • 8 Mar 2016, 20:28 • openhardware.io 8 Mar 2016, 21:07