The ACS712 30A is a Hall effect-based current sensor designed to measure both AC and DC currents up to ±30A. It provides an analog voltage output that is proportional to the current flowing through the sensor. This compact and reliable sensor is widely used in power monitoring, motor control, battery management systems, and overcurrent protection circuits. Its ability to measure high currents with electrical isolation makes it a popular choice for various industrial and hobbyist applications.
The following are the key technical details of the ACS712 30A current sensor:
Parameter | Value |
---|---|
Supply Voltage (Vcc) | 4.5V to 5.5V |
Current Measurement Range | ±30A |
Sensitivity | 66mV/A |
Output Voltage at 0A | Vcc/2 (typically 2.5V for 5V Vcc) |
Response Time | 5 µs |
Bandwidth | 80 kHz |
Operating Temperature | -40°C to 85°C |
Isolation Voltage | 2.1 kV RMS |
The ACS712 30A module typically has three pins for interfacing:
Pin | Name | Description |
---|---|---|
1 | Vcc | Power supply input (4.5V to 5.5V). Connect to the 5V pin of your microcontroller. |
2 | Out | Analog output voltage proportional to the current being measured. |
3 | GND | Ground connection. Connect to the ground of your circuit. |
Additionally, the module has two screw terminals for the current-carrying wire:
The following code demonstrates how to use the ACS712 30A sensor with an Arduino UNO to measure current:
// Define the analog pin connected to the ACS712 output
const int sensorPin = A0;
// Define the sensitivity of the ACS712 30A sensor (66mV per amp)
const float sensitivity = 0.066; // 66mV/A
// Define the supply voltage (Vcc) in volts
const float Vcc = 5.0;
// 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 a voltage
float sensorVoltage = (sensorValue / 1023.0) * Vcc;
// Calculate the current in amps
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
}
sensitivity
value (66mV/A) is specific to the ACS712 30A version. Ensure you use the correct value for other versions.zeroCurrentVoltage
is assumed to be 2.5V for a 5V supply. If your sensor has a slight offset, adjust this value accordingly.No Output or Incorrect Readings
High Noise in Output
Output Voltage Does Not Return to 2.5V at 0A
zeroCurrentVoltage
value in your code.Output Voltage Saturates at High Currents
Q: Can the ACS712 30A measure currents below 1A?
A: Yes, but the resolution may be limited due to the sensor's sensitivity (66mV/A). For higher precision at low currents, consider using a lower-range ACS712 variant (e.g., 5A or 20A).
Q: Can I use the ACS712 30A with a 3.3V microcontroller?
A: Yes, but the output voltage range will be limited, and you may need to adjust the zeroCurrentVoltage
and sensitivity values in your calculations.
Q: Is the ACS712 suitable for high-frequency AC current measurements?
A: The ACS712 has a bandwidth of 80 kHz, making it suitable for most AC applications. However, for very high-frequency signals, additional filtering may be required.
Q: How do I protect the sensor from overcurrent?
A: Use a fuse or circuit breaker in series with the current path to protect the sensor from damage due to excessive current.