I am in the design stages for an Arduino Mega that takes inputs from a MQTT server and then turns relays on/off and applies dimming as appropriate. The relays are 230V DPST, 2 coil (24 V) PCB mounted relays. Attached to the relays is a dimmer circuit.
The dimmer circuit is based on https://www.electroschematics.com/ac-light-dimmer-module-with-zc-detector/. It utilises zero crossing detection and a triac.
The overall design is as follows:
With the ZC detection circuit:
There will be ~20 separate light circuits, therefore I have designed a 595 circuit - designed to be daisy chained together (the second single ethernet port):
Each of these 595 PCBs will connect to four relay and dimming modules - each having two inputs for the coils - one to set, one to reset, GND, +24V and separate ground to power the coils. This will be connected via ethernet cable to the 595 boards.
There will also be one input to control the dimming (questions to follow).
This is the relay & dimming board:
Questions I have:
I am making the assumption that I can use one zero crossing point detection and as the whole house is on the same phase, this will be okay. Is this valid?
Edit: my misunderstanding. The arduino mega has more than enough digital pins for my purposes
Controlling the dimming will be done by holding the required brightness as a percentage in an array for each dimmer. Clearly timing is key when dimming AC circuits to prevent flickering etc, will the Arduino be able to handle outputting ~20 dimming circuits at the same time, using the interrupts from one ZC point detection.
As this will be for my house, I have tried to make sure everything is designed in the most optimum way, please correct me if I have overlooked anything. Likewise the 230V AC will be protected by a 3A MCB prior to the relay/dimming board. Everything else should be able to handle in excess of 5As. The 230V AC should be isolated with optocouplers from all of the 5/24 V DC lines. I am making sure all of the PCB tracks that handle the live voltage are thick enough.