The PIC Thermostat


A final project for:
ECE 551, Computer Systems Manufacturing Lab

Dept. of ECE, UMASS Amherst

Project Description

This project uses the Microchip PIC 16C71 to emulate the functionality of a thermostat. This project is split into two main componets: the PIC which emulates the thermostat, and a C program that simulates the environment and also handles the display. The information which is displayed on the computer terminal shows the current enviroment temperature, the desired temperature, and also the current state such as heating, cooling, stable, or that a change in the desired temperature was detected.

Design Process

Tools Used: As stated above, the PIC is the control element of the system. The desired temperature is read from the potentiometer on the development board though the A/D converter on the PIC. This value is converted into a temperature value. The PIC then accepts the environment temperature across the RS-232 port and then compares the two values.

If the temperature values are equal then the PIC sends back a signal to the environment stating that no changes should be made, if the environment is too warm then a signal is sent back to say that the environment temperature should be cooled, and likewise for the environment being to cold. The PIC should also send back the desired temperature so that it may also be displayed along with the current temperature and state of the system.

The C program (environment) should raise, lower, or keep constant the enviroment temperature based on the output of the PIC. To simulate the time that it takes for the environemt to change temperature there should be a delay involved. The C program is also used to display the system variables to the terminal.

The C program was created using Borland Turbo C++, and tested via two terminals connected using PcPlus. PcPlus will display the ASCII value of the data being sent out. This was done to make sure that the environment was sending data as well as accepting data correctly.

The PIC program was created by MPASM and was also tested using PcPlus to make sure that the comparison and output signals were correct. To verify the PIC was outputting the correct desired temperature to the enviromnet the value was also displayed on the LEDs on the development board.

Problems Encountered:
Trying to make the C program and the PIC transmit and recieve the correct data at the right times was a major problem. To fix the problem delay loops, as well as transmit and recieve signals were used.

Manufacturability

In the case of this project the PIC was not being used to its full potential, a cheaper model or even a specially designed chip would be more practical for if this project was to go to production. It would most likely lower the production costs.

However, since this PIC was used, the re-spin time to fix or update the controller could be made in a two to three days, if not in a couple of hours.

There are already working thermostats on the market, and many of them are highly integrated. In one such example there are thermostats with a built in clock that will raise or lower the environemt temperature at some given time during the day. This type of product would be useful as an energy saving device. When you wake up in the morning your house could be already warmed up to a comfortable living temperature, but when you leave the house for work, the temperature of the house will drop down to a lower temperature in order to save energy. When you get home, the house will be warm again, and then when you go to bed for the night, the temperature will drop back down again.

Acknowledgements

The faculty and staff of the Electrical and Computer Engineering department at the University of Massachusetts at Amherst.


dwhite@student.umass.edu
brambill@ecs.umass.edu
burleson@ecs.umass.edu (Last Update: 12/22/95)