# Closed loop current sensor

Dec 17, 2017
5
Hello,

I am building a closed loop current sensor and having a very hard time finding good documentation about how to make one. I'm hoping I can solicit some help from the many savvy members of this forum.

I will post a schematic as soon as I can, but here's something to get this started.

The general theory of operation is that it's an AC/DC sensor that uses feedback to get high accuracy, and can measure either very high currents without saturating your magnetic core (a toroid with a thin slot cut in it), or alternately, very small amounts of current. The sensor combined a 1. Gapped magnetic core, 2. A hall effect sensor placed inside the gap, 2. An amplifier stage, and a secondary loop of wire that opposes the magnetic field in the primary of the circuit, with N turns ranging from 50 to 2000, depending on what you are trying to measure. The idea is that Ip = N x Is, and by putting a shunt resistor on the secondary, an analog voltage is created as the output. The formula for the circuit, then, presuming a high gain amp is used (say >=100) is: Vout / Ip = Rsh / N

I've designed the circuit with the following parameters:
Vout = +/- 4V
Ip = +/- 500 mA
N = 50
Rsh = 400 ohm

The problem I am having is that at 500 mA, the output, with the secondary wire coil connected, and in series with the shunt resistor gives the same output as if no coil is connected (about 60 mV at 500mA). I measured the current in secondary coil/resistor, and it is only 0.25 mA, versus the 500 mA / 50 turns = 10mA that is expected. The opamp I am using is an instrumentation amplifier TI INA826 with a gain set to 100. I was expecting that it could drive the 10mA required to energize the secondary circuit, but the output is clearly not doing what I was expecting it to do.

First, maybe a dumb question... Can this sensor actually detect DC?

Second, is it possible I need some sort of driver circuit to supply current to the secondary?

Any theories, tips, schematics, or reading materials you might provide on the subject would be greatly appreciated!

Dave

#### Harald Kapp

##### Moderator
Moderator
Nov 17, 2011
13,720
Welcome to EP, Dave.

In theory what you want to achieve is possible. Here's an app note showing how.
From your description the main difference seems to be the lack of an output amplifier which requires you to use a comparatively high value for the sense resistor..
Note that the app note states a typical offset of the Hall element of +-7 mV which at a gain of 100 results in an output offset of +-700 mV. Your observed value of 60 mV falls well within this range. The IC used in the app note uses current spinning to eliminate the offset (datasheet, figure 47).

For a more detailed analysis please post your schematic and the datasheet of (or a link to) the specific sensor you use.

Cheers,
Harald

Dec 17, 2017
5
Harald, really, thank you! Once gain it appears there is a brilliant TI part that can do what I want, and I'll read that datasheet forwards and backwards.

What you explained is completely true about the offset. at G = 100, there was about 480 mV of offset that I needed to null out with a potentiometer. There was plenty of headroom because I was powering the circuit from a +/-12V or +/-15V supply, but it would not work for a smaller, single supply, such as 0-5V.

As for the signal I observed, it was present, and went in the correct direction, but without the feedback coil being powered correctly, I wasn't ever expecting to get the correct full-scale output voltage from the sensor. The TI schematics and application examples should be invaluable in understanding how to build the sensor correctly. I am truly grateful to have this datasheet. Thank you!

Dave

Dec 17, 2017
5
I got the IC. I was so excited to use it. Created my schematic wrong and spent a whole lot of time wondering why it wasn't working. FYI, always work from the datasheet for pinouts, vs. your prototype schematic. I had transposed pins 1-10 with 11-20, so that I was dumping full supply current into ICOMP1 pin! Gotta go rebuild my circuit, but I'll let you know how it works. Here's an update on my settings:

Ip = 300mA
Is = 25 mA
N = Ip / Is = 12
Rs = 20 ohm +/- 0.1%
Vfs = Is x Rs = 25mA x 20 ohm = 500mV
G = 4
Vout,fs = 4 x Vfs = 2000mV (2.5V +/- 2V, really)

I really can't wait to build it and see it run!

Cheers, and happy holidays!

Dave

Last edited:

#### Harald Kapp

##### Moderator
Moderator
Nov 17, 2011
13,720

Happy holidays to you, too.

Dec 17, 2017
5
Hello! I have managed to build the sensor and I have some interesting notes:

