Tuesday, 12 September 2017

Arduino ESP8266 and DHT11 WIFI Temperature sensor controller

IMPORTANT COMPONENTS :


1.ESP8266




*Vcc for esp8266 is always 3.3v.(Module will burn if 5v is provided).
*CH_PD and VCC must be shorted and provided with 3.3v.
*Recommended to use seperate 3.3v for long time usage instead of connecting to arduino board since it drains more current supply which causes arduino to blow off.
*As soon as 3.3v is given, a red LED will power up.
*Connect Tx of esp8266 to Rx of arduino board and vice versa.
*Blue LED will blink when it is connected to the internet.

2.DHT11 SENSOR:

*The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a digital signal on the data pin (no analog input pins needed). Its fairly simple to use, but requires careful timing to grab data. The only real downside of this sensor is you can only get new data from it once every 2 seconds, so when using our library, sensor readings can be up to 2 seconds old.

* Use pull up resistor when connecting with arduino, if you dont use you wont get any data

out of the data line.(Pull-up resistors are used in electronic logic circuits to ensure that inputs to the arduino settle at expected logic levels if external devices are disconnected or high-impedance. 'Just because you have nothing at all connected to an input pin doesn't mean it is a logical zero.')

The overall components required are as follows:
Thingspeak:

*Create account using  this link: https://thingspeak.com/
*Make a channel with two fields.

Connections:



Logical level shifters/voltage dividers are made using two resistors of 220 ohms and 470 ohms so that voltage more than 3.3v passes through the wifi module. The pull up resistor is 4.7k pull up resistor.

Using DH11 sensor:

*Begin by downloading the DHT library from our github repository. To download, click the DOWNLOADS button in the top right corner. Rename the uncompressed folder DHT and make sure that it contains the dht.cpp file and others. Then drag the DHT folder into the arduinosketchfolder/libraries/ folder. You may have to create that libraries sub-folder if it doesnt exist. Restart the IDE .As of version 1.3.0 of the DHT library you will also need to install the Adafruit_Sensor library, which can be done by clicking sketch->include library->manage library->Adafruit_sensor.




No comments:

Post a Comment