Noise on active low limit switch.

Discussion in 'General Electronics Chat' started by markdem, Aug 2, 2015.

  1. markdem

    Thread Starter Member

    Jul 31, 2013
    76
    38
    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.
     
  2. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    Where is the limit switch connect to?
    How is the circuit or block diagram of control board?
     
  3. markdem

    Thread Starter Member

    Jul 31, 2013
    76
    38
    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.
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    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?
     
  5. markdem

    Thread Starter Member

    Jul 31, 2013
    76
    38
    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.
     
  6. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    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
     
  7. crutschow

    Expert

    Mar 14, 2008
    13,019
    3,235
    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.
     
  8. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,552
    2,374
  9. markdem

    Thread Starter Member

    Jul 31, 2013
    76
    38
    "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
     
  10. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,552
    2,374
    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.
     
  11. nigelwright7557

    Senior Member

    May 10, 2008
    487
    71
    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.
     
Loading...