I recently needed a large and visual temperature display. I managed to put this one together using some parts I had around. I ended up with this 7 segment LED display temperature with a Dallas 1-wire temperature sensor. It works pretty well and has already been useful for a batch of home brewed beer I recently made.
This is some build info and the PICAXE code.
The main components are:
- 2 digit 7 segment display with serila interface (Velleman Kit K8063)
- PICAXE 08M microcontroller
- PICAXE experimenter board
- DS18B20 Dallas 1-wire temperature sensor
- 7805 regulator
This is the completed unit, showing 23 degrees C.
The Velleman 2 digit LED kit is quite nice – basically you send data to it using a 2400 baud serial connection. There are some specifics for the protocol, which are mentioned in the kit. You send 5 characters to display a number – the number is sent in 2’s compliment. Check out the Velleman data sheet for details.
The brains of the unit is a PICAXE 08M microcontroller. I had a few of these lying around and they are pretty easy to program and get going. You need a USB to serial interface cable to program the IC. All the tools are available for free on-line, but PICAXE are not open-source. The IC itself only costs £1.50 though, almost the same cost as the PIC microprocessor itself.
There are some easy to use commands such as:
- serout 0,N2400,(13)
This sends out serial data on pin 0 (in this case the number 13), at 2400 baud with 0 parity.
- readtemp 1,b12
This reads the temperature from a DS18B20 sensor on pin 1 and puts the result into register b12.
The .bas code is available here. It was written using the PICAXE programming editor. Its pretty simple – basically reading the temperature, converting to ascii characters and then sending them out on the serial out pin. I have tried to comment the code, so it should be mostly obvious.
There is more information on measuring temperature in this blog post.
The unit is supplied with 12V DC, so I used a 7805 voltage regulator to give me 5V supply for the PICAXE.
Here is a video of the unit in action:
The sensor is removable and just plugs in the side.
The oopened box – showing battery pack (8 x AA batteries = 12V), the 2 digit LED displays, the PICAXE and experimenters board and the 7805 regulator.
The temperature sensor is connected using a stereo jack plug. It is powered with 5V (not using parasitic mode).
Here it is in use, measuring the temperature of a batch of home brewed beer.