How to make Voice control ESP32 WLED Project [ IoT Project ]

Smart Home Devices
120 followers
#wled #esp32 #iotprojects
In this internet of things tutorial I have explained how to make an IoT based WLED Project using ESP32 Alexa to control any RGB LED strip with voice commands, IR remote and manual switch.
Hello friends.
Welcome to Tech StudyCell.
In this video, we will explore a free IoT platform called as WLED.
Using this platform, you can control any RGB LED strip through the Internet from your mobile.
You can also connect Alexa for voice control, turn on RGB lights.
Apart from that, you can also control the LED strip with IR remote and push-button.
There are a number of modes available in the app, and you can do a lot of customization.
You can also schedule on and off time for the LED strip.
So this platform has a lot of features which is impossible to cover in a single video.
And the best part of this platform is you don't have to write a single line code.
So after watching the video, anyone can make this project.
So without any further delay, let's get started.
This video is sponsored by Altium, which is a world-class PCB designer software trusted
by most of the big electronic companies.
The user interface is so simple, you can easily design any complex PCBs in Altium.
Now Altium came up with an amazing product called Altium 365.
Altium 365 is an electronic product design platform that unites PCB design, MCAT, data
management, and teamwork.
With Altium 365, you can not only design PCBs, but you can also share your projects
to your teammates for review.
It also provides automatic backup, centralized cloud storage, and a lot more.
And along with all this, they do have a very useful search engine just for electronic components
called Octopart.
Using Octopart, you can search for any electronic components, compare the price and availability
around the globe.
Apart from that, you can also check the datasheet.
Altium provides everything to make your production task a lot easier.
And now you can download the free trial version of the Altium PCB designer software from the
description and use all these services in your next PCB design.
If you are using a 5V LED strip, then you just need an ESP32, nothing else.
But for the 12V LED strip, you have to add a voltage regulator to drop down 12V to 5V
for ESP32 as per the circuit.
Now if you want to add more features to the circuit, like manual control or IR remote
control, then you can refer to this circuit.
Here you can see, I have connected two pushbuttons, one for controlling the LED, another is to
change the mode of the LED, and here I have connected the IR receiver, and these two capacitors
are optional.
I have just used it to make the circuit more stable.
So the circuit part is very simple, now let me connect the ESP32 with my laptop to upload
the firmware.
Now to install the firmware, you have to open a browser like Chrome or Microsoft Edge, then
type install.wled.me, then press the enter, you will be redirected to this page.
Then select the firmware version, I am selecting 0.14, then click on install.
Then you have to select the USB port where ESP32 is connected, then click on connect,
then click on install WLED, then again click on install.
Now this will upload the firmware to the ESP32 board, and it may take some time.
Click on next, then you have to enter the Wi-Fi credential, here let me select the Wi-Fi
name, then enter the Wi-Fi password, then click on connect.
Now you may click on visit device to see the interface.
Now you can configure the GPIO and other details from this interface, but we will do that configuration
from the mobile app.
Here you can see, I have made the circuit on the breadboard using ESP32 and the voltage
regulator.
Now we will use this LED strip 2811.
On that strip, you will notice this is 12V, this is data pin, and this is ground.
So from this indication, we can identify these 3 wires, the red one is the 12V, white one
is the ground, and the middle one is the data pin.
And you will also notice this arrow, which indicates this part is DIN, here you can see
DIN is written, and this is data out, which indicates by DO.
So we will connect the data pin from the DIN terminal.
Here you can see, I have connected the LED strip with the circuit, and you can also provide
12V supply across these 2 wires.
Now the red wire is parallel to this red wire, which is plus 12V, and the black wire is parallel
to this white wire, which is ground.
Then we will configure this WLED app, you can download it from the App Store or Google
Play Store.
Now let me open the app.
First, I will tap on this plus icon, then tap on discover lights, and here you can see
found WLED.
So I will tap on this tick icon, and this is our device.
Let me tap on it.
First, we will configure the GPIO.
So I will tap on config, then select LED preference.
Now from this page, you can configure the ESP32.
So first, I will select the 12V LED, then I will select the color order.
As per my LED strip, you have to select according to the LED strip you are using.
Then in my strip, I have a total of 100 LEDs, but initially I want to control 10 LEDs from
the strip.
So I will type here 10 in the length.
Then I have to enter the GPIO for the data pin, and here I have used 25.
So you can use any other GPIO, you have to enter the GPIO details, which is connected
with the data pin of the LED strip.
Then if I scroll down, here you can configure the buttons, which we will see later.
So now I will save the configuration, then tap on back, the LED is already on, you can
see.
Now let me make it blue, you can see it turns into blue.
From the strip, only the 10 LEDs are on.
So this is one LED, this is another LED, like that you will find as I have entered the 10,
so first 10 LEDs are on.
Now let me quickly connect the IR receiver with the circuit.
So again, I will go to config, LED preference, then from this drop-down, I will select the
GPIO details.
So here I have connected the sensor output pin with 35 GPIO.
Then I will enable the remote, and here I am using this remote, which has 24 keys.
So I will select this.
So you have to select the remote type as per the IR remote you are using.
So from this IR remote, now I can enable to turn on or off the LED.
Let me turn it off.
You can see it turns off.
Now let me connect this LED strip in the Amazon Alexa app.
For that, you need an Echo device, then go to config, then select Sync Interfaces.
From here, you will find Alexa Voice Assistant.
So here you can see, this is Alexa Voice Assistant.
I will enable this option, then give a name to this LED light, say RGB light.
You can give any name, then save it.
After that, open the Amazon Alexa app, then go to device, tap on this plus icon, select
add device, then select light, scroll down, then select other, then Wi-Fi, then discover
device.
It will take some time, and during this time, the Echo Dot, ESP32, and your Alexa app must
be connected with the same Wi-Fi network.
So here you can see, one light found and connected.
So let me keep this.
Then if I go to light, I should see the light RGB LED, currently the LED is on.
So let me turn it off.
Turn off RGB light.
You can see the light turns off.
To make the circuit compact, I have designed this PCB.
You can also use this PCB layout to make the circuit on the zero PCB.
And here you can see, I have made the complete circuit on the zero PCB.
So let me connect the ESP32 on this PCB.
Now I will control the complete strip.
So again, I will go to the WLED app, then go to configuration, LED preference, and here
I will select length 100, as I want to control the complete strip.
Then I will also configure these two push-buttons connected with ESP32.
So with the first push-button, we can turn on and off the LED.
So I will select here GPIO 5, the type will be push-button.
In the next button, I will select GPIO 21, and here I will select the push-button again.
Then I will save it.
Then I will go to back, and now you can see the whole strip is on.
So let me select a mode first, say Aurora, you can see the mode changes.
I can select any mode from this dashboard, and I can also use the push-button, which
is connected with GPIO 21.
So this button to change the mode, so let me press the push-button, you can see the
mode changes.
If I press it again, and you can also monitor it on the mobile app, the modes are changing.
Press it again, so thus we can change the mode.
Now we can also turn the LED on and off from the push-button connected with GPIO 5.
Let me press the push-button, you can see the LED turns off.
Let me press it again, the LED turns on, and you can also monitor the real-time feedback
on the mobile app.
Now the only limitation of this IoT platform is everything should be connected with the
same Wi-Fi network, otherwise it will not work.
So anytime you are not able to connect the LED strip, you just have to delete the existing
device.
Then tap on the plus icon, tap on discover device.
After it found the WLED, tap on the tick icon, and you will find the device again.
And you don't have to configure it again and again.
The configuration will be saved in the ESP32.
Right now we have added the device again, but if I go to the Config menu, everything
is configured as before, as everything is saved in the ESP32.
Here you can see, I don't have to configure it again.
So this is a very useful project using the free IoT platform, and you can do a lot of
things using this WLED app.
If you find this video helpful, then please hit the like button and share it with your
friends.
Don't forget to subscribe.
Thank you for watching.
Have a great day.
