TEMPREATURE AND HUMIDITY TRACKING
by TECHATRONIC in Circuits > Arduino
12 Views, 0 Favorites, 0 Comments
TEMPREATURE AND HUMIDITY TRACKING
We all have seen various thermostats and thermometer both digital and simple one but today we are going to make such a thermometer with Arduino and a simple temperature and humidity sensor available easily in the market. It is very easy to build and use also it has humidity sensor involved in it. It is very sensitive to slightly change in temperature and humidity in our surroundings.
Various small thermostats and digital thermometers are available in the market but they cannot calibrate or cannot be adjusted according to our wish so this leads to problem so as to do it in an easier way we will make our own digital thermometer and humidity tracker.
DESCRIPTION
Here we are going to use few basic components required for every project and for today’s one DHT11 temperature and humidity sensor. It is a sensor which is covered by a plastic covering so much of the details about its internal schematic rather than this only that it has a thermostat and a humidity sensing component.
Sensor has four pins and its module has 3 pins which are VCC, GND and DATA.
FEATURES AND APPLICATIONS
- Sensitivity is very precise
- Easy to use
- Single wire data output
- Low price
- Can be used in small projects using temperature and humidity
SENSOR SPECIFICATIONS
COMPONENTS NEEDED
- Any microcontroller preferably Arduino Uno for beginners.
- A DHT11 sensor
- A breadboard
- Jumper wires
- I2C 16x2 LCD
CIRCUIT DIAGRAM
First take the power lines onto the bread board from microcontroller VCC/5v-->+ line and GND--> - line.
Then connect the sensor on to the bread board and connect power to the sensor from powerlines using jumper wires.
Now connect DATA PIN OF SENSOR TO MICROCONTROLLER DIGITAL PIN 2.
Also connect I2C lcd to Arduino as shown above for output display
CODE
//put this code in the ide of arduino from this line
#include <SimpleDHT.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
// for DHT11,
// VCC: 5V or 3V
// GND: GND
// DATA: 2
int pinDHT11 = 2;
SimpleDHT11 dht11(pinDHT11);
void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
Serial.println("TEMPERATURE AND HUMIDITY");
lcd.print("TEMP & HUMIDITY");
}
void loop()
{
byte temperature = 0;
byte humidity = 0;
int err = SimpleDHTErrSuccess;
if ((err = dht11.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
Serial.print("Read DHT11 failed, err="); Serial.println(err);delay(1000);
return;
}
Serial.print((int)temperature); Serial.print(" *C, ");
Serial.print((int)humidity); Serial.println(" H");
lcd.setCursor(1,1);
lcd.print((int)temperature);
lcd.setCursor(8,1);
lcd.print((int)humidity);
lcd.setCursor(3,1);
lcd.print(" C, ");
lcd.setCursor(10,1);
lcd.print(" H");
// DHT11 sampling rate is 1HZ.
delay(1500);
}
WORKING
As the code starts it initializes the pin to which the sensor sends its data then the microcontroller waits for the data to be received, as soon as the data is received through single wire it then separates the data into temperature and humidity and then it displays it on the screen.
PCB DESIGNING
Now as we have developed our circuit and ordering it. For ordering PCB, I would prefer you NextPCB which is a great website for ordering custom PCB with high quality and precision on time delivery. Ordering PCB online in various sites are a step towards developing our own circuit. NextPCB provides very easy and fast delivery of PCB in different masks and paste with professional look. Also, they send you the picture of your PCB before shipping it to you, now that very exciting….The Gerber File for the PCB is given below. You can simply download the Gerber File and order the PCB from :Gerber Viewer of NextPCB
Go to get your discount: NextPCB
#arduino #arduinouno #arduinoproject #arduinomega #arduinonano #arduino duo