

The ACS712 is a Hall effect-based current sensor that provides an analog output proportional to the current flowing through it. It is capable of measuring both AC and DC currents, making it a versatile component for a wide range of applications. The sensor is available in different variants to measure currents up to ±5A, ±20A, or ±30A. Its compact design and ease of use make it a popular choice for current monitoring and control in electrical systems.








Below are the key technical details of the ACS712 current sensor:
| Parameter | Value |
|---|---|
| Supply Voltage (Vcc) | 4.5V to 5.5V |
| Measurement Range | ±5A, ±20A, or ±30A (depending on model) |
| Sensitivity (Typ.) | 185mV/A (±5A), 100mV/A (±20A), 66mV/A (±30A) |
| Output Voltage | Analog, centered at Vcc/2 |
| Response Time | 5 µs |
| Bandwidth | 80 kHz |
| Operating Temperature | -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 load) |
| 4, 5, 6 | IP- | Current input terminal (negative side of load) |
| 7 | Vcc | Power supply (4.5V to 5.5V) |
| 8 | OUT | Analog voltage output proportional to current |
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 OUT pin
const int sensorPin = A0;
// Define the sensitivity of the ACS712 (e.g., 185mV/A for ±5A model)
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 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
Output Voltage Does Not Change
Inaccurate Current Measurements
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 select the correct ACS712 variant?
A: Choose the variant based on the maximum current you need to measure. For example, use the ±5A model for small currents and the ±30A model for larger currents.
Q: Is the ACS712 safe to use with high voltages?
A: Yes, the ACS712 provides electrical isolation between the current-carrying conductor and the sensor's output, making it safe for high-voltage applications.
Q: Can I use the ACS712 with a 3.3V microcontroller?
A: While the ACS712 is designed for a 5V supply, it may work with a 3.3V microcontroller if the output voltage range is within the ADC input range. However, accuracy may be affected.