I want to detect a magnetic field, like those of small neodymium magnets, from at least 6 inches away (the further the better, I'd like at least a foot but I won't ask for too much). I'd like to do this on a small board like the Arduino Beetle. And I'd also like to be able to sense polarity. That's it, I just need to be able to detect a small neodymium magnet and possibly it's polarity, nothing more.

I've been reading everything I can on hall sensors but I don't think any of them are capable of detecting a magnet over much of a distance and it seems that the sensor has to be at a certain orientation to the magnet for it to even work. I'm thinking a fluxgate sensor might be what I'm looking for but I'm not sure.

I know it's possible to detect a small magnet from a distance and it's polarity, I just can't find out exactly how.

Could someone point me in the right direction?

  • \$\begingroup\$ I suspect it will end up needing to be something like a magnet on a milligram strain gauge as the forces involved are tiny, but run us through exactly what the application is, is 1 part in motion relative to another? \$\endgroup\$
    – Reroute
    Commented May 18, 2020 at 9:19
  • \$\begingroup\$ I just need to be able to detect a magnet, I don't think there needs to be motion involved. There are products on the market the size of a half dollar that do this but I'm sure I can engineer one for a lot less than the $300 price tag they carry. And they only have iPhone apps. I want to be able to put together an Android app. Say you close a small magnet in your fist, I want to be able to detect it from at least 6 inches away. \$\endgroup\$ Commented May 18, 2020 at 9:30
  • \$\begingroup\$ Many android devices already have a magnetometer, mine was able to sense a 5x15mm magnet from about 6" \$\endgroup\$ Commented May 18, 2020 at 10:25
  • \$\begingroup\$ Thanks for the reply Jasen! I ordered a magnetometer for an Arduino, hopefully this works out well lol. Thank you! \$\endgroup\$ Commented May 18, 2020 at 11:22

1 Answer 1


The problem is, say you have a N42 magnet cube of 5x5mm with 1.3T strength, at 150mm (6") the magnetic field is 1.5 microTesla. Which is not a lot. Even the magnetic field of the planet is more at ~50 microTesla. See here: https://www.kjmagnetics.com/calculator.asp?calcType=block

So, I suspect you'd need to be looking into using a compass and detect disturbances with that. Since hall sensors are typically milliTesla range.

You phone has one. See if you can use it to test sensitivity.

  • \$\begingroup\$ I wasn't sure if my phone had a sensor capable but now I know. So I just need to find a magnetometer for an Arduino and I should be good to go. Hopefully. Thank you for the answer! \$\endgroup\$ Commented May 18, 2020 at 11:20
  • \$\begingroup\$ @SladeW.Cooper Not every phone has one, but all iPhones do, and most flagship androids. \$\endgroup\$
    – Jeroen3
    Commented May 18, 2020 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.