Closed Loop Temperature Control Circuit with LCD Display

Download Report

Transcript Closed Loop Temperature Control Circuit with LCD Display

Closed Loop
Temperature Control Circuit
with LCD Display
Mike Wooldridge
ECE 4330
Embedded Systems
System Block Diagram
STK500
External
Circuit
LCD
Project Description
•
•
•
•
Voltage divider circuit generates heat from current
Increased Voltage -> Increased Current -> Decreased Rt
Closed loop - Voltage is feedback to the ADC
PWM controls fan speed in an effort to keep the temperature
constant
• Push buttons will select the desired temp
• LCD will display the desired and current temperature
Hardware Design
Vcc
+5V
Rt
STK500
M
PA0
PC7-PC0
R
Q
PD7
LCD
Driver
LCD
Software Design
•
•
•
•
•
•
•
•
Configure the pulse width modulator
Configure the analog-to-digital converter
Calculate the error from the feedback to adjust the duty cycle
Configure the timer interrupt to update the OCR every 100 ms
Set up the switches to select a desired temperature
Output of the PWM determines the fan speed
Set up an output port to drive the LCD
Calculate the actual temperature from the ADC reading and send
this value to the LCD
What I Need to Do
•
•
•
•
•
•
Determine the values I need for R and Rt
Find a LCD and driver compatible with the STK500
Build the circuit and experiment with the input voltage and fan speeds
Learn to set up and control the LCD
Write the C program
Test the final circuit with varying values of Vcc and desired temperatures