Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use ACS712: Examples, Pinouts, and Specs

Image of ACS712
Cirkit Designer LogoDesign with ACS712 in Cirkit Designer

Introduction

The ACS712 is a Hall effect-based linear current sensor that provides an analog output proportional to the current flowing through it. It is designed to measure both AC and DC currents with high accuracy and electrical isolation. The sensor is available in different variants, such as 5A, 20A, and 30A, to accommodate a range of current measurement needs. Its compact design and ease of use make it a popular choice for current sensing in power monitoring, motor control, battery management, and other applications.

Explore Projects Built with ACS712

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Wemos S2 Mini Controlled Smart Device with OLED Display, Thermal Printing, and RGB LED Strip
Image of DT NEA - Noah Patel: A project utilizing ACS712 in a practical application
This circuit features a Wemos S2 Mini microcontroller that controls a WS2812 RGB LED strip and communicates with a 0.96" OLED display and a 58mm mini thermal printer. The ACS712 Current Sensor is interfaced with the microcontroller to monitor current, and power is managed by a CD42 BMS connected to two 18650 Li-ion batteries, with a USB-C PD Trigger Board for power delivery. The circuit is designed for visual output (LED strip, OLED display), printing capabilities, and current sensing, likely for a portable, battery-powered monitoring and display device.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino and GSM-Based Power Monitoring and Wi-Fi Controlled Lighting System
Image of light monitoring system: A project utilizing ACS712 in a practical application
This circuit is designed to monitor voltage and current using ACS712 current sensors and voltage sensors, calculate power, and control lighting via relay modules. It features an Arduino Uno R3 for processing sensor data and executing control logic, which includes sending alerts via a GSM module (sim 800l) if power falls below a threshold and connecting to WiFi using an ESP8266 module. The circuit also includes a battery with a charging module (TP4056), a step-up boost converter, and multiple AC power supplies with circuit breakers for safety.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32C3 Smart Home Energy Monitor with Wi-Fi Control and LED Indicators
Image of EXTENSION: A project utilizing ACS712 in a practical application
This circuit uses an ESP32C3 microcontroller to monitor power consumption via ACS712 current and voltage sensors, control appliances through a relay, and indicate WiFi connection status with green and red LEDs. The relay can be controlled via a web interface, and the red LED indicates WiFi disconnection while the green LED indicates a successful connection.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Power Monitoring and SMS Control System
Image of Light monitor project final: A project utilizing ACS712 in a practical application
This circuit is designed to monitor and control power consumption for two separate sets of AC loads using current and voltage sensors. It features an ESP32 microcontroller that reads sensor data to calculate power, communicates via a GSM module for remote monitoring and control, and uses a 2-channel relay to switch the loads. The system can send notifications when power consumption falls below predefined thresholds and respond to SMS commands to control the connected lights.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with ACS712

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of DT NEA - Noah Patel: A project utilizing ACS712 in a practical application
Wemos S2 Mini Controlled Smart Device with OLED Display, Thermal Printing, and RGB LED Strip
This circuit features a Wemos S2 Mini microcontroller that controls a WS2812 RGB LED strip and communicates with a 0.96" OLED display and a 58mm mini thermal printer. The ACS712 Current Sensor is interfaced with the microcontroller to monitor current, and power is managed by a CD42 BMS connected to two 18650 Li-ion batteries, with a USB-C PD Trigger Board for power delivery. The circuit is designed for visual output (LED strip, OLED display), printing capabilities, and current sensing, likely for a portable, battery-powered monitoring and display device.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of light monitoring system: A project utilizing ACS712 in a practical application
Arduino and GSM-Based Power Monitoring and Wi-Fi Controlled Lighting System
This circuit is designed to monitor voltage and current using ACS712 current sensors and voltage sensors, calculate power, and control lighting via relay modules. It features an Arduino Uno R3 for processing sensor data and executing control logic, which includes sending alerts via a GSM module (sim 800l) if power falls below a threshold and connecting to WiFi using an ESP8266 module. The circuit also includes a battery with a charging module (TP4056), a step-up boost converter, and multiple AC power supplies with circuit breakers for safety.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of EXTENSION: A project utilizing ACS712 in a practical application
ESP32C3 Smart Home Energy Monitor with Wi-Fi Control and LED Indicators
This circuit uses an ESP32C3 microcontroller to monitor power consumption via ACS712 current and voltage sensors, control appliances through a relay, and indicate WiFi connection status with green and red LEDs. The relay can be controlled via a web interface, and the red LED indicates WiFi disconnection while the green LED indicates a successful connection.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Light monitor project final: A project utilizing ACS712 in a practical application
ESP32-Based Power Monitoring and SMS Control System
This circuit is designed to monitor and control power consumption for two separate sets of AC loads using current and voltage sensors. It features an ESP32 microcontroller that reads sensor data to calculate power, communicates via a GSM module for remote monitoring and control, and uses a 2-channel relay to switch the loads. The system can send notifications when power consumption falls below predefined thresholds and respond to SMS commands to control the connected lights.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Power monitoring in appliances and industrial equipment
  • Battery management systems
  • Motor control and protection
  • Overcurrent detection in circuits
  • Energy metering and load monitoring

