Digital Thermostat Board Manual.pdf

(209 KB) Pobierz
Digital Thermostat with High Accuracy
-6,00 to 46,00 °C
Digital Thermostat
We build a digital thermostat for home applications, which controls the room temperature. I
used the AT90S2313 microprocessor of ATMEL. The digital thermostat opens the main heating valve of
the apartment and the hot water flows in the radiators.
Digital Thermostat Board
Bitoulis Spyridon (Digital Thermostat)
Page 1 of 4
Power and Oscillator
The system is supplied a 6 Volts DC current, we use a 7805 to stabile the voltage to 5 Volts
DC. The microprocessor is running on an 8MHz crystal so the pulse measurement is in microseconds
(us).
Watchdog Timer
The AT90S2313 enables the watchdog timer in a period of 2 seconds the microprocessor runs
the program and finally goes to power down sleep mode. It can wake up only from the RESET of
watchdog. The CPU is mainly in sleep mode and the actual current is very low (0,04mA).
NE555 – Pulse measurement
The temperature is measured using the NE555. In order to reduce the power consumption the
PB1 pin gives the ground to the NE555, in normal operation it consume up to 3mA. The resistor R0
reduces the current of the NTC Thermistor in order not to influent the real resistor of the thermistor. In
the AT90S2313 we store in the eeprom memory the NTC thermistor curve. Using the ICP pin in the
AT90S2313 we measure the pulse duration of the NE55 output. The AT90S2313 calculates the actual
temperature using the NTC thermistor curve and also an average temperature of four measurements is
also performed. The temperature measurement is performed every a specified period of time, by default
every 1 minute.
Bitoulis Spyridon (Digital Thermostat)
Page 2 of 4
Communication (RS232)
In order to communicate with the PC with the RS232, AT90S2313 checks the PD5 pin, if the
pin is LOW then a PC is connected in the RS232. The user program must supply on the CTS signal +10
Volts and on the DSR signal -10 Volts in order for the Rx signal to work. The Rx on the AT90S2313 is
enabled using the PB2 pin in order to reduce the power consumption (20mA in normal operation). The
settings of the communication is 38400,n,8,1.
Now the AT90S2313 sends the ‘Q’ character on RESET that means every 2 seconds. The PC
can send an ‘R’ Read or ‘W’ Write character command. On Read command the response is ‘B’ character
and 40 bytes or 20 integers of the Parameters inside the AT90S2313. On Write command the response
is ‘S’ character and now the AT90S2313 waits for the following information.
Byte 1 = Memory address of Parameter
Byte 2 = E2prom address of Parameter
Byte 3 = Low byte of Parameter
Byte 4 = High byte of Parameter
Communication Cable (RS232)
The communication cable for the connection between PC and Digital Thermostat is as in the
picture above.
Bitoulis Spyridon (Digital Thermostat)
Page 3 of 4
Relay Contact
The output of the thermostat is a relay contact that’s used to activate the heating system. The
PD4 pin is used to energize the transistor T1 and drive the relay. The relay is a 6 Volt and the contact is
250V AC / 5A. We use the C4 capacitor because when the system RESET from the watchdog the PD4
pin is HIGH. So in the period of RESET until the beginning of the program the relay should be disabled
but the capacitor maintains the command of the relay until the RESET passes. In series with the relay
contact there is a switch for manual switch on and off the system. The operation modes of the Relay
are three, off, pulse, continues. In Pulse mode the relay switch on and off using specified times. In
Continues mode the relay is always switches on is the user set point is bigger than the average actual
temperature until the hysterisis set point is reached.
Avr_ISP (Programming connection)
We also use the PB5, 6, 7 pins and the RESET for
the AVR_ISP socket, in order to be able to program the
AT90S2313.
Bitoulis Spyridon (Digital Thermostat)
Page 4 of 4
Zgłoś jeśli naruszono regulamin