Centralized smart house controller with alarm system

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.

Smart house controller - szendreigabor.hu

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.

Microcontroller block
Smart house controller - szendreigabor.hu

Radios, memory, temperature sensor block
smart house controller - szendreigabor.hu

Input block (a part of it)
smart house controller - szendreigabor.hu

12V output block (a part of it)
smart house controller - szendreigabor.hu

230V output block (a part of it)
smart house controller - szendreigabor.hu

After I finished and checked the design I ordered the PCB.
smart house controller - szendreigabor.hu

When the PCB-s arrived I started to plant the components. In the first days I used for the tests an auxiliary PCB with a PIC microcontroller and connect via I2C bus to the main PCB.
smart house controller - szendreigabor.hu

When I finished a part of PCB I tested this area how to work.
smart house controller - szendreigabor.hu

First time to connected to display.
smart house controller - szendreigabor.hu

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.

We were fully testing the PCB and firmware.
smart house controller - szendreigabor.hu

We installed the smart house controller into the wall.
smart house controller - szendreigabor.hu

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.
smart house controller - szendreigabor.hu

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 ;)
https://www.facebook.com/szendreiblog/

Ismerőseiddel itt tudod megosztani:

Szólj hozzá!

hozzászólás eddig.

Tags: , , , ,

Comments are closed.