This project is a minimalist Arduino-based switch that turns off your room light 15 seconds (or a custom set duration) after powering on — so you can hop into bed without fumbling in the dark.
Best part? It uses no relay at all. Just a servo motor and clever timing logic.
I was tired of switching off the light and walking to bed in the dark. This was my hands-on solution — a servo-powered auto shut-off that mimics the relay functionality without needing one. This uses the most minimum components and anybody can make this.
Light-Timer-vid.mp4
- 🛑 No relay switch used – fully mechanical
- ⏲️ 15-second delay before lights turn off
- 🤖 Built using just an Arduino Nano and a servo motor
- 🌙 Perfect for bedtime routines
- 🔌 Plug & Go — no need for buttons or remotes and is extremely compact and portable
- Arduino Uno
- Servo Motor (SG90 or compatible)
- 9V battery (Can use an USB as power supply too)
- (Optional) 3D-printed mount or taped rig for servo to press the switch (if you want to make the setup more sturdy)
- Power on the setup.
- The servo arm stays in the "ON" position.
- After 15 seconds, the Arduino sends a signal to the servo to move and flip the switch to "OFF".
- You’re already cozy in bed. Mission accomplished.
- Mount the servo securely over your physical light switch. I used masking tape as it was a temporary setup.
- Plug in the Arduino setup to power. (9V battery)
- That's literally it — enjoy the auto turn-off after 15 seconds, or the timed duration that you have custom set!
#include <Servo.h>
Servo myServo;
void setup() {
myServo.attach(9); // Connect servo signal to pin 9
myServo.write(0); // Start position (assumes 0° holds the switch ON)
delay(15000); // Wait for 15 seconds before switching off
myServo.write(90); // Move to 90° to turn the switch OFF
myServo.write(0); // Goes back to initial position.
}
void loop() {
}Built by Siddhanth Panikar