The ACS712 is a Hall effect-based linear 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 compact, easy to use, and provides isolation between the current-carrying conductor and the output signal, ensuring safety and reliability.
The ACS712 is available in different variants based on the current range it can measure. Below are the key technical details:
Parameter | Value |
---|---|
Supply Voltage (Vcc) | 4.5V to 5.5V |
Current Measurement Range | ±5A (ACS712-05B), ±20A (ACS712-20A), ±30A (ACS712-30A) |
Sensitivity | 185 mV/A (05B), 100 mV/A (20A), 66 mV/A (30A) |
Output Voltage at 0A | Vcc / 2 (typically 2.5V for 5V supply) |
Response Time | 5 µs |
Bandwidth | 80 kHz |
Operating Temperature | -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 | Name | Description |
---|---|---|
1, 2 | IP+ | Current input terminal (positive side) |
3, 4 | IP- | Current input terminal (negative side) |
5 | GND | Ground (0V reference) |
6 | FILTER | External capacitor for bandwidth control |
7 | VIOUT | Analog output voltage proportional to current |
8 | VCC | Supply voltage (4.5V to 5.5V) |
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 output
const int sensorPin = A0;
// Define the sensitivity of the ACS712 (e.g., 185 mV/A for ACS712-05B)
const float sensitivity = 0.185; // Sensitivity in V/A
// Define the supply voltage (Vcc) and zero-current voltage (Vcc/2)
const float Vcc = 5.0; // Supply voltage in volts
const float zeroCurrentVoltage = Vcc / 2; // Voltage at 0A
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 to the Serial Monitor
Serial.print("Current: ");
Serial.print(current);
Serial.println(" A");
delay(1000); // Wait for 1 second before the next reading
}
No Output or Incorrect Readings
Output Voltage Does Not Change
High Noise in Output
Output Voltage Offset
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 select the correct ACS712 variant?
Choose the variant based on the maximum current you need to measure. For example, use ACS712-05B for currents up to ±5A, ACS712-20A for currents up to ±20A, and ACS712-30A for currents up to ±30A.
Q3: What happens if the current exceeds the sensor's range?
Exceeding the sensor's range may result in inaccurate readings or permanent damage to the sensor. Always ensure the current stays within the specified range.
Q4: Can I use the ACS712 with a 3.3V microcontroller?
Yes, but the output voltage range will be limited, and you may need to adjust the calculations accordingly. Ensure the sensor's VCC is still within 4.5V to 5.5V.