Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Sensors & Modules

Current Sensor ACS712: Power Monitoring with Arduino

Current Sensor ACS712: Power Monitoring with Arduino

April 1, 2026 /Posted by / 0

The ACS712 current sensor measures both AC and DC current flowing through a wire and outputs a proportional analogue voltage that Arduino can read directly. Available in 5A, 20A, and 30A variants, it’s used in solar panel monitoring, home energy meters, battery management, and appliance-level power tracking. This guide covers wiring, calibration, and practical power monitoring projects — all with components available in India for under ₹200.

Table of Contents

  • How the ACS712 Works
  • Choosing the Right Variant: 5A, 20A, or 30A
  • Wiring to Arduino
  • DC Current Measurement
  • AC Current Measurement
  • Calculating Power Consumption
  • Energy Monitoring Projects
  • Frequently Asked Questions

How the ACS712 Works

The ACS712 uses the Hall effect to measure current non-invasively. The current-carrying conductor passes through the IC, generating a magnetic field proportional to the current. A Hall sensor inside the chip converts this magnetic field to a voltage output.

At zero current, the output is VCC/2 (approximately 2.5V at 5V supply). Positive current increases the output above 2.5V, and negative current decreases it below 2.5V. The sensitivity (mV per amp) depends on the variant.

Key Specifications

Parameter ACS712-5A ACS712-20A ACS712-30A
Current Range ±5A ±20A ±30A
Sensitivity 185 mV/A 100 mV/A 66 mV/A
Resolution (10-bit ADC) ~26 mA ~49 mA ~74 mA
Zero Current Output ~2.5V ~2.5V ~2.5V
Best For USB, small DC loads Most applications High-power loads
🛒 Recommended: Browse ACS712 current sensors at Zbotic — 5A, 20A, and 30A variants with module boards ready for Arduino.

Choosing the Right Variant

  • ACS712-5A (185 mV/A) — Highest sensitivity, best for measuring small DC currents (USB devices, LED strips, Arduino projects). Can resolve about 26 mA per ADC step.
  • ACS712-20A (100 mV/A) — The general-purpose choice. Covers household appliances like fans (0.5-1.5A), lights (0.1-2A), and chargers. Most commonly used variant.
  • ACS712-30A (66 mV/A) — For heavier loads like geysers, air coolers, or e-bike motors. Lower resolution but higher headroom.

Rule of thumb: Choose the smallest range that covers your maximum expected current. Higher sensitivity = better measurement resolution.

Wiring to Arduino

The ACS712 module has 3 output pins (VCC, GND, OUT) and 2 screw terminals for the current-carrying wire. The load wire passes through the screw terminals — the module is wired in series with the load.

ACS712 Pin Arduino Pin
VCC 5V
GND GND
OUT A0

Safety warning: If you’re measuring AC mains current (220V in India), the current-carrying terminals are at mains potential. Use proper insulation, keep fingers away when powered, and enclose the module in a project box. Work with low voltage DC during development, then switch to mains only in a properly enclosed installation.

DC Current Measurement

const int sensorPin = A0;
const float SENSITIVITY = 0.100; // 100mV/A for 20A variant
const float ZERO_CURRENT_VOLTAGE = 2.50; // Calibrate this!

void setup() {
  Serial.begin(9600);
  Serial.println("ACS712 DC Current Sensor");

  // Calibrate zero point (no load connected)
  Serial.println("Calibrating zero point...");
  float sum = 0;
  for (int i = 0; i < 100; i++) {
    sum += analogRead(sensorPin) * (5.0 / 1024.0);
    delay(10);
  }
  float zeroVoltage = sum / 100.0;
  Serial.print("Zero voltage: ");
  Serial.println(zeroVoltage, 3);
}

