When Your Smart Light Switches Stop Working, Build Your Own

If you want smart light switches in your house, you can buy from any one of hundreds of manufacturers. [Brian Boyle] had kitted out his home with TP Link devices, but after a few years of use, he found they all suddenly failed within a few months of each other. Decrying the state of things, he set about building his own instead.

[Brian]’s switches use the ESP32 for its handy in-built WiFi hardware. His aim was to produce smart switches that would fit neatly into standard “Decor” style switch boxes. The design uses two PCBs. One is charged with handling the mains power side of things. It carries an SPDT relay for switching AC power, and a DC power supply to run the ESP32 itself. The controller board holds the microcontroller, a Neopixel as a status indicator, and a pair of buttons — one for switching the lights on and off, the other for resetting to default settings. The physical housing is 3D printed, and looks great with the glowing status indicator in the middle of the switch.

[Brian]’s switches are triggerable via MQTT, a web interface, and the physical button onboard the device itself. Having built the devices on his own, he’ll be well-placed to troubleshoot any usability or reliability issues that crop up in the future. That’s a lot more than we can say about most smart devices on the market!

The Eyes Have It: Stare Down Your Lighting

You know how you can feel when someone is looking at you? Thanks to a person detector, [Michael Rigsby’s] little robotic light switch also knows when you are looking at it. As you can see in the video below, when it notices you are looking at it, it lights up an LED. If you continue to gaze at it, it will turn to stare back at you. Keep staring it down and it will toggle the state of a remote control light switch.

This all works because of the person sensor module by Useful Sensors. The little module has a camera and face detection built into it. It doesn’t draw much power at 150 milliwatts. It can sense faces, including where they are and how many people are looking.

Continue reading “The Eyes Have It: Stare Down Your Lighting”

3D Print A Home Automation Switch

If you are the kind of person who won’t use cheap Sonoff modules to control AC powered devices, we don’t blame you and you should probably stop reading now. However, if you don’t mind a little exposed AC wiring and you have a 3D printer, you might be interested in the second generation of [530 Project’s] in-wall light switch.

The 3D printed switch fits a standard box and uses the guts of a Sonoff controller. These work with all the popular ecosystems such as Alexa and Google Home. And they are cheap. Like, really cheap. If you already have a 3D printer, even counting the cost of the filament these are going to be a small fraction of the cost of a commercial switch. You can see a video about the device, below.

Continue reading “3D Print A Home Automation Switch”

Zero-Intrusion Wireless Light Switch

What do you do if your light switch is too far from your desk, and you’re in a rental property so you can’t put in extra wiring to install an electronic control for it? Get up and turn it on or off by hand? Of course not!

If you are [Guyfromhe], you solve this problem with a servo attached to a screw-on light switch faceplate, and you control it with a pair of Arduino/nRF24L01 combos. It’s a pretty simple arrangement, the wireless link simply takes the place of a serial cable that instructs the Arduino on the light switch to operate the servo that in turn moves the switch. The whole thing is triggered through his home automation system, which in turn responds to an Amazon Dash button on his desk. Yes, it’s complex. But turning on the light has been automated without intrusion into his landlord’s domain, and that’s all that matters.

On a more serious note, he’s put some Arduino code up on his write-up, as well as a YouTube video we’ve put below the break.

Continue reading “Zero-Intrusion Wireless Light Switch”

Servo-Controlled IoT Light Switches

The Internet of Things is fun to play with; there’s all manner of devices to automate and control remotely. It can be sketchy, though — make a mistake when coding your automatic plant watering system and you could flood your house. Make a mistake with a space heater and you could burn it down. Combine these risks with the fact that many people live in rental properties, and it can be a difficult proposition to bring the Internet of Things to your home.

[Suyash] came up with a way around this by building 3D printed light switch covers that add servo control. It’s a great solution that it doesn’t require the modification of any mains wiring, and interfaces with the standard switches in the normal way. It makes it a lot safer this way — there are municipal wiring codes for a reason. This is a great example of what you can do with a 3D printer, above and beyond printing out Yoda heads and keychains.

The backend of things is handled by the venerable ESP8266, with [Suyash]’s custom IoT library known as conduit doing the heavy lifting. The library is a way to quickly build IoT devices with web interfaces, and [Suyash] claims it’s possible to be blinking an LED from the cloud within 5 minutes using the tool.

For another take on an IoT light switch, check out this Hackaday Prize entry from 2016.

Hackaday Prize Entry: Theia IoT Light-switch

There are it seems no wireless-enabled light switches available in the standard form factor of a UK light switch. At least, that was the experience of [loldavid6], when he decided he needed one. Also, none of the switches he could find were open-source, or easy to integrate with. So he set out to design his own, and the Theia IoT light switch is the result.

In adapting a standard light switch, he was anxious that his device would not depend on the position of the switch for its operation. Therefore he had to ensure that the switch became merely an input to whichever board he designed, rather than controlling the mains power. He settled upon the ESP8266 wireless-enabled microcontroller as the brains of the unit, with a relay doing the mains switching. He first considered using an LNK304 off-line switching PSU chip to derive his low voltages, but later moved to an off-the-shelf switch-mode board.

So far two prototype designs have been completed, one for each power supply option. Boards have been ordered, and he’s now in the interminable waiting period for international postage. All the KiCad and other files are available for download o the project’s hackaday.io page, so you can have a look for yourselves if you are so inclined.

You might ask why another IoT light switch might be needed. But even though they are now available and inexpensive, there is still a gap for a board that is open, and more importantly does not rely on someone else’s cloud backend. Plus, of course, this board can be used for more than lighting.

Light bulb image: Осадчая Екатерина (Own work) [CC BY-SA 4.0], via Wikimedia Commons.

Infrared-controlled Light Switch

If you’re looking for your first electronics project, or a project to get someone else started in electronics, [Vadim] has you covered. Back when he was first starting out in electronics he built this infrared-controlled light switch that works with a standard TV remote control.

[Vadim]’s first few projects ended up as parts for other projects after they were built, so he wanted to build something useful that wouldn’t ultimately end up back in the parts drawer. The other requirements for the project were to use a microcontroller and to keep it simple. [Vadim] chose an ATtiny2313 to handle the RC-5 IR protocol and switch the light.

The circuit still has a switch to manually control the lights, preserving the original functionality of the light switch. The rest of the design includes a header for programming the board and another header for tying into the high voltage lines. This is a great project for anyone who knows what they’re doing with mains power but is just getting started with microcontrollers. If properly designed and implemented you’ll never stumble across a room to turn the lights out again!

Perhaps mixing high and low voltages on the same circuit board doesn’t spark your fancy or you can’t modify the light switch in your place of residence? Check out this mechanically-switched light switch.