Best way to measure how far open a door is?

Im creating an interaction based around a door being opened. What would be the best way to measure how far the door is open?

Depends on the mounting options you have, but I think just attaching a potentiometer to the door with a linkage, then reading the pot with a microcontroller/Arduino/Raspberri Pi would be the way to go.

Just had another thought on this. A bend sensor like ( would be even easier to mount.

Funnily enough, I was just about to do this on a box hinge. But I’m not too mechanical. As far as I can tell, I need to have the doors attachment point moved away from the surface, since the potentiometer can’t be right on the hinge, and then have a linkage to an arm mounted on the pot.

Does any have a source for the bits and bobs I need to do that?


One way to go would be using a stretch sensor. Probably not as precise as a potentiometer, but would be really easy to mount. You can find a few here:

Other sizes available in the side bar.

Another option is to just use a magnet and a Hall Effect sensor