5A ACS712 Current Sensor
5A ACS712 Current Sensor
The 5A ACS712 Current Sensor is a high-precision, bidirectional current sensor module designed to measure AC and DC currents with high accuracy. The module is based on the ACS712 Hall effect sensor chip from Allegro MicroSystems, which provides a precise measurement of the current flowing through a conductor.
| The 5A ACS712 Current Sensor module is capable of measuring currents in both directions, making it suitable for a wide range of applications, including |
Monitoring AC and DC power supplies
Measuring motor currents
Determining energy consumption
Detecting overcurrent conditions
The module operates by detecting the magnetic field generated by the current flowing through a conductor, such as a wire, and converting it into a proportional analog output voltage. The output voltage is then read by a microcontroller or other devices for processing and analysis.
5V
-20C to 85C
1.5% at 25C
80 kHz
185 mV/A
1.5 mV rms
50 s
| The 5A ACS712 Current Sensor module is suitable for a wide range of applications, including |
Motor control and monitoring
Power supply monitoring
Energy harvesting and monitoring
Industrial automation
IoT devices
Robotics
Automotive systems
The 5A ACS712 Current Sensor module is a high-precision, bidirectional current sensor module that offers accurate and reliable current measurement capabilities. Its wide operating range, high accuracy, and ease of integration make it an ideal choice for a wide range of applications.
ACS712 5A Current Sensor DocumentationOverviewThe ACS712 5A current sensor is a high-accuracy, Hall-effect-based linear current sensor that can measure AC or DC currents up to 5A. It provides an analog output voltage that is proportional to the input current. This sensor is ideal for a wide range of applications, including industrial automation, motor control, and energy monitoring.Pinout| Pin | Description |
| --- | --- |
| VCC | Power supply pin (5V) |
| GND | Ground pin |
| OUT | Analog output pin |
| IP+ | Current input pin (+) |
| IP- | Current input pin (-) |Technical SpecificationsCurrent measurement range: 5A
Sensitivity: 185 mV/A
Output voltage range: 0-5V
Accuracy: 1.5% (typical)
Operating temperature range: -40C to 125C
Power supply voltage: 5V (10%)Code ExamplesExample 1: Basic Analog Read with ArduinoThis example demonstrates how to read the analog output voltage from the ACS712 using an Arduino board and calculate the current measurement.```c
const int sensorPin = A0; // Analog input pinvoid setup() {
Serial.begin(9600);
}void loop() {
int sensorValue = analogRead(sensorPin);
float voltage = sensorValue (5.0 / 1023.0);
float current = (voltage - 2.5) / 0.185;
Serial.print("Current: ");
Serial.print(current);
Serial.println(" A");
delay(100);
}
```Example 2: Raspberry Pi with PythonThis example shows how to read the analog output voltage from the ACS712 using a Raspberry Pi and Python.```python
import RPi.GPIO as GPIO
import timeGPIO.setmode(GPIO.BCM)sensor_pin = 18 # Analog input pin
GPIO.setup(sensor_pin, GPIO.IN)while True:
sensor_value = GPIO.input(sensor_pin)
voltage = (sensor_value / 1023.0) 5.0
current = (voltage - 2.5) / 0.185
print("Current: {:.2f} A".format(current))
time.sleep(0.1)
```Example 3: MicroPython with ESP32This example demonstrates how to read the analog output voltage from the ACS712 using an ESP32 board with MicroPython.```python
import machine
import timesensor_pin = machine.ADC(machine.Pin(32)) # Analog input pinwhile True:
sensor_value = sensor_pin.read()
voltage = (sensor_value / 4095.0) 5.0
current = (voltage - 2.5) / 0.185
print("Current: {:.2f} A".format(current))
time.sleep(0.1)
```Note: In these examples, the sensor output voltage is converted to a current measurement using the formula: `current = (voltage - 2.5) / 0.185`, where `voltage` is the output voltage and `2.5` is the quiescent output voltage (VCC/2). The `0.185` value is the sensitivity of the sensor in mV/A.