Author Topic: Using a Hall sensor to measure current  (Read 4097 times)

0 Members and 1 Guest are viewing this topic.

Offline outrageTopic starter

  • Newbie
  • Posts: 7
  • Country: ru
Using a Hall sensor to measure current
« on: April 19, 2025, 10:59:59 am »
Hi!
I am a student, finishing my bachelor's degree. I am currently writing my graduation thesis and in it I need to measure the parameters of 220 V electrical networks.
In my work, I want to use a current measuring sensor based on the Hall effect. For these purposes, the ZMCT116-A is suitable for me, I want to connect it to the ESP-12 based on 8266.
I searched for information on the Internet and on Google Scholar and the like, but I did not find answers to my questions. :horse:

I don't really understand how the sensor should be connected to the controller.
I'll start from the beginning: According to information from the Internet, the sensor outputs a signal equal to the RMS current flowing in the 220 V circuit. The analog pin on the ESP-12 senses a voltage of up to 3.3 volts, and the sensor outputs up to 2.5 milliamps.

 Do I need to use some kind of signal converters, such as operational amplifiers? Does such an amplifier need a reference signal source, such as TL431?

It would be very cool if someone shared their experience of using such sensors and gave an example of practical use in a real circuit, shared their experience, and provided links to literature on the topic.
Thank you very much in advance!

PS English is not my native language, so I may make mistakes, I'm sorry :(
 

Offline moffy

  • Super Contributor
  • ***
  • Posts: 2908
  • Country: au
Re: Using a Hall sensor to measure current
« Reply #1 on: April 19, 2025, 11:26:55 am »
The device you mention ZMCT116-A : https://www.lcsc.com/datasheet/lcsc_datasheet_1810010923_ZHE-MING-LANG-XI-ZMCT116A_C155200.pdf
is not a Hall effect device but a current transformer, it doesn't measure DC only AC currents which is the main difference between a Hall effect sensor and a current transformer. The datasheet shows two applications:
1. Using an opamp as a virtual ground input to convert the current to a voltage.
2. A low value resistor placed across the output to convert the output current into a voltage.
For connection to I assume the ADC of the micro the AC signal would need a DC bias voltage to keep the AC signal within the voltage range of the ADC.
The current transformer produces an output current, as long as the output load is small, proportional to the input current, AC only, and in this case the output current is 1/2500 of the input or through current.
« Last Edit: April 19, 2025, 11:44:22 am by moffy »
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5962
  • Country: nl
Re: Using a Hall sensor to measure current
« Reply #2 on: April 19, 2025, 11:28:55 am »
Ouch, I don't know what they taught you in school, but I will give a hint. How do you convert current into voltage. Think of Ohms law.

Ai, moffy spilled the beans already.

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22257
  • Country: gb
  • 0999
Re: Using a Hall sensor to measure current
« Reply #3 on: April 19, 2025, 11:30:07 am »
The ZMCT116-A is a current transformer, not a Hall effect sensor. It has a turns ratio of 2500:1, which means it outputs a current equal to 1/2500 of the primary current, not a voltage.
https://hadibanelectronic.com/wp-content/uploads/2022/04/ZMCT116A-specification.pdf

You need to put a current sense resistor on the secondary side of your current transformer. Assuming the voltage range of your ADC is 3.3V, the peak-to-peak voltage across the sense resistor needs to be under 3.3V and biased to 3.3/2 = 1.65V.
 

Offline outrageTopic starter

  • Newbie
  • Posts: 7
  • Country: ru
Re: Using a Hall sensor to measure current
« Reply #4 on: April 19, 2025, 11:46:19 am »
Oh, I'm sorry, I made a mistake with the sensor name. What if it's a Hall sensor? What will fundamentally change?
 

Offline outrageTopic starter

  • Newbie
  • Posts: 7
  • Country: ru
Re: Using a Hall sensor to measure current
« Reply #5 on: April 19, 2025, 11:47:47 am »
I mean, what will change in the connection scheme.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5962
  • Country: nl
Re: Using a Hall sensor to measure current
« Reply #6 on: April 19, 2025, 11:57:13 am »
Depends on the sensor, but ones with a linear output will most likely give of a voltage within a certain range. Search for datasheets on these components.

Offline moffy

  • Super Contributor
  • ***
  • Posts: 2908
  • Country: au
Re: Using a Hall sensor to measure current
« Reply #7 on: April 19, 2025, 11:58:18 am »
A Hall effect sensor is normally prebiased based upon the supply voltage, but you need to take into account DC drift.
 

