I describe creating an automated desk light using a servo motor and ultrasonic sensor. I designed a simple system to turn the light on when I’m at my desk and off when I’m not, using an Arduino Nano for control. It’s a cool, DIY approach to everyday convenience and energy saving

Every single time at the office, whether it’s dashing off to a project meeting, making a quick pitstop at the pantry, or even just a bathroom break, I find myself in this little dance with my desk lamp. Off to save electricity, and on again when I’m back – all in the spirit of doing a solid for those polar bears. As an engineer, isn’t our superhero skill making life’s mundane bits more efficient? We ought to focus our energies on real problems.

Demo Demo
Fusion360 CAD View Fusion360 CAD View

Now, as much as I’d love to, I can’t just mess with the office wiring and install something like a Relay or Solid State Relay (SSR) to act as a switch. Let’s be real; I kinda still need that paycheck. But that won’t stop me from getting crafty. Back home, I whipped out Fusion 360 and designed a simple servo motor bracket that’ll sit right above my switch. Paired with an ultrasonic sensor, it’ll detect when I’m back at my desk, and bingo – let there be light!

And since there’s often a quick chat with colleagues about project details, I didn’t want the servo causing a racket every time I’m in and out. So, I’ve set a simple delay: the lamp stays on for a bit and only turns off if I’m MIA for a while. Given the simplicity of this gadget, an Arduino Nano board is perfect. A few connections on a breadboard, and I’ve got myself an automated desk light. Problem-solving at its finest, right? Oh, the sweet joys of engineering! Yeahhhh! 🎉