Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use acs712: Examples, Pinouts, and Specs

Image of acs712Design with acs712 in Cirkit Designer

Introduction

The ACS712 Current Sensor, manufactured by Allegro MicroSystems, is a Hall effect-based linear current sensor designed to measure both AC and DC currents. It provides an analog voltage output proportional to the current flowing through the sensor. The ACS712 is widely used in power management, motor control, overcurrent protection, and energy monitoring systems due to its high accuracy, compact size, and ease of integration.

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 Arduino and GSM-Based Power Monitoring and Wi-Fi Controlled Lighting 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.

Open Project in Cirkit Designer
Image of Wemos S2 Mini Controlled Smart Device with OLED Display, Thermal Printing, and RGB LED Strip: 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.

Open Project in Cirkit Designer
Image of ESP32-Based Power Monitoring and SMS Control System: 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.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

The ACS712 is available in multiple variants, each with a different current sensing range. Below are the key technical details:

Parameter Value
Manufacturer Allegro MicroSystems
Part Number ACS712
Current Sensing Range ±5A, ±20A, ±30A (depending on variant)
Supply Voltage (Vcc) 4.5V to 5.5V
Output Voltage Range 0V to Vcc
Sensitivity (Typ.) 185 mV/A (±5A), 100 mV/A (±20A), 66 mV/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 is typically available in an 8-pin SOIC package. Below is the pinout and description:

Pin Number Pin Name Description
1 IP+ Positive current input terminal
2 IP- Negative current input terminal
3 NC Not connected (leave floating or grounded)
4 GND Ground reference for the sensor
5 VIOUT Analog output voltage proportional to the sensed current
6 NC Not connected (leave floating or grounded)
7 NC Not connected (leave floating 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 ground of your circuit.
  2. Current Input: Pass the current to be measured through the IP+ and IP- terminals. Ensure the current does not exceed the rated range of the specific ACS712 variant.
  3. Output Signal: The VIOUT pin provides an analog voltage proportional to the current. At 0A, the output voltage is approximately VCC/2 (e.g., 2.5V for a 5V supply). The voltage increases or decreases linearly with the current.

Important Considerations

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 output
const int sensorPin = A0;

// Define the sensitivity of the ACS712 (e.g., 185 mV/A for ±5A variant)
const float sensitivity = 0.185; // Sensitivity in V/A

// Define the supply voltage (Vcc) of the ACS712
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 to the Serial Monitor
  Serial.print("Current: ");
  Serial.print(current);
  Serial.println(" A");

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

Notes:

Troubleshooting and FAQs

Common Issues

  1. Incorrect Output Voltage:

    • Cause: Improper calibration or incorrect sensitivity value.
    • Solution: Verify the sensitivity value for your ACS712 variant and recalibrate the sensor.
  2. No Output Signal:

    • Cause: Faulty connections or insufficient power supply.
    • Solution: Check all connections and ensure the VCC pin is supplied with 5V.
  3. Noisy Output:

    • Cause: Electrical noise or lack of filtering.
    • Solution: Add a capacitor (e.g., 0.1 µF) between the VIOUT pin and GND to filter noise.
  4. Overheating:

    • Cause: Current exceeding the sensor's rated range.
    • Solution: Ensure the current through the IP+ and IP- terminals is within the specified range.

FAQs

Q1: Can the ACS712 measure both AC and DC currents?
Yes, the ACS712 can measure both AC and DC currents. The output voltage varies linearly with the current in either direction.

Q2: How do I determine the current direction?
The output voltage will be greater than VCC/2 for positive currents (IP+ to IP-) and less than VCC/2 for negative currents.

Q3: What is the maximum current the ACS712 can handle?
The maximum current depends on the variant: ±5A, ±20A, or ±30A. Ensure you select the appropriate variant for your application.

Q4: Can I use the ACS712 with a 3.3V microcontroller?
Yes, but the output voltage range will be limited. Ensure the microcontroller's ADC can accurately read the sensor's output within this range.

Q5: Is the ACS712 suitable for high-frequency current measurements?
The ACS712 has a bandwidth of 80 kHz, making it suitable for most low- to medium-frequency applications. For higher frequencies, consider alternative sensors.