Offline outrageTopic starter

  • Newbie
  • Posts: 7
  • Country: ru
Re: Using a Hall sensor to measure current
« Reply #8 on: April 19, 2025, 12:07:54 pm »
Thanks for the answers! Brainstrom begins
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22257
  • Country: gb
  • 0999
Re: Using a Hall sensor to measure current
« Reply #9 on: April 19, 2025, 02:03:25 pm »
Use a potential divider to bias one side of the CT secondary at half the supply voltage. Put a sense resistor (also known as a burden resistor) across the secondary.
 
The following users thanked this post: outrage

Offline outrageTopic starter

  • Newbie
  • Posts: 7
  • Country: ru
Re: Using a Hall sensor to measure current
« Reply #10 on: April 19, 2025, 04:34:47 pm »
Can anyone recommend literature on the topic of connecting and using Hall sensors? I want to study the topic better :D
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11654
  • Country: us
  • Retired, now restoring antique test equipment
Re: Using a Hall sensor to measure current
« Reply #11 on: April 19, 2025, 04:58:29 pm »
Start by looking up the "Hall Effect" in physics, upon which these sensors are based.
Fundamentally, take a slab of conductor, shaped roughly like a domino.
Apply an external magnetic field through the thin dimension of the slab.
Send an electrical current down the long dimension of the slab.
The magnetic field will deflect the current a bit in the direction perpendicular to the current flow and the magnetic field.
This produces a voltage in that direction.
However, one must be careful not to confuse that voltage with the voltage in the direction of current flow caused by Ohm's Law, sensed due to misalignment of the contacts for sensing the Hall voltage.
This can be improved by modulating the internal current flow and using multiple contacts for the voltage sense.
With modulation, the sensor is useful for DC through a frequency less than the modulating frequency.
Interestingly, the polarity of the Hall voltage depends on what the charge carriers in the material are:  negative electrons or positive holes, or a combination.
We see that a Hall Sensor is useful to measure the magnetic field through the sample:  your external current, which you want to measure, induces a magnetic field according to the geometry of that current flow.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22257
  • Country: gb
  • 0999
Re: Using a Hall sensor to measure current
« Reply #12 on: April 19, 2025, 06:21:50 pm »
Are you talking about making your own Hall effect current sensor or asking about how to use one in your project?

I wouldn't know where to start, regarding making a Hall effect current sensor, but I have used one before in a project.

Anyway, you need to be specific about the input current range.
 

Offline outrageTopic starter

  • Newbie
  • Posts: 7
  • Country: ru
