Wireless Indoor & Outdoor Thermometer

49,736

142

42

Posted

Introduction: Wireless Indoor & Outdoor Thermometer

I would like to introduce you to one of my interesting projects. It is a wireless thermometer that measures the indoor and outdoor temperature. The device consists of two parts. One is a transmitter that contains one digital temperature sensor and a transmitter module. A second receiver consisting of an LCD screen, the digital sensor and receiving module.

Step 1: Parts

You need:

1. Two arduinos any version
2. Two DS18B20 digital temperature sensor
4. LCD 16x2
5: RF 433MHz or 315 MHz module

Step 2: Transmitter

Transmitter is very simple. Connect the wires as shown in pictures.

Here is transmitter code:

#include <VirtualWire.h>
#include <OneWire.h>

#include <DallasTemperature.h>

#define ONE_WIRE_BUS 7

OneWire oneWire(ONE_WIRE_BUS);

DallasTemperature sensors(&oneWire);

char msg[6];

void setup() {

sensors.begin();

vw_setup(2000);

vw_set_tx_pin(3);

}

void loop() {

sensors.requestTemperatures();

float temperature = sensors.getTempCByIndex(0);

dtostrf(temperature, 6, 2, msg);

vw_send((uint8_t *)msg, strlen(msg));

vw_wait_tx();

delay(200);

}

Step 3: Receiver

Receiver is a little more complicated than the transmitter. Connect the wires as shown in pictures.

Here is the code for receiver:

//www.facebook.com/njizi.dvizi

#include <LiquidCrystal.h>

#include <VirtualWire.h>

#include <OneWire.h>

#include <DallasTemperature.h>

int i;

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

#define ONE_WIRE_BUS 7

OneWire ourWire(ONE_WIRE_BUS);
DallasTemperature sensors(&ourWire);

void setup(){

lcd.begin(16, 2);

sensors.begin();

vw_setup(2000);

vw_rx_start();

vw_set_rx_pin(11);

}

void loop(){

sensors.requestTemperatures();

lcd.setCursor(0, 1);

lcd.print("Indoor:");

lcd.setCursor(14, 1);

lcd.print(sensors.getTempCByIndex(0));

lcd.setCursor(9, 1);

lcd.print((char)223);

lcd.print("C");

uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;

if( vw_get_message(buf, &buflen) )

{
lcd.setCursor(0, 0);

lcd.print("Outdoor:");

for (i = 0; i < buflen; i++)
{

lcd.write(buf[i]);

}

lcd.setCursor(14, 0);

lcd.print((char)223);

lcd.print("C");

}

}

Step 4: Library

For this project you need three types of libraries. Two for digital sensor and the other for RF module. In the link below have all the files needed for this project.

Share

Recommendations

  • Microcontroller Contest

    Microcontroller Contest
  • Spotless Contest

    Spotless Contest
  • Science of Cooking

    Science of Cooking
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

38 Comments

if you use dht 11 or dht 22 i have code for you :)

hello,

can you please send me the code for dht22?

Thanks

Please help me, how to replace in your script Liquid Crystal library to OLedI2C library?

-------------------------------------------------------

#include <OneWire.h>

#include <DallasTemperature.h>

#include "Wire.h"
#include "OLedI2C.h"

#define ONE_WIRE_BUS 7
OLedI2C LCD;
char line[5];
float val = 0;
// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

void setup()

{
Serial.begin(9600);
// Start up the library
sensors.begin();
Wire.begin();
LCD.init();

}


void loop()
{
sensors.requestTemperatures();
float val = sensors.getTempCByIndex(0) ;
LCD.sendString("Home:",2,0);// now includes the cursor position data (col, row)
dtostrf(val,4,1,line);//Convert the float value to string
LCD.sendString(line,9,0);//Send the string to the display
delay(0);
LCD.sendString("C",14,0);
}

---------------------------------------------------------
Or how to add in this script the data of RF-module ?

user

alarm 80 C led Pin 4

works fine

start with little trouble to connect the right wire's

This are the pics of my circuit, I follow your steps, but it is not clear how you wired the LCD to the circuit.

Also, there is a confuse in the transmitter circuit, because you used two temp sensor (LM335az) on both TX and RX circuit. Can you please check my connection and tell me if I am right or not .

Show me how I connect the temp sensor and the LCD please !

image1.JPGimage2.JPG

what is the parts on the receiver circuit that connected by the yellow wire ?

Also, How you said that you use two aurdino.

I see one on the transmitter and the nano ordain on the receiver ?

I am right or not

PLEASE HELP ME THROUGH IT

part of which is connected to the yellow wire is 10K ohm potentiometer for contrast LCD.if one arduino on the receiver and if the one on the transmitter then it is a total of two

Good job I need your help please on this project