Go Down

Topic: ACS712 sensors not outputting any readings. (Read 164 times) previous topic - next topic

fuzzybabybunny

Oct 12, 2017, 08:34 pm Last Edit: Oct 12, 2017, 08:53 pm by fuzzybabybunny



These are the 5A versions. Both are connected to a common ground and a common +5V on a breadboard.

The 120V AC and 12V DC lines are the negative wires. I can get current readings using my multimeter on both of them.

When I place my multimeter on the bidirectional AC712 GND and OUT pins, the voltage always stays at 2.5V (signifying no current). For the 120V AC, I would expect the voltage to constantly fluctuate between the GND and OUT, since I have to take numerous samples and average out the analog readings in my Arduino code for AC voltage, but my multimeter reading is pegged at 2.5V. For the 12V DC, I would expect a constant non-2.5V reading because there are things running on 12V.

Basically the ACS712 always outputs 2.5V regardless of current being run through them.

Thinking there might be some kind of interference from being mounted side by side, I unplugged one ACS712 but the remaining one still read 2.5V.

Am I hooking these things up wrong?

edgemoron


Wawa

For the 120V AC, I would expect the voltage to constantly fluctuate between the GND and OUT,

since I have to take numerous samples and average out the analog readings in my Arduino code for AC voltage,

but my multimeter reading is pegged at 2.5V.
No. The sensor outputs an AC voltage, centered around 2.5volt VCC/2.

If you average the A/D values, you get an average of 512 (no current).

Did you set it to AC voltage?
Leo..

JohnRob

Hi,


I see in you photo, one is marked as "12Vdc line"  This sensor should give you a reasonably stable reading (assuming the dc current is stable).

Keep in mind the output will be  Vcc/2   + or -   0.185 Volts for each amp going through the sensor "primary"

I know you can do the math but sometimes I like to see numbers:
  For instance, if at no current input the output is 2.520 volts, at one amp input the output would be 2.705.  Assuming the polarity of the current is not inverted.

Do you have a multimeter you can test with?  Even an inexpensive one can be very helpful.


TomGeorge

Hi,
How much current are you testing them with.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

fuzzybabybunny

Hmm... it seems that the AC line is working correctly and my multimeter is maybe averaging out the voltage changes over time.

When I use this codehere I do indeed get a current reading, but it's not accurate.

I have a water pump and an air pump running on the AC circuit.

With both on:

0.38-0.41 amps is the current I'm getting from the ACS712 using the code above using 185 mV / amp for the 5A sensor. Vcc is 5V. When I measured the voltage using the DMM between the GND and OUT on the sensor I expected the voltage to continuously vary between like 2.55V and 2.45V, but it stayed constant.

But when measured with a multimeter, the current is 0.222 amps, a difference of ~0.178 amps from the hall sensor.

TomGeorge

#6
Oct 13, 2017, 08:17 am Last Edit: Oct 13, 2017, 08:20 am by TomGeorge
Hi,

Quote
But when measured with a multimeter, the current is 0.222 amps, a difference of ~0.178 amps from the hall sensor.
Did you adjust this;

Code: [Select]
int mVperAmp = 185; // use 100 for 20A Module and 66 for 30A Module


For 5Amp module?
if 20A is 100 mV/A
then
5A is 400 mV/A
But you may have to adjust it get calibration correct.

Tom... :)


Everything runs on smoke, let the smoke out, it stops running....

Wawa

Code used measures peak/peak value.
Might not work that well for inductive loads.
Try measuring/calibrating with a resistive load (incandescent lightbulb or the kettle).
Leo..

MarkT

Hmm... it seems that the AC line is working correctly and my multimeter is maybe averaging out the voltage changes over time.
Yes, multimeters are designed to accurately average over long time periods of a second or so.
Quote
But when measured with a multimeter, the current is 0.222 amps, a difference of ~0.178 amps from the hall sensor.
Yes, that's fine, this is a hall sensor, accuracy is low, noise is high, this is what you get from such
a sensor.   You should be calibrating the zero point, it is not guaranteed to be exactly mis-rail.

If you want accurate current sensing then a non-isolated method using a shunt resistor is needed.

For accurate high voltage AC current measuring a CT is used.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up