Wireless indoor-outdoor thermometer
Build it step by step
0 of 6 doneTest the sensor
Read the DS18B20 on the outdoor Nano with the Serial Monitor.
Fit the antennas
Solder a 17 cm wire to each radio board's antenna pad.
Send a test
Upload the outdoor sketch and check the indoor board receives a number.
Add the display
Wire the LCD and show the temperature and the min and max.
Test the warning
Switch off the outdoor board for 5 minutes and see the message.
Mount outdoors
Put the outdoor box in the shade away from direct sun.
How do you build a wireless indoor-outdoor thermometer?
An outdoor Nano sends temperature over a cheap 433 MHz link to an indoor display, like a shop-bought weather clock. You need Arduino Nano × 2, 433 MHz RF transmitter and receiver pair, DS18B20 waterproof probe, Resistor 4.7 kΩ, 16x2 LCD with I2C backpack (PCF8574), Battery holder 4 × AA with switch and AA alkaline battery × 4. It takes 6 steps and about 120 minutes.
- Level
- Intermediate
- Time
- About 120 min
- Parts
- 7
Parts list
- Development BoardsBuyArduino Nano × 2
- WirelessBuy
- SensorsBuy
- PassivesBuyResistor 4.7 kΩ × 1
- DisplaysBuy
- PowerBuy
- BatteriesBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| Outdoor: DS18B20 red, black, yellow | Nano 5V, GND, D2, with 4.7 kΩ from D2 to 5V | Outdoor probe |
| Outdoor: 433 MHz transmitter VCC, GND, DATA | Nano 5V, GND, D12 | Radio |
| Outdoor: 17 cm wire on the transmitter ANT pad | Straight wire | Quarter-wave antenna |
| Outdoor: 4 AA holder | Nano VIN and GND | About 6 V supply |
| Indoor: 433 MHz receiver VCC, GND, DATA | Nano 5V, GND, D11 | Radio |
| Indoor: 17 cm wire on the receiver ANT pad | Straight wire | Quarter-wave antenna |
| Indoor: LCD SDA, SCL, VCC, GND | Nano A4, A5, 5V, GND | I2C display |
| Indoor: USB cable | Indoor Nano | Power |
Code
Arduino IDE, board "Arduino Nano" (processor ATmega328P, or ATmega328P (Old Bootloader) for clones). Install "RadioHead" and, for the outdoor board, "OneWire" and "DallasTemperature"; the indoor board also needs "LiquidCrystal I2C". Cut each antenna to 17 cm (a quarter wave at 433 MHz) and keep it straight and away from metal. The outdoor Nano runs from four AA cells through its VIN pin; fresh cells give about 6.4 V and it keeps running until about 5.8 V. Put the transmitter in a dry box and bring the probe out through a cable gland. Range through walls is typically 20 to 50 m.
Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
// ---- Outdoor sketch (Nano with the transmitter) ----
#include <RH_ASK.h>
#include <SPI.h>
#include <OneWire.h>
#include <DallasTemperature.h>
RH_ASK driver(2000, 11, 12, 10); // speed, rx pin, tx pin, ptt pin
OneWire oneWire(2);
DallasTemperature sensors(&oneWire);
void setup() { driver.init(); sensors.begin(); }
void loop() {
sensors.requestTemperatures();
float t = sensors.getTempCByIndex(0);
char msg[16];
dtostrf(t, 4, 1, msg); // for example " 23.4"
driver.send((uint8_t*)msg, strlen(msg));
driver.waitPacketSent();
delay(60000); // once a minute
}
/* ---- Indoor sketch (Nano with the receiver and LCD) ----
#include <RH_ASK.h>
#include <SPI.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
RH_ASK driver(2000, 11, 12, 10);
LiquidCrystal_I2C lcd(0x27, 16, 2);
float minT = 99, maxT = -99;
unsigned long lastRx = 0;
void setup() { driver.init(); lcd.init(); lcd.backlight(); lcd.print("Waiting..."); }
void loop() {
uint8_t buf[16]; uint8_t len = sizeof(buf);
if (driver.recv(buf, &len)) { // RadioHead checks the checksum for us
buf[len] = 0;
float t = atof((char*)buf);
lastRx = millis();
minT = min(minT, t); maxT = max(maxT, t);
lcd.clear();
lcd.setCursor(0, 0); lcd.print("Out "); lcd.print(t, 1); lcd.print(" C");
lcd.setCursor(0, 1); lcd.print("L"); lcd.print(minT, 0); lcd.print(" H"); lcd.print(maxT, 0);
}
if (lastRx && millis() - lastRx > 300000UL) { lcd.setCursor(0, 1); lcd.print("No signal 5 min "); }
}
*/Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Boards a few metres apart | Temperature shown within a minute |
| Outdoor probe in warm hand | Reading rises on the next packet |
| Outdoor board off | No signal message after 5 minutes |
| Min and max | Update as the day goes on |
If it does not work
Nothing received
Check the data pins match (TX on D12, RX on D11) and the antennas.
Garbage numbers
RadioHead should reject bad packets. Check the baud match and keep the antenna clear.
Reads -127
DS18B20 not found. Check the pull-up.
Short range
Fit the antennas straight and move away from metal and switching supplies.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the wireless indoor-outdoor thermometer?
Arduino Nano × 2, 433 MHz RF transmitter and receiver pair, DS18B20 waterproof probe, Resistor 4.7 kΩ, 16x2 LCD with I2C backpack (PCF8574), Battery holder 4 × AA with switch and AA alkaline battery × 4.
How long does the wireless indoor-outdoor thermometer take to build?
About 120 minutes for a intermediate maker, in 6 steps.
How do I know the wireless indoor-outdoor thermometer works?
Boards a few metres apart: Temperature shown within a minute. Outdoor probe in warm hand: Reading rises on the next packet. Outdoor board off: No signal message after 5 minutes.
Nothing received: what should I check?
Check the data pins match (TX on D12, RX on D11) and the antennas.
Garbage numbers: what should I check?
RadioHead should reject bad packets. Check the baud match and keep the antenna clear.
Reads -127: what should I check?
DS18B20 not found. Check the pull-up.
Short range: what should I check?
Fit the antennas straight and move away from metal and switching supplies.