Technical Specifications

The ACS712 is available in three variants: ACS712-05B (±5A), ACS712-20A (±20A), and ACS712-30A (±30A). Below are the key technical details:

Parameter Value
Supply Voltage (Vcc) 4.5V to 5.5V
Output Voltage Range 0V to Vcc
Sensitivity (ACS712-05B) 185 mV/A
Sensitivity (ACS712-20A) 100 mV/A
Sensitivity (ACS712-30A) 66 mV/A
Measurement Range ±5A, ±20A, ±30A (depending on model)
Response Time 5 µs
Bandwidth 80 kHz
Isolation Voltage 2.1 kV RMS
Operating Temperature -40°C to 85°C

Pin Configuration

The ACS712 is typically available in an 8-pin SOIC package. Below is the pinout description:

Pin Name Description
1 IP+ Positive current input terminal
2 IP- Negative current input terminal
3 NC Not connected (leave floating)
4 GND Ground connection
5 VIOUT Analog output voltage proportional to sensed current
6 NC Not connected (leave floating)
7 NC Not connected (leave floating)
8 VCC Supply voltage (4.5V to 5.5V)

Usage Instructions

How to Use the ACS712 in a Circuit

  1. Power the Sensor: Connect the VCC pin to a 5V power supply and the GND pin to ground.
  2. Connect the Current Path: Pass the current-carrying conductor through the IP+ and IP- terminals. Ensure the current flows in the correct direction as indicated on the module.
  3. Read the Output: The VIOUT pin provides an analog voltage proportional to the current. This voltage can be read using an ADC (Analog-to-Digital Converter) on a microcontroller, such as an Arduino.

Important Considerations

  • Calibration: The output voltage at 0A is typically Vcc/2 (e.g., 2.5V for a 5V supply). Subtract this offset to calculate the actual current.
  • Filtering: Add a capacitor (e.g., 0.1 µF) between VIOUT and GND to reduce noise in the output signal.
  • Isolation: The ACS712 provides electrical isolation between the current-carrying conductor and the sensing circuitry, making it safe for high-voltage applications.
  • Current Range: Choose the appropriate ACS712 variant (05B, 20A, or 30A) based on the maximum current you need to measure.

Example Code for Arduino UNO

The following code demonstrates how to use the ACS712 with an Arduino UNO to measure current:

// Include necessary libraries
const int sensorPin = A0; // Connect VIOUT to Arduino analog pin A0
const float sensitivity = 0.185; // Sensitivity for ACS712-05B in V/A
const float vcc = 5.0; // Supply voltage to the ACS712
const float zeroCurrentVoltage = vcc / 2; // Voltage at 0A (2.5V for 5V supply)

void setup() {
  Serial.begin(9600); // Initialize serial communication
}

void loop() {
  int sensorValue = analogRead(sensorPin); // Read analog value from sensor
  float voltage = (sensorValue / 1023.0) * vcc; // Convert ADC value to voltage
  float current = (voltage - zeroCurrentVoltage) / sensitivity; 
  // Calculate current in Amperes
  
  Serial.print("Current: ");
  Serial.print(current, 3); // Print current with 3 decimal places
  Serial.println(" A");
  
  delay(1000); // Wait for 1 second before next reading
}

Notes:

  • Replace sensitivity with 0.1 for ACS712-20A or 0.066 for ACS712-30A.
  • Ensure the current being measured does not exceed the sensor's rated range.

Troubleshooting and FAQs

Common Issues

  1. No Output or Incorrect Readings

    • Cause: Improper wiring or loose connections.
    • Solution: Double-check all connections, especially VCC, GND, and VIOUT.
  2. High Noise in Output

    • Cause: Lack of filtering capacitor or external electrical noise.
    • Solution: Add a 0.1 µF capacitor between VIOUT and GND to filter noise.
  3. Output Voltage Does Not Change

    • Cause: Current is not flowing through the IP+ and IP- terminals.
    • Solution: Ensure the current-carrying conductor is properly connected to the input terminals.
  4. Incorrect Current Calculation

    • Cause: Incorrect sensitivity value or offset voltage.
    • Solution: Verify the sensitivity value for your ACS712 variant and account for the offset voltage (Vcc/2).

FAQs

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 choose the correct ACS712 variant?
A: Select the variant based on the maximum current you need to measure. For example, use ACS712-05B for currents up to ±5A, ACS712-20A for ±20A, and ACS712-30A for ±30A.

Q: What is the accuracy of the ACS712?
A: The ACS712 has a typical accuracy of ±1.5% of the full-scale reading, depending on the variant and operating conditions.

Q: Can I use the ACS712 with a 3.3V microcontroller?
A: Yes, but ensure the output voltage range of the ACS712 is compatible with the ADC input range of your microcontroller.