Go Down

Topic: Magnets affect sensor data? (Read 167 times) previous topic - next topic


I need to connect a Dallas DS18B20 temperature sensor to the side of a flat metal can somehow, and a magnet seems like the most efficient way to attach it.

Before I accidentally kill one of my arduino boards trying to see if this works, can anyone tell me if magnets effect sensor data or if it would cause harm to an arduino board with the magnet at the end of about a 6 foot wire with the sensor glued to it?


It is extremely unlikely that you will damage the Arduino by putting a magnet near it.
It is very unlikely that the sensor data will be affected by the magnet, but try it and see.


No warnings about magnetics issues found on the datasheet DS18B20.pdf.
Appassionato di Car Audio
4xGZCW10-4, 4xGZCW6-4, 4xGZCT0500, 1xGZHW30X, 1xGZNW15X, 1xHelix P200, 1xHelix P400, 1xGZHA1.1800, 1xGZUA2250DX, 1xGZPA1.4000, 2xHelix P-DSP, 1xAlpine9886r, 1xmicroDimension, 2xTEC ls29neo, 2xTEC SQ3, Arduino Uno


Thanks for the input guys, I haven't found anything in data sheets or notes from sellers to keep away from magnets, so I guess I'll just take a little risk and see what happens. I shall report my findings soon!


Mar 26, 2015, 02:22 am Last Edit: Mar 26, 2015, 02:23 am by aarg
I would worry more about heat from the Arduino affecting the temperature reading. If I were looking for much accuracy, that is. I have one in a small box, and it raises the temperature inside by about 2 degrees C.
Windows 10 - the OS equivalent of the slow action toilet seat.


It would take a LOT of magnet to affect the Arduino from feet away.

What you need to watch for is changing magnetic fields (like from moving magnets or unshielded AC) inducing current in your wires. You can use shielded wires (shielded CAT cable, a real pain to solder so look for ScotchLok wire splices at the home store that has the CAT cable) being sure to ground the shield to avoid external fields affecting your nice long antenna... errrr, wires.
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

Go Up