4. Temperature and humidity sensor module

4. Temperature and humidity sensor module

LM315 Temperature and Humidity Module

  • Humidity Range: 20-90% RH 
  • Humidity Accuracy: ±5% RH 
  • Temperature Range: 0-50 °C 
  • Temperature Accuracy: ±2% °C 
  • Operating Voltage: 3V to 5.5V

The DHT11 humidity and temperature sensor appears to be an easy to add humidity and temperature data. Such a device will fit into the current ideas of a ‘sensor net’ which include home environmental monitoring (internal and external) as well as a garden monitoring systems. Given the dual information in a single chip and use of a single data line then is may included on the base board for all sensors.Will need to look into sourcing the chip seperatly

 

DHT11

TempHum

Libraries:

Current Code

#include <dht.h>

dht DHT;

#define DHT11_PIN 7

void setup(){
Serial.begin(9600);
}

void loop()
{
int chk = DHT.read11(DHT11_PIN);
Serial.print(“Temperature = “);
Serial.println(DHT.temperature);
Serial.print(“Humidity = “);
Serial.println(DHT.humidity);
delay(2000);
}

Future:

Simple code with interface to LCD;

#include <dht.h>
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

dht DHT;

#define DHT11_PIN 7

void setup(){
lcd.begin(16, 2);
}

void loop()
{
int chk = DHT.read11(DHT11_PIN);
lcd.setCursor(0,0);
lcd.print(“Temp: “);
lcd.print(DHT.temperature);
lcd.print((char)223);
lcd.print(“C”);
lcd.setCursor(0,1);
lcd.print(“Humidity: “);
lcd.print(DHT.humidity);
lcd.print(“%”);
delay(1000);
}

 

Notes:

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: