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

How to Use Current sensor: Examples, Pinouts, and Specs

Image of Current sensor
Cirkit Designer LogoDesign with Current sensor in Cirkit Designer

Introduction

The ACS712 current sensor, manufactured by Allegro Electronics, is a highly accurate and versatile device designed to measure the flow of electric current in a circuit. It provides an analog output signal proportional to the current being measured, making it ideal for applications requiring precise current monitoring. The sensor is based on the Hall effect principle, ensuring electrical isolation between the measured current and the output signal.

Explore Projects Built with Current sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-Based Current Monitoring and Temperature Sensing System
Image of SISTEMA DE MONITOREO: A project utilizing Current sensor in a practical application
This circuit is designed to measure current using an ACS712 Current Sensor and temperature using a DS18B20 sensor, with an ESP32 microcontroller to process and possibly communicate the sensor data. The ACS712 sensor output is connected to one of the ESP32's analog input pins (D34), while the DS18B20's signal line is interfaced with a digital input pin (D23) through a pull-up resistor (4.7k Ohms). The ESP32 is powered through its Vin pin, and both sensors share a common ground with the ESP32.
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 Current sensor 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 UNO Based Ammeter with LCD Display
Image of ammeter: A project utilizing Current sensor in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an ACS712 current sensor and a 16x2 LCD screen using I2C communication. The Arduino reads the current value from the sensor and displays it on the LCD screen, also sending the data to the serial monitor. It is designed to function as an ammeter, measuring and displaying the current flowing through the sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Controlled Smart Lighting System with Power Monitoring
Image of Energy Monitoring System: A project utilizing Current sensor in a practical application
This circuit appears to be a multi-channel current monitoring system using several ACS712 current sensors to measure the current through different loads, likely bulbs connected to a 220V power source. The current readings from the sensors are digitized by an Adafruit ADS1115 16-bit ADC, which interfaces with an ESP32 microcontroller via I2C communication for further processing or telemetry. A buck converter is used to step down the voltage to power the ESP32 and the sensors, and the system is powered through a 2.1mm DC barrel jack, indicating it is designed for external power supply.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Current sensor

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 SISTEMA DE MONITOREO: A project utilizing Current sensor in a practical application
ESP32-Based Current Monitoring and Temperature Sensing System
This circuit is designed to measure current using an ACS712 Current Sensor and temperature using a DS18B20 sensor, with an ESP32 microcontroller to process and possibly communicate the sensor data. The ACS712 sensor output is connected to one of the ESP32's analog input pins (D34), while the DS18B20's signal line is interfaced with a digital input pin (D23) through a pull-up resistor (4.7k Ohms). The ESP32 is powered through its Vin pin, and both sensors share a common ground with the ESP32.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of DT NEA - Noah Patel: A project utilizing Current sensor 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 ammeter: A project utilizing Current sensor in a practical application
Arduino UNO Based Ammeter with LCD Display
This circuit features an Arduino UNO microcontroller interfaced with an ACS712 current sensor and a 16x2 LCD screen using I2C communication. The Arduino reads the current value from the sensor and displays it on the LCD screen, also sending the data to the serial monitor. It is designed to function as an ammeter, measuring and displaying the current flowing through the sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Energy Monitoring System: A project utilizing Current sensor in a practical application
ESP32-Controlled Smart Lighting System with Power Monitoring
This circuit appears to be a multi-channel current monitoring system using several ACS712 current sensors to measure the current through different loads, likely bulbs connected to a 220V power source. The current readings from the sensors are digitized by an Adafruit ADS1115 16-bit ADC, which interfaces with an ESP32 microcontroller via I2C communication for further processing or telemetry. A buck converter is used to step down the voltage to power the ESP32 and the sensors, and the system is powered through a 2.1mm DC barrel jack, indicating it is designed for external power supply.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

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

Technical Specifications

The ACS712 is available in different variants to measure various current ranges. Below are the key technical details:

Parameter Value
Manufacturer Allegro Electronics
Part Number ACS712
Current Measurement Range ±5A, ±20A, ±30A (depending on variant)
Supply Voltage (Vcc) 4.5V to 5.5V
Output Signal Analog voltage proportional to current
Sensitivity (Typ.) 185 mV/A (±5A), 100 mV/A (±20A), 66 mV/A (±30A)
Zero Current Output Voltage ~2.5V (at Vcc = 5V)
Bandwidth 80 kHz
Operating Temperature Range -40°C to 85°C
Isolation Voltage 2.1 kV RMS

Pin Configuration and Descriptions

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

Pin Number Pin Name Description
1, 2 IP+ Current input terminal (positive)
3, 4 IP- Current input terminal (negative)
5 GND Ground
6 FILTER External capacitor connection for bandwidth adjustment
7 VIOUT Analog output voltage proportional to current
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 source and the GND pin to the ground.
  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.
  3. Output Signal: Connect the VIOUT pin to an analog input pin of a microcontroller or an ADC (Analog-to-Digital Converter) to read the output voltage.
  4. Bandwidth Adjustment: Connect a capacitor between the FILTER pin and GND to set the desired bandwidth. For most applications, a 1 nF capacitor is recommended.

Important Considerations and Best Practices

  • Electrical Isolation: The ACS712 provides electrical isolation between the current-carrying conductor and the output signal, ensuring safety in high-voltage applications.
  • Zero Current Offset: The output voltage at zero current is approximately 2.5V. Any deviation from this value indicates the presence of current.
  • Calibration: For precise measurements, calibrate the sensor by measuring the output voltage at known current levels.
  • Noise Reduction: Use a decoupling capacitor (e.g., 0.1 µF) between VCC and GND to reduce noise.
  • Avoid Overcurrent: Ensure the current through the sensor does not exceed its rated range to prevent damage.

Example Code for Arduino UNO

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

// Include necessary libraries
const int analogPin = A0; // Connect VIOUT to Arduino analog pin A0
const float sensitivity = 0.185; // Sensitivity for ACS712-05B (185 mV/A)
const float zeroCurrentVoltage = 2.5; // Zero current output voltage (V)

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

void loop() {
  int sensorValue = analogRead(analogPin); // Read analog value from ACS712
  float voltage = sensorValue * (5.0 / 1023.0); // 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"); // Append unit
  
  delay(1000); // Wait for 1 second before next reading
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output Signal:

    • Ensure the sensor is powered correctly (VCC = 5V).
    • Verify that the current-carrying conductor is properly connected to the IP+ and IP- terminals.
  2. Incorrect Current Readings:

    • Check for proper calibration of the sensor.
    • Ensure the sensitivity value matches the specific ACS712 variant being used.
    • Verify that the zero current output voltage is approximately 2.5V.
  3. Noisy Output:

    • Add a decoupling capacitor (e.g., 0.1 µF) between VCC and GND.
    • Use a capacitor on the FILTER pin to adjust the bandwidth and reduce noise.
  4. Sensor Overheating:

    • Ensure the current through the sensor does not exceed its rated range.
    • Verify that the connections to the IP+ and IP- terminals are secure.

FAQs

Q: Can the ACS712 measure both AC and DC currents?
A: Yes, the ACS712 can measure both AC and DC currents. The output signal is proportional to the instantaneous current.

Q: How do I select the correct ACS712 variant?
A: Choose the variant based on the maximum current you need to measure. For example, use the ±5A variant for low-current applications and the ±30A variant for high-current applications.

Q: What is the purpose of the FILTER pin?
A: The FILTER pin allows you to connect an external capacitor to adjust the sensor's bandwidth, which can help reduce noise in the output signal.

Q: Is the ACS712 suitable for high-voltage applications?
A: Yes, the ACS712 provides electrical isolation up to 2.1 kV RMS, making it suitable for high-voltage applications.