What I'd like to do is hack the light with an ATTINY85 and an ultrasonic sensor so that besides the normal light switch, the light also goes on when someone is using the sink. Is there a recommended method for doing this? Just thinking about it myself I can probably create a secondary path for the power switch and add a MOSFET wired to an ATTINY85 that toggles when the ultrasonic sensor reads below a certain distance. Or possibly a relay? -- -Stupidity, like hydrogen, is one of the basic building blocks of the Universe. -Insanity: doing the same thing over and over again and expecting different results.
Just make sure the relay has a peak rating across the contacts for what the lamp draws at startup. a fluorescent lamp will draw extra power at start in that brief moment of getting the bulb to strike. -- [65 Arcanist]Filan(High Elf) Zone: Broadband Reports
perhaps you could instead use any of the motion sensors used in alarm systems, that typically sense heat, and change in heat. those run on 12-24 volts dc, and have a third wire that outputs switched 12-24 to the control relay.
who knows, maybe there's an ir sensor like that built into a regular switch assembly...
Eh, I can make that for less than $15 (the PIR controller)...It's a dumber version of the nightlight in the bathroom right now.
The home depot thing won't work because I want a parallel circuit to be able to actually turn the light on if I am using it for something (Hopefully that will almost never happen with the hack which I haven't gotten to yet)