Filtering AC out of the measured DC currenty with hall effect CT

Thread Starter

Kibirad

Joined Oct 18, 2021
24
Hi,
I'm thinking about constructing energy monitor for DC circuit. Because I usually prefer non invasive methods I would like to use hall effect CT. Another reason for using it is the current itself. I expect the circuit to work with voltage around 250V and 22 A. Yes there are some shield but I don't trust them when I see those small connection terminals. But back to the question. I plan to measure voltage just by using voltage divider and then measure voltage on it. Power source is "hard" so I'm not really afraid of using such a circuit without some op amp "magic". Current transformer would be connected right to the MCU. But there is the catch.. noise in measured data. Because I'm focusing on long term and relatively precise energy monitor I can't neglect noise. At first I was thinking about just using some digital filter in MCU but more that I think of it I'm leaning to the side of HW filtering. I can imagine low pass RC filter with voltage divider to cut off all AC noise. But I'm not really experienced with using HW filters. Can I go wrong with using too low cutoff frequency? Let's say 1 Hz cutoff for DC should be ok, no? But mainly I'm absolutely clueless if it's possible to create HW filter for hall effect CT. I expect there would be needed some op amp circuit so the low pass filter wouldn't interfere with the measured data from the CT. Any suggestions? Thanks.
 

Papabravo

Joined Feb 24, 2006
21,225
Point #1 - You do not want to rely on purely digital means to do your filtering.
Point #2 - Any analog anti-aliasing filter that you build must use opamps because a passive filter will require impractical values of passive components.

An annotated schematic of the voltage divider, Hall Effect CT, and the DC system under measurement would be handy in analyzing your problem and helping you arrive at a solution.

EDIT: I see another problem with using a Hall Effect CT with a DC system:

Yes, Hall effect sensors sense the magnetic field caused by current, and can therefore measure absolute current. A current transformer can only sense current down to some minimum frequency below which gain falls off rapidly. A current transformer can't sense a fixed current.

I think the above condition might be a deal breaker for DC current.
 

schmitt trigger

Joined Jul 12, 2010
900
What Papabravo just said. An analog pre-filter followed by digital processing.
What I would do is to use one of the analog filter design wizards available from Analog, TI, and others.
Those will allow you to test different filter configuration and orders, and choose the one that provides the required bandstop attenuation while minimizing settling time and over shoot. Those will also calculate the required capacitor and resistor values, and suggest opamp types.
 

Thread Starter

Kibirad

Joined Oct 18, 2021
24
Point #1 - You do not want to rely on purely digital means to do your filtering.
Point #2 - Any analog anti-aliasing filter that you build must use opamps because a passive filter will require impractical values of passive components.

An annotated schematic of the voltage divider, Hall Effect CT, and the DC system under measurement would be handy in analyzing your problem and helping you arrive at a solution.

EDIT: I see another problem with using a Hall Effect CT with a DC system:

Yes, Hall effect sensors sense the magnetic field caused by current, and can therefore measure absolute current. A current transformer can only sense current down to some minimum frequency below which gain falls off rapidly. A current transformer can't sense a fixed current.

I think the above condition might be a deal breaker for DC current.
Schematics is non existent at this point. I'm in a phase when I'm trying to figure out if there is even simple way to solve the problem. About the posted citation. I think there is some confusion no? But maybe on my side. Author talks about hall effect CT and normal CT. I'm talking about CT with hall cell in it. Something like HSTS016L. I've found the same reply and it continues.


Yes, Hall effect sensors sense the magnetic field caused by current, and can therefore measure absolute current. A current transformer can only sense current down to some minimum frequency below which gain falls off rapidly. A current transformer can't sense a fixed current.

If you are measuring current of something that is inherently AC, like the power line, then a current transformer can be appropriate. If you really need to sense DC current, then you can't use a current transformer and a Hall effect sensor may be appropriate. Keep in mind that a Hall sensor requires separate power to operate.
 

Papabravo

Joined Feb 24, 2006
21,225
Schematics is non existent at this point. I'm in a phase when I'm trying to figure out if there is even simple way to solve the problem. About the posted citation. I think there is some confusion no? But maybe on my side. Author talks about hall effect CT and normal CT. I'm talking about CT with hall cell in it. Something like HSTS016L. I've found the same reply and it continues.


Yes, Hall effect sensors sense the magnetic field caused by current, and can therefore measure absolute current. A current transformer can only sense current down to some minimum frequency below which gain falls off rapidly. A current transformer can't sense a fixed current.

If you are measuring current of something that is inherently AC, like the power line, then a current transformer can be appropriate. If you really need to sense DC current, then you can't use a current transformer and a Hall effect sensor may be appropriate. Keep in mind that a Hall sensor requires separate power to operate.
I agree that you have some component engineering research to do, before creating a schematic.
 

eetech00