For one, low primary:secondary turns ratio is not usable. In my previous posts I mentioned I would try n = 12. That's a non-starter. What happens is that there is a finite amount of offset error in the hall device, even at zero field. The feedback circuit of the DRV411 is used to drive the offset to zero, and requires coupling with the magnetic circuit to do this. Because it can only drive a finite amount of current (~250mA), if there are too few turns in your secondary coil, you'll never get even the hall device's offset error to be cancelled. What happens then, is that a very large error is introduced as Voq + Is x Rs. if Is = 250mA and Rs = 10 ohm, well, you've just saturated the output of the IC, at zero primary current: 2.5V + .25A x 10 = 5V. So, after failing at n =12, I tried 200, 400, and then 1000 turns. Each subsequent increase in turns reduces the secondary current required to null the hall offset, and reduced error in the quiescent offset voltage (Voq).

Now, what I am running into is a problem with the offset, which has prevented me from being able to capture full-scale measurements of less that 25A. My goal is to make a +/-500mA sensor. As I mentioned above, there is an offset voltage in each hall device, one which causes the DRV411 to drive current in the secondary even at a zero primary current. Call this Is_0, for "quiescent offset current." Then there is a error in the quiescent output voltage (Voq), which is Voq = Vref + Is_0 x Rs x G. If everything was perfect, then Voq = Vref. My hall devices at room temperature have about 2.5mV of offset voltage on them, and could be as high 7 or 8 mV across the whole temperature range. This is a problem, because they are causing up to 6 mA to flow in the secondary (Is_0), which amount to volts on the output, depending on the shunt resistor value. This error, then, also must be removed from the measurement, which will require an external voltage reference, an op-amp buffer, and either hand-picked resistors, or a potentiometer to do the trimming (bad for thermal performance, and accuracy). If the full scale range on the sensor is 0.5 to 4.5V, using a 5V supply, that means the product of offset current (Is_0) x series resistance (Rs) x differential amp gain (G = 4) must be less than 0.5V, or the sensor will be out of range. That implies the product of Is_0 x Rs must be less than 0.5V / 4 = 125 mV. This is what's limiting my ability to create a sensor with very low full scale values (500mA, 1A, 5A, for instance), because they require large shunt resistors, which causes the Is_0 x Rs product to quickly blow up.

I am very happy with my progress in both getting the IC and sensor to run, and achieving relatively good accuracy at current ratings down to +/-25A. Now I need to make the necessary refinements to get the current ratings I need: 500mA, 1A, and 5A. I thought that the DRV411 with its "current spinning" technique would eliminate not only the 1/f noise, but the offset error too. Unfortunately, I was mistaken. At this point I am unsure if the closed-loop w/ hall element will get me to the range and accuracy I require. I know that there is another Texas Instruments IC, DRV401, which uses a different type of detector to form the closed-loop secondary circuit. If the DRV411 isn't the right horse, perhaps the DRV401 in the right choice to get me there. What do you think?

Based on my account does anyone have any suggestions as to how to reduce my total offset error, and increase the sensitivity of the sensor (e.g. lower the full scale rating to <5A)? Do you think that the hall element is the problem? What would you do differently, or what might you recommend that I try? Some ideas are: 1) Use a CT core with higher relative permeability, 2) reduce the radius of the CT core, 3) Add another gain stage via instrumentation amp to dial in the correct output current, 4) SOMETHING ELSE. Ideas?

Regards,

#### Minder

Apr 24, 2015
3,478
I have used the ASC712 before, they can be had on a PCCT board for $1.50 to$2.50 on ebay.
Not sure if it would work for you.
M.

Dec 17, 2017
5
Minder, thanks for the suggestion! That would work nicely, however, the measurement requires a wide aperture to accommodate more that a single conductor. I do love that Allegro company, and they have a lot of nice products. I've been playing with their 136x hall effect sensor(s) and the range of sensitivities they offer is staggering. Unfortunately, though, accuracy, stability and core hysteresis have been a problem, and the reason why I moved to the closed-loop design. A recurring theme is that hall effect sensors seem to be pretty good, but not excellent at what I am trying to do (measure small currents in big objects). For instance, if a single, small conductor were all to be measured, I would have just taken shunt resistor, paired it with a nice diff-amp like the TI 199, added an optocoupler for isolation and called it a day. Oh well, the fun is in the hunt!

Replies
10
Views
977
Replies
4
Views
1K
Replies
1
Views
2K
Replies
12
Views
2K
Replies
2
Views
1K