# DC Current Measurement using ASC712-05A

#### Definition

An electric current is a flow of electric charge. In electric circuits this charge is often carried by moving electrons in a wire. It can also be carried by ions in an electrolyte, or by both ions and electrons such as in plasma. It is measured in Ampere.

## DC Current Measurement using ASC712-05A

The Allegro™ ACS712 provides economical and precise solutions for AC or DC current sensing in industrial, commercial, and communications systems. The device package allows for easy implementation by the customer.

Typical applications include motor control, load detection and management, switch mode power supplies, and over current fault protection. The device is not intended for automotive applications.

The device consists of a precise, low-offset, linear Hall circuit with a copper conduction path located near the surface of the die. Applied current flowing through this copper conduction path generates a magnetic field which the Hall IC converts into a proportional voltage.

ASC712 is available in three different rating 5Amp, 20Amp and 30Amp. It gives 185mV/Amp, 100mV/Amp and 66mV/Amp respectively. Here we are measuring 5Amp current.

ASC712-5A gives 185mV/Amps from this we can calculate the actual current.

Voltage = AnalogRead * (5 / 1024)

Amps = (Voltage-ACSoffset) / mVperAmp

Where:  ACSOffset is 2.5V

#### Components Required

1. ASC712-05A Current Sensor Module
2. Arduino Uno
3. Connecting Wires

## DC Current Measurement Circuit using ASC12-05A DC Current Measurement ASC712 Circuit

To test this circuit use load and power source, Current sensor is connected in series with the load to measure the current. In next session we discuss on current measurement using shunt resistor.

## Arduino Code for DC Current Measurement using ASC12-05A

```/*
Measuring Current Using ACS712
www.circuits4you.com
*/
double mVperAmp = 185; // use 100 for 20A Module and 66 for 30A Module
double RawValue= 0;
double ACSoffset = 2500;
double Voltage = 0;
double Amps = 0;

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

void loop(){
Voltage = (RawValue / 1024.0) * 5000; // Gets you mV
Amps = ((Voltage - ACSoffset) / mVperAmp);

Serial.print("Amps = "); // shows the voltage measured
Serial.println(Amps,2); // the '2' after voltage allows you to display 2 digits after decimal point
delay(1000);
}
```

## Result of DC Current Measurement using ASC12-05A

Open the Serial Monitor from (Tools>>Serial Monitor), Set Baud rate to 9600, See the Current reading in serial monitor. 