sensing the opening of a door

hello I am gonna be working on a project for my local arts festival which involves triggering a sound whenever a portaloo door is open. my first thought was a IR range finder pointing at the door and I just wondered what people thought. I think a flex sensor would be too unreliable and prone to break and Ive worked with sonic ranger finders before and found them to be really erratic. would anyone suggest a different methodology ?

cheers

The dollar store has little magnetic switch sensors that work great. At first I thought they used Hall effect sensors, but it turns out it's just magnetic wire. Really simple and very effective.

Search "magnetic switch".

cheers guys this looks to be the ticket

thank you

They're also called reed switches you know.

yeah I've gone for recessed reed switches so I can put the switch in the frame (which is hollow) and the magnet in the door. :slight_smile: