SlideShare a Scribd company logo
1 of 23
Remote Temperature Monitor
Prepared by : Parshwadeep Lahane
Summary
• The project uses DHT11 and ESP8266 to monitor temperature at any point
of time
• The monitoring aspect has 2 objectives:
• To check temperature at any given point (achieved with the help of cloud connectivity through Thingspeak)
• To send an alert message when temperature exceeds a predefined value(achieved with the
help of Notify My Android app)
Things needed
6Pin USB 2.0 to TTL
UART Module Serial
Converter
HARDWARE
ESP8266 - 01
DHT11
Multi Power Supply
(5V and 3.3V)
Jumper wires Male to
Male
Jumper wires Female
to Female
Jumper wires Male to
Female
12V adaptor (1Amp)
Bread Board
Laptop
Breadboard Adapters
(optional)
WiFi connection
Any android mobile
Things needed
SOFTWARE
NodeMCU firmware (free)
Scripting language (free)
Account on Thingspeak (free)
Account on NMA (free)
Premium one at $5
Windows (any other
also would do)
Costing
• ESP8266 Rs300
• UART Rs180
• DHT11 Rs180
• Multipower supply Rs140
• 12V adapter Rs100
• Jumper wires(15) Rs50
• Bread board Rs120
• Premium NMA membership Rs350
TOTAL COST ~Rs 1500 or ~US $23
Note: The price quoted is as per what I got on SP road in Bangalore,India. It may be cheaper online/offline at other places so cost can come down further.
Assumptions:
1. WiFi connection already exists
2. Laptop with windows is available
3. Android Mobile phone available
1.ESP8266
microcontroller from Chinese manufacturer Espressif that includes Wi-Fi capability
Cadence Tensilica LX106 microcontroller
• Operates at 3.3V
• Firmware upgrade is needed as first step after purchase
• GPIO 0 should be grounded for firmware upgrade mode
• RST and GPIO2 to be left open
• Connect RX of ESP8266 to TX of FT232RL
• Connect TX of ESP8266 to RX of FT232RL
• Supply external voltage of 3.3V to VCC and CH_PD
• GND to be connected to ground (FT232RL and ESP8266 ground should be
common)
Once the connections are done. RED LED on ESP8266 should be on. BLUE LED
will flash momentarily.
PIN PIN Description
VCC 3.3V
RST Reset (low active)
CH_PD Chip Power down (low active)
TXD Transmit data (3.3V level)
RXD Receive data (3.3V level)
GPIO 0 General Purpose Input / Output
GPIO 2 General Purpose Input / Output
GND Ground
Steps for firmware upgrade: http://www.whatimade.today/loading-the-nodemcu-firmware-on-the-esp8266-windows-guide/
2. Lua
powerful, fast, lightweight, embeddable scripting language
What is Lua?
Lua is a powerful, fast, lightweight, embeddable scripting language.
Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and
extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has
automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid
prototyping.
Where does Lua come from?
Lua is designed, implemented, and maintained by a team at PUC-Rio, the Pontifical Catholic University of Rio de Janeiro in
Brazil. Lua was born and raised in Tecgraf, formerly the Computer Graphics Technology Group of PUC-Rio in 1993. Lua is
now housed at LabLua, a laboratory of the Department of Computer Science of PUC-Rio.
What's in a name?
"Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun.
More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should
be written in lower case with an initial capital, that is, "Lua".
3. NodeMCU firmware upgrade
Lua based firmware for wifi-soc esp8266
• http://benlo.com/esp8266/esp8266QuickStart.html
• Plug the USB to serial adapter into your PC. Most adapters are automatically recognized by
Windows 7 and 8. Users of XP or older versions of Windows may need a driver which should be
supplied by the manufacturer of the USB adapter. The adapter will appear as a new COM port
on your system. Check the Device Manager if necessary.
• Run ESP8266Flasher.exe
• NodeMcuFlasher
• If you only have one COM device, the port will appear automatically. If you have more than one,
select the correct one from the drop down menu.
• The flasher program comes with default NodeMCU firmware in memory. This is unlikely to be
the latest version, but to get started quickly, use the default internal image. Later, you can
download the latest firmware, then select the [Config] tab and choose the new .bin file. Select
the 0x7C000 default and 0x7E000 blank sections. Uncheck the box for the 0x10000 IROM
section.
• Click on Flash(E) to start the programming process.
• https://www.youtube.com/watch?v=Gh_pgqjfeQc
• https://github.com/nodemcu/nodemcu-firmware
• https://bigdanzblog.wordpress.com/2015/04/14/installing-nodemcu-lua-firmware-on-esp8266-wifi-module/
• http://www.roboremo.com/flashing-nodemcu-firmware-to-esp8266.html
Videos:
If ESP8266 gets bricked what to do?
(Blue LED starts flashing on continuous basis)
• https://www.youtube.com/watch?v=VQ6-WrX54_s
http://www.xess.com/blog/esp8266-reflash/
Sketch for ESP8266 firmware upgrade
ESP 8266-01FT232RL
TXD
TXD
RXD
RXD
GND GND
GPIO 0
GPIO 2
+3.3V
Multi-Power
Supply
VCC CH_PD
GND
USBconnectiontoLaptop
3 pins used 7 pins used
Note: use a bread board to get connections in place.
A
4.DHT11 Temperature and Humidity Sensor
GPIO 0 of ESP8266
along with ESP8266 and FT232 ground pins
5V External power supply
Basic working :
Note: now NodeMCU has built in DHT function so same can be used directly, Arduino also has one built in function
5. ThingSpeak
The open data cloud platform for the Internet of Things
ThingSpeak API Quick Start
1. Sign Up for a ThingSpeak account
2. Go to Channels, and click New Channel
3. Complete the channel settings, and click Save Channel.
4. Update your Channel via URL:
5. https://api.thingspeak.com/update?api_key=YOUR_CHANN
EL_API_KEY&field1=7
6. View your Channel feed:
7. https://api.thingspeak.com/channels/YOUR_CHANNEL_ID/f
eeds.json
Video Link: https://www.youtube.com/watch?v=I_Jm6Q4z7ig
6. Notify My Android(NMA)
platform that allows you to deliver push notifications from virtually any application to your Android device
NMA API Quick guide
1. Sign Up for a NMA account
2. Go to Manage API Keys and Generate New Key
3. Key details will appear in Key Description field.
4. Update NMA alerts via URL:
conn:send("GET /publicapi/notify?apikey=YOUR API KEY
&application=ESP8266&event=XXXX&description=text1%20tex
t2%20text3&priority=2rn HTTP/1.1rn")
7. ESPlorer
Integrated Development Environment (IDE) for ESP8266 developers
• The essential multi-platforms
tools for any ESP8266 developer
from luatool author’s, including
a LUA for NodeMCU and
MicroPython.
• Download link :
• https://github.com/4refr0nt/ESPlorer
• http://esp8266.ru/esplorer/#download
Code (init.lua)
print("Setting up WIFI..")
wifi.setmode(wifi.STATION)
--modify according your wireless router settings
wifi.sta.config("SSID","PASSWORD")
wifi.sta.connect()
tmr.alarm(1, 1000, 1, function()
if wifi.sta.getip()== nil then
print("IP unavailable, Waiting...")
else
tmr.stop(1)
print("Config done, IP is "..wifi.sta.getip())
dofile("dht11.lua")
end
end)
Source: https://github.com/Parshwadeep/DHT11andESP8266andLuaandThingspeak/blob/master/init.lua
Change the RED part in your code
--- Get temperature and humidity data and send data to thingspeak.com
function sendData()
getTemp()
-- conection to thingspeak.com
print("Sending data to thingspeak.com")
conn=net.createConnection(net.TCP, 0)
conn:on("receive", function(conn, payload) print(payload) end)
-- api.thingspeak.com 184.106.153.149
conn:connect(80,'184.106.153.149')
conn:send("GET /update?key=YOUR_KEY&field1="..temp.."&field2="..humi.." HTTP/1.1rn")
conn:send("Host: api.thingspeak.comrn")
conn:send("Accept: */*rn")
conn:send("User-Agent: Mozilla/4.0 (compatible; esp8266 Lua; Windows NT 5.1)rn")
conn:send("rn")
conn:on("sent",function(conn)
print("Closing connection")
conn:close()
end)
conn:on("disconnection", function(conn)
print("Got disconnection...")
end)
end
-- send data every X ms to thing speak
tmr.alarm(2, 60000, 1, function() sendData() end )
Code (dht11.lua)
pin=3
m=0
function getTemp()
status,temp,humi,temp_decimial,humi_decimial = dht.read(pin)
if( status == dht.OK ) then
-- Float firmware using this example
print(string.format("DHT
Temperature:%d.%02d;Humidity:%d.%02drn",temp,temp_decimial,humi,humi_decimi
al))
if (temp >25) then
print ("ALERT: Temperature is out of range")
if m == 1 then
conn=net.createConnection(net.TCP, 0)
conn:on("receive", function(conn, payload) print(payload) end)
conn:connect(80,"50.116.34.97")
conn:send("GET
/publicapi/notify?apikey=YOUR_KEY&application=ESP8266&event=TEMP_ALERT&descri
ption=Temperature%20is%20more%20than%2025&priority=2rn HTTP/1.1rn")
conn:send("Host: notifymyandroid.comrn")
conn:send("Accept: */*rn")
conn:send("User-Agent: Mozilla/4.0 (compatible; esp8266 Lua; Windows NT
5.1)rn")
conn:send("rn")
m = 0
else m = 1
end
end
elseif( status == dht.ERROR_CHECKSUM ) then
print( "DHT Checksum error." );
elseif( status == dht.ERROR_TIMEOUT ) then
print( "DHT Time out." );
end
end
Source: https://github.com/Parshwadeep/DHT11andESP8266andLuaandThingspeak/blob/master/dht11.lua
Change the RED part in your code
Sketch for SW update and working model
ESP 8266-01FT232RL DHT11
TXD
TXD
RXD
RXD
GND GND GND
GPIO 0 Signal
+5V+3.3V
Multi-Power
Supply
VCC CH_PD
VCC
GND
USBconnectiontoLaptop
3 pins used 7 pins used 3 pins used
Note: use a bread board to get connections in place.
B
Important for software upload on ESP8266
• FIRST UPLOAD dht11.lua on ESP8266 by
clicking on Save to ESP in ESplorer.
• NEXT UPLOAD init.lua on ESP8266 by
clicking on Save to ESP in ESplorer.
• Wait for 1-2 min after upload. The setup
should work and updated data points
available on Thingspeak channel and
alerts on Notify My Android as per
distance monitored.
Sketch for post software update on ESP8266
ESP 8266-01 DHT11
GND GND
GPIO 0 Signal(S)
+5V+3.3V
Multi-Power
Supply
VCC CH_PD
VCC
GND
4 pins used 3 pins used
C
Tracking sensor data on ThingSpeak
Alerts on mobile with NMA app
In a Nutshell
• Get ESP8266 upgraded with NodeMCU firmware with help of UART (Sketch A)
• Open accounts on Thingspeak and Notify My Android App and get the API keys to be used
in code
• Connect DHT11 to ESP8266 and upload the code on ESP8266 using ESPlorer (Sketch B)
• Check the working of init.lua on serial monitor:
• Check Charts on Thingspeak
• Check condition of Mobile Alert when temperature is above a predefined value.
• Remove UART connections and check standalone working of ESP8266 and DHT11 (Sketch C)
Next Steps
• Get the things working on circuit board with minimal size
• Implement it in real server room/other environment
END

More Related Content

What's hot

Sensors and microcontroller interfacing
Sensors and microcontroller interfacingSensors and microcontroller interfacing
Sensors and microcontroller interfacingmohamed albanna
 
Electronics project presentation
Electronics project presentationElectronics project presentation
Electronics project presentationZahidul Islam Razu
 
Temperature measurement using nodemcu esp8266
Temperature measurement  using nodemcu esp8266Temperature measurement  using nodemcu esp8266
Temperature measurement using nodemcu esp8266DheerendraKumar43
 
Basics of arduino uno
Basics of arduino unoBasics of arduino uno
Basics of arduino unoRahat Sood
 
Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Mahmoud Sadat
 
Smart shopping trolley using rfid and remote controlling
Smart shopping trolley using rfid and remote controllingSmart shopping trolley using rfid and remote controlling
Smart shopping trolley using rfid and remote controllingPranav Veerani
 
ThingSpeak: apps for social things
ThingSpeak: apps for social thingsThingSpeak: apps for social things
ThingSpeak: apps for social thingsHans Scharler
 
ALCOHOL AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSM
ALCOHOL  AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSMALCOHOL  AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSM
ALCOHOL AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSMMallemptiOohasri
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 prsamurti
 
Android Based Home Automation Control
Android Based Home Automation ControlAndroid Based Home Automation Control
Android Based Home Automation ControlVivek Porwal
 
Synopsis for alcohol detection with vehicle controlling (1)
Synopsis for alcohol detection with vehicle controlling (1)Synopsis for alcohol detection with vehicle controlling (1)
Synopsis for alcohol detection with vehicle controlling (1)Pankaj Singh
 
Alcohol Sensing Alert with Engine Locking Project
Alcohol Sensing Alert with Engine Locking ProjectAlcohol Sensing Alert with Engine Locking Project
Alcohol Sensing Alert with Engine Locking ProjectDINKAR MALI
 
Drink and Drive Alcohol Detection
Drink and Drive Alcohol DetectionDrink and Drive Alcohol Detection
Drink and Drive Alcohol DetectionNandha_Gopal
 
INTELLIGENT MOBILE BASED PATIENT MONITORING SYSTEM
INTELLIGENT MOBILE BASED PATIENT MONITORING SYSTEMINTELLIGENT MOBILE BASED PATIENT MONITORING SYSTEM
INTELLIGENT MOBILE BASED PATIENT MONITORING SYSTEMJOLLUSUDARSHANREDDY
 
PIR sensing with arduino
PIR sensing  with  arduinoPIR sensing  with  arduino
PIR sensing with arduinochetan kadiwal
 

What's hot (20)

Sensors and microcontroller interfacing
Sensors and microcontroller interfacingSensors and microcontroller interfacing
Sensors and microcontroller interfacing
 
Electronics project presentation
Electronics project presentationElectronics project presentation
Electronics project presentation
 
Temperature measurement using nodemcu esp8266
Temperature measurement  using nodemcu esp8266Temperature measurement  using nodemcu esp8266
Temperature measurement using nodemcu esp8266
 
Basics of arduino uno
Basics of arduino unoBasics of arduino uno
Basics of arduino uno
 
Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Introduction to AVR Microcontroller
Introduction to AVR Microcontroller
 
Smart shopping trolley using rfid and remote controlling
Smart shopping trolley using rfid and remote controllingSmart shopping trolley using rfid and remote controlling
Smart shopping trolley using rfid and remote controlling
 
ThingSpeak: apps for social things
ThingSpeak: apps for social thingsThingSpeak: apps for social things
ThingSpeak: apps for social things
 
ALCOHOL AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSM
ALCOHOL  AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSMALCOHOL  AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSM
ALCOHOL AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSM
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 p
 
Android Based Home Automation Control
Android Based Home Automation ControlAndroid Based Home Automation Control
Android Based Home Automation Control
 
Bidirect visitor counter
Bidirect visitor counterBidirect visitor counter
Bidirect visitor counter
 
Internet of Things Using Arduino
Internet of Things Using ArduinoInternet of Things Using Arduino
Internet of Things Using Arduino
 
Synopsis for alcohol detection with vehicle controlling (1)
Synopsis for alcohol detection with vehicle controlling (1)Synopsis for alcohol detection with vehicle controlling (1)
Synopsis for alcohol detection with vehicle controlling (1)
 
Alcohol Sensing Alert with Engine Locking Project
Alcohol Sensing Alert with Engine Locking ProjectAlcohol Sensing Alert with Engine Locking Project
Alcohol Sensing Alert with Engine Locking Project
 
Drink and Drive Alcohol Detection
Drink and Drive Alcohol DetectionDrink and Drive Alcohol Detection
Drink and Drive Alcohol Detection
 
INTELLIGENT MOBILE BASED PATIENT MONITORING SYSTEM
INTELLIGENT MOBILE BASED PATIENT MONITORING SYSTEMINTELLIGENT MOBILE BASED PATIENT MONITORING SYSTEM
INTELLIGENT MOBILE BASED PATIENT MONITORING SYSTEM
 
Esp8266 basics
Esp8266 basicsEsp8266 basics
Esp8266 basics
 
PIR sensing with arduino
PIR sensing  with  arduinoPIR sensing  with  arduino
PIR sensing with arduino
 
Security door lock system
Security door lock system Security door lock system
Security door lock system
 
advanced security system for women
advanced security system for womenadvanced security system for women
advanced security system for women
 

Viewers also liked

Relazione tecnica progetto «arduino dht11»
Relazione tecnica progetto «arduino dht11»Relazione tecnica progetto «arduino dht11»
Relazione tecnica progetto «arduino dht11»Davide29
 
Topfoison product catalog
Topfoison product catalogTopfoison product catalog
Topfoison product catalogLynapple1022
 
presentation on image processing and temperature and humidity sensor.
presentation on image processing and temperature and humidity sensor.presentation on image processing and temperature and humidity sensor.
presentation on image processing and temperature and humidity sensor.jitendra suthar
 
Instrumentation Project "Monitoring And Control Water Level With Arduino Uno"...
Instrumentation Project "Monitoring And Control Water Level With Arduino Uno"...Instrumentation Project "Monitoring And Control Water Level With Arduino Uno"...
Instrumentation Project "Monitoring And Control Water Level With Arduino Uno"...Caladhityo Dwi Prakoso
 
Humidity and temperature sensor using dht11 with arduino
Humidity and temperature sensor using dht11 with arduinoHumidity and temperature sensor using dht11 with arduino
Humidity and temperature sensor using dht11 with arduinoAsep Subagja
 
ARDUINOLIKE BOARDS: A SHORT HARDWARE REFERENCE GUIDE FOR MAKERS
ARDUINOLIKE BOARDS: A SHORT HARDWARE REFERENCE GUIDE FOR MAKERSARDUINOLIKE BOARDS: A SHORT HARDWARE REFERENCE GUIDE FOR MAKERS
ARDUINOLIKE BOARDS: A SHORT HARDWARE REFERENCE GUIDE FOR MAKERSLeandro Agro'
 
IoT Analytics from Edge to Cloud - using IBM Informix
IoT Analytics from Edge to Cloud - using IBM InformixIoT Analytics from Edge to Cloud - using IBM Informix
IoT Analytics from Edge to Cloud - using IBM InformixPradeep Muthalpuredathe
 
humidity sensor project
humidity sensor projecthumidity sensor project
humidity sensor projectAzlin lolin
 
How Spark Enables the Internet of Things- Paula Ta-Shma
How Spark Enables the Internet of Things- Paula Ta-ShmaHow Spark Enables the Internet of Things- Paula Ta-Shma
How Spark Enables the Internet of Things- Paula Ta-ShmaSpark Summit
 
Presentación de internet de las cosas
Presentación de internet de las cosasPresentación de internet de las cosas
Presentación de internet de las cosasDimitro Dmytrovich
 
Arduino Introduction by coopermaa
Arduino Introduction by coopermaaArduino Introduction by coopermaa
Arduino Introduction by coopermaa馬 萬圳
 
NodeMCU with Blynk and Firebase
NodeMCU with Blynk and FirebaseNodeMCU with Blynk and Firebase
NodeMCU with Blynk and FirebaseEueung Mulyana
 
Apache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Apache Spark Introduction and Resilient Distributed Dataset basics and deep diveApache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Apache Spark Introduction and Resilient Distributed Dataset basics and deep diveSachin Aggarwal
 
Internet de las Cosas. Tecnologías, Aplicaciones y Retos de Futuro
Internet de las Cosas. Tecnologías, Aplicaciones y Retos de FuturoInternet de las Cosas. Tecnologías, Aplicaciones y Retos de Futuro
Internet de las Cosas. Tecnologías, Aplicaciones y Retos de FuturoVicente Pelechano
 
Watson IoT @Ryerson University - IEEE Chapter
Watson IoT  @Ryerson University - IEEE Chapter  Watson IoT  @Ryerson University - IEEE Chapter
Watson IoT @Ryerson University - IEEE Chapter Markus Van Kempen
 
Smart Industry 4.0: IBM Watson IoT in de praktijk
Smart Industry 4.0: IBM Watson IoT in de praktijkSmart Industry 4.0: IBM Watson IoT in de praktijk
Smart Industry 4.0: IBM Watson IoT in de praktijkIoT Academy
 

Viewers also liked (20)

Relazione tecnica progetto «arduino dht11»
Relazione tecnica progetto «arduino dht11»Relazione tecnica progetto «arduino dht11»
Relazione tecnica progetto «arduino dht11»
 
Topfoison product catalog
Topfoison product catalogTopfoison product catalog
Topfoison product catalog
 
Remote tanklevelmonitor
Remote tanklevelmonitorRemote tanklevelmonitor
Remote tanklevelmonitor
 
presentation on image processing and temperature and humidity sensor.
presentation on image processing and temperature and humidity sensor.presentation on image processing and temperature and humidity sensor.
presentation on image processing and temperature and humidity sensor.
 
Instrumentation Project "Monitoring And Control Water Level With Arduino Uno"...
Instrumentation Project "Monitoring And Control Water Level With Arduino Uno"...Instrumentation Project "Monitoring And Control Water Level With Arduino Uno"...
Instrumentation Project "Monitoring And Control Water Level With Arduino Uno"...
 
Humidity and temperature sensor using dht11 with arduino
Humidity and temperature sensor using dht11 with arduinoHumidity and temperature sensor using dht11 with arduino
Humidity and temperature sensor using dht11 with arduino
 
Spark Technology Center IBM
Spark Technology Center IBMSpark Technology Center IBM
Spark Technology Center IBM
 
ARDUINOLIKE BOARDS: A SHORT HARDWARE REFERENCE GUIDE FOR MAKERS
ARDUINOLIKE BOARDS: A SHORT HARDWARE REFERENCE GUIDE FOR MAKERSARDUINOLIKE BOARDS: A SHORT HARDWARE REFERENCE GUIDE FOR MAKERS
ARDUINOLIKE BOARDS: A SHORT HARDWARE REFERENCE GUIDE FOR MAKERS
 
IoT Analytics from Edge to Cloud - using IBM Informix
IoT Analytics from Edge to Cloud - using IBM InformixIoT Analytics from Edge to Cloud - using IBM Informix
IoT Analytics from Edge to Cloud - using IBM Informix
 
humidity sensor project
humidity sensor projecthumidity sensor project
humidity sensor project
 
How Spark Enables the Internet of Things- Paula Ta-Shma
How Spark Enables the Internet of Things- Paula Ta-ShmaHow Spark Enables the Internet of Things- Paula Ta-Shma
How Spark Enables the Internet of Things- Paula Ta-Shma
 
Presentación de internet de las cosas
Presentación de internet de las cosasPresentación de internet de las cosas
Presentación de internet de las cosas
 
Arduino Introduction by coopermaa
Arduino Introduction by coopermaaArduino Introduction by coopermaa
Arduino Introduction by coopermaa
 
NodeMCU with Blynk and Firebase
NodeMCU with Blynk and FirebaseNodeMCU with Blynk and Firebase
NodeMCU with Blynk and Firebase
 
Apache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Apache Spark Introduction and Resilient Distributed Dataset basics and deep diveApache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Apache Spark Introduction and Resilient Distributed Dataset basics and deep dive
 
Internet de las Cosas. Tecnologías, Aplicaciones y Retos de Futuro
Internet de las Cosas. Tecnologías, Aplicaciones y Retos de FuturoInternet de las Cosas. Tecnologías, Aplicaciones y Retos de Futuro
Internet de las Cosas. Tecnologías, Aplicaciones y Retos de Futuro
 
Watson IoT @Ryerson University - IEEE Chapter
Watson IoT  @Ryerson University - IEEE Chapter  Watson IoT  @Ryerson University - IEEE Chapter
Watson IoT @Ryerson University - IEEE Chapter
 
Machine Learning with Apache Spark
Machine Learning with Apache SparkMachine Learning with Apache Spark
Machine Learning with Apache Spark
 
Smart Industry 4.0: IBM Watson IoT in de praktijk
Smart Industry 4.0: IBM Watson IoT in de praktijkSmart Industry 4.0: IBM Watson IoT in de praktijk
Smart Industry 4.0: IBM Watson IoT in de praktijk
 
IBM Internet of Things Offerings
IBM Internet of Things OfferingsIBM Internet of Things Offerings
IBM Internet of Things Offerings
 

Similar to Remote temperature monitor (DHT11)

Esp8266 wi fi_module_quick_start_guide_v_1.0.4
Esp8266 wi fi_module_quick_start_guide_v_1.0.4Esp8266 wi fi_module_quick_start_guide_v_1.0.4
Esp8266 wi fi_module_quick_start_guide_v_1.0.4Melvin Gutiérrez Rivero
 
Adafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi BoardAdafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi BoardBiagio Botticelli
 
Siemens PXC Controller Series Part-2
Siemens PXC Controller Series Part-2Siemens PXC Controller Series Part-2
Siemens PXC Controller Series Part-2CONTROLS & SYSTEMS
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1Andy Gelme
 
ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guidehandson28
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection systemAashiq Ahamed N
 
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)Athens IoT Meetup
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BJingfeng Liu
 
esp32-complex-waveform-generator-v2.pdf
esp32-complex-waveform-generator-v2.pdfesp32-complex-waveform-generator-v2.pdf
esp32-complex-waveform-generator-v2.pdfDaniel Donatelli
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino MajdyShamasneh
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummiesPavlos Isaris
 
Internet of things laboratory
Internet of things laboratoryInternet of things laboratory
Internet of things laboratorySoumee Maschatak
 
Arduino Teaching Program
Arduino Teaching ProgramArduino Teaching Program
Arduino Teaching ProgramMax Kleiner
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitSulamita Garcia
 
communicate with instrument by using lan
communicate with instrument by using lancommunicate with instrument by using lan
communicate with instrument by using lanAbdosalam Arif
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Jorisimec.archive
 

Similar to Remote temperature monitor (DHT11) (20)

Esp8266 wi fi_module_quick_start_guide_v_1.0.4
Esp8266 wi fi_module_quick_start_guide_v_1.0.4Esp8266 wi fi_module_quick_start_guide_v_1.0.4
Esp8266 wi fi_module_quick_start_guide_v_1.0.4
 
Adafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi BoardAdafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi Board
 
Siemens PXC Controller Series Part-2
Siemens PXC Controller Series Part-2Siemens PXC Controller Series Part-2
Siemens PXC Controller Series Part-2
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1
 
Chapter 2.doc
Chapter 2.docChapter 2.doc
Chapter 2.doc
 
ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guide
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection system
 
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
esp32-complex-waveform-generator-v2.pdf
esp32-complex-waveform-generator-v2.pdfesp32-complex-waveform-generator-v2.pdf
esp32-complex-waveform-generator-v2.pdf
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummies
 
Tos tutorial
Tos tutorialTos tutorial
Tos tutorial
 
Internet of things laboratory
Internet of things laboratoryInternet of things laboratory
Internet of things laboratory
 
ESAT– ISP
ESAT– ISPESAT– ISP
ESAT– ISP
 
Arduino Teaching Program
Arduino Teaching ProgramArduino Teaching Program
Arduino Teaching Program
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
communicate with instrument by using lan
communicate with instrument by using lancommunicate with instrument by using lan
communicate with instrument by using lan
 
Assembler4
Assembler4Assembler4
Assembler4
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
 

Recently uploaded

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

Remote temperature monitor (DHT11)

  • 1. Remote Temperature Monitor Prepared by : Parshwadeep Lahane
  • 2. Summary • The project uses DHT11 and ESP8266 to monitor temperature at any point of time • The monitoring aspect has 2 objectives: • To check temperature at any given point (achieved with the help of cloud connectivity through Thingspeak) • To send an alert message when temperature exceeds a predefined value(achieved with the help of Notify My Android app)
  • 3. Things needed 6Pin USB 2.0 to TTL UART Module Serial Converter HARDWARE ESP8266 - 01 DHT11 Multi Power Supply (5V and 3.3V) Jumper wires Male to Male Jumper wires Female to Female Jumper wires Male to Female 12V adaptor (1Amp) Bread Board Laptop Breadboard Adapters (optional) WiFi connection Any android mobile
  • 4. Things needed SOFTWARE NodeMCU firmware (free) Scripting language (free) Account on Thingspeak (free) Account on NMA (free) Premium one at $5 Windows (any other also would do)
  • 5. Costing • ESP8266 Rs300 • UART Rs180 • DHT11 Rs180 • Multipower supply Rs140 • 12V adapter Rs100 • Jumper wires(15) Rs50 • Bread board Rs120 • Premium NMA membership Rs350 TOTAL COST ~Rs 1500 or ~US $23 Note: The price quoted is as per what I got on SP road in Bangalore,India. It may be cheaper online/offline at other places so cost can come down further. Assumptions: 1. WiFi connection already exists 2. Laptop with windows is available 3. Android Mobile phone available
  • 6. 1.ESP8266 microcontroller from Chinese manufacturer Espressif that includes Wi-Fi capability Cadence Tensilica LX106 microcontroller • Operates at 3.3V • Firmware upgrade is needed as first step after purchase • GPIO 0 should be grounded for firmware upgrade mode • RST and GPIO2 to be left open • Connect RX of ESP8266 to TX of FT232RL • Connect TX of ESP8266 to RX of FT232RL • Supply external voltage of 3.3V to VCC and CH_PD • GND to be connected to ground (FT232RL and ESP8266 ground should be common) Once the connections are done. RED LED on ESP8266 should be on. BLUE LED will flash momentarily. PIN PIN Description VCC 3.3V RST Reset (low active) CH_PD Chip Power down (low active) TXD Transmit data (3.3V level) RXD Receive data (3.3V level) GPIO 0 General Purpose Input / Output GPIO 2 General Purpose Input / Output GND Ground Steps for firmware upgrade: http://www.whatimade.today/loading-the-nodemcu-firmware-on-the-esp8266-windows-guide/
  • 7. 2. Lua powerful, fast, lightweight, embeddable scripting language What is Lua? Lua is a powerful, fast, lightweight, embeddable scripting language. Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping. Where does Lua come from? Lua is designed, implemented, and maintained by a team at PUC-Rio, the Pontifical Catholic University of Rio de Janeiro in Brazil. Lua was born and raised in Tecgraf, formerly the Computer Graphics Technology Group of PUC-Rio in 1993. Lua is now housed at LabLua, a laboratory of the Department of Computer Science of PUC-Rio. What's in a name? "Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua".
  • 8. 3. NodeMCU firmware upgrade Lua based firmware for wifi-soc esp8266 • http://benlo.com/esp8266/esp8266QuickStart.html • Plug the USB to serial adapter into your PC. Most adapters are automatically recognized by Windows 7 and 8. Users of XP or older versions of Windows may need a driver which should be supplied by the manufacturer of the USB adapter. The adapter will appear as a new COM port on your system. Check the Device Manager if necessary. • Run ESP8266Flasher.exe • NodeMcuFlasher • If you only have one COM device, the port will appear automatically. If you have more than one, select the correct one from the drop down menu. • The flasher program comes with default NodeMCU firmware in memory. This is unlikely to be the latest version, but to get started quickly, use the default internal image. Later, you can download the latest firmware, then select the [Config] tab and choose the new .bin file. Select the 0x7C000 default and 0x7E000 blank sections. Uncheck the box for the 0x10000 IROM section. • Click on Flash(E) to start the programming process. • https://www.youtube.com/watch?v=Gh_pgqjfeQc • https://github.com/nodemcu/nodemcu-firmware • https://bigdanzblog.wordpress.com/2015/04/14/installing-nodemcu-lua-firmware-on-esp8266-wifi-module/ • http://www.roboremo.com/flashing-nodemcu-firmware-to-esp8266.html Videos:
  • 9. If ESP8266 gets bricked what to do? (Blue LED starts flashing on continuous basis) • https://www.youtube.com/watch?v=VQ6-WrX54_s http://www.xess.com/blog/esp8266-reflash/
  • 10. Sketch for ESP8266 firmware upgrade ESP 8266-01FT232RL TXD TXD RXD RXD GND GND GPIO 0 GPIO 2 +3.3V Multi-Power Supply VCC CH_PD GND USBconnectiontoLaptop 3 pins used 7 pins used Note: use a bread board to get connections in place. A
  • 11. 4.DHT11 Temperature and Humidity Sensor GPIO 0 of ESP8266 along with ESP8266 and FT232 ground pins 5V External power supply Basic working : Note: now NodeMCU has built in DHT function so same can be used directly, Arduino also has one built in function
  • 12. 5. ThingSpeak The open data cloud platform for the Internet of Things ThingSpeak API Quick Start 1. Sign Up for a ThingSpeak account 2. Go to Channels, and click New Channel 3. Complete the channel settings, and click Save Channel. 4. Update your Channel via URL: 5. https://api.thingspeak.com/update?api_key=YOUR_CHANN EL_API_KEY&field1=7 6. View your Channel feed: 7. https://api.thingspeak.com/channels/YOUR_CHANNEL_ID/f eeds.json Video Link: https://www.youtube.com/watch?v=I_Jm6Q4z7ig
  • 13. 6. Notify My Android(NMA) platform that allows you to deliver push notifications from virtually any application to your Android device NMA API Quick guide 1. Sign Up for a NMA account 2. Go to Manage API Keys and Generate New Key 3. Key details will appear in Key Description field. 4. Update NMA alerts via URL: conn:send("GET /publicapi/notify?apikey=YOUR API KEY &application=ESP8266&event=XXXX&description=text1%20tex t2%20text3&priority=2rn HTTP/1.1rn")
  • 14. 7. ESPlorer Integrated Development Environment (IDE) for ESP8266 developers • The essential multi-platforms tools for any ESP8266 developer from luatool author’s, including a LUA for NodeMCU and MicroPython. • Download link : • https://github.com/4refr0nt/ESPlorer • http://esp8266.ru/esplorer/#download
  • 15. Code (init.lua) print("Setting up WIFI..") wifi.setmode(wifi.STATION) --modify according your wireless router settings wifi.sta.config("SSID","PASSWORD") wifi.sta.connect() tmr.alarm(1, 1000, 1, function() if wifi.sta.getip()== nil then print("IP unavailable, Waiting...") else tmr.stop(1) print("Config done, IP is "..wifi.sta.getip()) dofile("dht11.lua") end end) Source: https://github.com/Parshwadeep/DHT11andESP8266andLuaandThingspeak/blob/master/init.lua Change the RED part in your code
  • 16. --- Get temperature and humidity data and send data to thingspeak.com function sendData() getTemp() -- conection to thingspeak.com print("Sending data to thingspeak.com") conn=net.createConnection(net.TCP, 0) conn:on("receive", function(conn, payload) print(payload) end) -- api.thingspeak.com 184.106.153.149 conn:connect(80,'184.106.153.149') conn:send("GET /update?key=YOUR_KEY&field1="..temp.."&field2="..humi.." HTTP/1.1rn") conn:send("Host: api.thingspeak.comrn") conn:send("Accept: */*rn") conn:send("User-Agent: Mozilla/4.0 (compatible; esp8266 Lua; Windows NT 5.1)rn") conn:send("rn") conn:on("sent",function(conn) print("Closing connection") conn:close() end) conn:on("disconnection", function(conn) print("Got disconnection...") end) end -- send data every X ms to thing speak tmr.alarm(2, 60000, 1, function() sendData() end ) Code (dht11.lua) pin=3 m=0 function getTemp() status,temp,humi,temp_decimial,humi_decimial = dht.read(pin) if( status == dht.OK ) then -- Float firmware using this example print(string.format("DHT Temperature:%d.%02d;Humidity:%d.%02drn",temp,temp_decimial,humi,humi_decimi al)) if (temp >25) then print ("ALERT: Temperature is out of range") if m == 1 then conn=net.createConnection(net.TCP, 0) conn:on("receive", function(conn, payload) print(payload) end) conn:connect(80,"50.116.34.97") conn:send("GET /publicapi/notify?apikey=YOUR_KEY&application=ESP8266&event=TEMP_ALERT&descri ption=Temperature%20is%20more%20than%2025&priority=2rn HTTP/1.1rn") conn:send("Host: notifymyandroid.comrn") conn:send("Accept: */*rn") conn:send("User-Agent: Mozilla/4.0 (compatible; esp8266 Lua; Windows NT 5.1)rn") conn:send("rn") m = 0 else m = 1 end end elseif( status == dht.ERROR_CHECKSUM ) then print( "DHT Checksum error." ); elseif( status == dht.ERROR_TIMEOUT ) then print( "DHT Time out." ); end end Source: https://github.com/Parshwadeep/DHT11andESP8266andLuaandThingspeak/blob/master/dht11.lua Change the RED part in your code
  • 17. Sketch for SW update and working model ESP 8266-01FT232RL DHT11 TXD TXD RXD RXD GND GND GND GPIO 0 Signal +5V+3.3V Multi-Power Supply VCC CH_PD VCC GND USBconnectiontoLaptop 3 pins used 7 pins used 3 pins used Note: use a bread board to get connections in place. B
  • 18. Important for software upload on ESP8266 • FIRST UPLOAD dht11.lua on ESP8266 by clicking on Save to ESP in ESplorer. • NEXT UPLOAD init.lua on ESP8266 by clicking on Save to ESP in ESplorer. • Wait for 1-2 min after upload. The setup should work and updated data points available on Thingspeak channel and alerts on Notify My Android as per distance monitored.
  • 19. Sketch for post software update on ESP8266 ESP 8266-01 DHT11 GND GND GPIO 0 Signal(S) +5V+3.3V Multi-Power Supply VCC CH_PD VCC GND 4 pins used 3 pins used C
  • 20. Tracking sensor data on ThingSpeak Alerts on mobile with NMA app
  • 21. In a Nutshell • Get ESP8266 upgraded with NodeMCU firmware with help of UART (Sketch A) • Open accounts on Thingspeak and Notify My Android App and get the API keys to be used in code • Connect DHT11 to ESP8266 and upload the code on ESP8266 using ESPlorer (Sketch B) • Check the working of init.lua on serial monitor: • Check Charts on Thingspeak • Check condition of Mobile Alert when temperature is above a predefined value. • Remove UART connections and check standalone working of ESP8266 and DHT11 (Sketch C)
  • 22. Next Steps • Get the things working on circuit board with minimal size • Implement it in real server room/other environment
  • 23. END

Editor's Notes

  1. https://en.wikipedia.org/wiki/ESP8266