Tag Archives: Temperature

Thermostat for 1KW Space Heater (SCR controlled)

Above is a thermostat circuit I recently built to control a 1300 watt space heater. The heater element (not shown) is connected in series with two back to back 16 amp SCRs (not shown) which are controlled with a small pulse transformer. The pulse transformer has 3 identical windings, two of which are used to supply trigger pulses to the SCRs, and the third winding is connected to a PNP transistor pair that alternately supply pulses to the transformer at the beginning of each AC half cycle. The trigger pulses are applied to both SCRs near the beginning of each AC half cycle but only one conducts depending on the AC polarity.

DC power for the circuit is shown in the lower left section of the drawing and uses a 1.25uF, 400 volt non-polarized capacitor to obtain about 50mA of current from the AC line. The current is rectified by 2 diodes and used to charge a couple larger low voltage capacitors (3300uF) which provide about 6 volts DC for the circuit. The DC voltage is regulated by the 6.2 volt zener and the 150 ohm resistor in series with the line limits the surge current when power is first applied.

The lower comparator (output at pin 13) serves as a zero crossing detector and produces a 60 Hz square wave in phase with the AC line. The phase is shifted slightly by the 0.33 uF, 220K and 1K network so that the SCR trigger pulse arrives when the line voltage is a few volts above or below zero. The SCRs will not trigger at exactly zero since there will be no voltage to maintain conduction.

The upper two comparators operate in same manner as described in the “Electronic thermostat and relay” circuit. A low level at pin 2 is produced when the temperature is above the desired level and inhibits the square wave at pin 13 and prevents triggering of the SCRs. When the temperature drops below the desired level, pin 2 will move to an open circuit condition allowing the square wave at pin 13 to trigger the SCRs.

The comparator near the center of the drawing (pins 8,9,14) is used to allow the heater to be manually run for a few minutes and automatically shut off. A momentary toggle switch (shown connected to a 51 ohm resistor) is used to discharge the 1000uF capacitor so that pin 2 of the upper comparator moves to a open circuit state allowing the 60 Hz square wave to trigger the SCRs and power the heater. When the capacitor reaches about 4 volts the circuit returns to normal operation where the thermistor controls the operation. The momentary switch can also be toggled so that the capacitor charges above 4 volts and shuts off the heater if the temperature is above the setting of the pot.

Copyright 2006 Bill Bowden

Temperature Controller (AVR + DS1621)

Wine doesn’t like subzero temperatures, and during wintertime, my “winecellar” got pretty cold.
There was an electric heating element, but the thermostat was broken, so it was either full burn or nothing.

That’s how the temperature monitor/controller came to be.
It was an obvious task for a small processor and I’ve always wanted to test the Dallas temperature sensors.

So, I designed this little device which could monitor the temperature and control the heater.

It’s based on an AT90S2313 and a Dallas DS1621 Digital Thermometer. The temperature is displayed on a dual 7-segment display, and two buttons are used for setting parameters. A high current relay switches the heating element.

I used an AVR 2313 as it just the right number of pins for this task. Also, it’s programmable in C, which makes things easier. An alternative would be the 1200, but I’ve got some bad experience with that.
A 4 MHz ceramic resonator is used for clocking the 2313.

The displays are common cathode displays. The segments of both displays are tied together and multiplexing is handled in software. Note that the decimal point segment also are used. More detail about this later.

The power supply is straight forward. A single or double tap 9 V transformer with a rectifier circuit and a 5V voltage regulator. The rectified input to the regulator is also supplied as a drive voltage to the relay.

The Dallas DS1621 chip interfaces to the 2313 using a I2C interface. This is a 2 wire bidirectional bus with a speed up to 400 kbps.
Up to 8 DS1621 devices can be connected on the same I2C bus, but in this case there’s only one device, so the address selector pins on the DS1621 is pulled low, giving it address 0 (well, 0x90 actually).
Actually, the DS1621 has a thermostat output, which can be programmed to a certain temperature, but it’s not used in this application.

The relay needs about 40-50 mA and is driven by a standard NPN transistor.

The two buttons are used to set the temperature where the relay should kick in. As the code is now, the relay will always be ON when the measured temperature < set temperature, but this could be changed (if you would want to control an air-condition f.i.)

Normally, the display show the measured temperature. The left decimal point will toggle on/off to show that the system is “alive”. The right decimal point show the state of the relay, on or off.
A short press on either the UP or DOWN button, will display the set temperature for about 1 second. If the key is held down, the set temperature will be increased or decreased respectively.
Pressing both keys at the same time gives access to two parameters :
The first is the hysteresis (indicated by the middle segment in the left display being lit, the right display show the parameter value), which determines the relay switch points. For instance, if the hysteresis is set to 2, and the set temperature to 21 degrees, the relay will go ON at 19 degrees, and OFF at 23 degrees. This is to avoid a situation with an oscillating relay.
The second parameter is the display duty-cyle (indicated by the bottom segment in the left display being lit, the right display show the parameter value). This controls the display multiplexing, and effectively determines the display brightness.
Both these settings are stored and fetched from the in the EEPROM.

A fun little construction and a good way to learn about the DS1621.

[img:22b8f10325]http://www.circuitdb.com/download.php?fileID=175[/img:22b8f10325]
Inside of the box

[url=http://www.circuitdb.com/download.php?fileID=173]View schematics[/url]
[url=http://www.circuitdb.com/download.php?fileID=174]Download C-code[/url]

Copyright 2006 [url=http://www.myplace.nu/avr/]Jesper Hansen[/url]