Past projects time – Digital thermometer

Hi, today I want to describe a project that I did in February 2014:

P1060626 [1600x1200]


To measure outside temperature I used simple battery-powered thermometer. But as you can guess after some time the battery died and I decided to build a new thermometer from scratch. You may ask why I didn’t simply buy a new battery. I guess it was just too simple.

As usually, for a few weeks I postponed starting the project and one day I decided that it’s high time I did it and said to myself that I wouldn’t go to sleep until the project was finished. So I started at around 18.30 and finished at 4.45 🙂


As temperature sensor I used digital DS18B20. ATtiny13 MCU controls the thermometer via 1Wire interface (implemented in software). To display the data I created 7-segment displays using 5mm LEDs (one segment consists of two LEDs). To drive the displays I used 3 daisy-chained 74HC595 shift registers. The whole thing is powered by 12V wall adapter. I used 7805 linear voltage regulator to get 5V, but as it turned out the regulator was getting a bit too warm (it would work, but leaving it unattended for a few days meant that it should be realiable). To lessen the heat generated on 7805 I installed small step-down comverter between 12V and 7805’s input and adjusted it to be around 7V. It’s been working very well for around 18 months.



You can notice one thing – I used no capacitors (the only ones are built into 12V PS and step-down converter). When I was building this project I forgot about them and it worked flawelessly for a long time.


Code for this project is available at my Github: . It definitely is ugly – some functions and variables have Polish names, I should probably do some refactoring, but since this is a finished project and I have no intentions of modifying it, I won’t.

Building it

To make the whole thing a bit more fun I recorded the process and made a timelapse:

As you can see the project was build on perfboard to speed up the process. Writing code at around 2 a.m. was pretty challenging (especially after a few hours of soldering…). I encountered some problems with decoding data from DS18B20 when temperature was below zero (two’s complement), but I didn’t give up a the project was fnished 🙂

How the back side of PCB looks like:


I tried to lay the wires as tidy as I could, so it took me a little bit more than normal “prototyping” speed mode (which usually results in a quite big mess) 😉


I really like this project – although it was a quick build, the thermometer’s been working for 18 months (recently I only had to change one burnt LED and solder new wires to the thermometer). The no-sleep-until-finished idea was pretty cool (at least that’s how I perceive it now, back when I was debugging my code at 3 a.m. I might have different opinion 😉 ).

I hope you liked my project. If you have any questions or remarks please leave a comment below or write me an e-mail (luke at

Leave a Reply

Your email address will not be published. Required fields are marked *