Announcement

Collapse
No announcement yet.

[OT] Inexpensive Hall Effect magnetic field and non-contact current sensor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [OT] Inexpensive Hall Effect magnetic field and non-contact current sensor

    This was from my post on my "Simple VFD", which needed a good way to measure current, both DC and AC. There are many Hall Effect current sensors, but most of them use a CT, which requires one or more turns of wire through a toroid core, or consist of an IC which carries the current. The MLX91205 can be mounted to straddle a PC board trace for current measurement, but is obsolete. The MLX91219 is in stock at Mouser for about $4, but senses the magnetic field perpendicular (orthagonal) to the surface of the device, which is suitable for placement in the gap of a magnetic core. It has a maximum sensitivity of 15 mV/mT. But I have a few pieces of the DRV5053, with a sensitivity of 45 mV/mT, and in stock for $1.41 in 10 piece quantity. Anther similar device is AH49FZ3-G1 which is less than $1, with sensitivity of 2.5 mV/Gauss or 25 mV/mT. As a point of reference, and determining if this could be used as an electronic compass, the Earth's magnetic field varies from 35 to 65 microTeslas, so the output would be in the order of 2.7 mV. It seems that I get a variation of 1.0228 volts to 1.0198 volts according to position using my test jig.

    I have the device connected to a 9V battery and a 1 uF capacitor on the power leads. I put a 3/4 loop of wire around the package.

    Click image for larger version

Name:	DRV5053_Hall_Current_Sensor_6971.jpg
Views:	412
Size:	280.4 KB
ID:	1986559 Click image for larger version

Name:	DRV5053_Hall_Current_Sensor_6973.jpg
Views:	439
Size:	246.2 KB
ID:	1986558

    I did a simple experiment with the DRV5053 and it will put out about 5 millivolts per ampere. The magnetic field must be directed perpendicular to the flat surfaces of the package, as it would be in the gap of a magnetic core. I should be able to route a track in a U-shape and have the device lay flat inside the "U". Results:

    3 A 1.0394 0.0051 V/A
    2 A 1.0348 0.0053 V/A
    1 A 1.0303 0.0061 V/A
    0 A 1.0242 ---
    -1 A 1.0179 0.0063 V/A
    -2 A 1.0128 0.0057 V/A
    -3 A 1.0078 0.0055 V/A

    It might be a very useful project to package this circuit into a hand-held tool which can be placed on a conductor to read AC or DC current. It will require a simple level shifter and amplifier to provide a convenient voltage level that can be calibrated in amperes or Teslas (or Gauss). So it could also be used to test the strength of magnets or electromagnets, such as a magnetic chuck. And it could also be used with a simple level detector to function as a tachometer, position indicator, or ignition timing and control device. I can supply more detailed circuits and ideas later, after some discussion (if there is sufficient interest). I'll be continuing to work on my Simple VFD, using this to measure phase currents or bus link current.
    http://pauleschoen.com/pix/PM08_P76_P54.png
    Paul , P S Technology, Inc. and MrTibbs
    USA Maryland 21030

  • #2
    I've just built 4 current sensors for my campervan using some ratiometric SS495A from Honeywell. I cut a slit on some small ferrite toroids and mounted the sensors. Tested out and and was able to measure from + 95A to - 95A. Supplied them with a little 9V1 zener diode, I get 4.55V at 0A.
    Helder Ferreira
    Setubal, Portugal

    Comment


    • #3
      It adds complication of course, but if the output is not sufficiently linear or regular over the range you're interested in, you can use a lookup table to convert arbitrary output values to desired display values.
      "A machinist's (WHAP!) best friend (WHAP! WHAP!) is his hammer. (WHAP!)" - Fred Tanner, foreman, Lunenburg Foundry and Engineering machine shop, circa 1979

      Comment


      • #4
        I received 10 powdered iron toroid cores and cut a slot in one of them with an abrasive disc and high speed "Casco" tool that was my father's and must be at least 60 years old. I placed the DRV5053 in the slot and repeated the tests shown in post Home with a wire through the toroid. For the last one, I used two turns. Here are the results:

        0.00 A 1.0240 V
        1.00 A 1.0376 V 13.6 mV/A
        2.00 A 1.0600 V 18.0 mV/A
        3.00 A 1.0832 V 19.7 mV/A
        6.00 A 1.2062 V 30.4 mV/A
        -1.0 A 1.0055 V -18.5 mV/A
        -2.0 A 0.9912 V -16.4 mV/A
        -3.0 A 0.9703 V -17.9 mV/A
        -6.0 A 0.8310 V -32.2 mV/A


        I am not sure why the output seems so non-linear, but probably because I didn't have the sensor properly affixed to the core, and the placement varied quite a lot. The slot is also rather roughly cut. The most significant variation appears with the 6 amp reading, but that was actually 3 amps through two turns of wire, so the coupling may be tighter. What is most important is that the output is much higher than that with just a loop of wire around the sensor, as in post Home - about 18 mV/A compared to about 5 or 6 mV/A.

        Click image for larger version

