Make Your Own Smart Light Strip Enabled With Amazon Alexa and Google Assistant Control
by ssiddharth in Circuits > LEDs
4326 Views, 34 Favorites, 0 Comments
Make Your Own Smart Light Strip Enabled With Amazon Alexa and Google Assistant Control
In this instructable, I shall outline the steps to be followed to get yourselves a smart LED strip on a budget. This strip can be controlled using both the Google Assistant and Amazon Alexa either by voice via the respective party's smart speakers or from the respective party's apps.
Supplies
1. Terminal Blocks http://ebay.us/YO7Zha
2. Wemos D1 Mini http://ebay.us/Tzvi4Q
3. SMD 5050 RGBWW LED Strip http://ebay.us/APG8W6 or http://ebay.us/4Y0UBK
4. PCB http://ebay.us/ujStHB
5. DC-DC Step Down Converter http://ebay.us/EU2Xd5
6. IRF540N Mosfet http://ebay.us/tiUWHJ
7. Wires
Strip Controller Wiring
The smartness to the SMD 5050 strip is added using a NodeMCU/ESP8266 based controller. The strip controller board comprises of:
1. Wemos D1 Mini/NodeMCU that connects to the internet.
2. DC-DC converter that steps down the 12V supply to the microcontroller tolerable 5V.
3. 3 MOSFETS for the Red(R), Green(G) and Blue(B) channels.
The wiring diagram shows the connection between the different parts.
A word of caution though. The pins cannot be interchanged and has to be used as it is. The Pins used with Wemos are D6, D7 and D8. They translate to GPIO numbers 12, 13 and 15. Please refer to the pin map attached.
Preparing a PCB for the Controller
Populating the components on a PCB makes it more compact and easy on the eyes than having wires dangling between the parts. In the previous step, I had shown the wiring diagram. As the wiring diagram was made in Fritzing, it was easy to design the PCB directly from the wiring diagram. As one can probably see, I have mad the supply tracks thick to stand the current draw from the LED Strip. Due to the shortage of time, I soldered the components on a general purpose PCB. Those who wish may fabricate the PCB using the Fritzing or the Gerber files attached. There are a number of different PCB fabrication providers, but I recommend JLCPCB (https://jlcpcb.com) for fabricating the PCB purely based on my experience.
Link to the Fritzing file: https://mega.nz/file/a0xGFJjT#1llAj0IeAiGFmeHzPdaW...
Link to the Gerber file: https://mega.nz/file/m4gAUDCa#UPfquIzSdDWayZLJ8wdg...
Prerequisites for the Controller Software/firmware
The Google Assistant and Amazon Alexa integration is quite complex for DIY projects. In this instructable, we will be making use of SUPLA (a free home automation service provider) for their built-in Google Assistant and Amazon Alexa integration.
1. First head over to https://cloud.supla.org/login and login or create an account if you already dont have one. immediately after logging in you will be presented with a screen that looks like the first image. The credentials under supla-dev will go into the NodeMCU/Wemos and the supla-client credentials will go into the SUPLA phone/tablet app. Leave it opened as we will comeback to it again.
2. Next, go to https://www.supla.org/en/download webpage and scroll down untill you get to the "H801 WIFI LED CONTROLLER" tab. Click on the download button to download the binaries that needs to be flashed onto the NodemCU/Wemos.
3. Download the FLASH DOWNLOAD TOOLS from the Espressif's downloads page https://www.espressif.com/en/support/download/othe... There seems to be only a Windows version, however you can refer this post for running the flash download tools on a macOS machine https://blog.squix.org/2015/05/esp8266-flashing-no...
4. Unzip both the H801 and Flash Download Tools zip files into separate folders.
Next, we will take a look into the firmware flashing process.
Flashing the Firmware
1. From the unzipped flash download tool folder, double clikc and run flash_download_tool_x.x.x.exe file.
2. In the first pop-up window choose Developer mode and in the subsequent pop-up window choose ESP8266 DeveloperTools.
3. Now open the Readme file in the unzipped H801 folder. This has the details pertaining to the flashing settings.
4. In the ESP8266 Download Tool window, the left side space is for the path to the binaries and the right side space is for the corresponding flash address.
5. The binaries' paths can by added by clicking on the ... and by selecting the binary file or by directly pasting the path in the space provided.
6. The addresses of the binaries should be copied from the Readme document and pasted in the space provided.
7. The SPI settings should be set as shown in the last image. The while the crystal frequency is board dependent, the SPI frequency should be set to 40MHz, SPI mode should be DIO, and flash size should be 8Mbit (1MB).
8. From the COM port drop down menu, select the comport on which the NodeMCU/Wemos is connected. Also, set the baudrate to 1152000.
9. Finally, click on START. After a couple seconds, you should see a FINISH prompt in the same space where it reads IDLE.
10. Now the firmware has been successfully flashed. You can unplug the NodeMCU/Wemos and restart it.
Configuring the NodeMCU
1. First time when the NodeMCU restarts after the flashing process, it will start in Access Point mode serving its own wireless network.
2. Connect to the SUPLA network. it does not request for any password.
3. Once connected, open a bowser and in the address bar type 192.168.1.4 and press enter.
4. You will now be presented with the SUPLA configuration screen. Provide the WiFi credentials and the supla-dev credentials that we last saw in the "Prerequisites for the controller software/firmware" step.
5. After furnishing the details, click on SAVE and wait for the microcontroller to restart.
Setting Up the Device
1. Login into the SUPLA console and click on the My SUPLA tab.
2. In that window, the registration will be disabled by default. click on the box at the right top to enable registration and only then your strip controller will get listed here.
3. Once the device gets listed, click on that to bring up two yellow colored boxes.
4. Click on each of them and under the Functions drop down, select the light type. One of the Functions should be RGB Color bulb and Dimmer.
5. Click on save button to save the settings.
Linking With Google Assistant
1. Open the Google Home app.
2. At the top left, tap on + and then choose Set up device and then choose Works with Google.
3. Click on the search icon and search for the SUPLA app.
4. Select the SUPLA app and link it with Google by providing the credentials.
5. After successful linking, the SUPLA devices should now get listed in the Home app.
Linking With Amazon Alexa
1. Open the Amazon Alexa app and tap on the More tab.
2. Under More tab, tap on Skills and Games.
3. tap on the search icon and look for Supla Skill.
4. Tap on Supla Skill and Enable it.
5. You will be prompted for SUPLA credentials and upon providing them, SUPLA will get linked to the Amazon Alexa Voice service.
6. Choose the discover devices option. At the end of the discovery, the SUPLA devices should get listed in the Amazon Alexa devices option.
Demo
Time to light up the space around you.
Alexa integration demo:
Google Assistant integration demo: