Switch a Light Using a Magnet

Does your bedside table give light when you open it?

In a discussion with a carpenter about his furnitures I asked about the usage
of electronics in his creations. After some additional explanative words and
examples like "Turn light on when bedside table gets opened" or "Midi output
on a chair that is like a Cajon drum" or "Embedded screen in a table" he got a
glimpse of the additional values electronics could bring.

So a few weeks later as we sat together again he came back to me with the
question if we could make something together and showed me a bedside table.

"Can we make something that when the door opens the lights go on?"

"Sure we can." I replied.

On the way home I thought about different switch solutions, their pros and cons. Given
that the switch must not have physical contact is a pro since the lifetime of the sensor
might be very high and the lifetime of the furniture too. 

So I headed home and breadboarded this schema using a Hall Effect Sensor and a
NPN Transistor. 



This little device can be embedded into the furniture of the carpenter...
...looking forward to what he is doing with it.


Some Impressions from the Making



Further Readings



…an other one. A bit smaller and tigther.