A Brief Overview of Allegro ACS712 Current Sensor (Part 1) _ Embedded Lab

download A Brief Overview of Allegro ACS712 Current Sensor (Part 1) _ Embedded Lab

of 5

Transcript of A Brief Overview of Allegro ACS712 Current Sensor (Part 1) _ Embedded Lab

  • 8/20/2019 A Brief Overview of Allegro ACS712 Current Sensor (Part 1) _ Embedded Lab

    1/8

    23.7.2015. A brief overview of Allegro ACS712 current sensor (Part 1) | Embedded Lab

    http://embedded-lab.com/blog/?p=4469 1/8

    Embedded Lab

    An online teaching laboratory for Microcontrollers and Embedded Systems

    A BRIEF OVERVIEW OF ALLEGRO ACS712

    CURRENT SENSOR PART 1)

    Posted on January 25, 2012 by R-B 10 comments |

    Sensing and controlling current flow is a fundamental

    requirement in a wide variety of applications including,

    over-current protection circuits, battery chargers, switching

    mode power supplies, digital watt meters, programmable

    current sources, etc. One of the simplest techniques of 

    sensing current is to place a small value resistance (also

    known as Shunt resistor) in between the load and the

    ground and measure the voltage drop across it, which in

    fact, is proportional to the current flowing through it.

    Whereas this technique is easy and straightforward to

    implement, it may not be very precise because the value of 

    the shunt resistor slightly varies with its temperature, which

    in fact is not constant because of the Joule heating. Besides,

    this simple technique does not provide an isolation

    between the load and current sensing unit, which is

    desirable in applications involving high voltage loads.Today, we will talk about Allegro ACS712 device which

    provides an economical and precise way of sensing AC and

    DC currents based on Hall-effect. This discussion is divided

    into two parts. The first part will provide a brief overview of 

    the ACS712 sensor and its characteristics. In the second

    part, a test experiment will be carried out to interface the

    sensor with a PIC microcontroller to measure a dc current.

    SUBSCRIBE

    Subscribe through

    email

      Sign Up

    Read Our Privacy Policy!

    2   F

    Go to Top| Contact Us |Privacy Policy | Log In

    HOME NETDUINO CHIPKIT PRODUCTS STM32 TIPS AND TRICKS THEORY PIC PROJECTS

    PIC TUTORIALS AVR XMEGA ARDUINO PROJECTS CONTACT US

    37Like

    Search...

    Be the first of your friends to like this

    Embedded Lab13,729 likes

    Like Page

    https://www.facebook.com/pages/Embedded-Lab/204296282917811https://www.facebook.com/sharer/sharer.php?app_id=776730922422337&u=https%3A%2F%2Fwww.facebook.com%2Fpages%2FEmbedded-Lab%2F204296282917811&display=popup&ref=plugin&src=pagehttps://www.tindie.com/stores/rajbex/?ref=offsite_badges&utm_source=sellers_rajbex&utm_medium=badges&utm_campaign=badge_smallhttp://www.youtube.com/user/ThePicboardhttp://feeds.feedburner.com/EmbeddedLabhttp://twitter.com/EmbeddedLabhttp://www.facebook.com/pages/Embedded-Lab/204296282917811http://embedded-lab.com/blog/http://embedded-lab.com/blog/http://embedded-lab.com/blog/?page_id=26http://embedded-lab.com/blog/?page_id=9755http://embedded-lab.com/blog/?page_id=23http://embedded-lab.com/blog/?page_id=7124http://embedded-lab.com/blog/?page_id=6225http://embedded-lab.com/blog/?page_id=4705http://embedded-lab.com/blog/?page_id=5045http://embedded-lab.com/blog/?page_id=3030http://embedded-lab.com/blog/?page_id=2822http://embedded-lab.com/blog/?page_id=525http://embedded-lab.com/blog/?page_id=26https://www.facebook.com/piotr.redkiewiczhttps://www.facebook.com/pages/Embedded-Lab/204296282917811https://twitter.com/intent/follow?original_referer=http%3A%2F%2Fembedded-lab.com%2Fblog%2F%3Fp%3D4469&region=follow_link&screen_name=EmbeddedLab&tw_p=followbuttonhttp://embedded-lab.com/blog/?page_id=7124http://embedded-lab.com/blog/?page_id=7952http://embedded-lab.com/blog/?p=4469http://www.youtube.com/user/ThePicboardhttps://www.facebook.com/03luckyhttp://embedded-lab.com/blog/?page_id=7952http://twitter.com/EmbeddedLabhttp://www.embedded-lab.com/https://plus.google.com/102500228795021081703http://feeds.feedburner.com/EmbeddedLabhttps://www.facebook.com/sharer/sharer.php?app_id=776730922422337&u=https%3A%2F%2Fwww.facebook.com%2Fpages%2FEmbedded-Lab%2F204296282917811&display=popup&ref=plugin&src=pagehttp://embedded-lab.com/blog/?page_id=6225https://www.facebook.com/profile.php?id=100009396978470https://www.tindie.com/stores/rajbex/?ref=offsite_badges&utm_source=sellers_rajbex&utm_medium=badges&utm_campaign=badge_smallhttp://embedded-lab.com/blog/?page_id=5045https://www.facebook.com/pages/Embedded-Lab/204296282917811http://embedded-lab.com/blog/?page_id=23http://embedded-lab.com/blog/?page_id=9755http://embedded-lab.com/blog/?page_id=4705https://www.facebook.com/profile.php?id=100009436058226https://www.facebook.com/martin.krstevski.129http://embedded-lab.com/blog/http://embedded-lab.com/wp-login.phphttps://www.facebook.com/profile.php?id=100001894059351http://embedded-lab.com/blog/?page_id=7124https://www.facebook.com/profile.php?id=100010005186255https://www.facebook.com/pages/Embedded-Lab/204296282917811http://www.facebook.com/pages/Embedded-Lab/204296282917811http://embedded-lab.com/blog/?page_id=28http://embedded-lab.com/blog/?page_id=2822http://embedded-lab.com/blog/?page_id=3030http://embedded-lab.com/blog/?author=1http://embedded-lab.com/blog/?page_id=525

  • 8/20/2019 A Brief Overview of Allegro ACS712 Current Sensor (Part 1) _ Embedded Lab

    2/8

    23.7.2015. A brief overview of Allegro ACS712 current sensor (Part 1) | Embedded Lab

    http://embedded-lab.com/blog/?p=4469 2/8

    ACS712-05 current sensor module

    TheoryThe current sensing technique based on a shunt resistor is

    described in How to measure dc current with a

    microcontroller? and implemented in the Multi-functional

    power supply project. The major disadvantages of this

    technique are:

    load is lifted from the direct ground connection

    non-linearity in the response due to Joule heating

    that drifts the resistance value

    lack of electrical isolation between the load and thesensing part

    The Allergo ACS712 current sensor is based on the principle

    of Hall-effect, which was discovered by Dr. Edwin Hall in

    1879. According to this principle, when a current carrying

    conductor is placed into a magnetic filed, a voltage is

    generated across its edges perpendicular to the directions

    of both the current and the magnetic field. It is illustrated in

    the figure shown below. A thin sheet of semiconductor

    material (called Hall element) is carrying a current (I) and is

    placed into a magnetic field (B) which is perpendicular to

    the direction of current flow. Due to the presence of Lorentz

    force, the distribution of current is no more uniform across

    the Hall element and therefore a potential difference is

    created across its edges perpendicular to the directions of 

    both the current and the field. This voltage is known Hall

    voltage and its typical value is in the order of few

    microvolts. The Hall voltage is directly proportional to the

    magnitudes of I and B. So if one of them (I and B) is known,

    then the observed Hall voltage can be used to estimate the

    other.

    http://embedded-lab.com/blog/wp-content/uploads/2012/01/ActualModule.jpghttp://embedded-lab.com/blog/?p=1953http://embedded-lab.com/blog/?p=1906

  • 8/20/2019 A Brief Overview of Allegro ACS712 Current Sensor (Part 1) _ Embedded Lab

    3/8

    23.7.2015. A brief overview of Allegro ACS712 current sensor (Part 1) | Embedded Lab

    http://embedded-lab.com/blog/?p=4469 3/8

    Principle of Hall-effect

    The ACS712 device is provided in a small, surface mount

    SOIC8 package. It consists of a precise, low-offset, linear

    Hall sensor circuit with a copper conduction path located

    near the surface of the die. When current is applied through

    the copper conductor, a magnetic field is generated which

    is sensed by the built-in Hall element. The strength of the

    magnetic field is proportional to the magnitude of the

    current through the conduction path, providing a linear

    relationship between the output Hall voltage and input

    conduction current. The on-chip signal conditioner and

    filter circuit stabilizes and enhances the induced Hall

    voltage to an appropriate level so that it could be measured

    through an ADC channel of a microcontroller. The pin

    diagram of ACS712 device and its typical application circuitis shown below. Pins 1, 2 and 3, 4 forms the copper

    conduction path which is used for current sensing. The

    internal resistance of this path is around 1.2 m?, thus

    providing low power loss. As the terminals of this

    conduction path are electrically isolated from the sensor

    leads (pins 5 through 8), the ACS712 device eliminates the

    risk of damaging the current monitoring circuit due to the

    high voltage on the conduction side. The electrical isolation

    between the conduction current and the sensor circuit also

    minimizes the safety concerns while dealing with high

    voltage systems.

    Pin diagram and a typical application circuit of ACS712

    http://embedded-lab.com/blog/wp-content/uploads/2012/01/PinDiagrams.jpghttp://embedded-lab.com/blog/wp-content/uploads/2012/01/HallEffect.jpg

  • 8/20/2019 A Brief Overview of Allegro ACS712 Current Sensor (Part 1) _ Embedded Lab

    4/8

    23.7.2015. A brief overview of Allegro ACS712 current sensor (Part 1) | Embedded Lab

    http://embedded-lab.com/blog/?p=4469 4/8

    In low-frequency applications, it is often desirable to add a

    simple RC filter circuit at the output of the device to

    improve the signal-to-noise ratio. The ACS712 contains an

    internal resistor (R ) connected between the the output of 

    the on-chip signal amplifier and the input of the output

    buffer stage (shown below). The other end of the resistor is

    externally accessible through pin 6 (Filter). With this

    architecture, users can implement a simple RC filterthrough the addition of an external capacitor (C ) between

    the Filter pin and ground. It should be noted that the use of 

    external capacitor increases the rise time of the sensor

    output, and therefore, sets the bandwidth of the input

    signal. The maximum bandwidth of the input signal is 80

    KHz at zero external filter capacitor. The bandwidth

    decreases with increasing C . The datasheet of ACS712

    recommends to use 1 nF for C to reduce noise under

    nominal conditions.

    Functional block diagram of ACS712

    Sensitivity and output of ACS712

    The output of the device has positive slope when an

    increasing current flows through the copper conduction

    path (from pins 1 and 2, to pins 3 and 4). The ACS712 device

    comes in three variants, providing current range of±5A

    (ACS712-05B), ±20A (ACS712-20B), and ±30A (ACS712-30A).

    The ACS712-05B can measure current up to ±5A and

    provides output sensitivity of 185mV/A (at +5V power

    supply), which means for every 1A increase in the current

    through the conduction terminals in positive direction, the

    output voltage also rises by 185 mV. The sensitivities of 20A

    and 30A versions are 100 mV/A and 66 mV/A, respectively.

    At zero current, the output voltage is half of the supply

    voltage (Vcc/2). It should be noted that the ACS712 provides

    ratiometric output, which means the zero current output

    and the device sensitivity are both proportional to the

    supply voltage, V . This feature is particularly useful when

    using the ACS712 with an analog-to-digital converter. The

    precision of any A/D conversion depends upon the stability

    F

    F

    F

    F

    CC

    http://embedded-lab.com/blog/wp-content/uploads/2012/01/FunctionalBlock.png

  • 8/20/2019 A Brief Overview of Allegro ACS712 Current Sensor (Part 1) _ Embedded Lab

    5/8

    23.7.2015. A brief overview of Allegro ACS712 current sensor (Part 1) | Embedded Lab

    http://embedded-lab.com/blog/?p=4469 5/8

    of the reference voltage used in the ADC operation. In most

    microcontroller circuits, the reference voltage for A/D

    conversion is the supply voltage itself. So, if the supply

    voltage is not stable, the ADC measurements may not be

    precise and accurate. However, if the reference voltage of 

    ADC is same as the supply voltage of ACS712, then the

    ratiometric output of ACS712 will compensate for any error

    in the A/D conversion due to the fluctuation in thereference voltage.

    Let me explain this with an example. Suppose, an ADC chip

    uses Vcc = 5.0V as a reference for A/D conversion and the

    same supply voltage powers an ACS712 sensor chip. The

    analog output of the ACS712 will be digitized through the

    ADC chip. When there is zero current through the current

    sensor, the output is Vcc/2 = 2.5V. If the ADC chip is 10-bit

    (0-1023), it will convert the analog output from the ACS712

    sensor into digital value of 512 count. Now, if the supply

    voltage drifts and becomes Vcc = 4.5V, then, due to the

    ratiometric nature, the new output of the ACS712 sensor

    will be 4.5/2 = 2.25V, which will still be digitized to 512 by

    the ADC as its reference voltage is also lowered to 4.5V.

    Similarly, the sensitivity value will also be lowered by a

    factor of 4.5/5 = 0.9, which means if the ACS712-05B is

    powered with a 4.5V supply, the sensitivity is reduced to

    166.5 mV/A, instead of 185mV, A. This concludes that any

    fluctuation in the reference voltage will not be a source of error in the analog-to-digital conversion of the ACS712

    output signals.

    The curve below shows the nominal sensitivity and

    transfer characteristics of the ACS712-05B sensor powered

    with a 5.0V supply. The drift in the output is minimum for a

    varying operating temperature, which is attributed to an

    innovative chopper stabilization technique implemented on

    the chip (read ACS712 datasheet for detail).

    Output voltage vs sensed current of ACS712-05B at 5.0 V power supply and

    http://embedded-lab.com/blog/wp-content/uploads/2012/01/IO_Characteristics.jpg

  • 8/20/2019 A Brief Overview of Allegro ACS712 Current Sensor (Part 1) _ Embedded Lab

    6/8

    23.7.2015. A brief overview of Allegro ACS712 current sensor (Part 1) | Embedded Lab

    http://embedded-lab.com/blog/?p=4469 6/8

    PIC Projects Tips and Tricks

    Billy

    comsian

    varying temperature

    Summary

    This article briefly described the ACS712 current sensor and

    its basic features. Continue reading the second part of this

    discussion to see how to use it with a PIC microcontroller tomeasure DC current.

    A brief overview of Allegro ACS712

    current sensor Part 2)

    References

    ACS712 datasheet

    ACS712 FAQ from Allegro website

     

    Related posts:

    1. A brief overview of Allegro ACS712 current sensor

    (Part 2)

    2. Humidity and temperature measurements with

    Sensirion’s SHT1x/SHT7x sensors (Part 2)3. Making a simple clap switch

    4. Low-cost thermostat design for cooking appliances

    using PIC10F204

    tagged with ACS712, current sensor, PIC16F1847

    10 COMMENTS

     July 18, 2015 5:28 am

    The 30A modules you buy from China, are no good, the

    solder melts at 8 Amps and open circuits.

    Reply

    March 7, 2015 2:08 pm

    how much power does acs712 consume..??

    if i want to check power ratings of my home appliances like

     2

    37Like

    265 17 28

    14K

    http://embedded-lab.com/blog/?p=4529http://embedded-lab.com/blog/?tag=current-sensorhttp://embedded-lab.com/blog/?cat=4http://www.allegromicro.com/en/Products/Current-Sensor-ICs/Zero-To-Fifty-Amp-Integrated-Conductor-Sensor-ICs/ACS712/ACS712-ACS713-Frequently-Asked-Questions.aspxhttp://embedded-lab.com/blog/?p=4469&replytocom=1980042#respondhttp://embedded-lab.com/blog/?tag=pic16f1847http://embedded-lab.com/blog/?cat=183http://embedded-lab.com/blog/?p=7811http://embedded-lab.com/blog/?p=4529http://embedded-lab.com/uploads/datasheets/ACS712-Datasheet.pdfhttp://embedded-lab.com/blog/?tag=acs712http://embedded-lab.com/blog/?p=6439http://embedded-lab.com/blog/?p=2760

  • 8/20/2019 A Brief Overview of Allegro ACS712 Current Sensor (Part 1) _ Embedded Lab

    7/8

    23.7.2015. A brief overview of Allegro ACS712 current sensor (Part 1) | Embedded Lab

    http://embedded-lab.com/blog/?p=4469 7/8

    Zafar

    Amit sharma

    Ali

    Hazem

    Hazem

    HS

    fans ; will acs 712 will be a right option?

    Reply

     July 17, 2014 9:07 am

    i wont calculate current in 230V AC supply with load Current

    appox 20-25 amp.so this(ACS712-30A)IC is reliable or not

    becos total

    POWER = 230*23= 5290watt =5.2KVA

    or use CT(Current Transformer)

    Reply

    March 3, 2014 12:15 pm

    Sir,what is the power rating of ACS712-05B current sensor

    ic?

    Reply

    April 19, 2014 7:29 pm

    I think 100W

    Reply

    March 28, 2013 12:59 pm

    i will change ACS712-05 by ACS712-20A . plz give me an idea

    Reply

    March 28, 2013 12:53 pm

    plz.you can help me . why maximum current 6.52 ?

    thanks for yours answer .

    Reply

    Pingback: Blog J.Schweiss | AVR Tutorials

    August 11, 2012 3:10 am

    I am in big trouble, I am on my dead line of project and not

    able to measure current. please help me out. My

    application is to measure current through 200 ohm to 1000

    Mohm resistance, right now I am able to measure 200 ohm

    to 20 Mohm but not above than that, help me with this

    problem is this IC can help me or any other circuit?

    Reply

    Pingback: Electronics-Lab.com Blog » Blog Archive » A brief overview of Allegro ACS712 current sensor

    http://embedded-lab.com/blog/?p=4469&replytocom=178200#respondhttp://embedded-lab.com/blog/?p=4469&replytocom=1771428#respondhttp://www.jschweiss.de/blog/post/2013/01/07/AVR-Tutorials.aspxhttp://www.electronics-lab.com/blog/?p=16415http://embedded-lab.com/blog/?p=4469&replytocom=64290#respondhttp://embedded-lab.com/blog/?p=4469&replytocom=657696#respondhttp://embedded-lab.com/blog/?p=4469&replytocom=519301#respondhttp://embedded-lab.com/blog/?p=4469&replytocom=178204#respondhttp://embedded-lab.com/blog/?p=4469&replytocom=902694#respond

  • 8/20/2019 A Brief Overview of Allegro ACS712 Current Sensor (Part 1) _ Embedded Lab

    8/8

    23.7.2015. A brief overview of Allegro ACS712 current sensor (Part 1) | Embedded Lab

    http://embedded-lab.com/blog/?p=4469 8/8

    © 2015 Embedded-Lab. All Rights Reserved. zeeDynamic Theme

    LEAVE A REPLY

    Your email address will not be published. Required fieldsare marked *

    Name *

    Email *

    Website

    Comment

    Post Comment

    http://themezee.com/themes/zeedynamic/