EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: mainakae on August 20, 2013, 07:50:02 am
-
Hello everybody!
I've been working in this project for quite some time now, but no matter how many videos, books and tutorials I read, It's my first project and I'm pretty sure I'm letting in many mistakes, so I thought I could share it with you, hoping that somebody could throw some advice to this newb.
That said, I'm working on the domotic system, based on Arduino, that I plan to install in my house. I want to make it so I can fit it in existing houses, so I'm doing a lot of things that I already know that are big "no no"s for newbies, like installing this devices inside existing AC registers, or using (although not always) existing canalizations of AC to pass my CAN and power wires through (in the hope that shielding and the natural immunity of CAN will protect it against AC noise).
The device consist of an Atmega 328 (loaded with Arduino bootloader), MCP2515 & MCP2551 as CAN interface, LM2674 as DC/DC converter, a couple of relays (or OMRON G3MC SSRs with zero crossing, I already have two models) and some screw terminals and pin headers to connect switches, sensors and such. The idea is to bypass all the existing (light) switches in the house, and substitute them with the relay in this devices. Then all those old switches will be connected to the device as well (this time working as arduino DC switches, push buttons, capacitive sensors...). Finally, all devices are interconnected by means of CAN bus (4 wires: CANH, CANL, GND and Vcc from 12v up to 40v), isntalled in ac registers and cabled through the house using existing AC tubing.
I've tried to protect against mistakes during installation and operation as well as filtering the CAN in order to ensure the best possible signal. I've also tried to make it as efficient as my constraints would allow (lack of experience, and project constraints, that is). Finally my design contains:
- polarity reversion protection at device input, by means of a MOSFET (better efficiency than simple diode)
- simple filtering at switch inputs by means of RC filter
- ground plane in PCB, using 4 layers PCB
- switched DC/DC buck converter, using LM2674
- TVS diodes and rf choke at CAN input (to protect from spikes and filter noise)
- fuses to protect AC relays (5A for the 10A relays and 1A for the 2A SSRs)
I've played with several ideas, like using polyfuses and zenner diodes at switches inputs(I believe it's called crowbar config), to protect against accidental connection to mains AC, polyfuses at power input to protect power distribution to other devices against possible shorts in the board, and some more, but after careful consideration, I thought it was kind of an overkill: In casa a short happens in the board, the LM2674 thermal protection would kick in, switching it off, and following a careful installation procedure, and all mains ac cables will be substituted by smaller AWG24 wires for switches to be connected (DC) to the board, so there's no possible accidental mix of AC and DC.
I still have doubts regarding the schematic, like If I should use varistors at relay outputs, and if some extra care should be taken at switches.
And finally, my most feared task: the PCB layout. As I said I've used 4 layers, use masive ground planes, and tried to find as much information as possible in the net, but I think I still lack a lot to make a proper layout. My biggest fear is that the board has to be as small as possible, but I have the LM2674, which I'm pretty sure is a huge source of EMI noise. I tried to make as much distance as possible between the LM2674 and the CAN circuitry, but still, I don't know if I'm doing things right here. The ATmega rests between both, which I also fear will expose it to CAN noise and buck converter noise... What do you think, any advice?