EE 476: Laboratory 6

Digital Thermometer with fan

Introduction.

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


Procedure:

We will be changing MCUs for this lab. You will use the Mega163 because it has built-in analog-to-digital converters (ADC). Your TA has put the Mega163 on an STK200 development board.

Things to watch for:

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.

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.


Assignment

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