Oven and signal unit
From uCtrl.net
| The Rack box project is being discontinued! I am moving to a new location, and therefor terminating the Rack box project, my plan is to build an even bigger system based on slot-in cards in a full size rack. I'll keep you posted. Feel tree to leave a comment if you have any question. |
OSU installed in the Rack box
Contents |
Information
Tasks:
- The module turns of the heat in the living room after the porch door has been oven for 20 seconds. 90 seconds after the door has been closed the heat is turned back on. It can also be controlled using an external switch.
- A short signal pulse from another module or a switch, will activate the output for 15 minutes. Used for turning on the test voltage on the status panel. A new pulse within these 15 minutes turns the output off.
Leakage current
The solid state relay leaks a small amount of current to the oven, about 10mA. This current can be eliminated using a resistor in parallel over the oven supply after the relay. A 22K, 5W resistor should be the job.
I/O
Inputs
- Porch door, from MPM1
- Manual oven disengage
- Signal activate
Outputs
D-Sub 9-Pin
- Red: 5v
- Black: 0v
- Input: Porch door
- Input: Manual oven disengage
- Input: Signal activate
- Output: Oven relay N.O
- Output: Oven relay N.C
- Output: Oven LED
- Output: Signal
- Output: Lifesignal
Parts list
| Quantity | Supplier | Part number | Description |
| 1 | Elfa | 73-665-78 | AVR-RISC, AT90S2313 |
| 1 | Elfa | 50-194-19 | Plastic Enclosure (1591), 100x50x25mm |
| 1 | Elfa | 44-055-51 | D-Sub soldering cups, 9 pin male |
| 1 | Elfa | 44-055-02 | D-Sub soldering cups, 9 pin female |
| 1 | Elfa | 48-161-53 | DIL socket, 20-pin, 7,62mm |
| 3 | Elfa | 70-005-57 | Small Signal Diode, 1N4148/Ph |
| 2 | Elfa | 48-352-37 | Spring-loaded terminal block, Mounting supp. f. DIN rail |
| 1 | Elfa | 67-008-01 | Aluminium electrolytic capacitor, 10uF 25V |
| 1 | Elfa | 65-851-94 | Ceramic Disc Capacitor, 1 nF 100V |
| 2 | Elfa | 65-848-58 | Ceramic Disc Capacitor, 22 pF 100V |
| 1 | Elfa | 74-501-82 | Quartz, 4,0Mhz |
| 1 | Elfa | 75-034-44 | LED 5mm coloured clear, Green, 2.1V, 20mA, 30mcd, 10° |
| 1 | Elfa | 75-034-69 | LED 5mm coloured clear, Red, 2.1V, 20mA, 8mcd, 10° |
| 2 | Elfa | 75-031-96 | LED holder 5mm, RTC51, black plastic |
| 3 | Elfa | 60-106-15 | Carbon film resistor 5% 1/4W, 10 K |
| 5 | Elfa | 60-104-33 | Carbon film resistor 5% 1/4W, 330 Ohm |
| 6 | Elfa | 60-105-73 | Carbon film resistor 5% 1/4W, 4,7 K |
| 1 | Elfa | 48-288-10 | Terminal block, DIN, end-plate, WAP2,5-10 |
| 4 | Elfa | 48-284-06 | Terminal block, DIN, row, WDU2,5, max 4mm2, 24A 800V |
| 5 | Elfa | 71-027-59 | Transistor BC547B, NPN, 45V 0.1A 0.625W |
| 1 | Elfa | 35-305-16 | Toggle switch, 1-pole, micro, on-on |
Images
Testing using SIM6IO |
PCB complete |
||
Oven relay inside |
Oven relay mounted |
OSU installed in the Rack box |
Schematic drawing
Files
- Datasheet Solid state relay: Media:crydom_dual.pdf
Source code
The program is written in basic, using Bascom-AVR.
'-------------------------------------------------------------- ' Thomas Jensen '-------------------------------------------------------------- ' file: AVR_OSU ' date: 23/12/2006 '-------------------------------------------------------------- $regfile = "2313def.dat" $crystal = 4000000 Config Portd = Input Config Portb = Output Config Watchdog = 1024 Dim A As Byte , Lifesignal As Integer Dim Doraapen As Integer , Pretimer As Integer Dim Ovndiode As Integer , Posttimer As Integer Dim Ovndiode2 As Integer , Servertimer As Integer Lifesignal = 21 Doraapen = 0 Pretimer = 0 Posttimer = 0 Ovndiode = 0 Ovndiode2 = 0 Servertimer = 0 Portb = 0 For A = 1 To 20 Portb.2 = Not Portb.2 Portb.3 = Not Portb.3 Waitms 200 Next A Portb = 0 Waitms 1000 Start Watchdog Portb.0 = 1 Main: If Pind.1 = 1 Then 'sense if door is open/closed If Pind.0 = 0 Then Doraapen = 21 If Doraapen > 0 Then Doraapen = Doraapen - 1 'activate pre delay If Doraapen > 1 And Pretimer = 0 And Portb.0 = 1 Then Pretimer = 201 If Pretimer > 0 Then Decr Pretimer If Doraapen = 0 And Pretimer <> 0 Then Pretimer = 0 If Pretimer > 5 And Ovndiode = 0 Then Ovndiode = 3 'turn off oven If Pretimer = 1 And Doraapen > 1 Then Portb.0 = 0 Pretimer = 0 End If 'activate post delay If Doraapen = 0 And Posttimer = 0 And Portb.0 = 0 Then Posttimer = 901 If Posttimer > 0 Then Decr Posttimer If Doraapen > 0 And Ovndiode = 0 Then Ovndiode = 50 If Posttimer > 200 And Ovndiode = 0 Then Ovndiode = 15 If Posttimer < 200 And Posttimer > 0 And Ovndiode = 0 Then Ovndiode = 10 'turn on oven If Posttimer = 1 Then Portb.0 = 1 'turn on LED If Ovndiode > 0 Then Ovndiode = Ovndiode - 1 If Ovndiode = 10 Then Portb.2 = 1 Portb.3 = 1 End If If Ovndiode = 2 Then Portb.2 = 1 Portb.3 = 1 End If If Ovndiode = 1 Then Portb.2 = 0 Portb.3 = 0 End If Else Portb.0 = 0 Pretimer = 0 Posttimer = 100 Ovndiode = 0 Doraapen = 0 If Ovndiode2 = 0 Then Ovndiode2 = 50 End If 'local oven LED If Ovndiode2 > 0 Then Ovndiode2 = Ovndiode2 - 1 If Ovndiode2 = 11 Then Portb.3 = 1 If Ovndiode2 = 1 Then Portb.3 = 0 'oven NC Portb.1 = Not Portb.0 'signal If Pind.2 = 0 And Servertimer = 0 Then Servertimer = 9000 If Pind.2 = 0 And Servertimer < 8975 Then Servertimer = 15 If Servertimer > 0 Then Decr Servertimer Portb.4 = 1 End If If Servertimer = 0 Then Portb.4 = 0 'Lifesignal If Lifesignal > 0 Then Lifesignal = Lifesignal - 1 If Lifesignal = 6 Then Portb.5 = 1 If Lifesignal = 1 Then Portb.5 = 0 If Lifesignal = 0 Then Lifesignal = 21 'Loop cycle Reset Watchdog Waitms 100 Goto Main End