Noise on active low limit switch.

Thread Starter

markdem

Joined Jul 31, 2013
113
Hi all,
I am have an issue with a CNC machine I built and can't workout why..
Problem is when I turn on the spindle (just a 3 phase 400hz motor) I get random limit switch activations, sometimes after a few seconds and sometimes after a few minutes. If I leave the motor off, everything works fine.
Question is as the limit switches a active low (pulled up via 10k) how is noise affecting the switches? If the where active high I would understand, but been active low the noise would need to be negative. Is this possible?

I am going to change the pull up resistors to 1k to try to fix the issue. Besides this, is there anything else I could try to fix the issue?

Thanks.
 

Thread Starter

markdem

Joined Jul 31, 2013
113
The limit switch is connected to a parallel port on a pc. Nothing besides the pull up resistor is involved with the switch.
The control signal (pwm) for the spindle comes from the same pc via the same cable but the noise is not from there as if I disconnect the mains voltage from the spindle so it does not spin, the problem with the limit switches does not occur.
The pwm signal is opto isolated, as is the ground, between the pc and the inverter that drives the spindle.
I have attached a drawing showing the connections. Note there are 7 switches involved, but all show the same issue if I test individually. Sorry for the poor effort at the drawing, I don't have anything beside paint on this pc.

Thanks again.
 

Attachments

ScottWang

Joined Aug 23, 2012
7,397
The limit switch connected to which board or pin of PC?
How long the wire of limit switch from PC?
Can you make sure the noise come from AC line of PC or the wire of limit switch?
 

Thread Starter

markdem

Joined Jul 31, 2013
113
The switches are connected to a board inside my controller, then to the pc. Pins 10 to 13 re used for the switches.
Cable length is between 2 and 3 meters.

The noise is not coming from the pc as the system works useless ac is connected to the inverter.
The question here really is why, when I have the switches as active low, is noise triggering the input?

Thanks.
 

ScottWang

Joined Aug 23, 2012
7,397
The circuit as below was used for the power of uC, but now you need it for the input signal, you may need to adjust the values of L1 AND c1 to suit your needs.

uCLimitSwitchNoise_markdem_ScottWang.gif
 

crutschow

Joined Mar 14, 2008
34,285
Noise is AC so it will go positive and negative.

Just attaching the two capacitors that Scott shows will likely stop the noise problem. But add a small resistor (say 100Ω) in series with the limit switches to limit the surge current when the switches close.
Try that before you add the inductor.
 

Thread Starter

markdem

Joined Jul 31, 2013
113
"Noise is AC so it will go positive and negative." - Makes sense I guess, I just did not think it could "take away"... At least I learnt something today :)

ScottWang - thanks for that. I was thinking about some filtering too. I will give it a shot.

Max - The VFD is connected to earth but the spindle is not. I only have a 3 pin plug on it but I will try to bond it and see what happens.

Thanks for the help.

Mark
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
Max - The VFD is connected to earth but the spindle is not. I only have a 3 pin plug on it but I will try to bond it and see what happens.
IMO many of the R/C noise 'debounce ' fixes are just covering up the original problem, industrial systems do not typically experience or employ these type of work arounds.
Max.
 
I have worked on industrial equipment and found issues with common mode noise.
The answer is to swamp it out wit ha lower pull up resistor.

Or if its really bad use a differential amplifier input.
 
Top