Multifunction Digital Thermometer

42,726

122

49

Posted

Introduction: Multifunction Digital Thermometer

This instructable will show you how to create a multifunction platform with a thermometer, chronograph (count up timer), count down timer, and light display. It is also intended to be a platform for other analog sensors or any other functions you can think of.

Step 1: Gather Materials

To build the digital thermometer you will need:
- Wire
- Altoids tin
- Breadboard
- Variable Resistor
- Dual-digit Common Anode 7 Segment Display
- 4 2N2222 Transistors
- 2 220 k ohm Resistors
- Thermistor(preferably linear output)
- 2 Momentary Push Buttons
- 2 2.2 k ohm Resistors
- 5 volt Regulator
- 2 Leveling Capacitors for the Power Supply (I used 220 uF)
- Power Switch
- ATMEGA168 Microcontroller
- 16 MHz Crystal
- 1 k ohm Resistor
- Printable Label (Larger then the front of the Altoids tin)
- Sockets (any you think you may need)

Needed tools:
- Soldering iron
- Desoldering Pump (optional)
- Wire Stripper (optional)
- Wire Cutters

Step 2: Start Building

For this step, use the attached schematic (word or AutoCAD) to build the circuit. I always find it helpful to first build it on a solderless breadboard. This makes it easy to fix any problems that arise before you want to pull your hair out :)

Before you start soldering it is probably best to first cut the breadboard to the final size and arrange all of the larger parts on the board (as seen in the 2nd image below). Don't forget to allow room for the buttons above the board and a power button off to the side.

It should be noted that in the schematic that R5 is a comparison resistor for the thermistor, and it might be included in your thermistor, so you should check your data sheet for how to implement your specific thermistor.

Step 3: Calibrate the Thermistor

To calibrate the thermistor, you need to take readings from the microcontroller at different temperatures (the more the better).

I have attached the hex file to be loaded into the microcontroller's flash to display the analog input from the thermistor. If it reads with a line in the output, it is because the thermistor input is too high to be displayed on two digits (example the output -5 could be from 155 to 105).

The points should then be plotted in excel as a scatter plot, not connected by lines (for an example see my temperature readings attached below).
You then need to right click the data points on the graph and click "Add Trendline".
Next choose the type of equation that is closest to the apparent line created by the sample points (I used a linear equation because my thermistor is made to have a linear output). Next click the "options" tab and select "display equation on chart" and click OK. This equation should be entered in the place of the formula in the source code, where x is "analogRead(tempPin)". The spot to do this is indicated in the source code(found in the intro).

The editor I used for the source code is Arduino 0007. The program also creates the hex files in the applet sub folder of the project when you click the compile button in the program. These hex files can then be loaded into the flash of the microcontroller using any method(such as the AVRIsp mkII).

Step 4: Make the Case

To Prepare the case to hold the electronics, two things need to be done.

The first is to cut the holes for the LED display, variable resistor, two momentary pushbuttons and the power switch. I did this by first inserting the finished electronics into the tin. Next, keeping the tin in the exact same place, I used a laser as a guide to mark the edges of the part, then closing the lid, scratched along the laser line marking where to cut . I then drilled out any corners(such as the display hole). Finally, I used an exacto knife to cut along the lines. Don't worry about deforming the metal around the edges too much, it can easily be flattened later by putting a block of wood under one side, and hitting the edge lightly with a hammer.

The second thing that needs to be done is line the bottom with cardboard (preferably thin) to insulate the electronics from shorting on the metal bottom. This is easily done by pressing the Altoids case on the cardboard so it leaves a depression along the edges. Now just cut along the depression and insert it in the bottom of the tin (see the lase photo).

Step 5: Attach the Label

I created the label by downloading a template for the printable labels I bought. Next was one of the hardest parts for me, making a decent looking design. I used clip art and basic shapes to create it. I have attached the design so you can use or modify it.

Next, print it out and cut along the outer lines (make sure you cut the black outlines right off). Now attach the label. I found it useful to hold it up to a light while doing this, it helps to see where the holes are to line it up. Finally, cut diagonal lines across the holes and fold the flaps under(see picture below) and finish installing the buttons.

I would also love to see pictures of the thermometers you made, or even the labels if you didn't make the thermometer =)

Share

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • First Time Author Contest 2018

    First Time Author Contest 2018
  • Paper Contest 2018

    Paper Contest 2018
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

49 Comments

Can i get an exact parts list? Im buying from Sparkfun. For example, I wanted to know the exact thermistor i need. Is it a10k thermistor or a LM series temperature sensor?

One word ingenious!!!
I misread the title thought it read "malfunctioning" thermometer.

do you have an instructable on how to make this but without a thermometer? I'm new to all of this and I'm wanting to learn how to make these for pinhole camera I make.

I like the treatment you did on the Altoids box. I've been looking over Arduino projects, and your Altoids box treatment looks good.

another noob question. The comparison resistor, if I have a 10k thermistor would that imply at 10k comparison resistor? I have the datasheet, but I guess I'm being dim. Thanks for the information.

If the thermistor is 10k at room temp, then yes. You want to choose the comparison resistor so that it roughly equals the average of the varying resistor (it creates a 'voltage divider', if you want to look up how it works). This is because the voltage at the measurement point is in the middle of the measurement range, allowing the most sensitivity.

I supposed that you had used LM35 as the thermal sensor but i wonder what is the need for variable resistor? And according to the schematic the 7-segment was connected as in common-anode...but u mentioned it is common-cathode so i wonder if u can explain it? Lastly i wonder will it be a problem if i programmed atmega168 using 4Mhz crystal? (The programmer that i use is the following link: http://electronics-diy.com/avr_programmer.php )
thanks :)

I also forgot to mention that the program will need to be changed and recompiled depending on that type of LED configuration you use(it is currently set for common anode).

i think that you are using arduino to program atmega168 through the board. may i know the hex file that i should burn my chip is "calibration.hex" ? Can i compile the code through the arduino software and download the hex file through another hardware programmer? thx again ; )