Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

Current Sensing using Hall Effect Sensor -ACS712

By Nischay Malhan

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

 

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



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

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!


Featured Tutorials

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • What are the battery-selection criteria for low-power design?
  • Key factors to optimize power consumption in an embedded device
  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • Introduction to Brain Waves & its Types (Part 1/13)

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Band Pass Filte
  • Making a ducted soldering fan?
  • Slope compensation ramp calculation for UCC38084
  • Timer MC14541B wrong delay
  • Pull up via GPIO

RSS Electro-Tech-Online.com Discussions

  • Best way to reduce voltage in higher wattage system?
  • Need a ducted soldering fan for solder smoke extraction
  • Power failure relay options
  • DIY bluetooth speaker
  • Turn CD4029 on/off with TTP223
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 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 | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering