ACS712 AC Current sensor not sensing anything

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
easylab4kids
Posts: 20
Joined: Mon Aug 12, 2019 10:58 am
Location: Ellisras, Suid-Afrika ("South Africa")

Re: ACS712 AC Current sensor not sensing anything

Post by easylab4kids » Wed Nov 17, 2021 6:48 am

Roberthh wrote:
Sun Nov 14, 2021 5:26 pm
The 5A sensor has a six times larger output variation at the same current.
WHAAT? I'm getting crazy. :(

I bought a ACS712ELCTR-05B-T (5A)-version which gives same results of 745 regardless of load :evil: . I used a 40W LED bulb on AC power, with Wemos D1 Mini (ESP8266). I tried my clamp meter, put it around the brown wire and got 0 reading.
My AC has only 2 wired: brown & blue, with interchangeable wall plug. Is the 231V AC, or this European double-wiring unsuited for the ACS712?

Do I have it wired incorrectly from mains --> sensor?

My Wiring is..
blue wire ==> 40W LED light
wallplug brown wire ==> ACS712 in ==> ACS712 out brown wire ==> 40W LED light.

Changelog in this post:
- Fixed various spelling errors.
Last edited by easylab4kids on Wed Nov 17, 2021 11:17 am, edited 4 times in total.
met vriendelijke groet,
Easylab4kids.nl

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ACS712 AC Current sensor not sensing anything

Post by Roberthh » Wed Nov 17, 2021 8:32 am

OK. So if you look into the data sheets of the sensor, it tells about sensitivity:
5A Version: 185mV/A
20A Version: 100mV/A
30A Version: 66mV/A
That's how much the output changes when then input changes by 1A. A 40W equivalent LED bulb has actually 5W consumption. So the current it draws at 230V is 0.02A, giving an output change of 4 mV at the 5A sensor, and 1.4 mV at the 30A sensor. The ADC has a resolution of about 3 mV (3.3V/1024), not considering the noise, which will reduce the effective resolution to ~10mV (but that's another story).
That's why I suggested to make a test with a larger load, like 1000W instead of 5W. Even classic non-LED 100W or 200W light bulb would be better for testing than the 40W LED bulb.

So you have the following problems to master:

- Limited resolution of the ADC
- ADC vs DC measurement
- Wrong offset of the ADC input
- Noise in the signal

easylab4kids
Posts: 20
Joined: Mon Aug 12, 2019 10:58 am
Location: Ellisras, Suid-Afrika ("South Africa")

Re: ACS712 AC Current sensor not sensing anything

Post by easylab4kids » Sun Dec 05, 2021 9:56 pm

I'm not making any sense of it :evil:, and tried without a MCU connected. Only the bare sensor.

No voltage changes detected on the ACS712 OUT-pin :cry:.

Heres wat i tried.
With ACS712 switched off AND no load, measured = 377,8K ohms resistance
With ACS712 switched on AND no load, measured = 2,503V
With ACS712 switched on AND load 10W Led blulb, measured = 2,503V

HUH?!?! 2,503V with/without load?!?

MCU: None. Barebones connected on VCC to my lab bench power-supply.
Sensor used: ACS712ELCTR-05B-T
DC voltage to VCC-pin: 5,01V
AC Input voltage: 231V

My wiring is like this:
Image

Using the example from Andreas Spiess on the ACS712 here.

Is this 2-wired European wiring not suitable?
Can the 5A-sensor not measure such low current use?
met vriendelijke groet,
Easylab4kids.nl

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ACS712 AC Current sensor not sensing anything

Post by Roberthh » Mon Dec 06, 2021 7:01 am

From what you tell, everything is fine. You should try to understand the operation of the sensor. if you look into the data sheet, it says, that the no current output voltage is Vdd/2. At Vdd of 5V, this is 2.5 V. That is what you see. If you connect an AC load, an AC voltage is added to that 2.5 V. The average DC voltage will not change. What you measure with your Voltmeter in DC setting is the average DC value. To see the AC component, you have to switch your voltmeter to AC. With a 100W load, 230V mains voltage and the 5A sensor, you should expect a reading of 100VA/230V * 0.185 V/A = 0.08V. 0.187 V/A is the transfer ratio from the data sheet for the 5A sensor. That's not a lot. I would have expected twice the value.

P.S.: Measuring the resistance at a point under voltage will never return any useful value.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ACS712 AC Current sensor not sensing anything

Post by Roberthh » Mon Dec 06, 2021 9:12 am

Just to show what happens, i have set up a test with an ACS712-05 and a 0.45A AC current. The Picture below shows what you get: an output voltage of 2.5V with a 50Hz AC overlaid with 250mV Pk-Pk or ~0.088V RMS. This 0.088V is what you should get when using an AC measurement with a voltmeter. The mean value of ~2.5 V is what you read in the DC setting of your voltmeter, and that will stay with or without current at the sensing pins.
ACS712_PNG_3.png
ACS712_PNG_3.png (39.98 KiB) Viewed 12883 times

