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 capable of measuring both AC and DC currents, making it a versatile component for a wide range of applications. The sensor offers electrical isolation between the measured current and the output signal, ensuring safety and reliability. Its compact design and high accuracy make it a popular choice for current sensing in embedded systems, motor control, power monitoring, and energy management systems.

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

  • Measuring AC and DC currents in power systems
  • Overcurrent protection in circuits
  • Battery monitoring and management
  • Motor control and load monitoring
  • Energy consumption measurement in appliances

Technical Specifications

The ACS712 is available in different variants based on the current range: 5A, 20A, and 30A. Below are the key technical details:

Parameter Value
Supply Voltage (Vcc) 4.5V to 5.5V
Current Measurement Range ±5A, ±20A, ±30A (depending on model)
Sensitivity 185 mV/A (5A), 100 mV/A (20A), 66 mV/A (30A)
Output Voltage Analog, centered at Vcc/2
Response Time 5 µs
Isolation Voltage 2.1 kV RMS
Operating Temperature Range -40°C to 85°C

Pin Configuration and Descriptions

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

Pin Name Description
1 IP+ Current input terminal (positive side of the current to be measured)
2 IP- Current input terminal (negative side of the current to be measured)
3 NC Not connected
4 GND Ground reference for the sensor
5 VIOUT Analog output voltage proportional to the measured current
6 NC Not connected
7 NC Not connected
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 the ground.
  2. Connect the Current Path: Pass the current to be measured through the IP+ and IP- terminals. Ensure the current does not exceed the rated range of the sensor.
  3. Read the Output: The VIOUT pin provides an analog voltage proportional to the current. At 0A, the output voltage is approximately Vcc/2 (2.5V for a 5V supply). The output voltage increases or decreases linearly with the current.

Important Considerations

  • Calibration: The sensor's output may vary slightly due to manufacturing tolerances. Calibrate the sensor in your application for the best accuracy.
  • Filtering: Add a capacitor (e.g., 0.1 µF) between the VIOUT pin and GND to reduce noise in the output signal.
  • Current Direction: Positive current flows from IP+ to IP-, and the output voltage increases above Vcc/2. Negative current flows in the opposite direction, and the output voltage decreases below Vcc/2.
  • Isolation: The ACS712 provides electrical isolation between the current-carrying path and the output signal, making it safe for high-voltage applications.

Example: Using ACS712 with Arduino UNO

Below is an example code to measure current using the ACS712 sensor with an Arduino UNO:

// 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 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

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 voltage = (sensorValue / 1023.0) * Vcc;

  // Calculate the current (in amps)
  float current = (voltage - (Vcc / 2)) / sensitivity;

  // Print the current value to the Serial Monitor
  Serial.print("Current: ");
  Serial.print(current, 3); // Print current with 3 decimal places
  Serial.println(" A");

  delay(1000); // Wait for 1 second before the next reading
}

Notes:

  • Replace sensitivity with the appropriate value for your ACS712 model (e.g., 0.1 for 20A, 0.066 for 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:

    • Ensure the sensor is powered correctly (VCC = 5V, GND connected).
    • Verify that the current path is properly connected to IP+ and IP-.
  2. High Noise in Output:

    • Add a decoupling capacitor (e.g., 0.1 µF) between VIOUT and GND.
    • Use shielded cables for the current-carrying path to reduce electromagnetic interference.
  3. Output Voltage Does Not Change:

    • Check if the current being measured is within the sensor's range.
    • Verify the connections and ensure there is no open circuit in the current path.

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 varies linearly with the instantaneous current.

Q: How do I determine the current direction?
A: Positive current flows from IP+ to IP-, causing the output voltage to rise above Vcc/2. Negative current flows in the opposite direction, causing the output voltage to drop below Vcc/2.

Q: What is the maximum current the ACS712 can handle?
A: The maximum current depends on the model: ±5A, ±20A, or ±30A. Exceeding this range may damage the sensor.

Q: Can I use the ACS712 with a 3.3V microcontroller?
A: Yes, but ensure the sensor is powered with 5V, and use a voltage divider or level shifter to scale the output voltage to 3.3V for the microcontroller's ADC input.