Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Current Sensing using Hall Effect Sensor -ACS712

By Nischay Malhan August 22, 2015

In the field of Electronics, sometimes it is becomes essential to know how much current an appliance consumes. We need something that can accurately tell what the current is. There are many ways to do this but one of the most handy and cost efficient way to do this is the Hall-effect sensing technique. In this project, we make use of the ACS712 sensor that operates at 5V to measure the current consumed by a load, in this case a bulb.

Current Sensing is one important aspect of electronics field. It has huge industrial importance like detecting voltage drops in appliances, detecting the response time and accuracy of appliances etc.

In this project, we will use a micro-controller, a bulb of any power rating(I have used a 200W bulb), the ACS712 sensor, some connecting wires, 4.7 Kohm resistor and 0.1uF capacitor.

Image showing components used in designing Current Sensor Circuit - Arduino, Hall Sensor, Wires, Bulb and Line Tester

Fig. 1: Image showing components used in designing Current Sensor Circuit – Arduino, Hall Sensor, Wires, Bulb and Line Tester

Description:

The ACS712 sensor uses hall effect sensing technique to give readings of the current that an appliance is consuming. Hall effect sensing is a technique in which a transducer varies its output voltage in response to a varying magnetic field. This output voltage suppose ‘V’ is now known. The sensor has an inbuilt resistance which in the case of ACS712 is 0.185 V/Amps. This divided by the voltage gives the Current.

While taking readings of the output voltage there could be spikes, which can change the final reading drastically. So we take mean voltage. In a cycle there is a maximum reading and a minimum reading. The average of these is the mean.

-> (Mean – Max) *0.0049 is the RMS voltage V ( 5/1023 = 0.0049)

-> V / 0.185 is the RMS Current.

Pin Connections:

Pin connections are easy as you can see in the circuit diagram. The circuit Diagram has the Output of the ACS712 sensor put into the Analog Pin A0 of the micro-controller through a low pass filter. A 4.7K resistor and a 0.1 uF capacitor are put in the configuration shown in the diagram to make a low pass filter which stabilizes the output. This reading is then fed into the micro-controller on pin A0. The Vcc and the ground of the sensor are connected to the 5V supply and the Gnd pins available on the micro-controller respectively.

Code:

In the code I have declared a variable mVperAmp = 185 which is the resistance of the sensor in millis. All variable have been declared as doubles as these will involve complex calculations in decimals. The temp variable stores the temporary value of the voltage reading at the analog pin. Maxi and Mini are initially set to 0 and 1023 in each iteration. These are then compared to the temp variable and set accordingly. At the end the final values are displayed upto 3 decimal places.

Why use a low pass filter?

This is because when I performed the experiment without any filter, the readings were very fluctuating and not according to what is expected at 240V source voltage. By using a 4.7K resistor and 0.1uF capacitor as a filter, the readings got stabilized as is expected. The low pass filter filters out all the unwanted readings and thus making the results optimal.

I performed this experiment for loads of different power ratings with 240V as the source voltage.

Power Rating                                                 Observed Current                                         Expected Current

25W                                                                                 0.106 A                                                                                   0.104 A

40W                                                                                 0.15 A                                                                         0.166 A

80W                                                                                 0.35 A                                                                         0.33A

200W                                                                               0.81 A                                                                         0.83 A

 

Images of the implemented Circuit :

Image of the PCB I finally made

Typical Image of Hall Sensor Module

Fig. 2: Typical Image of Hall Sensor Module

Prototype of Arduino Circuit used for sensing current

Fig. 3: Prototype of Arduino Circuit used for sensing current

Prototype of Arduino Circuit operating as Current Sensor

Fig. 4: Prototype of Arduino Circuit operating as Current Sensor

Image showing Arduino Circuit operating as Current Sensor in Dark

Fig. 5: Image showing Arduino Circuit operating as Current Sensor in Dark

Screenshot of Arduino Serial Port displaying logged value of current

Fig. 6: Screenshot of Arduino Serial Port displaying logged value of current

Project Video


Filed Under: Electronic Projects

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Snooping Around is All
  • mosfet driver problem in regeneration mode
  • Industrial Relay Board Design for Motorcycle Use
  • connector model question
  • ADEM III ECM — No CAN Signal & Power Supply Issue

RSS Electro-Tech-Online.com Discussions

  • Sump pit water alarm - Kicad 9
  • Pic18f25q10 osccon1 settings swordfish basic
  • Anyone jumped from Easyeda std to Easyeda pro?
  • turbo jet fan - feedback appreciated.
  • More fun with ws2812 this time XC8 and CLC

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • How IoT network topologies work
  • The top five AI startups to watch in 2025
  • STMicroelectronics unveils SoC based on secure MCU
  • Nexperia’s 48 V ESD diodes support higher data rates with ultra-low capacitance design
  • Taoglas releases Patriot antenna with 18 integrated elements covering 600 to 6000 MHz

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe