Reading Sensing and Controlling current flow is a requirements in a wide variety of application including, over-current protection circuits, switching mode, battery chargers, power supplies, digital watt meter and programmable current source, etc.. The ACS721 current reading module is based on ACS712 Sensor which can detect AC, DC current signal accurately.

Current_Module

The maximum AC / DC can be detected using ACS712 will reach 30 amp and present current signal can read via analog IO port of Arduino, Product available for this module are 30A, 20A, 5A. for this demonstration we will used the ACS712 30A.

arduino_ACS712 ACS712-30A

DC Current Measuring Sketch

Download the source code here > 14Core DC Current Measure

AC Current Measuring Sketch

Another Example of the AC712 Alternative Formula 

 

Download the source code here > 14Core AC Current Measure

Download AC712 Datasheet here > ACS712-Datasheet

 

Introduction of ACS712 Current Sensor Module – 30A with Arduino
Facebooktwitterredditpinterestmail

JLCPCBPCBgogoPCBway4pcb

11 thoughts on “Introduction of ACS712 Current Sensor Module – 30A with Arduino

  • at
    Permalink

    Hey what parameters do I need to change for 30 A sensor

    amplitude_current=(float)(sensor_max-512)/1024*5/185*1000000;

    Reply
    • at
      Permalink

      1023 – 512 = 511 * 234375 = 119,765,625 quarter microamps / 4,000,000
      = 29.9410625 Amps close to 30amp

      Reply
      • at
        Permalink

        I see , but can you explain what each number means and reform this amplitude_current=(float)(sensor_max-512)/1024*5/185*1000000; for 30A what do i need to replace

        Reply
  • at
    Permalink

    its very unreliable when using arduino with usb, because codes take ideal 5 volts into consideration, while in real world this dosent happen, and thus the readings fluctuate. I have tried and made this work, now all aspects of sensors and formulas are taken from current voltage, which are measured by secret arduino voltmeter.

    Reply
  • at
    Permalink

    (512)——-> adc value for 2.5V
    1024——->adc value for 5V both are constant for acs712
    *5———> 5V arduino analog pin max value
    185——->its from datasheet and its for 5A if we will use 30A censor we have to change it 66
    amplitude_current=(float)(sensor_max-512)/1024*5/66*1000000 so it will change like this for 30A

    Reply
  • at
    Permalink

    And I have a question too How can I use both code for it I mean I have to measure ac and also dc current

    Reply
  • at
    Permalink

    Well yet another code for this sensor doesn’t work… literally copied and pasted it, uploaded… my output is as follows:
    72.04
    72.04
    72.04
    72.04
    72.04
    72.04
    72.04
    72.04
    72.03

    Thats without pressing the button to connect the motor to the power (which uses around 300mA).

    Why on earth does the code from any site never work for this sensor? (I have two of them and both have the same result).

    Reply
    • at
      Permalink

      #include
      //current censor
      const int sensorIn = A1;
      int mVperAmp = 66; // use 100 for 20A Module and 66 for 30A Module
      int RawValue= 0;
      int ACSoffset = 2500;
      double Voltage = 0;
      double Amps = 0;

      void setup() {

      }
      void loop() {
      //Current calculate
      RawValue = analogRead(sensorIn);
      Voltage = (RawValue / 1024.0) * 5000; // Gets you mV
      Amps = ((Voltage – ACSoffset) / mVperAmp);
      Serial.print(“Current: ” );

      Serial.print( Amps );
      Serial.println(” A”);
      }

      I use this code and it worked on my project bro for 30A censor I hope it will help u too

      Reply
  • at
    Permalink

    #include
    There is this at the first in code I accidently deleted it

    Reply
  • at
    Permalink

    Hi. I connected the acs712 module to Arduino like the figure and tried your code, but it shows the module between negative 28 and 30 amps …… I do not know what to do.

    Reply
  • at
    Permalink

    Hi, We are using this sensor for reading ac current but the sensor will read incorrectly and when the sensors are not connected to the arduino mega,there is still a reading output in the lcd.Why is this happening?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *