The ACS712 current sensor, manufactured by Allegro Electronics, is a highly 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 accurate and reliable measurements for both AC and DC currents.
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!
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.
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.
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.
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.
Energy metering in industrial and residential setups
Current sensing in renewable energy systems (e.g., solar inverters)
Technical Specifications
The ACS712 is available in multiple variants, each designed for different 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
185 mV/A (±5A), 100 mV/A (±20A), 66 mV/A (±30A)
Accuracy
±1.5% of full-scale reading
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 and description:
Pin Number
Pin Name
Description
1
IP+
Positive current input terminal
2
IP-
Negative current input terminal
3
NC
No connection
4
GND
Ground (0V reference)
5
VIOUT
Analog output voltage proportional to current
6
NC
No connection
7
VCC
Supply voltage (4.5V to 5.5V)
8
NC
No connection
Usage Instructions
How to Use the ACS712 in a Circuit
Power the Sensor: Connect the VCC pin to a 5V power supply and the GND pin to the ground of your circuit.
Connect the Current Path: Pass the current-carrying conductor through the IP+ and IP- terminals. Ensure the current does not exceed the sensor's rated range.
Read the Output: The VIOUT pin provides an analog voltage proportional to the current. This can be read using an ADC (Analog-to-Digital Converter) on a microcontroller or other measurement devices.
Important Considerations and Best Practices
Current Range: Choose the correct ACS712 variant based on the expected current range in your application.
Filtering: Add a capacitor (e.g., 0.1 µF) between the VIOUT pin and GND to reduce noise in the output signal.
Isolation: Ensure proper isolation between the high-current path and the low-voltage control circuitry.
Calibration: For precise measurements, calibrate the sensor by measuring the output voltage at 0A and using the sensitivity value to calculate the current.
Temperature Effects: Be aware that temperature variations can slightly affect the sensor's accuracy.
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 ±5A variant)
const float sensitivity = 0.185; // Sensitivity in V/A
// Define the supply voltage of the Arduino (typically 5V)
const float supplyVoltage = 5.0;
// Define the ADC resolution (10-bit for Arduino UNO)
const int adcResolution = 1024;
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 * supplyVoltage) / adcResolution;
// Calculate the current (subtract 2.5V offset for 0A)
float current = (sensorVoltage - 2.5) / 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:
The code assumes the ACS712 is powered by a 5V supply and outputs a 2.5V signal at 0A.
Adjust the sensitivity variable based on the specific ACS712 variant you are using.
Troubleshooting and FAQs
Common Issues and Solutions
No Output Signal or Incorrect Readings
Cause: Improper wiring or loose connections.
Solution: Double-check all connections, especially the VCC, GND, and VIOUT pins.
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.
Output Voltage Does Not Change with Current
Cause: Current range exceeds the sensor's limit or incorrect wiring.
Solution: Ensure the current is within the sensor's rated range and verify the wiring.
Inaccurate Current Measurements
Cause: Sensor not calibrated or temperature effects.
Solution: Calibrate the sensor by measuring the output at 0A and adjusting calculations accordingly.
FAQs
Q1: Can the ACS712 measure both AC and DC currents?
Yes, the ACS712 can measure both AC and DC currents due to its Hall effect-based design.
Q2: What happens if the current exceeds the sensor's range?
The sensor may saturate, and the output signal will no longer be proportional to the current. Prolonged overcurrent may damage the sensor.
Q3: Can I use the ACS712 with a 3.3V microcontroller?
Yes, but ensure the sensor's output voltage range is compatible with the ADC input range of the microcontroller.
Q4: How do I protect the sensor from high currents?
Use a fuse or circuit breaker in series with the current path to prevent damage from overcurrent conditions.