

The ACS712 is a Hall effect-based linear current sensor that provides an analog output proportional to the current flowing through it. It is designed to measure both AC and DC currents with high accuracy and electrical isolation. The sensor is available in different variants, such as 5A, 20A, and 30A, to accommodate a range of current measurement needs. Its compact design and ease of use make it a popular choice for current sensing in power monitoring, motor control, battery management, and other applications.








The ACS712 is available in three variants: ACS712-05B (±5A), ACS712-20A (±20A), and ACS712-30A (±30A). Below are the key technical details:
| Parameter | Value |
|---|---|
| Supply Voltage (Vcc) | 4.5V to 5.5V |
| Output Voltage Range | 0V to Vcc |
| Sensitivity (ACS712-05B) | 185 mV/A |
| Sensitivity (ACS712-20A) | 100 mV/A |
| Sensitivity (ACS712-30A) | 66 mV/A |
| Measurement Range | ±5A, ±20A, ±30A (depending on model) |
| Response Time | 5 µs |
| Bandwidth | 80 kHz |
| Isolation Voltage | 2.1 kV RMS |
| Operating Temperature | -40°C to 85°C |
The ACS712 is typically available in an 8-pin SOIC package. Below is the pinout description:
| Pin | Name | Description |
|---|---|---|
| 1 | IP+ | Positive current input terminal |
| 2 | IP- | Negative current input terminal |
| 3 | NC | Not connected (leave floating) |
| 4 | GND | Ground connection |
| 5 | VIOUT | Analog output voltage proportional to sensed current |
| 6 | NC | Not connected (leave floating) |
| 7 | NC | Not connected (leave floating) |
| 8 | VCC | Supply voltage (4.5V to 5.5V) |
The following code demonstrates how to use the ACS712 with an Arduino UNO to measure current:
// Include necessary libraries
const int sensorPin = A0; // Connect VIOUT to Arduino analog pin A0
const float sensitivity = 0.185; // Sensitivity for ACS712-05B in V/A
const float vcc = 5.0; // Supply voltage to the ACS712
const float zeroCurrentVoltage = vcc / 2; // Voltage at 0A (2.5V for 5V supply)
void setup() {
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int sensorValue = analogRead(sensorPin); // Read analog value from sensor
float voltage = (sensorValue / 1023.0) * vcc; // Convert ADC value to voltage
float current = (voltage - zeroCurrentVoltage) / sensitivity;
// Calculate current in Amperes
Serial.print("Current: ");
Serial.print(current, 3); // Print current with 3 decimal places
Serial.println(" A");
delay(1000); // Wait for 1 second before next reading
}
sensitivity with 0.1 for ACS712-20A or 0.066 for ACS712-30A.No Output or Incorrect Readings
High Noise in Output
Output Voltage Does Not Change
Incorrect Current Calculation
Q: Can the ACS712 measure both AC and DC currents?
A: Yes, the ACS712 can measure both AC and DC currents. The output voltage will vary proportionally with the instantaneous current.
Q: How do I choose the correct ACS712 variant?
A: Select the variant based on the maximum current you need to measure. For example, use ACS712-05B for currents up to ±5A, ACS712-20A for ±20A, and ACS712-30A for ±30A.
Q: What is the accuracy of the ACS712?
A: The ACS712 has a typical accuracy of ±1.5% of the full-scale reading, depending on the variant and operating conditions.
Q: Can I use the ACS712 with a 3.3V microcontroller?
A: Yes, but ensure the output voltage range of the ACS712 is compatible with the ADC input range of your microcontroller.