I want to know if I can hook-up a resistor to one part of a Magnet Snap (carried by SparkFun), then another magnet snap to analog-pin on Arduino and still be able to read resistance value? Is this possible with these Magnetic Snaps? Can anyone recommend other alternatives?

Is this a bad idea? How much would the magnets interfere with resistor value/resistance?

I understand that Neodymium magnets are coated in nickel, which is highly conductive, so this could be an alternative.


You're using the Arduino to measure a resistor (call it R1) that is in series with the contact resistance of the magnet snap (call it R2). Because they are connected in series, the Arduino can only measure the series combination R1+R2. I assume you also have a DMM (Digital Multi-Meter), pretty much a required tool for any serious electronics work.

The magnets themselves won't have any noticeable effect on the circuit, since they are permanent magnets (so there is no changing magnetic flux and therefore no voltage will be induced) and magnetism is a very weak effect (1/distance cubed). However, contact resistance seems to be an issue with this particular component -- seems like a magnetic snap meant for clothing, that is being "hacked" to serve as electrical contact... because it is metallic... Sparkfun has comments attached to this part, indicating other people have had problems using it. Although they are apparently nickel-plated, the Sparkfun comments seem to indicate there may be some kind of clear, non-conductive coating over the metal.

Since your project is an e-textile prototype, the magnetic snap contact resistance includes not only the outward facing surfaces of the magnet snap, but also the connection between the magnet snap and your wires. I don't have much experience with this relatively new field, you'll need to make some measurements yourself. Best if you can use a DVM (digital voltmeter) instead of the Arduino, you'll get better accuracy.

If your DVM resistance measurements show high contact resistance (like more than 10 ohms), there may be some clear coating of plastic or varnish, that you will have to remove. Sandpaper may work.

If you can determine that the contact resistance R2 (without including R1) is consistent, reliable, and repeatable, then you can subtract your average R2 value from the total R1+R2 measurements, to get R1 by itself.

Side note about the Arduino:

I'm assuming that you really do mean your Arduino is somehow measuring resistance; because normally an A/D converter measures voltage. To measure resistance, an A/D converter would need a current source to drive the resistor. So I'm treating Arduino as a black box, you could replace it with a DVM and get the same results.

You also need to consider how much measurement range your Arduino circuit has, and whether minimum/maximum R1 value plus average R2 contact resistance could go out of the useful measurement range. Brief web search leads to arduino.cc forum, they suggest using a resistor divider with 10k vs unknown... This isn't a great way to do it, since the input impedance will vary quite a lot, and the range is very limited. But it may be good enough for simple projects.

So to summarize:

  • the magnets won't be a problem because their magnetic field is constant
  • BUT watch out for clear varnish or other coatings that may inhibit electrical contact
  • use a DVM to measure the contact resistance
  • Arduino may be able to measure resistance (somewhat) with help from an external resistor divider network or a current source
  • \$\begingroup\$ Thank you for the extensive answer. I up-voted your answer and accepted it. Thanks again! \$\endgroup\$ – lucidgold Jan 28 '15 at 3:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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