How I control my woodstove with a computer: ===========================================
I built my first "barrel stove" in 1980 and got into computers a couple of months later. It wasn't long before I wanted to marry the two in an effort to get better temperature control and efficiency from the stove. It took several incarnations of both the stove itself and the control interface to arrive at the present setup. All told, the computer has been "in charge" since about 1985 or '86.
First the stove: The final design is a stove made from a 55-gallon drum, using a Sotz stove kit. The Sotz kit was best of all that we tried because it has a door that seals well, and a draft control that is easy to adjust. We improved the assembly immensely by drilling the door frame between every mounting hole, thus doubling the number of bolts holding it to the drum head. This prevents most warpage, giving better "airtightness", which is critical to the succsessful operation of any woodstove. Unfortunately, I don't believe that Sotz is in business anymore.
A later addition was the installation of a catalytic convertor in the stack (also from Sotz). We even had a "Magic Heat" unit in the stack for a while, but that was removed after it proved to be troublesome due to excessive creosote buildup. With the drier firewood supply of later years, it might be better, but we've not tried it lately. The chimney is a double-wall solid-pack insulated, all stainless steel assembly. If you are installing a woodstove, this is the kind of chimney you want, as it is rated for 2" clearance to combustables, and the liner runs hot, reducing creosote buildup. You should not consider a triple-wall air-insulated stack for an airtight stove, and a masonary chimney isn't much better. We've also experimented with a barometric draft diverter, which is a big help in controlling the stove. They reportedly also reduce creosote buildup in the stack, due to the dilution of stack gases.
The draft control on the stove is mounted over a 2" diameter hole that we put in the lower portion of the door, using a hole saw in the drill press. It consists of 2 aluminum plates (1/4" thick), spaced apart with 3 3/4" coupling nuts, and mounted to the door with 3 more 3/4" coupling nuts and screws. A 24VDC solenoid is mounted to the "outside" aluminum plate, with the plunger at a right angle to and centered on the plate. It has a 10-32 rod threaded into the plunger, running through a hole in each plate, and has a one-quart paint can lid attached to the other end with a double nut arrangement. There is a spring around the plunger to close the draft when the solenoid is de-energized; applying power retracts the "damper" (paint can lid) about 1/4" from the door. It makes a fairly loud "clunk" when it opens, and a "clack" when it slaps against the door upon closing.
The computer selected for the control was a Radio Shack Color Computer, fondly referred to by its users as a "COCO". It was chosen for several reasons, chiefly because of its built-in Analog-to-Digital Convertors. The COCO uses 2 joysticks, each consisting of 2 potentiometers, giving us 4 analog inputs. The input swings between zero and 5 volts DC, and can be read from the COCO's BASIC interpreter. It also has a small relay, meant to start and stop the cassette recorder used for mass storage of programs and data. This relay can be accessed from BASIC, through the MOTOR ON and MOTOR OFF commands.
This left us with the task of interfacing the stove's draft control and some heat sensors to the COCO. The stove heat sensors are 2 thermocouples that are sold at the local hardware for use in gas furnaces or water heaters. They're used to verify pilot flame before opening the main gas valve, and sell for about $5.00 each. These thermocouples generate a very low voltage that varies between approximately 0 and 30 millivolts (30 thousandths of a volt) for the heat range I'm interested in. Maximum operating temperature in the stack is 1000 degrees Farenhite, and is verified by one of those magnetic stack temperature gauges. One of the thermocouples is stuck through a hole in the stack about 2" above the stack flange, the other is above the catalytic convertor, and is used to tell when the convertor lights off. The lower one is the only one actually used for control.
The temperature in the living space is sensed by a thermistor, a device with a "negative temperature coefficient", that is, it decreases in resistance with rising temperatures. I've also experimented with using an LM-334 integrated circuit as a sensor. The Thermistor is coated with clear Krylon, similar to a varnish, to make it waterproof (see below).
The little relay in the COCO wouldn't last long if it was handling the current for the solenoid, so I simply drive another relay coil with it. The second relay applies 24VDC to the draft control when it is powered up by the internal cassette relay. There is an RC across the line going to the solenoid to absorb some of the inductive kickback when de-energizing the solenoid. Without it, the computer is quite prone to crashing.
Getting the thermocouple and thermistor voltages to the 0-5 volt range is accomplished by a Quad CMOS OpAmp (LM324N). Only a "span" (gain) potentiometer is used for the thermocouple amplifiers, but a "zero" AND "span" pot are used for the room temperature portion. All pots are 15-turn PC board type. Each output from the OpAmp has a 5-volt MOV across it to protect the computer from excessive voltages. There is a single 20VDC regulated power supply for the OpAmp, and a 24VDC @ 2 amps supply for the solenoid circuit. This whole mess is built from Radio Shack parts, assembled on an "experimenters board" and installed in a "project box" 8"W x 6"D x 3"H in size. There are several cables to plug into the joystick and cassette recorder ports, and a terminal strip for the thermocouple and thermistor connections. An LED on the front for power indication and a pushbutton to operate the draft manually top it all off. It sits on top of the "monitor" (an old 12" B&W TV). The computer, monitor, and interface box is fully 20 feet from the stove.
There is a battery backup device connected through the cartridge port that supplies 5VDC power in the event of power loss to prevent the need for reloading the program via cassette recorder every time we get a power bump. Although this was a commercial unit, it would be very easy to design one from scratch. Just use a 6-volt gelcel and a voltage regulator set for slightly less than the computer's power supply voltage, and charge the battery with a few MA from an old AC adaptor.
This design was arrived at through experimentation, based on a couple of books on OpAmps. The best one was from Radio Shack. I do have a degree in electronics, but have not really worked in the field for quite a few years, and my education predates Integrated Circuits.
The temperatures were calibrated as follows: I adjusted the stack temperature to follow the magnetic stack gauge. (High Tech, huh?) The room temperature was a bit more complex. I took 2 insulated drinking mugs, filled one with ice water, the other with water at about 90-95 degrees, as measured with a thermometer. I'd move the waterproofed thermistor from one to the other, adjusting the zero pot with it in the ice water, the span/gain pot while it was in the warm water. A short program on the computer would continously print the joystick reading to the screen for calibration purposes.
Note that the COCO's joystick ports are equipped with 6-bit A/D convertors, meaning that the measured values can be broken down into only 64 parts (0-63), instead of the 256 parts that an 8-bit convertor would have allowed. A bit of thought showed this to be no problem, however. I simply multiply the joystick number by 15, giving me a range of 0-945 degrees for the stack temperature. The room temperature reading is set up to read only from 32 to 32+63, or 95 degrees. This is also done in software, of course.
There is a setup screen displayed upon running the program, that allows me to adjust the room setpoint, and "stack high" and "stack low" setpoints. While running, the stack temperature is read 20 times if the draft is "on" or 30 times if it's "off" and an average calculated. The average is then compared to the stack setpoint and a MOTOR ON or MOTOR OFF command is sent to open or close the draft. While calcuating the average, the room temperature is read and compared to the setpoint; if below, the stack setpoint is set to "high", if above, it's set to "low" to idle the stove. The program then enters the looping phase for another 20 or 30 readings. Pressing "any key" will abort the control portion of the program and return me to the setup screen.
There is also a safety circuit in the program: if the stack temperature falls below 125 degrees, the draft is closed and the program returns to the setup screen. There are 2 reasons for this. First is that most failures will cause the stack reading on the computer to fall to zero, which would normally cause the draft to be opened. Second reason is that closing the draft when the fire is mostly burned down preserves the coals, assisting is restarting the fire. A "startup" loop in the program over-rides this portion so I can get the stove started without having to mess with the manual draft, usually forgetting to close it. If I remove line 1230 or REM it out as shown, this part isn't operational. That's the way it usually runs, too, as the safety circuit was kind of a bother.
Although it might seem like a modulated control would be better than my ON/OFF draft damper, it works very well in practice. The stack temperature swings are quite small once the stove reaches equilibrium, being totally unmeasurable with the magnetic temperature gauge. About the only disadvantage is the noise it makes when closing or opening, but I did finally get used to it. The biggest advantage is that it is simple to build and very reliable. The solenoid was some sort of surplus piece, picked up at a "hamfest", a flea market for electronic items. All parts in the interface box (and the box itself) are from Radio Shack, and didn't probably total $40.00 at the time. The old TV "monitor" is seldom even turned on, as I know which keys to press to change the room setpoint, etc.
Following is the original program, with added comments for readability:
10 CLS ;set up defaults 20 RS=70 ;Room Setpoint 30 SM=15 ;Stack Multiplier 35 CM=15 ;Combustor Multiplier 50 SL=200 ;Stack Low setpoint 60 SH=500 ;Stack High setpoint 65 I=30 ;How many times we're going to loop 70 SS=SL ;Stack Setpoint=Stack Low
;this next block is the setup screen
100 PRINT@0,"1) CHG ROOM SETPOINT" ;Setup/adjustment 110 PRINT@28,RS ;screen 120 PRINT@32, "2) CHG STACK LO SETPOINT" ;Print@ is equivilant 130 PRINT@60,SL ;to Locate X,Y 140 PRINT@64, "3) CHG STACK HI SETPOINT" ;There are 512 150 PRINT@92,SH ;locations on a 32 x 16 160 PRINT@96,"4) GO TO STARTUP OPERATION" ;display 170 PRINT@128, "5) GO TO AUTO OPERATION" 180 PRINT@192, "ENTER YOUR CHOICE" 190 A$=INKEY$:IF A$="" THEN 190 ELSE C=VAL(A$) ;pick up the selection 191 IF C<1 GOTO 190 ;error trap it 192 IF C>5 GOTO 190 194 PRINT@211,C ;print it 195 ON C GOTO 200,300,400,500,1000 ;do something with it 200 PRINT@256,"NEW SETPOINT=" 210 INPUT RS ;get the new RS 215 IF RS>80 THEN PRINT"TOO HIGH!":GOTO 200 ;error trap 220 CLS:GOTO 100 ;and return 300 PRINT@256,"NEW SETPOINT=" 310 INPUT SL ;get the new SL 315 IF SL>SH THEN PRINT "TOO HIGH!":GOTO 300 ;error trap 320 CLS:GOTO 100 ;and return 400 PRINT@256,"NEW SETPOINT=" 410 INPUT SH ;get the new SH 415 IF SH>700 THEN PRINT "TOO HIGH!":GOTO 400 ;error trap 420 CLS:GOTO 100 ;and return
;the following block is a "startup" routine to allow stove to ;get hot before entering main control loop
500 CLS:SS=SL:SA=O:S=0 ;beginning of 510 FOR Z=1 TO I ;"startup" operation 511 CJ=JOYSTK(1) ;temperatures are 513 CT=CJ*CM ;joystick reading X 515 SJ=JOYSTK(0) ;the multiplier (15) 520 ST=SJ*SM ;the joystick is a 6- 525 RJ=JOYSTK(2) ;bit convertor (0-63) 530 RT=32+RJ ;room temp offset 540 PRINT@0,"ROOM TEMPERATURE=";RT ;display 560 PRINT@32,"STACK SETPOINT=";SS 580 PRINT@64,"STACK TEMPERATURE=";ST 590 PRINT@96,"STACK AVERAGE=";SA 591 PRINT@128,"COMBUSTOR TEMPERATURE=";CT 593 PRINT@320, "PRESS ANY KEY TO RESTART"; 596 A$=INKEY$:IF A$=""THEN 600 ELSE MOTOR OFF:CLS:GOTO 100 600 S=S+ST ;start building the 605 PRINT@505,Z; ;average and print the 610 NEXT Z ;loop number in the 615 PRINT@505," "; ;lower RH corner 620 SA=S/I ;calculate average 630 IF SA<200 GOSUB 700 ELSE S=0:GOTO 1010 ;do we open or close? 650 S=0:GOTO 510 ;restart the loop
700 MOTOR ON ;turn the draft on 710 PRINT@224,"DRAFT ON "; ;and display status 715 I=20 ;set to loop 20 times 720 RETURN
800 MOTOR OFF ;turn the draft off 810 PRINT@224,"DRAFT OFF"; ;and display status 815 I=30 ;set to loop 30 times 820 RETURN
; main control loop
1000 CLS:SS=SL:SA=0:S=0 ;initiate defaults 1010 FOR Z=1 TO I ;how many times? 1020 SJ=JOYSTK(0) ;stack temp 1030 RJ=JOYSTK(2) ;room temp 1040 ST=SJ*SM ;stack temp multiplier 1050 RT=32+RJ ;room temp offset 1060 CJ=JOYSTK(1) ;combustor temp 1070 CT=CJ*CM ;and multiplier 1080 PRINT@0,"ROOM SETPOINT=";RS ;display everything 1090 PRINT@32,"ROOM TEMPERATURE=";RT 1100 PRINT@64,"STACK SETPOINT=";SS 1110 PRINT@96,"STACK TEMPERATURE=";ST 1120 PRINT@128,"STACK AVERAGE=";SA 1130 PRINT@160,"COMBUSTOR TEMPERATURE=";CT 1140 PRINT@320,"PRESS ANY KEY TO RESTART"; 1150 A$=INKEY$:IF A$="" THEN 1160 ELSE MOTOR OFF:CLS:GOTO 100 1160 S=S+ST ;build the average 1170 PRINT@505,Z; ;print the increment 1180 NEXT Z ;and loop to 1010 1190 PRINT@505," "; ;blank the counter 1200 SA=S/I ;calculate average 1210 IF RT<RS THEN SS=SH ;do we want the stove 1220 IF RT>RS THEN SS=SL ;hot or idling? 1230 REM IF SA<125 MOTOR OFF:GOTO 100 ;stop if stove is cool 1240 IF SA<SS GOSUB 700 ELSE GOSUB 800 ;turn draft on or off 1250 S=0:GOTO 1010 ;and loop again
Bear in mind that if you attempt to duplicate this, YOU ARE ON YOUR OWN. The above is represented as no more than a report on how I'm doing it, not as instructions on how YOU can do it! No circuit diagrams will be supplied (I'm not sure that I have anything even close to what is running anyway!). I will answer specific questions via NetMail or in the HOMEPWR echo.
Jim Dunmyer, 1:234/2, Toledo's TBBS (313) 854-6001
Return to Stove page
Return to Jim's Home Page
Send Email to Jim