4 Relay Atmega328 board hangs or goes into lockup state after applying fluctuating Line AC to Relay

I have designed a washing machine board using Atmega328. Where there are 4 Relays for Fan, Heater, Drum Right rotation and Drum Left Rotation. A LCD for user interface where you can set time for heating and cooling.
Everything is working fine, but the problem occurs when I continuously connect and disconnect Applied AC main to the relays. These relays are powering another big high current Relay.
I have tried adding snubber network just after the small on board relays still my controller hangsup.
I have seen some commercial board few with no snubber and few with snubber, they don’t hang up.
Can someone plz explain me whats going on my board?

1 Like

Hi Yash,

I am not able to get your problem exactly. Could you please explain this part little bit more?? Can you post the circuit diagram of the relay connection if possible?

Hiii @EEngineer Thanks for the reply.
Yes I m sharing picture of relay circuit.
Arduino is driving optocoupler pc817 which than drive BD139 transistor which drives the coil of the Relay.
The Relay common point is Line mains and NO is connected to the another big Relay. So when I distribute line main like touching to the connector and remove it back, doing this very fast, while the relay is on, after few attempts my program hangs.

In schematics you might think snubber is connected wrong way. But I have tried both way connecting it to the neutral and line. Still the same problem.

It’s possible that the commercial boards you have seen are using different design techniques or components that help to mitigate the risk of voltage transients or electrical noise causing problems. There are many different ways to design a circuit to be resistant to these types of issues, and it’s possible that the commercial boards you have seen are using approaches that are different from the ones you are using on your board.

I didn’t get this part. But , as far as I understand from what you have mentioned, I suggest the following

  1. Use a decoupling capacitor: A decoupling capacitor is a capacitor that is connected between the power supply and ground lines of a circuit to reduce the effect of voltage fluctuations. By adding a decoupling capacitor to your circuit, you can help to smooth out any voltage spikes or transients that may occur.

  2. Use a pull-up resistor: If you are using a switch or button to trigger the relay, you may want to consider adding a pull-up resistor to the circuit. This will help to ensure that the microcontroller receives a stable signal when the switch is activated, reducing the risk of false triggers or other problems.

  3. Use a low-pass filter: A low-pass filter is a type of electronic filter that allows low-frequency signals to pass through but blocks high-frequency signals. By using a low-pass filter to filter out high-frequency noise, you can help to reduce the likelihood of the microcontroller resetting or behaving unexpectedly.

Let me know if you have any other questions or if you need further assistance.

1 Like

Hi @EEngineer,
Thanks your relpy is so valuable.
While designing another version of this board I will keep these thing in mind and if this issue resolved I will post the solution as well.

I did not understand your problem properly
But i get one thing that you atmega328p is hanging after some time of uses

I also face this problem with my arduino pro mini
I think the main problem is the atmega328p can’t able to to provide requested power from the pin

I suggestion is to use 12 volt relay with bc547 BJT
I have tested this method with 2000 watt load

I hope it helps you

1 Like

Yo opino que ese problema es ruido electrónico , prueba en poner un filtro en la salida del relé