On-Light Radio for your Bathroom
Many people have a radio in their bathroom. So do I. Most people turn it on and off on demand, however it would be a lot simpler if it just turns on and off with your bathroom light.
Depending on the cabling in your bathroom, there are different options: The obvious is to power the radio with the voltage from your light. In my case, this would of course be possible, but I would have to install a rather ugly cable from the ceiling, although there is another (constant, non-switchable) power source above the basin.
This is why I needed a solution that couples the radio power source with the bathroom light.
Generally, this task is done very easily. We need a photoresistor, some kind of schmitt trigger or differential amplifier and a relay. See here about a switchable power plug.
I used a small breadboard for the very simple circuit:
This setup allows to set a reference voltage with the trimmer resistor for adapting the light sensitivity. Furthermore, the capacitor introduces a small delay and avoids bouncing.