Help choosing a permanent magnet for a reed switch - Page 1
Forum section: electronics / beginners

author: cdevidal
author_rank: Regular Contributor
timestamp: January 26, 2025, 01:31:02 pm
content: Sanity check please, help me to know that I'm thinking correctly. I need a reed switch for a chicken coop door opener. (Edit: And yes, I've already tried the purpose-built security system outdoor reed switches.) The reed pulls in when a magnet attached to the bottom of the door is parallel with the reeds, indicating that the door has reached its end of travel. The more horizontal distance allowed between magnet and reed, the better*, since it may not be possible for the end user to get the magnet very close to the reeds, depending on their door design. If I havethis reed switch(datasheet) which requires at most 30AT, according toFigure 10 on page 7 of this document(screenshot below) I want at least a 75 gauss magnet. It needs thecorrect orientationso that the strongest portion of the field radiates in the required direction. And of course, I need a weather-resistant coating such as nickel or plastic. Usingthis calculator, I should be able to assess magnets of various sizes and materials to find one that gives at least 75 gauss at the distance required.Did I get this right, or am I missing something?* But not too far. If the magnet is too strong, it might pull in the switch before the door has reached the end of travel.

author: Xena E
author_rank: Frequent Contributor
timestamp: January 26, 2025, 08:25:20 pm
content: This is not what you are asking, apologies.However there are ready weatherproof encapsulated reed switches with matching magnets available that are used in industry, they even have built in mounting systems. (Screw holes!)Just as an example:Actuator magnet:https://uk.rs-online.com/web/p/sensor-accessories/2897812?gb=sReed switch:https://uk.rs-online.com/web/p/magnetic-proximity-switches/2897799?gb=sNormally closed switch versions also available. Sure there will be similar available local to you.X

author: janoc
author_rank: Super Contributor
timestamp: January 26, 2025, 08:35:08 pm
content: Don't reinvent the wheel, use a common window or door magnetic sensor as are used for heating (detecting open windows and closing the radiator valve) or burglar alarms. Those are cheap, plentiful and some of them are designed also for outdoors use. The ones for indoors will likely not last long due to UV radiation from Sun destroying the plastic.

author: cdevidal
author_rank: Regular Contributor
timestamp: January 26, 2025, 08:44:04 pm
content: Appreciate the responses, both of you, but I've already been down those roads. Got some of those sitting eight feet away from me right now.

author: floobydust
author_rank: Super Contributor
timestamp: January 26, 2025, 09:49:43 pm
content: You need the magnet to have right shape for the lines of flux to pass through the reed switch so that the leafs are pulled together. Axially like in pic.I'm not sure of what your configuration looks like.Standex magnets configsIf it's not ideal, a steel screw or washer can redirect/bend the flux.A rod magnet parallel to the reed switch is the usual configuration. Use a strong magnet (rare earth) if you need range.Not a thin disc/coin type that will not work well because the flux lines keep too close to include the reed switch, but the strong rare-earth ones can overcome this.Why not just use a home alarm door switch/magnet? Take it apart if you have to.Side opinion - I'm not a fan of reed switches, they are really fragile devices the glass breaks or the pin rotates etc. and I never had good luck with them.There are low power Hall switches that are more sensitive. I made a few for an alarm (door) of mine and zero troubles for years.Last ones I used areA1120are they are great I get operation at least an inch away, good sensitivity with strong magnet. But need steady power 4mA.A3211is micropower for cell phones etc.You can also get a bipolar Hall sensor and use two magnets for the door up/down detect.ESP32 has a Hall sensor built in.

author: cdevidal
author_rank: Regular Contributor
timestamp: January 26, 2025, 10:00:22 pm
content: Quote from: floobydust on January 26, 2025, 09:49:43 pmThat's the configuration I'm going for.Quote from: floobydust on January 26, 2025, 09:49:43 pmLong story, but I've already been down that road. Some of them are sitting right next to me.Quote from: floobydust on January 26, 2025, 09:49:43 pmThat's the idea, just need help choosing the right strength; Am I correctly converting AT to gauss and calculating the strength at the distance required, or am I missing something in the way I calculate it?

