How to Build a 5-Channel Smart Switch Compatible With Alexa

2022-09-17 17:05:39 By : Ms. Mikayla wang

Cloud-based smart switches are easy to set up, but they come with risks. Here's how to take matters into your own hands.

To make a home smart, you need smart switches and sensors to control over Wi-Fi, RF, or Zigbee connections. There are several brands that offer smart switches that you can simply unbox and deploy using their cloud services.

But if you want to build a smart home that is completely private, you don't want to rely on a third party. You never know when they might close down their cloud services. Thus, security and reliability are big concerns. Fortunately, building smart switches that work with Alexa and smart home automation software, such as Home Assistant, is quite easier.

Let's say you want to build a 5-channel smart switch that you can use to control up to 5 different devices of up to ~2 amps at 220V or 110V. To build this smart switch, you will need the following:

We have already designed the PCB and did the hard part (new and improved). All you need to do is download the Gerber file, which you can use to get your PCBs printed or fabricated from any PCB manufacturer or supplier. FYI, we got 10 PCBs fabricated for $7 and paid $5 for shipping.

Mount all the components on the PCB as shown on the PCB. You may also use general PCB and follow the connection diagram shared below to manually mount and solder all the components.

Do not mount and solder the D1 Mini directly to the PCB. Follow these instructions to mount D1 Mini on the PCB.

This will help you quickly disconnect or replace D1 Mini if it goes bad.

If you don’t know or never soldered before, we highly recommend that you learn how to solder before proceeding.

Once the components are mounted and soldered on the PCB, follow these steps to download, flash and configure the firmware on the D1 Mini to control the 5-Solid State relay on the board.

If you want, you can also build a single-channel solid-state relay or DIY Alexa-supported single-channel smart switch.

Once the Tasmota Web Interface (Web UI) opens, follow the below steps to configure the 5-switches for Wi-Fi and Alexa control.

To control this smart 5-channel smart switch with Alexa, follow these steps:

To add this DIY smart switch to Home Assistant (HA), you need to enable the MQTT on Home Assistant and then enter the MQTT details via the Tasmota Web UI by following these steps:

You can build and use this 5-channel smart switch to control your fan, lights, or any other home appliances that require up to 200-300 watts of power. Since we have built this switch with Solid-State Relays (SSR), this switch will work silently with no clicking noise. Besides, you can control them locally even if there’s no internet or, if you are connected to the internet, from anywhere in the world using the Alexa app.

Ravi is an expert tech explainer, an IoT enthusiast and Linux lover with a background in big data and app development. He spends most of his weekends working with IoT devices and playing games on the Xbox. He is also a solo traveler who loves hiking and exploring new trails.

Join our newsletter for tech tips, reviews, free ebooks, and exclusive deals!