void loop() {
  // Average 100 readings for stable result
  float sum = 0;
  for (int i = 0; i < 100; i++) {
    sum += analogRead(sensorPin);
    delay(1);
  }
  float avgRaw = sum / 100.0;
  float voltage = avgRaw * (5.0 / 1024.0);
  float current = (voltage - ZERO_CURRENT_VOLTAGE) / SENSITIVITY;

  Serial.print("Voltage: ");
  Serial.print(voltage, 3);
  Serial.print("V | Current: ");
  Serial.print(current, 3);
  Serial.println(" A");

  delay(500);
}

AC Current Measurement

Measuring AC current requires a different approach. The current alternates at 50 Hz (India’s mains frequency), so the ACS712 output swings above and below the 2.5V midpoint 50 times per second. You need to sample rapidly and calculate the RMS (Root Mean Square) value to get the true AC current.

const int sensorPin = A0;
const float SENSITIVITY = 0.100; // 20A variant
const int SAMPLES = 1000;
const float MIDPOINT = 2.50; // Calibrate with no load

void setup() {
  Serial.begin(9600);
}

void loop() {
  float sumSquares = 0;

  for (int i = 0; i < SAMPLES; i++) {
    float voltage = analogRead(sensorPin) * (5.0 / 1024.0);
    float current = (voltage - MIDPOINT) / SENSITIVITY;
    sumSquares += current * current;
    delayMicroseconds(200); // Sample at ~5kHz (100 samples per 50Hz cycle)
  }

  float rmsCurrent = sqrt(sumSquares / SAMPLES);

  // Calculate power (assuming 230V AC and power factor 1.0)
  float power = rmsCurrent * 230.0;

  Serial.print("AC Current: ");
  Serial.print(rmsCurrent, 3);
  Serial.print(" A | Power: ");
  Serial.print(power, 1);
  Serial.println(" W");

  delay(1000);
}
🛒 Recommended: DHT22 Temperature Sensor — Monitor ambient temperature alongside current — useful for tracking motor or transformer heating under load.

Calculating Power Consumption

Power is current multiplied by voltage:

  • DC: Power (W) = Voltage (V) × Current (A)
  • AC: Power (W) = Voltage (V) × Current (A) × Power Factor

For resistive loads (heaters, incandescent bulbs), power factor is ~1.0. For inductive loads (motors, fans, transformers), power factor is typically 0.6-0.9. For capacitive loads (LED drivers, SMPS), it varies. Without a separate voltage measurement, assume a power factor of 0.85 for household loads.

For energy (kWh), integrate power over time:

Energy (Wh) = Average Power (W) × Time (hours)

Log power readings every minute to an SD card or cloud service, then sum for daily energy consumption.

Energy Monitoring Projects

1. Solar Panel Output Monitor

Measure the current output of your solar panel with the ACS712-5A. Combined with a voltage divider to read panel voltage, calculate real-time power generation. Log to ThingSpeak via ESP32 for daily generation tracking. Compare against panel ratings to identify shading or dirt issues.

2. Home Energy Monitor

Install an ACS712-30A on your main power line (requires an electrician for safety) to monitor total household power consumption. Track usage patterns — peak hours, standby drain, and monthly trends. The data helps identify energy-wasteful appliances.

3. Battery Discharge Tester

Measure the discharge current and voltage of lithium cells under load. Calculate mAh capacity by integrating current over time until the cell reaches cutoff voltage. Essential for building reliable battery packs — know exactly how much capacity each cell delivers.

🛒 Recommended: BME280 Environmental Sensor — Add temperature and humidity monitoring to your solar panel setup for weather-correlated performance analysis.

4. Appliance-Level Power Tracker

Monitor individual appliance power consumption with separate ACS712 sensors on each circuit. Display on a TFT screen showing real-time watts per appliance. Useful for identifying which devices contribute most to your electricity bill — information that’s particularly valuable with India’s tiered tariff structure.

5. E-Bike Battery Monitor

Use the ACS712-30A to monitor current draw from your e-bike battery during rides. Combined with voltage measurement, calculate remaining battery capacity, instantaneous power, and energy used per trip. Display on a handlebar-mounted OLED screen.

