- Blog entry posted in 'Home Automation (HVAC)', September 07, 2014.
Ok so the first entry was getting a little long, so I decided to create another.
Now is time for the Master control unit:
Master PicBasic Code here http://pastebin.com/8nNVxzn8
Found a suitable housing (plastic) so the X-Bee radio network could easily operate inside the enclosure.
Made some indicator boards so I can see where the PIC is in the program. These boards have 74LS595 shift registers and the Led's march as the code dictates. If there was an error in communications a flag is thrown and the red led is lit & the node is skipped until next round. When the data transmission completes the error bit is cleared.
Note the 120VAC outlet on the left. That is for controlling an Insteon Power line modem so I can send commands to IR transmitters and control the Mini-split units in each zone.
MiniSPlitOffice:
if Nb_var86 =0 then return 'unit on/off
pause 1000
if Nb_var93 = 0 then 'AC
MS_Office = Nb_var02
IF MS_Office > 78 THEN MS_Office =78
IF MS_Office =< 72 THEN MS_Office = 72
MS_Office = MS_Office-72
LOOKUP MS_Office,, result
endif
if Nb_var93 = 1 then 'heat
MS_Office = Nb_var02
IF MS_Office > 70 THEN MS_Office =70
IF MS_Office =< 60 THEN MS_Office = 60
MS_Office = MS_Office-60
LOOKUP MS_Office,, result
endif
serout2 PortB.2,Insteon,
'pause 5000
debug "Office Set at ", hex2 hour,":",hex2 minute," To: ",dec Nb_var02,"º (",hex2 result,")", cr
return
That bit of code looks at what the set temperature is and sends out the Hex code to the Insteon power line modem that you have programed with button presses for each mini-split you have/temperature setting you want.
I made a Stevenson Shield out of 8" plant saucers to house the outdoor weather monitoring sensors. Used a SHT11 temperature and humidity sensor.
http://www.sensirion.com/en/products/humidity-temperature/humidity-sensor-sht11/
Comments