Wifi enabled temperature and humidity sensor and client sending email notifications
description
This project was developed as part of a research to build a temperature automation system for our charming but cold Auckland home. Relying on electric oil heaters as sole source of heating in children's room, the aim was to monitor continuously the temperature at night and to turn on or off the heater according to the measured temperature.The project described in this post does the first half and mode demanding part of the job which is log a temperature, broadcast it to the web using the MQTT protocol through the house's wifi.
A small and cheap ESP8266 Wifi board programmes using the Arduino language reads temperature and humidity through an DHT22 sensor and broadcasts the values to an MQTT server at set intervals.
A custom client written in the java based Processing 3 and running on a computer located anywhere (Macbook in this case) displays the readings and sends notifications by email when the temperature drops or rises past the set point.
A second part of the project will consist of a piece of hardware similar to the temperature sensor but listening to the MQTT topic and triggering a 220V 10A relay according to the temperature value. This is to be covered in a different post.
hardware
Bill of material :
ESP8266DHT11 or 22 temperature and humidity sensor
4.7kOhm resistor
power module 5V to 3.3V
power adapter 220V to 5V
breadboard and jumper wires
for flashing : USB adapter for ESP8266
board schematic
code arduino:
code processing:
Sourcing components
Components used for the project:Procured in New Zealand through http://breadboards.co.nz
total cost under 15 NZD, excluding 5V power supplied (reused a spare phone charger and USB cable)
Further developments
hardware : use temp sensor ds18b20 - cheaphardware : source readily assembled boards with DHT11, power supply and slot for connecting ESP2866 link
hardware : create a similar module with a relay (220V 10A) to control a heater using readily available modules like this one link
Credits
Hardware inspired for project example on http://breadboards.co.nz Thanks for their site and selection of products.Processing : https://processing.org/reference/
Arduino : https://www.arduino.cc/reference/en
Comments
Post a Comment