Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Home Automation and IoT

Workshop
Meghna M C
Day 1
Introduction
Blink LED Using NodeMCU
What is IoT?

● Internet of things
● Network of interconnected physical devices that communicate and exchange data
with each other
● Devices embedded with sensors and other connectivity features
Home Automation

● Technology to automate various aspects of home


● Integration of smart devices, sensors, communication technologies
● Convenient, energy efficient, secure
NodeMCU
● 30 pins in total
● 8 digital pins (D0-D8) and 1 Analog pin with 10 bit ADC
● Wifi compatibility, low cost microcontroller
● EN- HIGH → Chip is enabled
● Power Requirements
○ Operating Voltage: 3V to 3.6V
○ Vin = 7V - 12V
● Supports UART, I2C, SPI communication
NodeMCU Pin diagram
Serial Communication in NodeMCU

1. UART (Universal Asynchronous Receiver Transmitter):


a. TX (Transmit)
b. RX(Receive)
2. SPI (Serial Peripheral Interface):
a. MISO: Master In Slave Out
b. MOSI: Master Out Slave In
c. SCLK: Serial Clock
d. SS/CS: Slave Select/ Chip Select
3. I2C (Inter Integrated Circuit):
a. SDA: Serial Data
b. SCL: Serial Clock
Applications of IoT and home Automation

Can you think?


Applications of IoT and home Automation

● Amazon’s Alexa
● Google Assistant
● Smart Garden
● Smart Irrigation
● Child and pet monitoring applications
● Projects in this workshop!

And many more!


Setting up Arduino IDE for NodeMCU

● Installing package:
https://arduino.esp8266.com/stable/package_esp8266com_index.json
● Installing libraries
Blink LED using NodeMCU

● NodeMCU: 2 LEDs
○ The LED next to D0: connected to D4 (GPIO 2)
○ The LED near to Reset button: connected to D0 )GPIO 16)
Project 1: IoT based Home
Security System
Components required

● NodeMCU board (ESP8266)


● Breadboard
● PIR Sensor/ Ultrasonic Motion Sensor
● Buzzer
● LEDs: 2
● Resistor: 180 ohm or 150 ohm (Optional)
● Connecting Wires
Setting up the blynk app

● Use Blynk Console in your laptop


● Use the Blynk App in your smartphone
● Always better to connect the system to you hotspot rather than a Wifi router
Connections

● Connect PIR sensor to D6 or Connect Trig to D7 and Echo to D8


● Connect Buzzer to pin D5
● LED 1 to D1
● LED 2 to D2
Circuit Diagram

You might also like