In this project we are going to interface DHT22 sensor to Raspberry Pi. In this project, we are going to explain you about how we can get sensor data in cloud. Here we are using Thingspeak as a cloud for getting sensor data.
Software Requireda) Raspbian OS: This is the recommended OS for Raspberry Pi. You can also installed other OS from third party. Raspbian OS is Debian based OS. We can install it from NOOBS installer. You can download here
b) Python idle: This is the software we get in Raspbian OS. For this project we have used Python script.
c) Putty: We are using Putty for remote access of Raspberry Pi. You can Download here.
d) Win32DiskImager: This software is used to burn Raspbian Os on SD Card. you can download here.
e) SDFormatter: This software is used to format memory card. you can download here.
Component Used:- Raspberry Pi
- DHT22 sensor
This is the latest version of Raspberry Pi. In this we have inbuilt Bluetooth and Wi-Fi, unlike previously we have to use Wi-Fi dongle in one of its USB ports. There are total 40 pins in RPI3. Of the 40 pins, 26 are GPIO pins and the others are power or ground pins (plus two ID EEPROM pins.) There are 4 USB port and 1 Ethernet slot, one HDMI port, 1 audio output port and 1 micro USB port and also many other things you can see the diagram on right side. And also we have one micro SD card slot wherein we have to installed the recommended Operating System on micro SD card. There are two ways to interact with your Raspberry Pi. Either you can interact directly through HDMI port by connecting HDMI to VGA cable, and keyboard and mouse or else you can interact from any system through SSH.
DHT22 sensorDHT22 capacitive humidity sensing digital temperature and humidity module is one that contains the compound has been calibrated digital signal output of the temperature and humidity sensors. Application of a dedicated digital modules collection technology and the temperature and humidity sensing technology, to ensure that the product has high reliability and excellent long-term stability.
Thingspeak WorkingSo till now you got the software and hardware required in this project. So now it's time for Thingspeak. So what is Thingspeak: ThingSpeak is an open source Internet of Things (IoT) application and API to store and retrieve data from things using the HTTP protocol over the Internet or via a Local Area Network.
So for getting the graph and sensor data in Thingspeak first you have to create an account in Thingspeak. After creating the account now just sign in the account. Now you need to create a channel so click on New Channels shown in above figure. Now give name to your channel and fill some of the things like description and field1 and field2. We can make up to 8 field for a single channel. Here we need only 2 channels as we are getting temperature and humidity from DHT22 sensor.
Now after creating the channel you need to go to API Keys and get the key of that channel this key you will use in your Python script. If you have any doubt feel free to comment us below so finally if all things will go well.
Definitely you will enjoy this project.
You can also mail us on info@deligence.com and if you want to learn more about these type of project then feel free to visit our YouTube channel link.
Comments