I am designing a PCB that uses an ATMega8A MCU to switch two high power relays (Songle SLA-12VDC-SL-A). I have used 2 separate approaches with the same disappointed result: the ATmega8A will reset as soon as either of the relay engages, even with no external load.
To eliminate the possibility of EMI caused by the relays’ coil, I have done an experiment with the same setting using an external Arduino UNO powered by the 5V from the PCB. The result is the same: the UNO resets even when it’s like 50cm (1.5 feet) from the relays.
So I reason that it may be because of the power supply, but I have used the LM2576-5V in many project and it’s very reliable. Also ground paths of the signal side and the relay side are separated. 12V and 5V power lines are also separated. Please see the photos.
Approach 1: use Optos to isolate the relays and switch them by a transistor
Approach 2: like 1 but the opto+transistors switch smaller relays (Songle SLA-05VDC-SL-A) which in turn switch the big 30A relays.
So I am at my wit’s end as to how to use these 30A relays. I saw some commercial relay module that use the same relay and though I don’t have the schematic, I can see that they just use an opto and a transistor, just like in my first approach. Or is it the ATmega8A to blame? I remember hearing somewhere that it’s very sensitive to noise.
I’d appreciate any advice!
Please see the complete Eagle schematic and board for both approaches here: https://drive.google.com/open?id=0B_JjLISYz2JHM0t4SzBaQkhZUEE
I have added the schematics in PNG for your reference.
UPDATE 3 Attached is my re-design incorporating your advice so far. Here are the changes: - Since I don't use the 5V relays to switch the 12V relays anymore, I shrank the board to fit a smaller enclosure - No more optos, the relays are switched by BJTs connected to MCU - BJTs resistor value has been changed to 470R - BJTs are close to their respective diode and the coils' pins - More ground vias - Added a 100nF at the AVCC pin of the Atmega8A - There are 2 separate pairs of GND planes: the upper pair (top & bottom) is for 12V and the lower pair is for signal. They meet at the point where battery GND is connected - BJTs' emiters are now part of the 12V GND plane
Please let me know if you have any further advice, before I have this fabricated and see how it goes. THANKS!