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 manufactured by HandsonTech. It provides an analog output voltage proportional to the current flowing through it. This sensor is capable of measuring both AC and DC currents, making it versatile for a wide range of applications. The ACS712 is widely used in power management, motor control, overcurrent protection, and energy monitoring 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!
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
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
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 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 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 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 supply current monitoring
  • Motor control and protection
  • Battery management systems
  • Overcurrent fault detection
  • Energy consumption monitoring in appliances

Technical Specifications

The ACS712 is available in different variants based on the current sensing range. Below are the key technical details:

Parameter Value
Manufacturer HandsonTech
Part ID ACS712
Current Sensing Range ±5A, ±20A, ±30A (depending on model)
Supply Voltage (Vcc) 4.5V to 5.5V
Output Voltage Range 0V to Vcc
Sensitivity (Typ.) 185mV/A (±5A), 100mV/A (±20A), 66mV/A (±30A)
Bandwidth 80 kHz
Response Time 5 µs
Operating Temperature Range -40°C to 85°C
Package Type SOIC-8

Pin Configuration and Descriptions

The ACS712 has 8 pins, but only a few are typically used in most applications. Below is the pinout:

Pin Number Pin Name Description
1, 2, 3 IP+ Current input terminal (positive side of the load)
4, 5, 6 IP- Current input terminal (negative side of the load)
7 VIOUT Analog output voltage proportional to current
8 VCC Power supply input (4.5V to 5.5V)
- GND Ground (internally connected to the substrate)

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 ground of your circuit.
  2. Current Measurement:
    • Pass the current-carrying conductor through the IP+ and IP- terminals. Ensure the current does not exceed the sensor's rated range.
    • The sensor outputs an analog voltage (VIOUT) proportional to the current. At 0A, the output voltage is approximately VCC/2 (e.g., 2.5V for a 5V supply).
  3. Analog Output: Connect the VIOUT pin to an analog input pin of a microcontroller (e.g., Arduino) to read the voltage and calculate the current.

Important Considerations and Best Practices

  • Current Range: Choose the correct ACS712 variant (±5A, ±20A, or ±30A) based on your application's current range.
  • Filtering: Add a capacitor (e.g., 0.1 µF) between VIOUT and GND to reduce noise in the output signal.
  • Isolation: Ensure proper isolation between the high-current path and the low-voltage control circuit.
  • Calibration: Perform calibration to account for any offset in the output voltage at 0A.

Example: Using ACS712 with Arduino UNO

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

// 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., 185mV/A for ±5A variant)
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

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

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

Notes:

  • Replace sensitivity with the appropriate value for your ACS712 variant (e.g., 0.1 for ±20A, 0.066 for ±30A).
  • Ensure the current-carrying conductor is properly connected to the IP+ and IP- terminals.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings:

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

    • 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 with Current:

    • Cause: Current exceeds the sensor's rated range or sensor is damaged.
    • Solution: Verify the current range and ensure it is within the sensor's limits.
  4. Offset Voltage at 0A is Incorrect:

    • Cause: Manufacturing tolerances or environmental factors.
    • Solution: Perform a calibration to determine the exact zero-current voltage.

FAQs

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

Q3: What is the accuracy of the ACS712?
The typical accuracy is ±1.5% of the full-scale reading, but this may vary depending on the operating conditions and calibration.

Q4: Can I use the ACS712 with a 3.3V microcontroller?
Yes, but you must ensure the sensor is powered with 5V and use a voltage divider or level shifter to scale the output voltage to 3.3V.

Q5: Is the ACS712 isolated from the high-current path?
Yes, the ACS712 provides galvanic isolation between the high-current path and the low-voltage control circuit.