Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relay EMI is triggering sensors on custom Arduino PCB 2

Status
Not open for further replies.

SolarTrap

Computer
May 5, 2014
89
Hi All,

I have a problem with the relay on a custom PCB I designed. On my breadboard prototype the parts where somehow spaced out enough to not show the problem.
The relay I am using is a DPDT 120VAC (Mouser: 653-LY2-DC24). In 50% of the switching operation, a button is triggered as a side-affect. It is 'Push_button1' or 'Push_button2' that get triggered - luckily it does not also trigger the reset-button. I found some resources talking about arc suppression at relays that are RC elements. But I dont know how to use that with a DPDT relay. I use the relay to switch a load between 2 power sources.

Any suggestions?

Markus
buttons-pcb.png

bare-bone-shield.jpg

back-side-annot.jpg
 
Replies continue below

Recommended for you

I think problem come from initial high di/dt, not from contact arcing. From photo, PB1 and PB2 are far away form Arduino connector with very long traces that go too close to relay. For PB3 (reset) it's not same situation - it's close to Arduino connector - and don't "see" same EMI in traces. I think you need to redesign PB1 and PB2 position to eliminate such problems. May try to reduce resistors of these Arduino lines to minim (maxim allowed current) to increase noise immunity. For this card, may cut traces from PB1 and PB2 and replace them by wires (twisted or better shielded).
 
Designing a low voltage digital system on the same board as high current, high speed is certainly doable, but it requires extremely careful planning, and generally, more than a 2-layer board, particularly if signal lines are running through the high current sections. I've worked with boards that dump 120A in 60 ns that didn't have any problems, but the signal interfaces were all differential AND isolated through pulse transformers or opto isolators to prevent interference.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
I want to stick with 2 layers so I might re-consider the location of the buttons. I just bought the right Resistor+Cap and will install it at the weekend. Additionally I will create data logging around the push button events to dump out all sensor data, especially from the hall sensors and relay state. This might bring more clarification.
 
Dan, can you be more specific? I am not sure what you suggest to measure.
But so far a reset has not occurred.
 
Interesting board. I've been running a fridge for years with a UNO. Actually it runs the whole house with power point PV water heating, septic pump, fan, and 12 & 36V charge control. Have some questions, you should post this at fieldlines.com. Are you sure this isn't getting reset? What do you have for a pullup? It seems like this could be handled in software. I wouldn't worry too much about the values of the RC. The big difference is between none and any. I've manufactured tens of thousands of them. Just make sure you use an X2 rated cap if you do it yourself.
 
You should be able to do software debouncing of the PBs. In your program look for a continuous hold down signal of 0.5 to 1 sec before triggering the action. Any transients should be gone before 0.5 seconds. If it is still triggering, then then problem is not in the PBs, but elsewhere.
 
@djs: my software debouncing is currently set to 50ms - I will try if a higher value still gives good control when using the buttons to navigate the settings menu.
 
Any debounce beyond 20 milliseconds is pure lunacy. And to avoid HF interference, one millisecond is plenty.

Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
Results from the testing: Still got EMI. I setup a logging mechanism and captured a button press in the moment the relay was switching. The numbers show that in the moment of switching a load of 160W was on for about 24 minutes. The switching was passing the load from the inverter to the mains power. That means nothing in the DC circuit could have caused the EMI. I have used a 100 Ohms + 0.1uF combination.
Shall I try 50 Ohms now?
 
OK, do that. But I'm afraid that you need help from someone that knows the ins and outs of this. Working like this is never good. Hands-on is the only way.

Where in the World are you? If in the Bay area, I think that Keith is a good tip.

Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
I am in Los Angeles (Altadena). Agreed that trial and error is not the ideal method here, how is that done right?
 
Keith is in the Bay Area North of you - near San José, a beautiful drive along the 1 - but somewhat lengthy.

"how is that done right?"
Find the REAL reason for the problems instead of assuming. It can be anything, arcing contacts is the most common, then there is (as IR and Opera are saying) all sorts of influences from heavy currents causing ground shifts and induced voltages in unexpexted places.

To rule out arcing contacts and load/inrush, you can disconnect the load completely. If problems go away, then you know that it is on the contact's load side you shall look. Then observe if the problem occurs when contacts close or open. If it is when they close, you can almost certainly concentrate on induced voltage and ground shift. But, remember that bouncing may also include arcing. It is only when you find the problem also when opening the contacts that you can expect arcing and need to appy snubbers or an MOV.

If the problem is there when contacts close but not when they open, try to reduce load and see if the problem goes away. If it does, you can be sure that the inrush is the problem. Then you can cut the traces you have on the PCB and substitute Heavy gague wire that you route far away from any spot that might be sensitive. You can also try and "desensitize" the circuits that seem to be picking up interference.

You may also have a problem with the relay coils, but you do have clamping/free-wheeling diodes on them, don't you? So I don't see a problem there - unless something is terribly wrong with your power supply. If the voltage regulator is sluggish, you may have a Vcc drop when the relay kicks in. Have you checked that?

One thing that I hope that you have enough of is decoupling capacitors. Enough of them, of the right size and in the right places. You do have that?

This is not a complete Cook-book on how to track down and eliminate problems with switching on a PCB. But it is a good start, and I think that you will find your own way of doing it once you start to Divide and Conquer. Good luck!



Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
Try moving C16 and C23 next to the processor and add a pull up resistor (also next to the processor) to all three buttons. The built in pull up is kinda weak and having the cap next to the button makes the trace prone to induced voltages on the processor end.
 
@badservo:

will try the external pullup, fixing C16 and C23 on my current PCB is a nightmare. Not sure can do that.

@Gunnar:

Find the REAL reason for the problems instead of assuming

Thanks for the list. yes, that is my quest.

1) influences from heavy currents causing ground shifts and induced voltages in unexpected places
I can rule that out because the button was never triggered on a high load being switched on. I have dozens of these in my data logs without any trigger. Only if the relay is switched it happens.

2) Then observe if the problem occurs when contacts close or open
The nature of the DTDP relay is that it does always both: one side is opened and the other closed. So I have no way finding that out except for a high speed cam recording the contacts.

3) you can cut the traces you have on the PCB and substitute Heavy gauge wire
That will be my very last resort

4) You may also have a problem with the relay coils
I have a clamping/free-wheeling diode in there but I have not tested switching the relay with 120V but no load over a longer period.
The relay is not driven by 5Vcc but from a separate 24V supply

5) I hope that you have enough of is decoupling capacitors
All input ports on the Arduino have a 0.1uF on them - I think decoupling is good.
 
Markus

Re. 2: I am a bit disappointed now. Some own thinking may lead you to the conclusion that it is possible to disconnect one of the loads. Then you can do the necessary observations.



Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
He is using the internal microprocessor pullup. If he used a pullup resistor of 330-1200 ohms, that load may be enough to dampen the noise. This assumes that he is using real switches. Anyone else have an opinion on internal pullups?
 
Hi All,

I was pulled into other things so this last test too me a while to finish. I am now using 470 Ohm resistors to do an external pull-up. I measured the ATmega2560 pull-up which is only bringing the line up to 4.75 volts - that was a surprise to me. Now with the external two pull-ups I don't get phantom button presses any more. Thanks for all your input!

One question now remains: should I have a snubber to protect the relay contacts or is that is more a 'nice-to have' feature than a real requirement. What is your experience and best practices?

Markus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor