Stufin
Home Quick Cart Profile

5A ACS712 Current Sensor

Buy Now

Component Name

5A ACS712 Current Sensor

Description

The 5A ACS712 Current Sensor is a highly accurate and reliable Hall effect-based current sensor module designed to measure AC and DC currents up to 5 amperes. This module is based on the Allegro Microsystems ACS712 IC, which provides a high level of precision and stability in current measurement applications.

Functionality

The 5A ACS712 Current Sensor module is designed to measure the current flowing through a wire or circuit. It works by sensing the magnetic field generated by the current flow and converting it into a proportional analog output voltage. The module can measure both AC and DC currents, making it suitable for a wide range of applications, including power monitoring, motor control, and energy management systems.

Key Features

  • High Accuracy: The ACS712 IC provides a high level of accuracy, with a typical sensitivity of 185 mV/A and a linearity of 1.5% over the entire operating range.
  • Wide Operating Range: The module can measure currents up to 5 amperes, with an operating range of -5A to 5A.
  • Hall Effect Principle: The module uses the Hall effect principle, which provides a high level of immunity to electromagnetic interference (EMI) and radio-frequency interference (RFI).
  • Analog Output: The module provides an analog output voltage that is proportional to the measured current, allowing for easy integration with microcontrollers, ADCs, and other monitoring systems.
  • Low Power Consumption: The module has a low power consumption of 13mA at 5V, making it suitable for battery-powered applications.
  • Compact Design: The module is designed to be compact and lightweight, making it easy to integrate into a wide range of applications.
  • Protection Features: The module has built-in overvoltage protection and overcurrent protection, ensuring reliable operation in harsh environments.
  • Easy Integration: The module has a simple analog output and can be easily integrated with a wide range of microcontrollers, such as Arduino, Raspberry Pi, and ESP32.

Operating Voltage

4.5V to 5.5V

Operating Current

13mA (typical)

Sensitivity

185 mV/A (typical)

Linearity

1.5% (typical)

Response Time

50 s (typical)

Operating Temperature

-20C to 85C

Storage Temperature

-40C to 125C

Dimensions

19.5 x 15.5 x 4.5 mm

Applications

The 5A ACS712 Current Sensor module is suitable for a wide range of applications, including

Power monitoring and measurement

Motor control and feedback

Energy management systems

Industrial automation

IoT devices and sensor networks

Robotics and autonomous systems

Pinout

The module has a simple 5-pin interface

VIN

Power supply input (4.5V to 5.5V)

GND

Ground connection

VOUT

Analog output voltage

IP+Positive current input
IP-Negative current input

Pin Configuration

  • 5A ACS712 Current Sensor Documentation
  • Pin Description:
  • The 5A ACS712 Current Sensor has 5 pins, which are:
  • ### 1. VCC (Voltage Supply) Pin
  • Pin Number: 1
  • Function: Power supply pin for the sensor
  • Voltage Range: 4.5V to 5.5V
  • Typical Voltage: 5V
  • Description: Connect this pin to a stable 5V power supply to operate the sensor.
  • ### 2. GND (Ground) Pin
  • Pin Number: 2
  • Function: Ground pin for the sensor
  • Description: Connect this pin to the ground of your circuit or power supply.
  • ### 3. OUT (Output) Pin
  • Pin Number: 3
  • Function: Output pin that provides an analog voltage proportional to the sensed current
  • Output Voltage Range: 0V to 5V
  • Description: Connect this pin to an Analog-to-Digital Converter (ADC) or a microcontroller's analog input pin to read the sensed current value.
  • ### 4. IP+ (Current Input Positive) Pin
  • Pin Number: 4
  • Function: Positive input pin for the current to be measured
  • Description: Connect this pin to the positive leg of the current-carrying wire or the load.
  • ### 5. IP- (Current Input Negative) Pin
  • Pin Number: 5
  • Function: Negative input pin for the current to be measured
  • Description: Connect this pin to the negative leg of the current-carrying wire or the load.
  • Pin Connection Structure:
  • To connect the 5A ACS712 Current Sensor, follow this structure:
  • Connect VCC (Pin 1) to a 5V power supply.
  • Connect GND (Pin 2) to the ground of your circuit or power supply.
  • Connect IP+ (Pin 4) to the positive leg of the current-carrying wire or the load.
  • Connect IP- (Pin 5) to the negative leg of the current-carrying wire or the load.
  • Connect OUT (Pin 3) to an ADC or a microcontroller's analog input pin to read the sensed current value.
  • Important Notes:
  • Make sure to use a stable power supply and a suitable current-carrying wire to avoid noise and interference.
  • The sensor can measure currents up to 5A, but it's recommended to stay within the specified range for accurate readings.
  • Use a bypass capacitor (e.g., 10nF) between VCC and GND pins to reduce noise and ensure stable operation.
  • Refer to the datasheet and application notes for more detailed information on using the 5A ACS712 Current Sensor.

