Project Overview
Important Note: Don’t do this project unless you want a circuit building challenge. If all you want is a working digital thermometer there are much better designs out there.
This project was an attempt to create a stand alone digital thermometer without using a microcontroller (Arduino or similar). Unfortunately, one of the steps turned out to be impossible without using an arduino anyway, more on that in Steps 3 and 4. This project is a great way to learn about digital and analog electronics and the challenges and benefits of combining the two.
Step-by-Step Instructions
Analog to Digital Converter
Start by wiring and testing the ADC0809CCN Analog to Digital Converter (ADC). Its datasheet and a wiring schematic can be found in files.
There’s not a lot of interesting thinking behind this one, just using the chip for what it's intended.
- We tie ADD A, B and C to GND because (0, 0, 0) is the address for IN0, the one we are using.
- Tying EOC to START causes the chip to convert continuously, starting the next one whenever the previous finishes.
- Outputs 1-8 represent a binary number between 0 and 256. The pin marked 2-8 is the Least Significant Bit (LSB, the ones place), and the 2-1 pin is the Most Significant Bit (MSB, the 128ths place).
- For testing, set: Vref(+) = 5V, and Vref(-) = 0V and run outputs 1-8 to 8 different LEDs (with resistors). Draw IN0 from a variable DC power supply. It can also be helpful to use a debounced pushbutton with a pull up resistor instead of a function generator for more control over the CLK input.
You should be able to vary the voltage from the power supply and see the LEDs count up and down in binary.
7-Segment Display and Drivers
Next, Build the 7-Segment Display by placing the 4 single digits in a row. The two in the middle can be wired through resistors to the SN74LS47 BCD chips per the datasheet. I recommend using the 4116R 1-331 resistor chips for this.
For the right-most digit, connect F, E and A to GND (through resistors). This makes it so that setting pin D = 0V displays ‘C’ and G = 0V displays ‘F’. Indicating which scale we are measuring in.
For the left-most digit, connect B and C together (through resistors) setting this pair to GND makes the ‘1’ for the hundreds place. Finally setting pin G to GND displays a negative sign (‘-’).
Test these by plugging them in and checking that you get the correct symbols, for the two middle digits plug the A-D pins on the BCD chips into Digital Logic Switches and check that they produce the correct symbols.
Binary to BCD: Goal and Issues
BCD stands for Binary Coded Decimal and consists of 4 wires that represent one decimal digit (0-9). This is very different from Binary numbers (0,1) for example: 57 is BCD: 0101 0111 and Binary: 00111001. Since the 7-Segment Display drivers take BCD data and the ADC outputs Binary data we need some sort of converter between the two.
There used to be a chip, the DM74184, that would do this conversion but it is not produced anymore. This is because the modern solution is to just use a general use device like an arduino which removes the need for a dedicated integrated circuit solution. Unfortunately for this project that means we would need to make the conversion from scratch using basic logic gates. If you're interested, the 4-bit converter can be found in files, but the 8-bit converter was too complicated for my implementation, forcing the use of an arduino for this function.
Binary to BCD: Arduino Solution
The goal was to avoid using an arduino in this project, but as discussed in the previous step that proved impossible. To keep the rest of the project in that spirit however, we will only use the arduino for this Binary to BCD conversion before returning to circuit building.
Wire up 8 Arduino pins to the seven segment displays. 4 pins go to the 10s place digit pins A-D, 3 go to the ones place digit pins B-D and one goes to the 100s place “1” that we created specially in step 2. My code is included in files, just change the pin numbers to match your physical layout.
For testing, the arduino should take 6 inputs from Digital Logic Switches. The least significant bit should be connected directly to the ones place A pin. We are ignoring the most significant bit because we are out of room on the arduino and we would only need it for temperatures over 128 degrees anyway. Toggle switches to count through all the positive integers 0 - 127 on the displays.
Finally, once everything is working, move the input wires to the outputs of the ADC, carefully keeping track of the significance of each wire.
Temperature Sensors
Finally, the actual thermometer part! The LM 34 and 35 sensors need both positive and negative reference voltages. Since I was originally planning on powering this with 9V batteries, I used +/- 9V for mine, but any voltage between 5 and 30 should work. If you are using a different voltage you also need to change the resistors you use to have a resistance of Vref / 50 micro Amps. In my case 9V needs a resistance of 180k Ohms. The wiring can be found in the Temperature Sensor schematic.
Test the temperature sensors by measuring their output voltage with a multimeter. They should produce 10 mV per degree F or C, depending on the sensor.
Rectifier
The temperature sensors can output either positive or negative voltages depending on the temperature. Unfortunately our ADC cannot handle negative inputs. To solve this we need to send our signal through a full wave rectifier to make sure it is positive while maintaining its absolute value. Since we also want to display if the temperature is positive or negative, we also use an additional op-amp to compare V_in to GND, turning the ‘-’ on or off on the display.
Build the circuit in the diagram and ensure that both positive and negative V_in lead to a positive v_out and the corresponding indicator on the display.
Final Bits: Regulator and Switch
To put it all together we need a couple more segments. First a double pole double throw switch. Connect one of its middle pins to ground, and the two side pins to the F and C spots in our 7-segment driver from step 2. Connect the other two side pins to the outputs of the two temperature sensors so that the Celsius signal can be read on the middle pin while the display reads ‘C’ and vice versa. We will connect that last, middle pin to the rectifier.
Finally we need to set the reference voltage for the ADC. Connect a LM317 Adjustable Voltage Regulator and a potentiometer as shown in the regulator diagram. Measure the V_out with a multimeter and adjust the potentiometer until it reads about 2.5V. This sets the reference of the ADC so that we get one step of binary for each degree of temperature.