ACS712-05B reads out less current than digital Multimeter

I am making a data acquisition project gathering Current, voltage, rpm, etc. For measuring current I am using ACS712-05B module.

Problem: The ACS module shows very less current as compared to digital Multimeter. For testing I am using a load resistor of 6E2 ohm, 50W. My input to load is of 12V, 1 Ampere from IC 7812.

ACS712-05B reading = 0.344 Ampere
Digital Multimeter Reading = 0.95 Ampere (which I think is correct)

I have also attached my readings screenshot. What am I missing?

const int analogIn = A0;
int mVperAmp = 185; // use 100 for 20A Module and 66 for 30A Module
int RawValue= 0;
int ACSoffset = 2490; 
double Voltage = 0;
double Amps = 0;

void setup(){ 
 Serial.begin(9600);
}

void loop(){
 uint16_t avg = 0;
 
 for(uint8_t c=0; c<10; c++)
 {
  
  RawValue = analogRead(analogIn);
  avg += RawValue;
 }

 RawValue = avg/10;
  
 Voltage = (RawValue / 1024.0) * 5000; // Gets you mV
 Amps = ((Voltage - ACSoffset) / mVperAmp);
 
 
 Serial.print("Raw Value = " ); // shows pre-scaled value 
 Serial.print(RawValue); 
 Serial.print("\t mV = "); // shows the voltage measured 
 Serial.print(Voltage,3); // the '3' after voltage allows you to display 3 digits after decimal point
 Serial.print("\t Amps = "); // shows the voltage measured 
 Serial.println(Amps,3); // the '3' after voltage allows you to display 3 digits after decimal point
 delay(1000); 
 
}

You're sure that you have the 05B version? I'm asking because you would get correct results if the chip you're using was the 30A version.

load resistor of 6E2 ohm,

Sorry, but I don't know what that means... 6.2 Ohms? "6R2" would be 6.2 Ohms, and that's too low for your 1A power supply.

I (Amps) = V/R. That's Ohm's Law, it's a law of nature (and it's how the units are defined) and it's always true.*

12.6 Ohms would give you 0.95A
35 Ohms would give you 0.34A

You should probably measure the 12V. The resistor should be within it's tolerance and the marked resistance may be more accurate than your meter.

Anything less than 12 Ohms will "pull" excess current (more than 1A) and the voltage (and current) will probably drop (and other "bad things" can happen).

  • In AC circuits with capacitive & inductive reactance the voltage & current can be out-of-phase and Ohm's Law can appear to be wrong when measuring RMS voltage & current without regard to phase/time.

P.S.
1A from the 78xx is "optimistic", depending on the voltage-dropped across it and the heatsinking. The 7812 can often overheat and shut-down or go flaky (unstable) at/near the 1A maximum rating... You also have to consider the power dissipated by the regulator.

A 7812 is a 12 volt, 1 amp regulator. Placing a 6.2 ohm load on the output will collapse the output voltage and put the regulator into thermal shutdown.

As DVDoug said, measure the 12 volt supply. It cannot be 12 volts under the conditions you outline. You need a maximum of a 12 ohm load to test.

You also failed to mention what is supplying the 7812. It must be at least 3 volts greater than the device output, so a minimum of 15 to 16 volts is required on the input side of the 7812. You'll probably need a heatsink for the 7812 if testing for more than a few seconds at a time.