A brief overview of Allegro ACS712 current sensor using PIC16F1847 (Part 1)

Summary of A brief overview of Allegro ACS712 current sensor using PIC16F1847 (Part 1)


This article introduces the Allegro ACS712, a Hall-effect based current sensor offering precise AC/DC measurement with electrical isolation. It contrasts this method with traditional shunt resistors, highlighting issues like temperature drift and lack of isolation in the latter. The text outlines the Hall-effect theory where magnetic fields generate voltage proportional to current flow and mentions a planned two-part series covering sensor characteristics and interfacing with a PIC microcontroller.

Parts used in the Allegro ACS712 Current Sensing Project:

  • Allegro ACS712 device
  • Hall element (semiconductor material)
  • PIC microcontroller

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.

current sensor

Theory

The 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 the sensing 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.

 

For more detail: A brief overview of Allegro ACS712 current sensor using PIC16F1847 (Part 1)

Quick Solutions to Questions related to Allegro ACS712 Current Sensing Project:

  • How does the ACS712 sense current?
    The device uses the Hall-effect principle where a magnetic field generates a voltage across a semiconductor Hall element proportional to the current.
  • What are the disadvantages of using a shunt resistor for current sensing?
    Shunt resistors suffer from non-linearity due to Joule heating, temperature-dependent resistance drift, and a lack of electrical isolation between the load and sensing unit.
  • Can the ACS712 measure both AC and DC currents?
    Yes, the Allegro ACS712 provides an economical way to sense both AC and DC currents.
  • Why is electrical isolation desirable in high voltage applications?
    Isolation separates the load from the current sensing unit, which is a key advantage over simple shunt resistor techniques.
  • What is the relationship between Hall voltage and current?
    The Hall voltage is directly proportional to the magnitude of the current flowing through the conductor and the magnetic field.
  • What will be covered in the second part of this discussion?
    The second part will describe a test experiment to interface the sensor with a PIC microcontroller to measure DC current.
  • Who discovered the Hall-effect principle?
    Dr. Edwin Hall discovered the Hall-effect principle in 1879.
  • What force causes the distribution of current to become non-uniform in the Hall element?
    The Lorentz force causes the current distribution to change when the conductor is placed in a magnetic field.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter