2020.08.26. Centralized smart house controller with alarm system
My father has a small weekend house, but he dreamed a very complicated system. The house has only three rooms (hall with kitchen, bathroom and bedroom), garage, cellar and garden.
The wires, switches, plugs doors/windows sensors and motion detectors were installed earlier by my father. The switches modified to push button. These send only impulses to the controller.
In this city where this house is we are operating an monitored home security system via LoRa radio. We installed to our flats/houses this alarm system. It’s decentralized. All devices can send alarm signal, receiving and processing other station signals.
It has three main signals: Alarm (detect burglary), Water (detect flooding) and Fire (detect smoke and fire).
I had a good idea the house controller be able to communicate the alarm system.
We counted inputs, outputs and we also formed reserves. The result is 32 inputs(12V), 16 outputs(12V) and 16 outputs(230V). Than I started to design the controller.
I used: PIC24FJ64GA004 microcontroller, MCP23017 16-Bit I/O Expander with I2C interfaces, MCP9808 temperature sensor, 24LC512 I2C Serial EEPROM, MOC3083 Zero-Cross optoisolator triac driver, BT136S-800 TRIAC, SUD50P06 FET, SI4421, RHF76-052, LoRa610 and some little components.
I designed schematic and I drew PCB in EasyEDA designer.
Finally I wrote the program in C code. It’s an interesting fact that the firmware consists of two parts.
One of the parts the alarm system and other is the house controller. I added the new house controller program (about 1000 lines) to the exist alarm system program (about 3000 lines) to in a different file.
If I upgrade the alarm system or house controller, fortunately I don’t need to write two different program only need modify some lines.
A little bit later I made a new component to the house controller. It was the remote controller. It located about 4m from the main PCB. The remote controller included the display and buttons.
The remote controller communicate with main PCB via I2C bus. Two PIC24FJ64GA004 microcontroller keep contact together.
We installed the controller in January of 2020 and the remote controller was installed in march of 2020.
It has been working well ever since too.
Thank you for reading!
Please don’t forget to like my page ;)