Saturday, November 29, 2014

AVR Temperature/Humidity Logger

[Better documentation and new firmware over at]

This is my latest project, a small low-power climate logger. I finally got around to assemble the case & electronics, now I can finally present it to you.

The main electrical components are an AtMega88 in a TQFP package, a HYT939 temperature and humidity sensor ,a 24AA1025 1M I²C EEPROM and a DS1337 RTC.

The PCB and case were both designed in EAGLE, the files are available in the download below.
The Atmega was programmed in C, the code is also available below.
Here is another video of the final product working:
The data is first saved to a 128byte buffer, then it is saved to a page in the EEPROM. Each page first has 5 bytes containing the time of the first measurement, the rest are 41 readings, each 3-byte reading contains the most significant 12bits of the 14bit raw sensor data for each temperature and humidity.
The aquired data can be exported via standart UART/TTL at 9600 baud. I chose a RCA connector because it was the best that I could find. To receive the data, I wrote a small windows application that outputs a .csv file.

Average current when display inactive: ~ 60µA
Resolution: 0.04°C /  0.025%rH
Memory: 292 days woth of data (41984 data points at an interval of 10 minutes)
Power source: 4 rechargeable AA batteries (2700mAh)

220'000 µF supercapacitor as backup for the DS1337
automatic data saving on power loss (220µF buffer capacitor)
Easily expandable menu implementation
Super Sexy wooden case with sliding battery door
The PCB and case were milled on my ShapeOko, here is a timelapse of the R1 board and a second case being made:
The design files and software are available here:

Here are some more pictures of the project:

(This ratsnest of wires was acutally enough to hold the PCB in place)


  1. I know this is a few years after your hard work but I have had great fun building this and adapting to suit a cheaper temperature/humidity sensor so many thanks for putting your project on line.

    I have a long term goal to add some form of data access via the menu system so you could look at past records without having to transmit to a PC. This will be tricky for me as I'm not proficient at coding!

    Again - many thanks.

    1. Hi Andy, I just found your comment by chance looking through my older posts. You're very welcome, I love seeing other people adopt my projects. Did you by any chance share some details/pictures of your device?