

The ACS712 current sensor, manufactured by Allegro Electronics, is a highly accurate and versatile device designed to measure the flow of electric current in a circuit. It provides an analog output signal proportional to the current being measured, making it ideal for applications requiring precise current monitoring. The sensor is based on the Hall effect principle, ensuring electrical isolation between the measured current and the output signal.








The ACS712 is available in different variants to measure various current ranges. Below are the key technical details:
| Parameter | Value |
|---|---|
| Manufacturer | Allegro Electronics |
| Part Number | ACS712 |
| Current Measurement Range | ±5A, ±20A, ±30A (depending on variant) |
| Supply Voltage (Vcc) | 4.5V to 5.5V |
| Output Signal | Analog voltage proportional to current |
| Sensitivity (Typ.) | 185 mV/A (±5A), 100 mV/A (±20A), 66 mV/A (±30A) |
| Zero Current Output Voltage | ~2.5V (at Vcc = 5V) |
| Bandwidth | 80 kHz |
| Operating Temperature Range | -40°C to 85°C |
| Isolation Voltage | 2.1 kV RMS |
The ACS712 is typically available in an 8-pin SOIC package. Below is the pinout:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1, 2 | IP+ | Current input terminal (positive) |
| 3, 4 | IP- | Current input terminal (negative) |
| 5 | GND | Ground |
| 6 | FILTER | External capacitor connection for bandwidth adjustment |
| 7 | VIOUT | Analog output voltage proportional to current |
| 8 | VCC | Supply voltage (4.5V to 5.5V) |
The following code demonstrates how to interface the ACS712 with an Arduino UNO to measure current:
// Include necessary libraries
const int analogPin = A0; // Connect VIOUT to Arduino analog pin A0
const float sensitivity = 0.185; // Sensitivity for ACS712-05B (185 mV/A)
const float zeroCurrentVoltage = 2.5; // Zero current output voltage (V)
void setup() {
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int sensorValue = analogRead(analogPin); // Read analog value from ACS712
float voltage = sensorValue * (5.0 / 1023.0); // 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"); // Append unit
delay(1000); // Wait for 1 second before next reading
}
No Output Signal:
Incorrect Current Readings:
Noisy Output:
Sensor Overheating:
Q: Can the ACS712 measure both AC and DC currents?
A: Yes, the ACS712 can measure both AC and DC currents. The output signal is proportional to the instantaneous current.
Q: How do I select the correct ACS712 variant?
A: Choose the variant based on the maximum current you need to measure. For example, use the ±5A variant for low-current applications and the ±30A variant for high-current applications.
Q: What is the purpose of the FILTER pin?
A: The FILTER pin allows you to connect an external capacitor to adjust the sensor's bandwidth, which can help reduce noise in the output signal.
Q: Is the ACS712 suitable for high-voltage applications?
A: Yes, the ACS712 provides electrical isolation up to 2.1 kV RMS, making it suitable for high-voltage applications.