🛒 Recommended: DS18B20 Waterproof Temperature Probe — Monitor battery temperature alongside current draw to detect overheating during high-discharge scenarios.

Frequently Asked Questions

Can the ACS712 measure 220V AC mains current safely?

Yes, the ACS712 provides galvanic isolation between the high-voltage current path (screw terminals) and the low-voltage output (signal pins). The chip is rated for 2.1 kV RMS isolation. However, the module PCB’s screw terminals are at mains potential — handle with care, use proper enclosures, and never touch the module while connected to mains. An electrician should handle mains wiring.

Why is my zero-current reading not exactly 2.5V?

Manufacturing tolerances, supply voltage variations, and temperature affect the offset. Always calibrate by measuring the actual output voltage with no current flowing. Use this measured value (e.g., 2.48V or 2.52V) instead of the theoretical 2.5V in your code.

The readings are very noisy. How do I get stable values?

Take the average of 100-500 readings. Add a 100nF capacitor between the output pin and ground. Keep the sensor module away from high-current wires and switching power supplies. For AC measurement, ensure you’re sampling complete cycles (at 50 Hz, one cycle is 20 ms — sample for at least 100 ms).

Can I use the ACS712 with ESP32 (3.3V)?

The ACS712 requires 5V power to work correctly. Its output swings around 2.5V, which exceeds ESP32’s 3.3V ADC range. Solutions: (1) Use a voltage divider on the output, (2) power the module from 5V and use a level shifter, or (3) use the ACS712’s analogue output through an external ADC (ADS1115) that operates at 3.3V.

Is there a better alternative for high-accuracy power monitoring?

For dedicated power monitoring, consider the INA219 (I2C, measures both current and voltage, ±1%) or the PZEM-004T (standalone AC energy meter module with UART). The PZEM-004T directly outputs voltage, current, power, energy, frequency, and power factor — no calibration needed. It costs about ₹350-500 and is popular for home energy monitoring projects in India.

Conclusion

The ACS712 current sensor is an accessible entry point for power monitoring projects with Arduino. At under ₹100 per module, it handles both DC and AC current measurement with sufficient accuracy for solar monitoring, appliance tracking, and battery management. Calibrate the zero offset carefully, average your readings, and always prioritise safety when working with mains voltage. For higher accuracy or direct AC energy metering, consider upgrading to the INA219 or PZEM-004T.

Find ACS712 current sensors and power monitoring components at Zbotic’s sensor modules store.

Tags: ACS712, current sensor, power monitoring, Sensors
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
3D Printed Drone Parts: Custom...
blog 3d printed drone parts custom frames and mounts guide 612769
blog 3d printing for architecture models in india 612775
3D Printing for Architecture M...

Related posts

Svg%3E
Read more

Encoder Module: Position and Speed Measurement with Arduino

April 1, 2026 0
A rotary encoder converts the angular position and rotation speed of a shaft into electrical signals that Arduino can count... Continue reading
Svg%3E
Read more

Infrared Obstacle Sensor: Line Follower and Object Detection

April 1, 2026 0
Infrared obstacle sensors are the building blocks of line-following robots, edge detection systems, and proximity triggers. These tiny modules emit... Continue reading
Svg%3E
Read more

Rain Sensor and Raindrop Detection Module: Arduino Guide

April 1, 2026 0
A rain sensor module detects the presence of water droplets on its surface, giving Arduino a simple signal to trigger... Continue reading
Svg%3E
Read more

LiDAR Sensor TFmini: Distance Measurement Beyond Ultrasonic

April 1, 2026 0
When ultrasonic sensors hit their limits — range too short, accuracy too coarse, outdoor sunlight causing interference — LiDAR sensors... Continue reading
Svg%3E
Read more

Pressure Sensor BMP280: Weather Station and Altitude Meter

April 1, 2026 0
The BMP280 barometric pressure sensor by Bosch measures atmospheric pressure with ±1 hPa accuracy and temperature with ±1°C precision. These... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now