

The ACS712 current sensor, manufactured by Allegro Electronics, is a highly 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 accurate and reliable measurements for both AC and DC currents.








The ACS712 is available in multiple variants, each designed for different 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 | 185 mV/A (±5A), 100 mV/A (±20A), 66 mV/A (±30A) |
| Accuracy | ±1.5% of full-scale reading |
| 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 and description:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | IP+ | Positive current input terminal |
| 2 | IP- | Negative current input terminal |
| 3 | NC | No connection |
| 4 | GND | Ground (0V reference) |
| 5 | VIOUT | Analog output voltage proportional to current |
| 6 | NC | No connection |
| 7 | VCC | Supply voltage (4.5V to 5.5V) |
| 8 | NC | No connection |
Below is an example of how to interface the ACS712 with an Arduino UNO to measure current:
// 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., 185 mV/A for ±5A variant)
const float sensitivity = 0.185; // Sensitivity in V/A
// Define the supply voltage of the Arduino (typically 5V)
const float supplyVoltage = 5.0;
// Define the ADC resolution (10-bit for Arduino UNO)
const int adcResolution = 1024;
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 * supplyVoltage) / adcResolution;
// Calculate the current (subtract 2.5V offset for 0A)
float current = (sensorVoltage - 2.5) / 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 variable based on the specific ACS712 variant you are using.No Output Signal or Incorrect Readings
High Noise in Output Signal
Output Voltage Does Not Change with Current
Inaccurate Current Measurements
Q1: Can the ACS712 measure both AC and DC currents?
Yes, the ACS712 can measure both AC and DC currents due to its Hall effect-based design.
Q2: What happens if the current exceeds the sensor's range?
The sensor may saturate, and the output signal will no longer be proportional to the current. Prolonged overcurrent may damage the sensor.
Q3: Can I use the ACS712 with a 3.3V microcontroller?
Yes, but ensure the sensor's output voltage range is compatible with the ADC input range of the microcontroller.
Q4: How do I protect the sensor from high currents?
Use a fuse or circuit breaker in series with the current path to prevent damage from overcurrent conditions.