Joined Jun 8, 2013
3,951
Hi,
I'm thinking about constructing energy monitor for DC circuit. Because I usually prefer non invasive methods I would like to use hall effect CT. Another reason for using it is the current itself. I expect the circuit to work with voltage around 250V and 22 A. Yes there are some shield but I don't trust them when I see those small connection terminals. But back to the question. I plan to measure voltage just by using voltage divider and then measure voltage on it. Power source is "hard" so I'm not really afraid of using such a circuit without some op amp "magic". Current transformer would be connected right to the MCU. But there is the catch.. noise in measured data. Because I'm focusing on long term and relatively precise energy monitor I can't neglect noise. At first I was thinking about just using some digital filter in MCU but more that I think of it I'm leaning to the side of HW filtering. I can imagine low pass RC filter with voltage divider to cut off all AC noise. But I'm not really experienced with using HW filters. Can I go wrong with using too low cutoff frequency? Let's say 1 Hz cutoff for DC should be ok, no? But mainly I'm absolutely clueless if it's possible to create HW filter for hall effect CT. I expect there would be needed some op amp circuit so the low pass filter wouldn't interfere with the measured data from the CT. Any suggestions? Thanks.
You begin your discussion with DC then drop AC into it. Are you wanting measuring AC or DC current?
A CT won't work for DC but you can use a HALL sensor (with an Op Amp) to measure AC or DC.
 

nsaspook

Joined Aug 27, 2009
13,272
What controller? How much precision do you need from the current measurements? How much AC voltage and what frequency range to you expect will be mixed with the DC?

My last Solar energy monitor used 0.1 HF bypass filters on the outputs of the hall sensors and digital filtering in the controller because the power source was solar panels. If the input was unfiltered rectified AC generator power the digital filter requirement would be greater but still easily doable on a 8-bit controller with a computing 12-bit ADC like the pic18K42 series has.

https://forum.allaboutcircuits.com/...c-controlled-battery-array.32879/post-1460084
https://forum.allaboutcircuits.com/...c-controlled-battery-array.32879/post-1472837
https://forum.allaboutcircuits.com/...c-controlled-battery-array.32879/post-1473838

http://ww1.microchip.com/downloads/en/appnotes/pic16-pic18-adc2-90003194a.pdf
 
Last edited:

Thread Starter

Kibirad

Joined Oct 18, 2021
24
What controller? How much precision do you need from the current measurements? How much AC voltage and what frequency range to you expect will be mixed with the DC?

My last Solar energy monitor used 0.1 HF bypass filters on the outputs of the hall sensors and digital filtering in the controller because the power source was solar panels. If the input was unfiltered rectified AC generator power the digital filter requirement would be greater but still easily doable on a 8-bit controller with a computing 12-bit ADC like the pic18K42 series has.

https://forum.allaboutcircuits.com/...c-controlled-battery-array.32879/post-1460084
https://forum.allaboutcircuits.com/...c-controlled-battery-array.32879/post-1472837
https://forum.allaboutcircuits.com/...c-controlled-battery-array.32879/post-1473838

http://ww1.microchip.com/downloads/en/appnotes/pic16-pic18-adc2-90003194a.pdf
I'm thinking about something out of ESP family. Using ESP32 would be probably overkill so ESP8266 is probably way to go. Maybe with external ADC. I've really didn't thought about precision because at first I wanted to see if it is even possible to do such a thing relatively easily. But there is no reason to try achieve precision of 1 mA if the overall precision of sensor is around 100 mA... Higher precision would be better but there is always a wall where the price for small bit of precision rises astronomically. I really can't tell how much AC will get in. All would be noise from grid and surroundings. I have basically the same set up - power source are photovoltaics panels and I want to measure energy generated by it. It seems weir that you are using L01Z200S05 which is hall effect CT and it works for your applicationd and other here are seemingly saying that it can't work.
 

nsaspook

Joined Aug 27, 2009
13,272
The L01Z200S05 is not a current transformer. It's a open-loop configuration Hall sensor that measures the magnetic flux at a gap in the sensors magnetic core.
https://www.mouser.com/datasheet/2/397/TCOA_S_A0009485006_1-2563935.pdf

They work but I don't really like the short term stability of that Hall sensor.

Your front-end voltage-divider resistor networks and sensor/ADC voltage refs will be the major factor what precision you will get even with the best sensors.
https://www.mouser.com/datasheet/2/...-cslt_series-product-sheet-005862-1846316.pdf
https://forum.allaboutcircuits.com/...t-and-voltage-in-3-places.168908/post-1501156

The major problem I've had with AC signals in the mix with DC has been from Charge Controllers using PWM to control battery charging currents. It's easy to average out with digital or analog LP filtering.
 
Last edited:

Thread Starter

Kibirad

Joined Oct 18, 2021
24
The L01Z200S05 is not a current transformer. It's a open-loop configuration Hall sensor that measures the magnetic flux at a gap in the sensors magnetic core.
https://www.mouser.com/datasheet/2/397/TCOA_S_A0009485006_1-2563935.pdf

They work but I don't really like the short term stability of that Hall sensor.