author: floobydust
author_rank: Super Contributor
timestamp: January 26, 2025, 10:21:32 pm
content: TBH I don't think math works well here, it's complicated. Field strength falls off fast with distance 1/r2anyhow.K&J Magneticshas calculators and good info too, although they only sell super strong ones.That R&S PSM at 200 gauss is pretty weak, it's just a vanilla iron rod magnet inside.Realistically you want the strongest magnet you can afford, and if it's too strong move it away

author: inse
author_rank: Super Contributor
timestamp: January 27, 2025, 06:18:09 am
content: An industrial type position switch/end switch is not a viable solution?Those are pretty rugged and can be found at a reasonable price.

author: Xena E
author_rank: Frequent Contributor
timestamp: January 27, 2025, 09:22:56 am
content: Quote from: cdevidal on January 26, 2025, 10:00:22 pmThat graph is not helpful. AT on a standard coil equivalence to permanent magnet is the minimum strength needed to operate the reed reliably.Utilising a more powerful magnet will extend the operating range with a reed switch. So the increase in the strength of the magnet will increase the distance of the unclosed gap as you require, In close proximity the relationship between magnet strength and gap isalmost"square law" ie., 4 times strength, roughly doubles the gap. (Thats less the magnetic leakage, and the pull in hysterisis of the reed.) Increasing the range will proportionally increase the unclosed gap.What can then be done is the reed can have a U shaped feromagnetic shunt around it to control the range in the presence of a very strong magnet, or alternatively a seperate bias magnet to increase the range. Unfortunately if this device is to be fitted by non technical folk then theres a lot of scope for failure, if it is mounted near or on ferrous material for instance.X

author: cdevidal
author_rank: Regular Contributor
timestamp: January 27, 2025, 12:17:29 pm
content: Quote from: inse on January 27, 2025, 06:18:09 amThank you for the suggestion. Long story: Also no on these.The design decisions are all complete except for the size and composition of the magnet. Just need that and it's all done.

author: cdevidal
author_rank: Regular Contributor
timestamp: January 27, 2025, 12:25:13 pm
content: Quote from: Xena E on January 27, 2025, 09:22:56 amThat's how I understood the graph. Since it is showing the minimum strength needed, I need to calculate the strength provided by certain magnets to know if it is the minimum strength needed to operate the reed reliably.Quote from: Xena E on January 27, 2025, 09:22:56 amYeah, that's what the calculator shows.Quote from: Xena E on January 27, 2025, 09:22:56 amYeah, I'm not interested in solutions that have a lot of scope for failure by non technical folk.I just want a confirmation on how I'm thinking: Since as you said the chart shows the minimum strength needed to operate the reed reliably, if I use the calculator to find a magnet with the correct strength at that distance, it should work reliably, yes?I will of course buy and test before production but one can spend a lot of money buying and guessing wrongly on different sized magnets. At this point I am only looking for someone to confirm how I am thinking.

author: Xena E
author_rank: Frequent Contributor
timestamp: January 27, 2025, 01:14:29 pm
content: QuoteAs long as youre aware that theres a lot of vaguery involved in the application, then what youre doing is perfectly valid, but, it may be a case of calculate a figure and double it.If you can convince the supplier of further bulk orders they may be able to offer free samples or sale or return on items you need for development.Also knowing what you have already can give you informed choices of what you need. Have you that information on the magnets you already have?RegardsX

author: cdevidal
author_rank: Regular Contributor
timestamp: January 27, 2025, 01:16:52 pm
content: Quote from: Xena E on January 27, 2025, 01:14:29 pmYes definitely.Quote from: Xena E on January 27, 2025, 01:14:29 pmYes, the calculator only needs the shape, dimensions, and material of the magnet and all that is widely available.