This article will introduce you to a home automation system that can easily control lights, fans, and other home appliances through voice commands using NodeMCU and Relay modules.
In this IoT project, I have made an Alexa smart home automation system using NodeMCU ESP8266 and relay modules. You can easily control lights, fans, and other home appliances through voice commands. To connect Echo Dot smart speaker with NodeMCU, I have only used Amazon Alexa app.
If you don't have an Echo Dot smart speaker, you can still control your home appliances. You can also monitor the relay timing feedback of switches from your smartphone.
Alternatively, you can also use an ESP32 board instead of the NodeMCU microcontroller.
Components required:
Alexa Echo Dot
Relay Module
NodeMCU or ESP32 development board
Components required for the relay module:
Relay 5v (SPDT)
BC547 transistor
LED 5mm
220 ohm resistor
Connectors
Circuit diagram:
As you can see, the circuit for this home automation project is very simple. You can easily make this circuit using Relay module and NodeMCU.
Here, I have used D1, D2, D5, D6, D7 pins of NodeMCU to control 5 relays.
I used a 5V mobile charger to power the circuit.
Programming the NodeMCU:
As I said, you can use NodeMCU or ESP32 for this project. I used ESPAlexa library for this project.
If you use NodeMCU ESP8266, you must download and install the ESP8266 board version (2.5.1) (as shown in the picture).
I'm having some issues with the latest version of the ESp8266 board library when uploading code.
Enter your WiFi credentials in the code and set the names of devices such as room lights, fans, night lights, etc.
Here, I have used an active high relay module so if you are using an active low relay module then you just need to make few modifications in the code as shown in the tutorial video.
However, if you face any issues, please let me know in the comments section.
I have attached the code for this Alexa Home Automation Project.
To configure the Amazon Alexa app:
First, download and install the Amazon Alexa App from Google PlayStore or App Store.
Your phone and NodeMCU should be connected to the same wifi network.
Steps to add a device in the Amazon Alexa App:
Open the Amazon Alexa app.
Go to Devices.
Click the "+" icon at the top and select Add a device.
Select Light, then select Other.
Click Discover Devices.
It may take some time to discover all devices.
After that, add all the devices one by one to the Amazon Alexa App.
Design PCB:
Although you don't need any custom designed PCB to make this smart home system. But to make the circuit more compact and make the project look more professional, I designed a PCB for this Alexa project.
Solder all components:
After that solder all the components according to the circuit diagram.
Then connect the NodeMCU.
Connect home appliances:
Connect the home appliances according to the circuit diagram.
Take proper safety precautions when working with high voltage.
Connect a 5V DC power supply to the PCB as shown in the circuit.
Turn on the 110V/230V power supply and the 5V DC power supply.
Finally, control the lights and fan with Alexa:
Now you can control your home appliances in a smart way.
Just tell Alexa which devices you want to turn on or off, and Alexa will do the work for you.
Previous article:Specific methods of transforming fresh-keeping warehouse with air conditioner
Next article:Class D audio amplifier circuit based on power chip TDA8929T
Recommended ReadingLatest update time:2024-11-16 12:45
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Build your own virtual machine: design and implementation of parsing programming languages
- Electronics Projects with the ESP8266 and ESP32 Building Web Pages, Applications, and WiFi Enabled D
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Problems encountered in learning C programming language
- 5G Common Terms and Abbreviations
- I found a very good introductory book on 51 single-chip microcomputers and recommend it to beginners. It is suitable for self-study by novices (Wang Yun)
- Application of Bypass Capacitors in High-Speed Circuit Environment
- Design of software and hardware C delay program for MSP430
- Optical module SFF-8472 problem solving
- Develop smart devices based on ESP32 to access the smart home ecosystem HomeAssistant
- ST Value Series NUCLEO-G071RB Development Board Introduction
- Domestic MCU
- STM32F767 ADC self-calibration problem