Alexa Smart Home System Using NodeMCU Relay Module

Introduction: Alexa Smart Home System Using NodeMCU Relay Module

About: This Page is for different Electrical and Electronics Projects, DIY, Circuits, etc. All the projects are explained with circuit diagram, Breadboard schematic, working principle, Arduino sketches so it becomes …

In this IoT project, I have made the Alexa Smart Home Automation system using the NodeMCU ESP8266 & Relay Module. You can easily control light, fan, and other home appliances with the voice command. To connect the Echo Dot smart speaker with the NodeMCU, I have used only the Amazon Alexa app.

If you don't have Echo Dot smart speaker, still you can control the home appliances. And you can also monitor the relay time feedback of the switches from the smartphone. You can also use the ESP32 board instead of the NodeMCU microcontroller.

Supplies

1. Alexa Echo Dot

2. Relay Module

3. NodeMCU or ESP32 board

4. Relays 5v (SPDT)

5. BC547 Transistors

6. LED 5mm

7. 220-ohm Resistors

5. Connectors

Step 1: Circuit Diagram

As you can see the circuit for this home automation project is very simple. You can easily make this circuit with the Relay module and NodeMCU.

Here, I have used D1, D2, D5, D6, D7 pins of NodeMCU to control the 5 Relays. And I have used a 5V mobile charger to supply the circuit.

Step 2: Program the NodeMCU

In the tutorial video, I have explained the code in detail.

As I said, you can use both NodeMCU or ESP32 for this project. I have used the ESPAlexa library for this project.

If you use NodeMCU ESP8266 then you have to download and install the ESP8266 board version (2.5.1) (as shown in the picture).

I have faced some issues with the latest version of the ESp8266 board library while uploading the code.

In the code enter the WiFi credentials, and set the names of the devices like Room light, fan, Night Lamp, etc.

Here, I have used the active High relay module, so if you use the active low relay module then you have to do little modifications in the code as shown in the tutorial video.

Still, if you face any issue, let me know in the comment section.

I have attached the code for this Alexa home automation project.

Step 3: Configure the Amazon Alexa App

First, download and install the Amazon Alexa App from the Google PlayStore or App Store.

Your mobile and the NodeMCU should be connected with the same wifi network.

Steps to add devices in Amazon Alexa App.

1. Open the Amazon Alexa App.

2. Goto Devices.

3. Tap on the "+" icon on the top, then select Add Devices.

4. Select Light then selects Other.

5. Tap on the Discover Devices.

It will take some time to discover all the devices. After that add all the devices one by one in the Amazon Alexa App. In the tutorial video, I have step by step how to connect devices with the Amazon Alexa app.

Step 4: Designing the PCB

Although you don't need any custom design PCB to make this smart home system. But to make the circuit compact and to give the project a professional look, I have designed the PCB for this Alexa project.

Step 5: Order the PCB

After downloading the Garber file you can easily order the PCB

1. Visit https://jlcpcb.com and Sign in / Sign up

2. Click on the QUOTE NOW button.

3 Click on the "Add your Gerber file" button.

Then browse and select the Gerber file you have downloaded.

Step 6: Uploading the Gerber File and Set the Parameters

4. Set the required parameter like quantity, PCB color, etc

5. After selecting all the Parameters for PCB click on SAVE TO CART button.

Step 7: Select Shipping Address and Payment Mode

6. Type the Shipping Address.

7. Select the Shipping Method suitable for you.

8. Submit the order and proceed for the payment.

You can also track your order from the JLCPCB.com.

My PCBs took 2 days to get manufactured and arrived within a week using the DHL delivery option.

PCBs were well packed and the quality was really good at this affordable price.

Step 8: Solder All the Components

After that solder all the components as per the circuit diagram.

Then connect the NodeMCU.

Step 9: Connect the Home Appliances

Connect the home appliances as per the circuit diagram.

Please take proper safety precautions while working with high voltage.

Connect 5Volt DC supply to PCB as shown in the circuit.

Turn on the 110V/230V supply and 5V DC supply.

Step 10: Finally, We Can Control the Light, Fan With Alexa

Now you can control your home appliances in a smart way.

Just say which devices you want to turn on or off to Alexa, Alexa will do the job for you.

I hope you have liked this home automation project. I have shared all the required information for this project.

I will really appreciate it if you share your valuable feedback,
Also if you have any query please write in the comment section.

For more such projects Please follow TechStudyCell.

Thank you for your time & Happy Learning.

Lighting Challenge

Participated in the
Lighting Challenge

Be the First to Share

    Recommendations

    • First Time Author Contest

      First Time Author Contest
    • Water Speed Challenge

      Water Speed Challenge
    • Pets Challenge

      Pets Challenge

    Comments