Sure, magnets are a good way to flip a reed switch.
Well looking at a typical reed switch data sheet **broken link removed**
they do seem to have bounce issues which may cause an input to your gate as shown in attached photo. This may present a problem depending on what your gate is driving like a flipflop, again may not.
If you wish to eliminate switch bounce issues read here.
The gate runs a MOSFET which runs a motor. Can bounce be acceptable? The magnet is on the door jam and the switch is on the front door. Door is either open or shut, and I don't think it will be an issue.
The gate runs a MOSFET which runs a motor. Can bounce be acceptable? The magnet is on the door jam and the switch is on the front door. Door is either open or shut, and I don't think it will be an issue.
The bounce should not be a big deal in such a case. But I do have concern about undershoot blowing your gates input. To be safe, I would add a RC shunt to ground on the gate. See image.
R1 and C1 is what I am talking about. They make up a filter and will reduce poop on your gates input Back in my design days, I would use that configuration a lot as a precaution.
You can ignore the rest of my circuit as I only meant to show the filter...