Name:	DRV5053_Iron_Powder_Toroid_20220415_233129992.jpg
Views:	314
Size:	148.8 KB
ID:	1997024
        These pictures were taken with my Motorola E6 Android phone, and apparently it does not focus very well compared to my Nikon CoolPix L22. But rest assured that the slot is very sloppy and ugly, not worth a better shot. I will need to figure out a better way to cut it. I think an ordinary hacksaw or bandsaw will work OK. This is powdered iron, not ferrite, and machining is probably similar to cast iron.

        Click image for larger version

Name:	DRV5053_Iron_Powder_Toroid_20220415_232950066.jpg
Views:	309
Size:	203.8 KB
ID:	1997025

        One take-away is that this means you can make a pretty good Hall Effect current sensor for less than $2 worth of parts, whereas a similar component like the Honeywell CSLT6B100 is about $25 on Amazon.

        Click image for larger version

Name:	CSL168100_Hall_Current_Sensor_20220416_005510224_HDR.jpg
Views:	309
Size:	567.7 KB
ID:	1997026 Click image for larger version

Name:	31rep0JIqWL._AC_.jpg
Views:	307
Size:	6.6 KB
ID:	1997027
        http://pauleschoen.com/pix/PM08_P76_P54.png
        Paul , P S Technology, Inc. and MrTibbs
        USA Maryland 21030

        Comment


        • #5
          I looked into those some years back. Those sensors are "extremely" sensitive to position relative to the conductor, in 2 dimensions. Not at all sure it would be very accurate as a general purpose probe.

          For any sort of accuracy, they needed individual calibration. The ones the current goes through have the relationship fixed, so that their accuracy is far higher.
          CNC machines only go through the motions.

          Ideas expressed may be mine, or from anyone else in the universe.
          Not responsible for clerical errors. Or those made by lay people either.
          Number formats and units may be chosen at random depending on what day it is.
          I reserve the right to use a number system with any integer base without prior notice.
          Generalizations are understood to be "often" true, but not true in every case.

          Comment


          • #6
            I wouldn't worry about linearity, but rather repeatability - both in the individual device and in several that were assembled in the same way. As long as you get the same 'out' for the same 'in' you can reliably convert that to a meaningful value for display or further downstream processing.
            "A machinist's (WHAP!) best friend (WHAP! WHAP!) is his hammer. (WHAP!)" - Fred Tanner, foreman, Lunenburg Foundry and Engineering machine shop, circa 1979

            Comment


            • #7
              The linearity of the DRV5053 is specified as 1%, but the quiescent output voltage can be 0.9 to 1.15 volts, with nominal of 1.02 volts, and mine shows 1.024. Most AC/DC current meters have a zero adjustment. The output is specified as 20-70 mV/mT, with nominal 45. The CSLT6B100 is specified as16 mV/AT with a variation of 13.5 to 18.5. So it looks like just about any Hall Effect sensor will need some amount of calibration and trimming. And there is also the error induced due to the earth's magnetic field, which for this sensor is a variation of 1.0228 volts to 1.0198 volts according to position, which is 3 mV out of a total range of 1600 mV, which is just about 0.2%, so that is negligible. For low currents, multiple wraps affixed tightly should be repeatable and stable, and an assembly with a conductor fixed through the center of the toroid should also work well for its intended use. The accuracy is not really critical for reading phase current of a motor, as long as it can detect abnormal conditions such as overcurrent and waveform distortion. Something like 5% should be fine.
              http://pauleschoen.com/pix/PM08_P76_P54.png
              Paul , P S Technology, Inc. and MrTibbs
              USA Maryland 21030

              Comment


              • #8
                Some years, well decades ago I attempted to make a current probe with a hall sensor which I believe I got from Radio Shack. I felt that it would be nice when looking for things like a short circuit or heavy current draw in PC boards.

                After some hours of attempts, I was never able to bet any indication of current at all. I still do not know if that was due to a bad device or something I was not doing correctly. You may be encouraging me to try again. With known good devices, not RS question marks.

                A quick internet search seems to show that this is a somewhat popular subject:

                Last edited by Paul Alciatore; 04-16-2022, 05:20 PM.
                Paul A.
                Golden Triangle, SE Texas

                And if you look REAL close at an analog signal,
                You will find that it has discrete steps.

                Comment


                • #9
                  The all-in-one units are both corrected for the earth's field, and also pre-calibrated.

                  Also, the comments are related to use as a "near the conductor" type sensor, basically laid on top, where accuracy is needed. That's why we did not use them. And the ones we looked at were not this part number. But the issues of the magnetic field decrease with distance remain. When near the conductor, the magnetic field has a rapid change per mm, although that depends on the shape of the conductor and it's width. If used in the gap of a toroid, both accuracy (repeatability actually) and sensitivity are improved, due to collecting and concentrating the field.

                  The parts are usable, that's not the question. The issue with them is one of using them in ways, and for purposes, which they are suited to. And paying attention to the various limitations of the type.


                  I have used a similar device as a mag field detector. It works quite well for that, although the one I have is not particularly wide bandwidth. Static fields do not demand bandwidth, and I do have other sensors.
                  CNC machines only go through the motions.

                  Ideas expressed may be mine, or from anyone else in the universe.
                  Not responsible for clerical errors. Or those made by lay people either.
                  Number formats and units may be chosen at random depending on what day it is.
                  I reserve the right to use a number system with any integer base without prior notice.
                  Generalizations are understood to be "often" true, but not true in every case.

                  Comment


                  • #10
                    It remains to be seen how well this type of current sensor works for motor phase current, particularly when the waveform is a PWM signal with high harmonic content. The motor inductance probably provides some low pass filtering, but it won't be a clean sine wave. For the phase voltages I used a capacitive low pass filter which produces a pretty good sine wave, but it also attenuates the signal, and the perceived amplitude will vary with frequency. However, that can be compensated for by using a "fudge factor" based on the frequency, which is known. It might even be better to use iron core CTs which should filter out most of the carrier frequency of 5-10 kHz. Such CTs seem to be relatively immune to conductor placement. I am using one for the GFCI sensor, but it costs about $7 and seems to be available only from DigiKey. But similar sensors can be purchased on Amazon for $12 for five pieces.

                    Click image for larger version