Your front-end voltage-divider resistor networks and sensor/ADC voltage refs will be the major factor what precision you will get even with the best sensors.
https://www.mouser.com/datasheet/2/...-cslt_series-product-sheet-005862-1846316.pdf
https://forum.allaboutcircuits.com/...t-and-voltage-in-3-places.168908/post-1501156
So maybe there is the catch. I used translation from my language and found under it product after that I assumed that the english speaking part of world call it the same. Is there any other non invasive method with medium to long term stability? I know that the voltage divider circuit and adc is important but we are also limited by precision of sensor itself. If the sensor is no-good then really even the best cricut design won't help much. Yes with higher price tag I can get better sensors but I'm limited by size of cable (I need at least sensor with 15 mm hole) and there is the point where it is just cheaper to buy finished industrial product. But that product is still really pricey.
 

nsaspook

Joined Aug 27, 2009
13,272
So maybe there is the catch. I used translation from my language and found under it product after that I assumed that the english speaking part of world call it the same. Is there any other non invasive method with medium to long term stability? I know that the voltage divider circuit and adc is important but we are also limited by precision of sensor itself. If the sensor is no-good then really even the best cricut design won't help much. Yes with higher price tag I can get better sensors but I'm limited by size of cable (I need at least sensor with 15 mm hole) and there is the point where it is just cheaper to buy finished industrial product. But that product is still really pricey.
A ratiomatic Hall sensor is usually what you need to easily interface with the controller ADC.

Yes, sensor precision is very important. That's why the L01Z200S05 is not on my good list. Precision is stability, low noise and repeatability of the raw sensor measurement. I can calibrate and linearize the error offset with a known set of standards to provide Accuracy in the actual final measurement result..
https://forum.allaboutcircuits.com/...c-controlled-battery-array.32879/post-1496750

https://www.exactmetrology.com/information/educational/precision-vs-accuracy
 

Thread Starter

Kibirad

Joined Oct 18, 2021
24
A ratiomatic Hall sensor is usually what you need to easily interface with the controller ADC.

Yes, sensor precision is very important. That's why the L01Z200S05 is not on my good list. Precision is stability, low noise and repeatability of the raw sensor measurement. I can calibrate and linearize the error offset with a known set of standards to provide Accuracy in the actual final measurement result..
https://forum.allaboutcircuits.com/...c-controlled-battery-array.32879/post-1496750

https://www.exactmetrology.com/information/educational/precision-vs-accuracy
Sorry for delay but life got in the way.. After some thinking I decided to leave the non invasive approach. Mainly because I found that you can buy really robust looking shunt resistors and apparently they are even more precise than hall sensors. I don't want to start new thread so I'll ask here. Also the questions are still related to the original question. But if you deem it necessary to create new thread I'll do it.
As I said, mainly the noise introduced into measurement will be coming from the grid. Around will be also switched supply working with PWM on 50 Hz, so same as grid but probably more noisy. In the same room is also electronically ignited gas boiler and from previous projects I know, that it creates some substantial noise. Are there any recommended settings for filtering DC signal? Would be problem using low pass RC filter ( 4th order Butterworth ) with passband 1 Hz and stopband 4 Hz? And now about the circuit in my head. What about shunt resistor connected to two inverting op amps in series (one for amplification and second for inversion back, or would be better to use both as amplifiers not just one? ) and after amplification and inversion back add RC filter and from it go right on external ADC. Maybe something along the lines of ADS1115 ?
 

nsaspook

Joined Aug 27, 2009
13,272
Look at the Analog Input Filtering section of the ADS1115:
10.1.5 Analog Input Filtering
10.2 Typical Application Shunt-based, current-measurement solutions

for design references. I really don't think noise issues on the fairly low impedance DC measurements will be a big issue requiring complex filtering with only 860 SPS max from that ADC. If you only need ~20 SPS there are other ADC's with digital filters to reject 50-Hz or 60-Hz line frequencies or to simultaneously reject 50 Hz and 60 Hz like the ADS1120: https://www.ti.com/lit/ds/symlink/a...30322&ref_url=https%3A%2F%2Fwww.google.com%2F
 

Thread Starter

Kibirad

Joined Oct 18, 2021
24
Look at the Analog Input Filtering section of the ADS1115:
10.1.5 Analog Input Filtering
10.2 Typical Application Shunt-based, current-measurement solutions

for design references. I really don't think noise issues on the fairly low impedance DC measurements will be a big issue requiring complex filtering with only 860 SPS max from that ADC. If you only need ~20 SPS there are other ADC's with digital filters to reject 50-Hz or 60-Hz line frequencies or to simultaneously reject 50 Hz and 60 Hz like the ADS1120: https://www.ti.com/lit/ds/symlink/ads1120.pdf?ts=1634774630322&ref_url=https%3A%2F%2Fwww.google.com%2F
Ok, thanks for help. But I still have some questions. Did you recomended ADS1120 because it already includes programmable gain and therefore there is no need for another circuit for amplification of measured voltage drop? Is the described circuit with two op amps normaly used or are there some better choices? Maybe just op amp in non-inverting configuration? Thanks
 
Top