Wireless Arduino thermometer with data logger

There is a bunch of stuff in my closet, so it requires only time and appropriate mood to build some hardware device. And there is a summer around and weather is rather hot, so it’s not a surprising idea to build a thermometer.
DS1820 is a great thermometer and I started with it, but I have a spare HDPM01 barometer module with built-in thermometer, so let’s use it.
rfm-hdpm01-pinout
There is HP03 library found in Arduino forum. Following sketch used to test this hardware module:

HP03 library was patched to redefine TONE_PIN to 8’th digital pin because 11’th pin will be needed for SPI. There is no HDPM01 model in Fritzing editor but anyway hardware looks like this image:
HDPM01

Data logger functionality

Most convenient way to store megabytes of information on Arduino is to dump it to SD Card. SD Cards uses 3.3V levels and doesn’t claim to be 5V tolerant, so there are resistor based voltage divider for all 3 pins with Arduino -> SD Card data direction. Schematics looks like that:
sd_card
Sketch to test SD Card connectivity and compatibility:

Real time clock

What the point to log the data without timestamps? Good question, I doesn’t know answer either. So we need to attach RTC like DS1307 for example.
ds1307
Sketch to set time and test RTC:

Cut the wires

Besides strange barometer module I have couple of NRF24L01 radio modules.
20120208135133557
Fritzing schematics with pin mapping memo:
nrf24l01
NRF24L01 module have nice ACK feature that provides possibility to passively listen broadcast and send data only as response to request. Sketch to send some data to receiver in ACK payload:

Put all pieces together

Full sketch that logs temperature and pressure with timestamps on SD Card and respond with currently measured values on wireless requests can be found on github.

Facebooktwittergoogle_plusredditlinkedin