The device for use in home automation systems. It has 8 digital inputs and 4 outputs for load control with AC 220V. Mounted on DIN-rail. Originally developed for lighting control. It uses 4 inputs for connection of wall switches and 4 dimmable outputs for connection of lamps. The device has possibility to turn on/off by means of a wall switch and through the controller interface (OpenHAB, Domoticz or others). For communication with the controller is used NRF24L01+ with mySensors libraries. In my system the gateway uses the library version 1.5, so in the device is also version 1.5.
This device is built on the Atmega328 microcontroller. To power the microcontroller is set 3.3V linear regulator AMS1117-3.3. The source of the clock is the internal RC-oscillator 8MHz.
The outputs is three-quadrant triacs BTA216, which are less sensitive to interference and noise. For galvanic isolation of the signal and power circuits used opto-triacs MOC3021. In the circuit added zero crossing detector to provide dimming function.
It was planned be connected to a wall switch, so in the device are provided RC-chains to reduce the effects of bounce of mechanical contacts.
The board contains 2x4 pin socket to connect NRF24L01+. The board also has pin headers. Pin neader 2x3 used as ICSP, it allows you to flash the bootloader in AVR. Pin header 1x4 can be connected to the FTDI cable for communication via USB.
As for the control of four loads of four inputs are involved, then we've got four more to connect various sensors (motion, light, temperature, and other). Also device can be used for fan control or circulation pumps in the climate system. Keep in mind that there triacs used without radiators. Long-term use with high loads can lead to their failure. I have connected a maximum load of 360W and it did not cause the heating elements.