I am working on a product that is essentially a combination of below shown two products:
There will be a keypad and a separate box containing relays and power supply. A cable will run between the two for power (5 VDC) and signals (3.3 V logic). You can press a button on the keypad and this will turn a relay on/off.
Block diagram is as shown below:
I want to use a separate MCU for the relay module in order to minimize the number of connections between keypad and relay box. Keypad can communicate over UART to the relay module.
Since relay module will also connect to 220 VAC wires, there is a very high probability of communication cable running parallel to ac wires.
My questions are as follows:
Will UART work well in such conditions? Its ok if a couple of messages get corrupted. MCU will realize this and packet can be resent.
Are there better alternatives to this approach that come for low cost and don't take a lot of PCB area?
Do I need to worry about induced noise damaging anything? Should I put some TVS diode on all signals?
Some clarifications:
I can't make a single assembly of both PCBs due to some mechanical constraints. Also, I would want to use same keypad for 2-3 different designs of relay module.
I can't use i2c port expanders on back end because my other variants might need to performs some logic on the relay board and MCU is coming for a low cost.