Site hosted by Angelfire.com: Build your free website today!

 

 

PIC16F876 Based Thermostat for Space Heater & Fan Control

Theory of Operation

Temperature Sensing

Ambient temperature is measured by U5, a National Semiconductor LM34 providing an output of 10mV/°F to 10 bit ADC input RA0 of mcontroller U6.  U7, another LM34, measures heat sink temperature close to triac Q1 via 10 bit ADC input RA1.

Real Time Clock

XTAL2, a 32768Hz watch crystal, and the mcontroller's Timer1 counter are used to generate a 1 pulse per second clock source for the real time clock.  Current time can be displayed in 12 or 24 hour format.    

Programmable Hysteresis Loop

Hysteresis is user programmable, ±0.5°F to ±1.5°F, to adjust to personal preference.

User Selected Heat & Cool Modes

Line Switch

U4, a MOC3063 Zero Crossing Triac Output Optocoupler and Q1, a Teccor Q6025R5 triac, form the on/off switch to control a space heater or window fan.  Output RC4 on the mcontroller drives transistor Q4 to turn on the optocoupler diode.