easylab4kids
Posts: 20
Joined: Mon Aug 12, 2019 10:58 am
Location: Ellisras, Suid-Afrika ("South Africa")

Re: ACS712 AC Current sensor not sensing anything

Post by easylab4kids » Mon Dec 20, 2021 9:12 pm

No results. Nothing. I'm stuck. :oops:

I've connected my scope & multimeter connected.

Setup on my Fnirsi DC-6006L bench power supply
VCC to the ACS712 sensor: 5,01V
Sensor consumption: 0,016A / 0,08W with no load active.
Multimeter on output pin: 2,518V with/without load. HUH?!

With a 8W LED bulb as load:
Image

I dont have the smooth 49.99Hz sine wave as per your example.
Neither is there any sign of anything getting connected. :oops: :evil:

I must be using weird wiring, or incorrect connection, or a faulty chip. Ive tried it with 2x chips from Aliexpress and all the same result as above.
Last edited by easylab4kids on Mon Dec 20, 2021 9:25 pm, edited 1 time in total.
met vriendelijke groet,
Easylab4kids.nl

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ACS712 AC Current sensor not sensing anything

Post by Roberthh » Mon Dec 20, 2021 9:25 pm

The signal I have was created with a resistor as load at the output of a transformer, equivalent to a 100W load at 230V. A LED bulb is by no means a clean load, and the signal you can expect form an 8W load is so small, that it disappears in the noise. Using an old filament type 100W bulb should give a cleaner and stronger signal.
Once you manage to deal with that signal, you can improve it to get smaller signals as well.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ACS712 AC Current sensor not sensing anything

Post by Roberthh » Tue Dec 21, 2021 6:52 am

If you measure a symmetric AC current, the average DC output of the ACS712 will always be ~2.5 V, not matter if there is a load or not. And the power consumption of the sensor should not change with the current through the sensor. Everything you see follows the specification, but you do not seem to understand the principle of the ACS712's operation.

About the 100Hz signal on you oscilloscope screenshot: That may result from a poor power supply, or just noise picked up from the air, just like the higher frequency signal you see in the trace, which seems to be 50kHz. That may be created as well by the fnirsi power supply, which uses a switching regulator with up to 100mV output noise. Or another nearby device with a switching regulator (LED bulb, Computer screen, Power supplies of printers, Laptops, Mobile Phones, ....).

easylab4kids
Posts: 20
Joined: Mon Aug 12, 2019 10:58 am
Location: Ellisras, Suid-Afrika ("South Africa")

Re: ACS712 AC Current sensor not sensing anything

Post by easylab4kids » Mon Dec 27, 2021 4:19 pm

I wanna measure low current AC power >=0,01A. Looks like the ACS712 5A-version isnt suited.
So I bought more sensors from Aliexpress and done some more experiments with a ZMCT103C LM358-based hall sensor & current clamp.
No joy.

- The current clamp shows 0,038A current draw.
- The ZMCT103C sensor doesn't have any output V whatsoever, however clearly consistent ON/OFF signal changes on my Siglent scope.
Image
ABOVE: the 'scope is in rolling mode, and shows the moment the on/off switch is pushed.

Above could perhaps also be influenced in a small way by my Fnirsi DC-600L lab power supply.

ZMCT103C sensor
Image

Let me rephrase,;
- How does one measure low current, using an ESP8266/ESP32 or "Arduino"? Looks like the Sonoff POW R2 can,, but how?
- Would't it make sense to have a stable AC voltage reference, then somehow downscale to 5V DC< and route current use thought the 5V?

Getting low current measurements (milliAmps range) with the ACS712ELCTR-05B-T would be most desirable.
Last edited by easylab4kids on Tue Dec 28, 2021 10:20 am, edited 1 time in total.
met vriendelijke groet,
Easylab4kids.nl

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ACS712 AC Current sensor not sensing anything

Post by Roberthh » Mon Dec 27, 2021 5:10 pm

This other sensor will not help you. Only difference in functionality is, that is uses a transformer instead of an Hall element to sense the primary current. The small advantage her is, that you can change the transfer ration of the sensor, so you create a somewhat higher output signals with small currents. But, the output signal structure is the same. So the problems you have with the ACS712 will show up here as well. Again, you should have a DC offset, and the quantity you want to measure is the overlayed AC signal.

The oscilloscope picture below shows a 100Hz signal in the left part overlayed with a 50 Hz signal in the right part, but no DC offset, but positive and negative output swing. That is strange, since there is no negative supply on the board. I could not find schematics for that board. It may create a negative supply internally, even if I could not find any indication of that. Did you power the sensor while testing?

Post Reply