

The ACS712 is a Hall effect-based current sensor capable of measuring both AC and DC currents up to ±5A. It outputs an analog voltage proportional to the current flowing through the sensor, making it an ideal choice for applications requiring precise current measurement. The sensor is compact, easy to use, and provides electrical isolation between the measured current and the output signal.








The ACS712 module typically has three pins for connection:
| Pin Name | Description |
|---|---|
| Vcc | Power supply input (4.5V to 5.5V). Connect to the 5V pin of your microcontroller. |
| Out | Analog voltage output proportional to the current being measured. |
| GND | Ground connection. Connect to the ground of your circuit. |
// Example code to read current using the ACS712 sensor with Arduino UNO
const int sensorPin = A0; // Connect the Out pin of the ACS712 to A0
const float sensitivity = 0.185; // Sensitivity of ACS712 (185 mV/A)
const float vcc = 5.0; // Supply voltage to the sensor (5V)
const float zeroCurrentVoltage = vcc / 2; // Output voltage at 0A (2.5V for 5V supply)
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(sensorPin, INPUT); // Set the sensor pin as input
}
void loop() {
int sensorValue = analogRead(sensorPin); // Read the analog value
float voltage = (sensorValue / 1023.0) * vcc; // Convert 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 the next reading
}
No Output Voltage or Incorrect Readings:
High Noise in Output Signal:
Output Voltage Does Not Change with Current:
Offset in Zero Current Voltage:
Q1: Can the ACS712 measure currents higher than 5A?
A1: No, the ACS712-5A variant is designed for currents up to ±5A. For higher currents, use other ACS712 variants (e.g., 20A or 30A).
Q2: Can I use the ACS712 with a 3.3V microcontroller?
A2: Yes, but ensure the sensor is powered with 5V and the output voltage does not exceed the microcontroller's ADC input range.
Q3: How do I improve the accuracy of the sensor?
A3: Perform a calibration, use a stable power supply, and add noise filtering capacitors.
Q4: Is the ACS712 suitable for high-frequency current measurement?
A4: The ACS712 has a bandwidth of 80 kHz, making it suitable for most applications, but not for very high-frequency signals.