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

PortadaSquare.jpg

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:

DiagramaIng.PNG
Materials:
  • 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):

PCB.PNG
PCBlayout.PNG

Here is the Gerber File so you can order your own PCB.

I suggest to use PCBGOGO to manufature the PCBs.

Soldering Everything:

Captura de pantalla (18).png
Captura de pantalla (20).png

Clean up the circuit pads if they are not and start soldering everything step by step.

Install the Libraries for the Code:

librs.PNG

Here is the link where to can download the libraries.

Upload the Code:

Captura de pantalla (13).png

Here is the Code for download:

Wiring and Power Up:

Captura de pantalla (14).png
Captura de pantalla (15).png
Captura de pantalla (17).png
Captura de pantalla (21).png
Captura de pantalla (22).png

Connect the DC motor wires from the Curtain and the LED strips wires correctly.

Setup Your Ubidots Device and Dashboard:

Captura de pantalla (23).png
Captura de pantalla (24).png
Captura de pantalla (25).png
Captura de pantalla (26).png
Captura de pantalla (27).png
Captura de pantalla (28).png
Captura de pantalla (29).png
Captura de pantalla (30).png
Captura de pantalla (31).png
Captura de pantalla (32).png
Captura de pantalla (33).png
Captura de pantalla (34).png
Captura de pantalla (40).png
Captura de pantalla (38).png
Captura de pantalla (35).png
Captura de pantalla (36).png
Captura de pantalla (37).png

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:

Controla tu habitación con Arduino | Temperatura, movimiento, cortinas y luces | Ubidots
Captura de pantalla (42).png
Captura de pantalla (41).png

Thank you for being part of this tutorial, hope you like it and if you have any question you are free to ask me.