20A ACS712 Current Sensor
🔌 20A ACS712 Current Sensor Module — Detailed Explanation
🧠 What is it?
The ACS712 20A Current Sensor Module is a Hall-effect–based sensor used to measure AC or DC current in a circuit.
👉 It converts current flowing through a wire into a proportional analog voltage that a microcontroller (Arduino, ESP32, etc.) can read.
⚙️ How It Works
The module is based on the Hall Effect:
Current flows through a copper conductor inside the sensor
This creates a magnetic field
The Hall sensor detects this field
Converts it into a voltage output
👉 The output voltage is linearly proportional to the current
🔌 Pin Configuration
Module Pins:
| Pin | Function |
|---|---|
| VCC | 5V power supply |
| GND | Ground |
| OUT | Analog voltage output |
Current Terminals:
| Terminal | Function |
|---|---|
| IP+ | Current input |
| IP− | Current output |
👉 The current-carrying wire must pass through the sensor terminals
📊 Key Specifications
Current range: −20A to +20A
Operating voltage: 5V
Output: Analog (0–5V)
Sensitivity: 100 mV per Ampere
Zero current output: ~2.5V (midpoint)
Measures: AC + DC current
🧠 Important Concept (Very Important)
🔹 Center Voltage (Offset)
When current = 0A → output ≈ 2.5V
Positive current → voltage increases
Negative current → voltage decreases
👉 This allows measurement of bidirectional current (AC/DC)
🔄 Working Formula
To calculate current:
I=Vout−2.50.1I = \frac{V_{out} - 2.5}{0.1}I=0.1Vout−2.5
Where:
VoutV_{out}Vout = sensor output voltage
0.1 = 100 mV/A sensitivity
🔄 Working Flow
Current Flow → Magnetic Field
↓
Hall Sensor Detects Field
↓
Voltage Output (Analog)
↓
Microcontroller Reads Value
↓
Convert to Current (Amps)
🚀 Applications
🔋 Battery monitoring
⚡ Power consumption measurement
🏠 Smart energy meters
🤖 Motor current sensing
🔌 Overcurrent protection systems
✅ Advantages
Measures AC & DC current
Electrical isolation (safe measurement)
Easy interface with Arduino
Good accuracy for mid/high currents
⚠️ Limitations (Important)
❌ Not suitable for very small currents (<100mA)
❌ Output is noisy → needs filtering
❌ Accuracy depends on calibration
👉 Community experience confirms it struggles with very low current measurement due to low sensitivity
🔌 Arduino Connection
VCC → 5V
GND → GND
OUT → A0
💡 Example Use
Measure appliance current:
Connect load through sensor
Read analog voltage
Convert to current
Display on serial monitor
🔍 Practical Tips
Always calibrate zero offset (2.5V)
Use averaging/filtering for stable readings
Avoid external magnetic interference
Choose correct version:
5A → high precision
20A → general use
30A → high current
🔁 ACS712 Variants Comparison
| Variant | Range | Sensitivity |
|---|---|---|
| 5A | ±5A | 185 mV/A |
| 20A | ±20A | 100 mV/A |
| 30A | ±30A | 66 mV/A |
