

The ACS712 is a Hall effect-based linear current sensor manufactured by HandsonTech. It provides an analog output voltage proportional to the current flowing through it. This sensor is capable of measuring both AC and DC currents, making it versatile for a wide range of applications. The ACS712 is widely used in power management, motor control, overcurrent protection, and energy monitoring systems.








The ACS712 is available in different variants based on the current sensing range. Below are the key technical details:
| Parameter | Value |
|---|---|
| Manufacturer | HandsonTech |
| Part ID | ACS712 |
| Current Sensing Range | ±5A, ±20A, ±30A (depending on model) |
| Supply Voltage (Vcc) | 4.5V to 5.5V |
| Output Voltage Range | 0V to Vcc |
| Sensitivity (Typ.) | 185mV/A (±5A), 100mV/A (±20A), 66mV/A (±30A) |
| Bandwidth | 80 kHz |
| Response Time | 5 µs |
| Operating Temperature Range | -40°C to 85°C |
| Package Type | SOIC-8 |
The ACS712 has 8 pins, but only a few are typically used in most applications. Below is the pinout:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1, 2, 3 | IP+ | Current input terminal (positive side of the load) |
| 4, 5, 6 | IP- | Current input terminal (negative side of the load) |
| 7 | VIOUT | Analog output voltage proportional to current |
| 8 | VCC | Power supply input (4.5V to 5.5V) |
| - | GND | Ground (internally connected to the substrate) |
Below is an example code to measure current using the ACS712 sensor with an Arduino UNO:
// Include necessary libraries (if any)
// Define the analog pin connected to the ACS712 VIOUT pin
const int sensorPin = A0;
// Define the sensitivity of the ACS712 (e.g., 185mV/A for ±5A variant)
const float sensitivity = 0.185; // Sensitivity in V/A
// Define the supply voltage (Vcc) of the sensor
const float Vcc = 5.0; // Supply voltage in volts
// Define the zero-current output voltage (Vcc/2)
const float zeroCurrentVoltage = Vcc / 2;
void setup() {
Serial.begin(9600); // Initialize serial communication
}
void loop() {
// Read the analog value from the sensor
int sensorValue = analogRead(sensorPin);
// Convert the analog value to voltage
float sensorVoltage = (sensorValue / 1023.0) * Vcc;
// Calculate the current in amperes
float current = (sensorVoltage - zeroCurrentVoltage) / sensitivity;
// Print the current value to the Serial Monitor
Serial.print("Current: ");
Serial.print(current);
Serial.println(" A");
delay(1000); // Wait for 1 second before the next reading
}
sensitivity with the appropriate value for your ACS712 variant (e.g., 0.1 for ±20A, 0.066 for ±30A).No Output or Incorrect Readings:
High Noise in Output Signal:
Output Voltage Does Not Change with Current:
Offset Voltage at 0A is Incorrect:
Q1: Can the ACS712 measure both AC and DC currents?
Yes, the ACS712 can measure both AC and DC currents. The output voltage will vary proportionally with the instantaneous current.
Q2: How do I choose the correct ACS712 variant?
Select the variant based on the maximum current you need to measure. For example, use the ±5A variant for small currents and the ±30A variant for larger currents.
Q3: What is the accuracy of the ACS712?
The typical accuracy is ±1.5% of the full-scale reading, but this may vary depending on the operating conditions and calibration.
Q4: Can I use the ACS712 with a 3.3V microcontroller?
Yes, but you must ensure the sensor is powered with 5V and use a voltage divider or level shifter to scale the output voltage to 3.3V.
Q5: Is the ACS712 isolated from the high-current path?
Yes, the ACS712 provides galvanic isolation between the high-current path and the low-voltage control circuit.