This has a 3-pin line input on a cord and 2 duplex sockets for the outputs. This has a limit of 5 amperes.
One of the four outlets is not switched.
They are enclosed in a dual NEMA enclosure. The low-voltage circuits are inside at the bottom.
There are two boards: one for the receiver and ICs and a second for the relays.
The box has a 9-pin D-connector which is used both for programming the micro-controller.
The receiver is hidden at the back of the wall unit in the living room behind our travel albums.
It is powered from a 12-V plug-in power supply.
#rem
Wall Unit.bas This has three separate switched outlets in 2 duplex receptacles
one of the 4 is not switched
It is housed in their NEMA box
John Saunders 7/25/2013
#endrem
#PICAXE 14M2
'Input Port
symbol Rcvr_In = C.3
symbol Rcvr_Int = pinC.0
'Output Ports - clockwise from live socket
symbol RL1Port = B.1 'Use for Pineapple Lights
symbol RL2Port = B.2 'Use for Shelf Lights
symbol RL3Port = B.3 'Use for Floor lamp
symbol Exp1Port = B.4
symbol Exp2Port = B.5
symbol Exp3Port = C.1
symbol Exp4Port = C.2
'Constants
'Variamles
symbol Int_Val = bit0
symbol Rcvr_Val = b1
symbol Iter = b2
symbol Dummy1 = b3
symbol Dummy2 = b4
symbol CountUp = w6
init:
LOW RL1Port
LOW RL2Port
LOW RL3Port
LOW Exp1Port
LOW Exp2Port
LOW Exp3Port
LOW Exp4Port
SETINT %00000001, %00000001
main:
FOR Iter = 0 TO 100
INC CountUp
IF CountUp = 100 THEN
SETINT %00000001, %00000001
ENDIF
NEXT Iter
GOTO main
interrupt:
SETFREQ m16 'Interrupt is triggered by a 20 ms burst which exceeds intergator threshold
PAUSE 40
SERIN [300,Invalid_Burst],Rcvr_In,N2400_16,("14L1776"),Rcvr_Val,Dummy1,Dummy2
SETFREQ m8 'To get SERTXD at 9600 baud
IF Rcvr_Val < "0" OR Rcvr_Val > "z" THEN Invalid_Burst
SELECT Rcvr_Val
CASE "K"
HIGH RL1Port 'Red + Green on Pentagon, Pineapple on
CASE "8"
LOW RL1Port 'Yellow + Green on Pentagon, Pineapple off
CASE "E"
HIGH RL2Port 'Black + Red + Yellow on Pentagon, Shelf on
CASE "F"
LOW RL2Port 'White + Red + Yellow on Pentagon, Shelf off
CASE "b"
HIGH RL3Port 'Red + Blue on Pentagon, Floor on
CASE "f"
LOW RL3Port 'Yellow + Blue on Pentagon, Floor off
ELSE SERTXD ("Received:",Rcvr_Val,13,10)
ENDSELECT
Invalid_Burst:
PAUSE 300
SETFREQ m8 'To get SERTXD at 9600 baud
LET Rcvr_Val = "z"
LET CountUp =0
RETURN