Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ESP8266 Home Automation Projects

You're reading from  ESP8266 Home Automation Projects

Product type Book
Published in Nov 2017
Publisher Packt
ISBN-13 9781787282629
Pages 196 pages
Edition 1st Edition
Languages
Authors (2):
Catalin Batrinu Catalin Batrinu
Profile icon Catalin Batrinu
Constantin Tambrea Constantin Tambrea
Profile icon Constantin Tambrea
View More author details
Toc

Temperature sensor


There are a lot of temperature sensors that can be used, but for this project we will use a very common one, the DTH22. It can measure temperature and humidity.

The following are the DHT22 characteristics:

  • Low cost
  • 3 to 5V power and I/O
  • 5mA max current used during conversion (while requesting data)
  • Good for 0-100% humidity readings with 2-5% accuracy
  • Good for -40 to 125°C temperature readings ±0.5°C accuracy
  • No more than 0.5 Hz sampling rate (once every two seconds)
  • Body size 15.1mm x 25mm x 7.7mm
  • 4 pins with 0.1" spacing

DHT22 can be found as a separate sensor or as a breakout. It is preferrable to buy the breakout version since it has also the pull-up 4k7 resistor and a capacitor. If you prefer the sensor alone this is the pinout:

DHT22 pinout

Here:

  • VCC: can be between 3V3 and 5V
  • GND: is the ground
  • DATA: is the data pin

Don't forget to add a 4K7 pull-up resistor between the DATA and VCC pin. For the connection with a gas furnance or other heating element, a relay will be added on the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}