Re: Using a Hall sensor to measure current
« Reply #13 on: April 19, 2025, 08:09:27 pm »
Thank you all for the answers! I probably didn't make it very clear what I wanted to do.
My project involves measuring the current flowing in the home wiring. I want to make this measurement using a Hall sensor.
 Now about the parameters: in my country, the standard voltage in home electrical networks is 220~ 230 volts; the current flowing in the circuit does not exceed 32 amperes. Therefore, a current in the range of 32 amperes will flow to the sensor input. I want to take the ACS758 sensor (https://www.chipdip.ru/product0/8752432854 ) , so that it can record the current in case of possible failures in the electrical network. The signal from the sensor must be output to the ESP-12, to a port that senses voltage up to 3.3 volts.
Here's what we have: the measured current is 32 amps maximum; the maximum possible output voltage from the sensor is 3.3 volts.

 I have a few questions.:
1. What exactly is the value of the output signal relative to the wire on which the sensor stands? RMS current?
 2. What should be included in the sensor connection circuit? I know that a filtering capacitor and a measuring resistor should be included, but maybe something else is needed?
I apologize for any possible inaccuracies. It's difficult to translate the terms I'm used to into English.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11654
  • Country: us
  • Retired, now restoring antique test equipment
Re: Using a Hall sensor to measure current
« Reply #14 on: April 19, 2025, 08:36:54 pm »
To measure large AC currents, it is much easier to use a current transformer.
They are readily available, need no power, and can be used without breaking the wire through which the current flows.
The specification for some transformers will include the correct termination resistor on the output, and the voltage per ampere on that resistor.
Others merely specify the current ratio from the wire (high current) to the secondary (low current) and the maximum current in the secondary winding.
A simple AC voltmeter circuit following that resistor can be read by your voltage sense port on the ESP-12.
I can't access your webpage on the ACS758.  Allegro referred me to https://www.allegromicro.com/en/products/sense/current-sensor-ics/fifty-to-two-hundred-amp-integrated-conductor-sensor-ics/acs772 for a replacement for the obsolescent 758.  It seems to be overkill for your problem:  Hall-Effect sensors are typically required when you need to measure DC current.
« Last Edit: April 19, 2025, 08:44:21 pm by TimFox »
 
The following users thanked this post: outrage

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22257
  • Country: gb
  • 0999
Re: Using a Hall sensor to measure current
« Reply #15 on: April 20, 2025, 10:17:47 am »
Definitely use a transformer for AC.

Use the circuit I posed above.

The voltage across R3 must be under 3.3V peak-to-peak, or 1.65V peak.

The current you want to measure is 32A RMS. To get the peak current it must be multiplied by √2, giving 45.25A.

The current transformer divides the current by 2500, so the current flowing through the secondary and R3 is 45.25/2500 = 18.1mA peak.

The maximum peak voltage across R3 is determined by Ohm's law. R = V/I, so 1.65/0.0181 = 91.15 Ohms.

Use a 91 Ohm or 90.9 Ohm resistor for R3.
 
The following users thanked this post: outrage

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 874
  • Country: ie
    • LinkedIn
Re: Using a Hall sensor to measure current
« Reply #16 on: April 20, 2025, 12:38:24 pm »
Quote
What exactly is the value of the output signal relative to the wire on which the sensor stands? RMS current?
No, just voltage, proportional to momentary value of current. Zero current will produce Vcc/2 output voltage. Positive current will produce voltage > Vcc/2, negative - less than Vcc/2.

Quote
What should be included in the sensor connection circuit? I know that a filtering capacitor and a measuring resistor should be included, but maybe something else is needed?
Take a look at datasheet for sensor - it contains application circuit (BTW - there is no measuring resistor there, just RC filter on output)

You could be needed an amplifier between output of sensor and input of ADC, it depends on curretn range you have to measure and type of sensor.
Your ACS758LCB-050B-PFF-T has 40mV/A, it could be not enough to drive ADC directly

« Last Edit: April 20, 2025, 12:40:01 pm by xvr »
 
The following users thanked this post: outrage

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22257
  • Country: gb
  • 0999
Re: Using a Hall sensor to measure current
« Reply #17 on: April 20, 2025, 04:08:03 pm »
I entered my circuit into LTSpice.



SPICE models the transformer as a pair of coupled inductors. I don't know what the inductance of the CT is, so I guessed, but it doesn't matter, since it's the ratio which is important.
NP/NS = √(LP/LS)
 
The following users thanked this post: outrage

Offline outrageTopic starter

  • Newbie
  • Posts: 7
  • Country: ru
Re: Using a Hall sensor to measure current
« Reply #18 on: April 22, 2025, 06:23:35 am »
Thank you all so much for the answers! I didn't expect such a feedback.
 

Offline BadeBhaiya

  • Frequent Contributor
  • **
  • Posts: 320
  • Country: in
Re: Using a Hall sensor to measure current
« Reply #19 on: April 22, 2025, 08:29:09 am »
Hope I'm not intruding but just curious if its possible to make a current sensor using these hall effect sensors. Basically some kind of assembly that would let the conductor current be measured by the sensor. Yes I'm aware this sounds awfully like the sensors available these days, but hear me out. Instead of a single sensor, why not have multiple of them for different ranges, so we have an array of sensors, using which we can get better dynamic range than with a single sensor.

We probably wouldn't be able to measure too low. But it sounds pretty cool to me.

2550960-0
 

Offline Infraviolet

  • Super Contributor
  • ***
  • Posts: 1304
  • Country: aq
Re: Using a Hall sensor to measure current
« Reply #20 on: April 23, 2025, 12:30:24 am »
BadeBhaiya: It can be done, but it's the sort of sensor where calibrating it before use will be very important. Might only work for fairly large currents, depending on the sensor sensitivity, and you have to get the sensor very close to the current carrying wire and ensure the distance between it and that wire remains absolutely constant. Magnetic fields around a current carrying wire drop off quickly with distance, if there's any wiggle room at all then the changing in distance could cause a much larger change in the hall effect sensor's output signal than variations in the amount of current carried would cause.
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 3083
  • Country: gb
  • Recovering Electrical Engineer
Re: Using a Hall sensor to measure current
« Reply #21 on: May 03, 2025, 07:10:42 pm »
Not an engineering degree I take it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf