EE 476: Laboratory 6

Digital Thermometer with fan


You will build a digital thermometer which displays temperature on a LCD display and controls a fan with user-selectable turn-on temperature.


The LM34 temperature sensor produces a voltage output of 10 mV/degree F. You will need to perfrom an analog-to-digital conversion using the mcu to read the voltage. There is some code to show you how to set up the ADC. For optimum accuracy, you will need to amplifiy the output of the LM34 by a factor of 2 (using an LMC7111 opamp) before feeding it into the A/D converter. Filtering the opamp output may lower spike noise. Use the scope to decide if you need a filter. The most accurate way to use the ADC requires that you use the internal voltage reference. For each different mcu that you use, you will need to measure Aref and use the measured value in your code.

You will need to drive a fan from the mcu. Fans usually have magnetic motors which can cause nasty inductive spikes to wipe out the transistors in the mcu port. The circuit shown in one of last year's final projects is fairly safe. The diode placed across the motor shorts out spikes when the motor is turned off.


Write a program and construct a circuit which will

You will demo all the features above to your TA.

Your written lab report should include:

Copyright Cornell University Feb 2002