Name:	61cRgEj8T-L._AC_SL1500_.jpg
Views:	204
Size:	115.5 KB
ID:	1997128
                    http://pauleschoen.com/pix/PM08_P76_P54.png
                    Paul , P S Technology, Inc. and MrTibbs
                    USA Maryland 21030

                    Comment


                    • #11
                      I glued one of my DRV5053s in the gap of the toroid, using "Gorilla Glue". It moved a bit as it cured, so it is not fully centered in the gap, but probably good enough. I had some pretty significant variations in the output with no current applied, reading as low as 1.0028 and as high as 1.0312. So here are some readings:

                      Bent wire
                      0.00 1.0130
                      1.00 1.0267 13.7 mV/A
                      2.00 1.0404 13.7 mV/A
                      3.00 1.0543 13.8 mV/A
                      4.00 1.0683 13.8 mV/A
                      0.00 1.0131
                      -1.00 0.9987 14.3 mV/A
                      -2.00 0.9843 14.3 mV/A
                      -3.00 0.9701 14.3 mV/A
                      -4.00 0.9551 14.5 mV/A

                      Straight wire
                      0.00 1.0032
                      1.00 1.0196 16.4 mV/A
                      2.00 1.0361 16.5 mV/A
                      3.00 1.0526 16.5 mV/A
                      4.00 1.0691 16.5 mV/A
                      0.00 1.0028
                      -1.00 0.9871 15.7 mV/A
                      -2.00 0.9720 15.4 mV/A
                      -3.00 0.9572 15.2 mV/A
                      -4.00 0.9431 14.9 mV/A

                      After cleaning the board
                      0.00 1.0296
                      1.00 1.0443 14.7 mV/A
                      2.00 1.0589 14.7 mV/A
                      3.00 1.0737 14.7 mV/A
                      4.00 1.0884 14.7 mV/A
                      0.00 1.0312
                      -1.00 1.0158 15.4 mV/A
                      -2.00 1.0014 14.9 mV/A
                      -3.00 0.9857 15.2 mV/A
                      -4.00 0.9700 15.3 mV/A

                      0.00 1.0256
                      1.00 1.0435 17.9 mV/A
                      2.00 1.0573 15.8 mV/A
                      3.00 1.0696 14.7 mV/A
                      4.00 1.0840 14.6 mV/A
                      0.00 1.0287
                      -1.00 1.0136 15.1 mV/A
                      -2.00 0.9995 14.6 mV/A
                      -3.00 0.9846 14.7 mV/A
                      -4.00 0.9698 14.7 mV/A


                      After sitting idle for 15 minutes or so, the output is still 1.0256. After applying -4 amps for one minute, the output is still stable at 1.0255. After applying +4 amps for one minute, the zero reading is 1.0288. So I think there may be some magnetization and hysteresis effect. I confirmed this by applying -4 amps for about 30 seconds, and the zero point is once again 1.0257. I also tried a pulse by disconnecting and reconnecting with 2 amps, and now the zero point is 1.0042. Reversing the leads, again with a 2 amp pulse, and now it's 1.0340.
                      http://pauleschoen.com/pix/PM08_P76_P54.png
                      Paul , P S Technology, Inc. and MrTibbs
                      USA Maryland 21030

                      Comment


                      • #12
                        I found an article about the effects of remanent magnetism and hysteresis for magnetic cores used in Hall Effect sensors, and it appears that for silicon steel, there is an error of +/- 2 amps for any size or shape of core. Nickel-steel is about ten times better. Here is another article.

                        The extremes of this core are about +/- 15 mV, and the output is about 15 mV/amp, which would be a +/- 1 amp error. These cores are type 26 Micrometals powdered iron. That type has a high permeability of 75, as well as a somewhat lower frequency of 0.38 MHz, which is of course not an issue for DC and motor currents, and even PWM frequencies.



                        I found a good calculator for winding inductors on iron powder cores, although that does not really apply to this application. But it does state that powdered iron has low hysteresis.

                        Another useful site that includes ferrite cores: http://www.catzco.com/toroids.htm

                        I think I will try winding a few turns of enameled magnet wire around one of these sensors and gluing them together. That should eliminate the hysteresis problem, at the expense of sensitivity. But according to my initial testing, it should give about 5 or 6 mV/A with just 3/4 turn. Stay tuned...
                        Last edited by PStechPaul; 04-21-2022, 12:20 AM.
                        http://pauleschoen.com/pix/PM08_P76_P54.png
                        Paul , P S Technology, Inc. and MrTibbs
                        USA Maryland 21030

                        Comment


                        • #13
                          Micrometals has a LOT of useful stuff in their design and applications portion of the website. You might look there first.
                          CNC machines only go through the motions.

                          Ideas expressed may be mine, or from anyone else in the universe.
                          Not responsible for clerical errors. Or those made by lay people either.
                          Number formats and units may be chosen at random depending on what day it is.
                          I reserve the right to use a number system with any integer base without prior notice.
                          Generalizations are understood to be "often" true, but not true in every case.

                          Comment


                          • #14
                            Why wouldn't you have used insulated wire and made, at least, a single full turn? I am sure the magnetic field of that 1/2 or 1/3 or 3/4 turn in the photo must vary a lot as you move around in it. If you look inside that plastic shell, the actual sensor would be very small and there is no guarantee about it's placement within the plastic. I would think a full turn would help stabilize that variable quite a bit.



                            Originally posted by PStechPaul View Post
                            This was from my post on my "Simple VFD", which needed a good way to measure current, both DC and AC. There are many Hall Effect current sensors, but most of them use a CT, which requires one or more turns of wire through a toroid core, or consist of an IC which carries the current. The MLX91205 can be mounted to straddle a PC board trace for current measurement, but is obsolete. The MLX91219 is in stock at Mouser for about $4, but senses the magnetic field perpendicular (orthagonal) to the surface of the device, which is suitable for placement in the gap of a magnetic core. It has a maximum sensitivity of 15 mV/mT. But I have a few pieces of the DRV5053, with a sensitivity of 45 mV/mT, and in stock for $1.41 in 10 piece quantity. Anther similar device is AH49FZ3-G1 which is less than $1, with sensitivity of 2.5 mV/Gauss or 25 mV/mT. As a point of reference, and determining if this could be used as an electronic compass, the Earth's magnetic field varies from 35 to 65 microTeslas, so the output would be in the order of 2.7 mV. It seems that I get a variation of 1.0228 volts to 1.0198 volts according to position using my test jig.

                            I have the device connected to a 9V battery and a 1 uF capacitor on the power leads. I put a 3/4 loop of wire around the package.

                            Click image for larger version

