Electromagnet to test hall effect switch? - Page 1
Forum section: electronics / projects

author: Jester
author_rank: Frequent Contributor
timestamp: December 18, 2020, 11:57:34 pm
content: I have been tasked with creating a pass/fail test circuit for a DRV5032 Hall effect sensor that senses when a magnet is present.I'm hoping to use some sort of off the shelf inductor or solenoid the smaller the better that I can energize and de-energize in close proximity to the sensor. I can place the electromagnet quite close if need be (1mm away), however it would be easier to implement if it could be 5or so mm away.This is suppose to be just a Pass/Fail test did it detect or did it not detect, so polarity etc. is not important. The DRV5032 has a minimum threshold of 3.9mT, and a maximum threshold of 1.2mTFor a power source I will have 12Vdc availableCan anyone point me in the right direction in terms a suitable electromagnet?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: December 19, 2020, 12:34:27 am
content: For some weird reason electromagnets are relatively expensive.Have you thought about using the coil of a relay?This testing can be done with short pulses, and for that you want a high current, so low number of turns and low voltage coil so it's easier to overload.You will get into saturation of the iron, and possibly also eddy currents in the core for such short pulses. You can try to calculate it, but just trying a handful of such devices is probably quicker and more reliable.Test to what distance you can get the magnet field to detect, and then make it some reasonable amount smaller to overcome tolerances.

author: Nusa
author_rank: Super Contributor
timestamp: December 19, 2020, 12:39:41 am
content: I'd suggest just putting an arm or wheel with a magnet on an el-cheapo motor, turning at a known frequency. If your sensor detects pulses at that frequency, it's working. That's actually the classic use case for hall-effect sensors -- detecting rotation on a shaft.

author: PeteH
author_rank: Unknown
timestamp: December 19, 2020, 12:48:26 am
content: Can use an unshielded inductor (stud inductor) or a PCB coil with many turns to produce flux in both directions to verify the IC. Both options are cheap... Core material will help increase the range a bit.

author: mag_therm
author_rank: Frequent Contributor
timestamp: December 19, 2020, 01:21:52 am
content: B = u* HB = 3.9 e-3 Tu = 4* pi*1e-7H_needed = 3.9 e-3/(4* pi*1e-7)H_needed = 3100 Amp/metreH = 3.1 Amp/millimetreH = 31 Amp/centimetreSo a core with an airgap of 1 centimetre will need 3.1 amp and 10 turns , or etc....Assuming 1 centimetre is OKLow carbon Steel Core Saturation?Ur = 700000/(H^0.92)Ur = 700000/(3100^0.92)Ur = 429B = Ur * u * HB = 429 * 4* pi*1e-7 * 3100B = 1.6 TSeems OK.. ?.

author: NiHaoMike
author_rank: Super Contributor
timestamp: December 19, 2020, 02:17:46 am
content: Quote from: Doctorandus_P on December 19, 2020, 12:34:27 amDepending on your definition of "expensive", electromagnetic door locks are available for as little as $10 or so.

author: james_s
author_rank: Super Contributor
timestamp: December 19, 2020, 02:39:12 am
content: You could wind a few dozen turns of wire on a nail like we did as kids and it should work for what you want to do. The idea someone else mentioned of gluing a small magnet to the shaft of a motor is probably easier though, or glue it to the arm of a servo. Hobby servos are cheap, easy to drive and reliable, at least for modest duty cycle and you can get good ball bearing brushless servos if you need it to last a long time.

author: Jester
author_rank: Frequent Contributor
timestamp: December 20, 2020, 03:39:55 pm
content: Thank you for the quick responses.I should have mentioned that the hall effect device is mounted on the bottom of a PCB and the board will be installed in a bed of nails (pogo pin) style test jig.The sensor is in a SOT-23 package, so fairly small.What I can do fairly easily is mount a 2-3mm diameter steel pin directly below the sensor. The upper cm or so of the pin would not have windings, however the upper end of the pin could be located close about 1mm below the SOT23 package. I would have about 3cm of available exposed pin on the lower portion of the pin for a winding.Update, Fe core worked great, thanks.