02-10-2012, 05:09 PM
Design and Construction of a Digital Thermometer
Design and Construction.doc (Size: 309 KB / Downloads: 98)
Introduction
This project is to design and build a digital thermometer. The circuit uses both analogue and digital components, so that both design skills will be required. The finished product is a thermometer which will show ambient temperature in degrees centigrade on a two digit LED display.
You should familiarise yourself with all sections of this document. Then, following your design strategy, use the detailed notes while you are designing. Remember test, test, TEST. Test every sub-circuit as much as you can whenever you can. In this way you should build with fewest problems.
The Sensor.
We will use a temperature sensor called a thermistor. A thermistor is a resister whose resistance varies with temperature (generally it decreases with temperature). Unfortunately, the variation is not linear rather, it is exponential. In order to get a linear variation with temperature some extra circuitry is required. We will use a simple voltage divider. As can be seen on the circuit diagram, the thermistor is the upper part of a voltage divider. By doing this some of the non linearity of the device is alleviated. Over the range of temperatures we will need (0 - 40 C) the output VT is close enough to being linear for our purposes. However, VT is still not directly proportional to centigrade because it is not 0 V when the temperature is 0, there is an offset voltage. The offset can be calculated from the data for the thermistor. The second voltage divider is designed to produce a reference voltage VR which is the value of VT for 0 C. Thus we end up with a circuit which has the voltage difference VT-VR proportional to temperature.
The A/D converter
A/D converters come in a variety of forms. We are going to use a design called the single slope integrating converter. Its principle is as follows:
Imagine we can create a voltage which increases linearly with time (called a voltage ramp). It would start at 0 and increase to some limit with constant slope. The graph of voltage with time is a straight line. Such a voltage is plotted in the graph below. If now we could compare the input signal we wish to convert (VT) with this ramping voltage we could detect when the two are equal. The time it takes the ramp voltage to get to the level of the input signal is directly proportional to the value of the input. By arranging a digital timer to start when the ramp is at zero and finish when the ramp equals the level of the input, the timer count will end up at a digital value proportional to the input signal.
The display
The A/D converter produces an output which is two binary coded decimal digits presented on eight output lines, four for each digit. The BCD values have to be converted into segment drives in order to drive the 7 segment display. This is done using a standard BCD to 7 segment decoder driver chip. The design is very simple, The BCD outputs of the counter are input to the decoder. The outputs of the decoders are connected to the appropriate segment drives. Ballast resisters are needed in the segment drives to stop excess current being taken by the LEDs.
The Controller
The system needs to be controlled. It is clear that the ramp generator and counter need to be zeroed before a measurement can be taken. In the first instance our thermometer will be a ‘one shot’. That is it will take a measurement when a button is pressed. A more sophisticated system would take measurements continuously so that any changes in temperature would be registered immediately. Details on how to add this option are given in a separate handout.
The counter
The counter needs to counts clock pulses while the ramp voltage lies between VR and VT. The final value on the counter should be the number of degrees centigrade above freezing. The range of the thermometer is to be 0 to 40 C. Thus we need a counter capable of counting from 0 to 40. We could use a simple eight bit binary counter. This can count from 0 to 255, quite enough for our purposes. However, getting this binary number displayed is not so simple we would need to convert it into two decimal digits before we can send it to an LED display. (It is quite possible that such a chip exists, let me know if you find one!). Since BCD to 7 segment decoder drivers are readily available, what seems simpler is to use a decade counter which naturally outputs in BCD. We need to design a two decade counter, since we need two digits i.e. 0 - 99. The ‘162 chip (either the 74HC162 or the 40162) is a synchronous decade counter. Hence we can simply produce a 0 - 99 counter by chaining two ‘162s together.