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 widely used in applications such as motor control, power monitoring, overcurrent protection, and energy metering. Its compact design and ease of integration make it a popular choice for current sensing in embedded 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

Technical Specifications

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

  • Supply Voltage (Vcc): 4.5V to 5.5V
  • Current Measurement Range:
    • ACS712-05B: ±5A
    • ACS712-20A: ±20A
    • ACS712-30A: ±30A
  • Sensitivity:
    • ACS712-05B: 185 mV/A
    • ACS712-20A: 100 mV/A
    • ACS712-30A: 66 mV/A
  • Output Voltage: Analog signal proportional to the current
  • Bandwidth: 80 kHz
  • 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 pin configuration:

Pin Number Pin Name Description
1 IP+ Positive current input terminal (connect to the load or current source)
2 IP- Negative current input terminal (connect to the return path of the load)
3 NC Not connected (leave unconnected or grounded)
4 GND Ground (connect to the system ground)
5 VIOUT Analog output voltage proportional to the current
6 NC Not connected (leave unconnected or grounded)
7 NC Not connected (leave unconnected or grounded)
8 VCC Supply voltage (4.5V to 5.5V)

Usage Instructions

How to Use the ACS712 in a Circuit

  1. Power Supply: Connect the VCC pin to a 5V power supply and the GND pin to the system ground.
  2. Current Path: Connect the IP+ and IP- pins in series with the load or circuit whose current you want to measure.
  3. Output Signal: 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.
  4. Calibration: Note that the output voltage at 0A current is approximately 2.5V (midpoint of the supply voltage). The sensitivity of the sensor depends on the variant (e.g., 185 mV/A for ACS712-05B).

Important Considerations and Best Practices

  • Isolation: Ensure proper isolation between the high-current path and the low-voltage control circuit.
  • Filtering: Use a capacitor (e.g., 0.1 µF) between the VIOUT pin and ground to reduce noise in the output signal.
  • Current Range: Select the appropriate ACS712 variant based on the maximum current in your application.
  • Temperature Effects: Be aware that the sensor's output may drift slightly with temperature changes. Consider compensating for this in your design if high accuracy is required.

Example: Using ACS712 with Arduino UNO

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 VIOUT pin
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 zero-current output voltage (2.5V for ACS712)
const float zeroCurrentVoltage = 2.5; // Zero current 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) * 5.0;

  // Calculate the current in amps
  float current = (voltage - 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
}

Troubleshooting and FAQs

Common Issues

  1. No Output Signal:

    • Ensure the VCC and GND pins are properly connected to a 5V power supply and ground.
    • Verify that the IP+ and IP- pins are correctly connected in series with the load.
  2. Incorrect Current Readings:

    • Check if the correct ACS712 variant is being used for the current range.
    • Ensure proper calibration of the zero-current voltage (2.5V at 0A).
    • Verify that the sensitivity value in your calculations matches the sensor variant.
  3. Noisy Output:

    • Add a capacitor (e.g., 0.1 µF) between the VIOUT pin and ground to filter noise.
    • Ensure that the wiring is short and shielded to minimize electromagnetic interference.

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: What happens if the current exceeds the sensor's range?
A: If the current exceeds the sensor's range, the output voltage will saturate at the supply voltage (5V) or ground (0V), and the readings will no longer be accurate.

Q: How do I handle temperature drift in the ACS712?
A: You can implement software compensation by monitoring the temperature and adjusting the readings based on the sensor's temperature coefficient.

Q: Can I use the ACS712 with a 3.3V microcontroller?
A: Yes, but you will need to ensure that the output voltage from the ACS712 does not exceed the ADC input range of the microcontroller. You may need a voltage divider or level shifter.

This concludes the documentation for the ACS712 current sensor.