Hello Guest it is September 21, 2019, 07:55:43 AM

Author Topic: Turning on the relay causes a 'limit switch triggered' error  (Read 610 times)

0 Members and 1 Guest are viewing this topic.

Offline reuelt

*
  •  444 444
    • View Profile
Re: Turning on the relay causes a 'limit switch triggered' error
« Reply #10 on: March 10, 2019, 08:51:33 PM »
So I have a 12V relay board that I used to use with my Arduino. It actually has two relays on it and I'm using only one channel. The board schematic is like the one shown in the image:


some comments:
1. YOU need to use a (high current) "SOLID STATE RELAY" - not an electromagnetic type relay.
2. (std) Ethernet cable is UTP "(unshieded) twisted-pair" and cannot be used for this application. Proper cable with grounded coaxial shielding must be used for limit switches.
3. You limit switches are better to be made normally closed (with preferable higher voltage and always on) rather than normally open.
4. A 0.1uf capacitor should be parallel to the each terminals of the limit switch input and ground at the BOB (break out board) of each axis.


Since I wanted the relay to operate on an active high input, I tied IN1 and GND together. The GND here is also the LPTs GND. On the Vcc terminal where it says Arduino's 5V, I have pin 14 of the LPT connected. Across JDVcc and GND is an independent 12V supply.

Now every time I try to switch on the spindle, the relay clicks ON for a fraction of a second and then turns OFF and I see a 'Limit switch triggered' on the screen. Can anyone help me understand what is happening here?
"the gift of God is eternal life through Jesus Christ our Lord"
Re: Turning on the relay causes a 'limit switch triggered' error
« Reply #11 on: March 13, 2019, 10:56:50 PM »
So I ran the job without the spindle powered up and it ran smoothly without any issues. I guess that confirms that the spindle is the source of the trip, even though the limit switches have RC noise filters. Thank you all for your actionable suggestions! They really helped.

some comments:
1. YOU need to use a (high current) "SOLID STATE RELAY" - not an electromagnetic type relay.
2. (std) Ethernet cable is UTP "(unshieded) twisted-pair" and cannot be used for this application. Proper cable with grounded coaxial shielding must be used for limit switches.
3. You limit switches are better to be made normally closed (with preferable higher voltage and always on) rather than normally open.
4. A 0.1uf capacitor should be parallel to the each terminals of the limit switch input and ground at the BOB (break out board) of each axis.

I did think about using a solid state relay, however, my spindle is weird in a way that it has two terminals that act as a switch. When shorted, the spindle turns ON. I could however, short those terminals and use the SSR to switch the main power to the spindle. The ethernet cable I have is S/FTP. Each pair has a foil shield and then there is shielding foil over all of them together. Yes my limit switches are configured to be NC and they have an RC filter between them and the board.
Re: Turning on the relay causes a 'limit switch triggered' error
« Reply #12 on: March 13, 2019, 11:07:07 PM »
Hi,
there are two ways to approach EMI (electromagnetic interference).

Things like shielding cables, RC filters  on signal lines are all variations on the theme of 'decreasing the sensitivity
of signal circuits to EMI'. This is not the best, or perhaps the first approach.

The other way is to apply line reactors and/or filters to the VFD/spindle so that no EMI is generated. Then all signal
circuits operate is a low noise environment.

What sort of spindle are you using?

Craig
My wife left with my best friend...
     and I miss him!

Offline MN300

*
  •  107 107
    • View Profile
Re: Turning on the relay causes a 'limit switch triggered' error
« Reply #13 on: March 13, 2019, 11:16:04 PM »
Connecting the ground of the computer to the ground of the machinery can provide a path for noise to enter and affect the computer, regardless of the limit switch filtering. If none of the previous suggestions solve the problem an opto-isolator type BOB may be needed.
Re: Turning on the relay causes a 'limit switch triggered' error
« Reply #14 on: March 14, 2019, 01:53:50 AM »
Hi,
there are two ways to approach EMI (electromagnetic interference).

Things like shielding cables, RC filters  on signal lines are all variations on the theme of 'decreasing the sensitivity
of signal circuits to EMI'. This is not the best, or perhaps the first approach.

The other way is to apply line reactors and/or filters to the VFD/spindle so that no EMI is generated. Then all signal
circuits operate is a low noise environment.

What sort of spindle are you using?

Craig

This is a Chinese 300W DC spindle. I'm curious about the filters for the spindle that you are referring to.
Re: Turning on the relay causes a 'limit switch triggered' error
« Reply #15 on: March 14, 2019, 01:55:35 AM »
Connecting the ground of the computer to the ground of the machinery can provide a path for noise to enter and affect the computer, regardless of the limit switch filtering. If none of the previous suggestions solve the problem an opto-isolator type BOB may be needed.
This was going to be my next port of call. I'm curious as to how opto-isolation would be able to isolate noise...
Re: Turning on the relay causes a 'limit switch triggered' error
« Reply #16 on: March 14, 2019, 02:18:46 AM »
Hi,
I was thinking that maybe you had a VFD and a asynchronous motor. For such motors line reactors
are appropriate.

For a DC spindle I would suggest a line filter like this in the AC input circuit:

https://nz.element14.com/corcom-te-connectivity/5vb1/power-line-filter-emi-rfi-5a-700ua/dp/2505259

In fact even between the DC controller and the motor would go a long way to suppress brush arcing.

Craig
My wife left with my best friend...
     and I miss him!
Re: Turning on the relay causes a 'limit switch triggered' error
« Reply #17 on: April 07, 2019, 01:44:37 AM »
So I've been doing testing on this further and I'm ready to give up. I switched off the limit sensing that seemed to be triggering the stops. I replaced all the cables on the machine to shielded ones and grounded the cable shields. I still get random stops in the middle of a job. Its not an estop because the spindle is still spinning. Not sure what is happening.
Re: Turning on the relay causes a 'limit switch triggered' error
« Reply #18 on: April 07, 2019, 02:13:07 AM »
Hi,
have you tried a line filter on the AC input to your DC power supply/spindle combination?

Shielded cable is all very well but its trying to 'keep the noise out' rather than stopping the noise at its source.

Craig
My wife left with my best friend...
     and I miss him!
Re: Turning on the relay causes a 'limit switch triggered' error
« Reply #19 on: April 07, 2019, 05:32:32 AM »
I don't really want to keep spending more money on this considering that it works perfectly fine with grbl-based hardware and software. The only problem with those is the inability to handle really large files. Anything program with more than 100K lines and grbl starts to get bogged down.