Will a REV magnetic limit switch work through the 1/16" wall of an aluminum tube?
I want to not stall our climber against the bottom stop or over-extended it. I have tested that a magnet works through an 1/8" aluminum plate so I am 95% sure this will work.
I plan on drilling a hole in the bottom slider and glueing the magnet in there and then double side taping the sensor(s) on the outside of the tube. Then wiring them up to the spark max as limit switches. I think I don’t even need code for this to work. Looks like I will have to solder the wires to a breakout board or split a data cable.
I can’t speak to this specific switch, but in industry we use mechanical (reed) and solid state magnet switches on aluminum bodied air cylinders (with sensing magnets in the piston) all the time. If it worked through 1/8" aluminum plate, as long as you don’t add a lot of air gap, I don’t see why it wouldn’t work on 1/16" wall aluminum tubing. Just beware that with the thinner aluminum (magnet to sensor gap), your effective sensing range may be a big larger; I’d include some way to adjust the sensor position if practical.
Thanks. Adjusting sensor position is one of the reasons I want to do it this way. The sensor is just taped to the outside of the tube. Easy to move. I don’t know if it has a light on the sensor. That would make it trivial. Also thinking of going with a 2 stage telescope. That would require reading through both tubes with about a 1/2” gap.
Given that the typical trigger distance for the top sensor is listed as 10mm, which is less then 1/2", that seems very iffy, even without additional obstructions.
If you put your magnet in the printed bottom bit of the telescoping stuff it will be much closer to the outside.
You need to do a worst case check for your specific magnet. Assemble things and verify that you switch reliably with everything pushed away from the sensor.
10mm is LOTS of room. Should work nicely!
So the 1/2 inch number was just me guessing. I did the actual math and you’re right that if I put the magnet in the bottom slider it would be about 8mm away and should work. I think I can also get a larger magnet and increase the range. Some testing would be needed. Hope I have the time for that.
If you determine the maximum distance that works reliably with one sensor/magnet pair, don’t count on going much further at all. The magnetic field strength is inversely proportional to the cube of the distance i.e. it falls off pretty fast.
The Rev mag switch definitely works with just a single stage telescope and the magnet in the slider. We’re currently using it this way. You’ll have to see if it works with the increased magnet gap of a 2nd stage. Fortunately, that is very easy to test. The Rev switch has a blue light. If you power the sensor (temporarily from a roboRio DIO port if needed), you’ll be able to see the feedback from the blue light as to whether it is sensing the magnet or not.
Adding a bit, Aluminum and other good conductors -can- block a rapidly changing magnetic field, but it can’t do anything to a static field. Eddy currents…
To intuitively sort this kind of thing out: if the material has no significant magnetic response, then the magnetic field will pass through it mostly unaffected. If the material has a magnetic response then the magnetic field is conducted by the material and very little field strength will be ‘in the air.’
So the rev robotics magnetic sensor does work through the aluminum tube as expected. The odd thing is that the distance is higher through the side rather than through the the bottom as I expected. It actually seems to have the greatest distance out the top of the sensor. But that covers the very helpful blue light.
The problem I am struggling with is that the climber arm will coast through the sensor area and then start again on the other side. I will need to put in a much larger magnet or add a hard stop. The kit comes with two magnets so I could have doubled them up if I had realized I needed more width to the sensed area.