Introduction: Hands Free Kitchen Sink Lightning
When you are going to wash dishes or prepare some food on countertop usually need light, even in day time. But toggle it by touching switch is not hygienic neither comfortable. Especially in kitchen with using inconveniently located switch.
Basically this project does turn on the light when you stand on front of ultrasonic sensor by pulling relay, and turns off after you gone by releasing the relay.
So we can do it by following steps.
- MCU (ATtiny, Arduino, ESP8266)
- Ultrasonic distance sensor (HC SR04)
- Relay module
- Power supply (5V usb adaptor)
- Jumper wires
- Water resistant housing (at least splash proof)
Optionally heat shrink, DIP socket and female pin header connectors would be useful for modularity.
And you will need solder, hot glue, scissors and might drill.
Step 1: Constructing the Circuit
Follow the diagram which I attached, isolate the circuit to prevent short circuit, and stuck it all in enclosure.
In mine case I pack all circuit except distance sensor in plastic salt shaker and replaced head of power cord with it.
Step 2: Install the Code
I don't think explain all steps are necessary. You can find the code at attachment and instructions at link https://www.instructables.com/id/How-to-Program-an-Attiny85-From-an-Arduino-Uno/
On-Off counters for prevent to sensor mistakes and accidental toggles. For example; Passing front of it.