Room Control With ESP8266 | Temperature, Motion, Curtains and Lighting
by mcmchris in Circuits > Arduino
1291 Views, 6 Favorites, 0 Comments
Room Control With ESP8266 | Temperature, Motion, Curtains and Lighting
This project consist on a system based on the NodeMCU ESP8266 module that let you control the brightness of a LED Strip and the curtain of your room, also it's able to send data about the motion events of your room and the temperature to the cloud where you can see it by Ubidots IoT platform.
Supplies
- Ubidots Account: http://bit.ly/2GNDBnl
- 1x ESP8266 NodeMCU
- 1x 12v Power Jack
- 1x 220 ohm Resistor 1/4W
- 2x Capacitors 120nf
- 1x Power Transistor TIP31
- 1x Voltage Regulator lm7805
- 1x PIR Sensor HC-SR501
- 1x Temperature sensor DS1820
- 1x DC Motor Driver L293D
- 2x Terminal Blocks
- 1x SIL Female Connectors
Circuit Schematics:
- 1x ESP8266 NodeMCU
- 1x 12v Power Jack
- 1x 220 ohm Resistor 1/4W
- 2x Capacitors 120nf
- 1x Power Transistor TIP31
- 1x Voltage Regulator lm7805
- 1x PIR Sensor HC-SR501
- 1x Temperature sensor DS1820
- 1x DC Motor Driver L293D
- 2x Terminal Blocks
- 1x SIL Female Connectors
PCB Design (Gerber):
Here is the Gerber File so you can order your own PCB.
I suggest to use PCBGOGO to manufature the PCBs.
Soldering Everything:
Clean up the circuit pads if they are not and start soldering everything step by step.
Install the Libraries for the Code:
Here is the link where to can download the libraries.
Upload the Code:
Here is the Code for download:
Wiring and Power Up:
Connect the DC motor wires from the Curtain and the LED strips wires correctly.
Setup Your Ubidots Device and Dashboard:
Order of Images:
1-When the NodeMCU is turned on, automaticaly it will create a device called "room" in the devices section of Ubidots.
2- The device will have all the variables inside.
3- Go to Data/Dashboards.
4- Click on "+" to create a new dashboard.
5- Click on Check mark.
6- Create a Widget by clicking on "+".
7- Select Slider widget for the Curtains control.
8- Add a variable.
9- Select "Room" device.
10- Select "Curtain" variable.
11- Set step to 100.
12- Repeat for LED Strip but Step = 1 and Variable is "Ledstrip".
13- Add a indicator widget.
14- Select Movement variable.
15- You are done.
Testing It:
Thank you for being part of this tutorial, hope you like it and if you have any question you are free to ask me.