# How to eliminate noise from Relay? [closed]

In my recent project, I am working with Peltier module. Now, here the main purpose of my project is switching between cooling and heating. And for that purpose, I'm using the 5V relay(2-relay) board. Now, during switching, the noise is generated from the relays and it totally destroys all functionality of the system.

First of all, let me explain the functionality of the system so you can understand the what is the role of the relay. In our system, we have to maintain the temperature at the desired time.

My system diagram looks like below:

Above is the most simple diagram. I just avoid the all actual connections and represent all connections in form of the bus. Now as you see in diagram different modules are there. Temperature sensor takes the reading which is attached with Peltier module. Now here motor driver is used for driving the Peltier module. LCD is used for display all data and keypad is used for entering the temperature and timer.

Now, here relays is used for the switching means for heating and cooling. By default, temperature is room temperature. Here we used 2-relay board in which one is used for cooling and other one used for heating.

For, switching for heating and cooling I just developed the logic like below.

if(desired_set_temp > peltier_temp)  // Heating
{
relay 1 active
relay 2 not active
}
if(desired_set_temp < peltier_temp)  // Cooling
{
relay 1 not active
relay 2 active
}


Now, the real problem starts here. Suppose, if we set temperature -5 degree then Peltier temperature try to maintain its temperature around -5 degree. and during this time switching happening and both relays generate noise. Now, how to eliminate this noise from these relays? Any circuit that removes this noise.

Edit: totally destroys all functionality of the system means during this time,

(1)LCD showing weird characters

(2)Can't able to operate the system

(3)Can't able to enter any value from Keypad

We have to compulsory restart the system and then we can able to operate system again.

## closed as unclear what you're asking by Olin Lathrop, laptop2d, Dmitry Grigoryev, Dwayne Reid, Kevin ReidJun 19 '18 at 21:40

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• "totally destroys all functionality of the system"? Can you be more specific? – Dampmaskin Jun 13 '18 at 10:35
• @Dampmaskin Ok let me edit and clear that things. – Hasan Jun 13 '18 at 10:39
• I'm an amateur but would relays with (built in) optocouplers be a solution? – Michel Keijzers Jun 13 '18 at 10:51
• "I just avoid the all actual connections" Then we avoid providing any actual answers. Most likely your grounding, bypassing, and/or power supply feed is badly done. There is nothing more to say for such a vague question. – Olin Lathrop Jun 13 '18 at 10:54
• Either EMI or power supply droop is disrupting your micro. You have not supplied enough information to figure out what you are doing wrong. Please do so. – Spehro Pefhany Jun 13 '18 at 15:04

auto active_error = 5;//or whatever
auto passive_error = 2;//or whatever
if(desired_set_temp > peltier_temp + allowed_error)  // Heating
{
relay 1 active
relay 2 not active
}
if(desired_set_temp < peltier_temp - allowed_error)  // Cooling
{
relay 1 not active
relay 2 active
}

if(desired_set_temp >= peltier_temp - passive_error &&
desired_set_temp <= peltier_temp + passive_error)  // goldilocks zone
{
relay 1 not active
relay 2 not active
}


This will add a delay between switching one and the other.

In this case it will activate the heater or cooler when the temperature exceeds the set temp +/-active_error and deactivate when it come back within +/-passive_error.