Code Examples

5A ACS712 Current Sensor Documentation
Overview
The 5A ACS712 Current Sensor is a highly accurate and sensitive Hall effect-based current sensor that measures AC and DC currents up to 5A. It provides a precise and stable output voltage proportional to the input current, making it an ideal choice for industrial, commercial, and IoT applications.
Pinout
The 5A ACS712 Current Sensor has a 5-pin package with the following pinout:
VCC: Power supply pin (5V)
 GND: Ground pin
 OUT: Analog output pin (0-5V)
 VS: Voltage supply pin (optional, for ratiometric applications)
 Z: Zero-crossing detection pin (optional)
Technical Specifications
Current measurement range: 5A
 Sensitivity: 185 mV/A
 Accuracy: 1.5% at 25C
 Operating voltage: 4.5V to 5.5V
 Operating temperature: -20C to 85C
Code Examples
### Example 1: Basic Current Measurement using Arduino
This example demonstrates how to measure the current flowing through a load using the 5A ACS712 Current Sensor with an Arduino board.
```c
const int currentPin = A0;  // Analog input pin connected to the OUT pin of the ACS712
void setup() {
  Serial.begin(9600);
}
void loop() {
  int sensorValue = analogRead(currentPin);
  float voltage = sensorValue  (5.0 / 1023.0);
  float current = (voltage - 2.5) / 0.185;  // Convert voltage to current using the sensitivity value
  Serial.print("Current: ");
  Serial.print(current);
  Serial.println(" A");
  delay(1000);
}
```
### Example 2: Current Monitoring with Raspberry Pi and Python
This example shows how to monitor the current consumption of a load using the 5A ACS712 Current Sensor with a Raspberry Pi board and Python.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
current_pin = 18  # GPIO pin connected to the OUT pin of the ACS712
def read_current():
  adc_value = GPIO.input(current_pin)
  voltage = adc_value  (5.0 / 1023.0)
  current = (voltage - 2.5) / 0.185  # Convert voltage to current using the sensitivity value
  return current
while True:
  current = read_current()
  print("Current: {:.2f} A".format(current))
  time.sleep(1)
```
### Example 3: Ratiometric Measurement using ESP32 and MicroPython
This example demonstrates how to perform ratiometric current measurement using the 5A ACS712 Current Sensor with an ESP32 board and MicroPython.
```python
import machine
import time
adc_pin = machine.Pin(32)  # ADC pin connected to the OUT pin of the ACS712
vs_pin = machine.Pin(33)  # VS pin connected to a voltage reference (e.g., 3.3V)
def read_current():
  adc_value = adc_pin.read_u16()
  vs_value = vs_pin.read_u16()
  voltage = adc_value / vs_value  3.3  # Ratiometric conversion
  current = (voltage - 2.5) / 0.185  # Convert voltage to current using the sensitivity value
  return current
while True:
  current = read_current()
  print("Current: {:.2f} A".format(current))
  time.sleep(1)
```
These examples illustrate how to use the 5A ACS712 Current Sensor in various contexts, demonstrating its versatility and ease of integration into IoT projects.