EE 476: Laboratory 5

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. 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 have motors which can cause nasty inductive spikes to wipe out the transistors in the mcu port. The circuit shown below is fairly safe. An optoisolator completely isolates the MCU from the motor. The diode placed across the motor shorts out spikes when the motor is turned off. The pinout of the 4N35 optoisolator and BUZ71 are also shown. The BUZ71 datasheet is here.


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