Past projects time – Digital thermometer

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

P1060626 [1600x1200]

Motivation

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 🙂

Description

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.

Schematic

digitalThermometerSch

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

Code for this project is available at my Github: https://github.com/Lukaszm94/DigitalThermometer . 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:

P1060630

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) 😉

Summary

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 lukemeyer.me).

Electric mountainboard – post #3 Update

I managed to improve power transmission by using sprockets with already added hubs. I just had to make two threaded holes in hubs and modify motors’ shafts to make flat surfaces on them.

P1060852

Another thing that I did is motors’ temperatures monitoring – I had some concerns about motors’ overheating so I added LM35 thermometer to each motor and quickly built board with 2×16 LCD, ATmega328P (on Arduino Pro Mini clone board) and a 7805 voltage regulator.

P1060855

I also rerouted the wires a bit since they were quite messy (they still are, but slightly less 😉 ).

Tests showed that my mechanical solution works OK – no sprocket slip on motor’s shaft. Temperature monitor also passed the test – I noticed that both motors have the same temperature (+/- 2 C) – I was worried that one motor may get hotter than the other because I changed bearings in one of them. While riding, motor’s temperature is about 6-10C higher than ambient temperature. When I stop and no airflow occurs motor temperature is higher, around 15C. No big deal here.

A few more photos of the board:

P1060857 P1060856 P1060858

Right now I focus my efforts on building case for batteries and designing electronics (power – IGBTs, sensing (temperatures, currents, voltages) and displaying data). I encountered problems with 128×64 graphical LCD I took out of HMI control panel – I believe it’s some kind of wiring error (I don’t know which type of pinout it has).