Name:	DRV5053_Hall_Current_Sensor_6971.jpg
Views:	412
Size:	280.4 KB
ID:	1986559 Click image for larger version

Name:	DRV5053_Hall_Current_Sensor_6973.jpg
Views:	439
Size:	246.2 KB
ID:	1986558

                            I did a simple experiment with the DRV5053 and it will put out about 5 millivolts per ampere. The magnetic field must be directed perpendicular to the flat surfaces of the package, as it would be in the gap of a magnetic core. I should be able to route a track in a U-shape and have the device lay flat inside the "U". Results:

                            3 A 1.0394 0.0051 V/A
                            2 A 1.0348 0.0053 V/A
                            1 A 1.0303 0.0061 V/A
                            0 A 1.0242 ---
                            -1 A 1.0179 0.0063 V/A
                            -2 A 1.0128 0.0057 V/A
                            -3 A 1.0078 0.0055 V/A

                            It might be a very useful project to package this circuit into a hand-held tool which can be placed on a conductor to read AC or DC current. It will require a simple level shifter and amplifier to provide a convenient voltage level that can be calibrated in amperes or Teslas (or Gauss). So it could also be used to test the strength of magnets or electromagnets, such as a magnetic chuck. And it could also be used with a simple level detector to function as a tachometer, position indicator, or ignition timing and control device. I can supply more detailed circuits and ideas later, after some discussion (if there is sufficient interest). I'll be continuing to work on my Simple VFD, using this to measure phase currents or bus link current.
                            Paul A.
                            Golden Triangle, SE Texas

                            And if you look REAL close at an analog signal,
                            You will find that it has discrete steps.

                            Comment


                            • #15
                              You can "coil" 3 or 4 turns of magnet wire in that configuration and reduce the error.
                              Helder Ferreira
                              Setubal, Portugal

                              Comment

                              Working...
                              X
                              😀
                              🥰
                              🤢
                              😎
                              😡
                              👍
                              👎