Hey guys i need some suggestions from you all. I'm working on a small project where i need to detect if a door is open or closed. Right now i have two wires attached to metal plates located on the door jamb and door itself. This works OK, but was wondering if anyone had a better idea.
Sure. Use a permanent magnet in the door, and a magnetic reed switch somewhere in the door frame. When the door is closed and the switch is in alignment with the magnet the switch contacts will be closed. When the door opens the contacts will open. This is the stuff that most home security systems use for doors and windows alarming.
Many vendors carry magnets and reed switches. Here is a quick link I found for inexpensive reed switches:
Lefty
If you want to know just how open the door is
then use hall-effect and magnet on top of doorframe.
I was just in The Source (aka Radio Shack) just this weekend and saw they had some really cheap door magnet sensors. Almost grabbed one but then reminded myself I was there shopping for others and not to buy myself presents
If I recall correctly, they had one for $6 and another for $10. This is in Canada though, but I believe the american Radio Shack has pretty much the same inventory.
The radioshack window switch's work pretty good its what you find in home alarm systems.
I once used on on my old truck with "shaved" door handles which means the handle is removed and covered to look as it were never there, i used a key fob to activate a solenoid in the door to pop the latch.
The window switch was hidden behind a special spot on the body and hooked to a relay as a backup for when i closed the door with the keys inside the truck. kept a magnet stuck under one of the beds frame rails
Worked great