Odd estop problem
- sajurcaju
- Offline
- Premium Member
-
Less
More
- Posts: 100
- Thank you received: 8
17 Apr 2025 18:48 #326537
by sajurcaju
Odd estop problem was created by sajurcaju
My machine is self designed/built, 3 axis wood router. 2.2kW spindle, conventional steppers, LinuxCNC 2.9something, LMDE6.
G540 motor driver at 48V, software stepping with parallel port(s).
My estop circuit is really simple, there is a NC emergency stop switch with a 5k pullup. For the past couple of months, estop has been randomly triggered with no cause I've been able to find. It could happen in 10 seconds after motion enable, it could run for an hour before being triggered. I can enable LinuxCNC and watch it, 10 seconds to 10 minutes (i.e. random) and it will go into estop, with the motors powered (locked) but not moving.
Estop randomly triggering will only happen when either at least one motor is connected to the g540, or a heavy resistive load (15 Ohms, 2x across where the stepper coils would be). With no load on the g540 estop will stay off. I have looked at the power supply voltages, they are fine during an estop event (using a DVM, not looking for a transient with a scope).
The machine has been working fine before this. The only things I can think of that I've done to the setup:
1. Fried one of the outputs on the motherboard parallel port. Now I have 3 parallel ports, two PCI cards and the motherboard. I'm only using the two PCI cards, but the motherboard parallel is still visible to the system.
2. Replaced the estop cable (!) with nicer wire.
What I've tried:
1. Replaced the estop cable again. I realized that the first replacement was no longer twisted pair. I replaced it again with shielded cable, shield connected at the box containing the g540 and power supplies. Interference seems unlikely since the switch is a short.
2. Cleaned the switch contacts, which didn't help. Jumpered the switch, which didn't help.
3. Removed the C10 breakout board. One parallel port goes directly to the g540, the other went to the C10. There were only two switches connected to the C10, the estop (!) and the electrical touch probe, I just hardwired them to the parallel port. Appeared to greatly improve the problem (a lot longer between estops), but now it's back to 10 sec - 10 min.
4. Greatly improved cooling on the g540.
I don't really see how the g540 can be causing this estop problem. The only estop connection to the g540 is estop OUT from the computer. Symptoms, however, seem like the g540 has something to do with it. I did check the 48V is rock steady through an estop. Note that the g540 stays powered up (motors still powered) when an estop happens. I can reset the estop and it will be fine again for 10 sec 10 min. This doesn't sound like a thermal problem.
Any advice?
Thanks, Steve
G540 motor driver at 48V, software stepping with parallel port(s).
My estop circuit is really simple, there is a NC emergency stop switch with a 5k pullup. For the past couple of months, estop has been randomly triggered with no cause I've been able to find. It could happen in 10 seconds after motion enable, it could run for an hour before being triggered. I can enable LinuxCNC and watch it, 10 seconds to 10 minutes (i.e. random) and it will go into estop, with the motors powered (locked) but not moving.
Estop randomly triggering will only happen when either at least one motor is connected to the g540, or a heavy resistive load (15 Ohms, 2x across where the stepper coils would be). With no load on the g540 estop will stay off. I have looked at the power supply voltages, they are fine during an estop event (using a DVM, not looking for a transient with a scope).
The machine has been working fine before this. The only things I can think of that I've done to the setup:
1. Fried one of the outputs on the motherboard parallel port. Now I have 3 parallel ports, two PCI cards and the motherboard. I'm only using the two PCI cards, but the motherboard parallel is still visible to the system.
2. Replaced the estop cable (!) with nicer wire.
What I've tried:
1. Replaced the estop cable again. I realized that the first replacement was no longer twisted pair. I replaced it again with shielded cable, shield connected at the box containing the g540 and power supplies. Interference seems unlikely since the switch is a short.
2. Cleaned the switch contacts, which didn't help. Jumpered the switch, which didn't help.
3. Removed the C10 breakout board. One parallel port goes directly to the g540, the other went to the C10. There were only two switches connected to the C10, the estop (!) and the electrical touch probe, I just hardwired them to the parallel port. Appeared to greatly improve the problem (a lot longer between estops), but now it's back to 10 sec - 10 min.
4. Greatly improved cooling on the g540.
I don't really see how the g540 can be causing this estop problem. The only estop connection to the g540 is estop OUT from the computer. Symptoms, however, seem like the g540 has something to do with it. I did check the 48V is rock steady through an estop. Note that the g540 stays powered up (motors still powered) when an estop happens. I can reset the estop and it will be fine again for 10 sec 10 min. This doesn't sound like a thermal problem.
Any advice?
Thanks, Steve
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20088
- Thank you received: 6836
17 Apr 2025 20:37 #326542
by tommylight
Replied by tommylight on topic Odd estop problem
That is interference, no matter how you put it, caused by:
- bad wiring,
- cross wiring,
- no ground,
- bad grounding,
- ground loops,
- bad power supply/s,
- dirty power supply (not physically)
-
A quick way to narrow down things is to use the halscope and watch the input parallel port pins, 4 at a time, for each port.
- bad wiring,
- cross wiring,
- no ground,
- bad grounding,
- ground loops,
- bad power supply/s,
- dirty power supply (not physically)
-
A quick way to narrow down things is to use the halscope and watch the input parallel port pins, 4 at a time, for each port.
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18460
- Thank you received: 5042
17 Apr 2025 21:14 - 18 Apr 2025 18:46 #326544
by PCW
Replied by PCW on topic Odd estop problem
Is the estop input debounced? (software or hardware)
A bare parallel port input will react to 20 or so ns noise spikes
These will occur only occasionally because the likelyhood
of the servo thread reading the input just an the moment of the
noise spike is unlikely. Motor drives make just these sorts of spikes.
Note that while an open switch wire with as resistive pullup will be susceptible
to capacitively coupled noise, a shorted switch wire will be susceptible
to inductively coupled noise.
I would check the routing of the estop wiring to make sure is is not anywhere
near the motor wiring.
If all else fails I would try a RC filter on the parallel port input pin (say 330 ohm and .1 uF at the parallel port itself)
or adding a hal debounce component to the ESTOP signal
A bare parallel port input will react to 20 or so ns noise spikes
These will occur only occasionally because the likelyhood
of the servo thread reading the input just an the moment of the
noise spike is unlikely. Motor drives make just these sorts of spikes.
Note that while an open switch wire with as resistive pullup will be susceptible
to capacitively coupled noise, a shorted switch wire will be susceptible
to inductively coupled noise.
I would check the routing of the estop wiring to make sure is is not anywhere
near the motor wiring.
If all else fails I would try a RC filter on the parallel port input pin (say 330 ohm and .1 uF at the parallel port itself)
or adding a hal debounce component to the ESTOP signal
Last edit: 18 Apr 2025 18:46 by PCW. Reason: sp
Please Log in or Create an account to join the conversation.
- sajurcaju
- Offline
- Premium Member
-
Less
More
- Posts: 100
- Thank you received: 8
18 Apr 2025 18:37 #326623
by sajurcaju
Replied by sajurcaju on topic Odd estop problem
Halscope does indeed show scattered 1V spikes on parallel port pin 3 (what I'm using for estop ext).
Estop-ext was not debounced.
I tried it again unchanged, estop not debounced. When I enabled, it immediately had an estop. Re-enabled, it took 10 seconds to estop.
I added debounce in Hal and it's been enabled for 3 hours with no estop events. Looks pretty good, more time will tell for sure.
Unfortunately, part of the debounce code is in my machine-name.hal file, which will get overwritten if I run Stepconf. Another note to my "fixing after stepconf" file. The code:
In machine-name.hal, add an intermediate net estop-ext-raw:
#net estop-ext <= parport.1.pin-03-in-not <<as written by Stepconf>>
net estop-ext-raw <= parport.1.pin-03-in-not
In custom.hal:
loadrt debounce cfg=2
setp debounce.0.delay 100
addf debounce.0 base-thread
net estop-ext-raw => debounce.0.1.in
net estop-ext <= debounce.0.1.out
Thank you!
Estop-ext was not debounced.
I tried it again unchanged, estop not debounced. When I enabled, it immediately had an estop. Re-enabled, it took 10 seconds to estop.
I added debounce in Hal and it's been enabled for 3 hours with no estop events. Looks pretty good, more time will tell for sure.
Unfortunately, part of the debounce code is in my machine-name.hal file, which will get overwritten if I run Stepconf. Another note to my "fixing after stepconf" file. The code:
In machine-name.hal, add an intermediate net estop-ext-raw:
#net estop-ext <= parport.1.pin-03-in-not <<as written by Stepconf>>
net estop-ext-raw <= parport.1.pin-03-in-not
In custom.hal:
loadrt debounce cfg=2
setp debounce.0.delay 100
addf debounce.0 base-thread
net estop-ext-raw => debounce.0.1.in
net estop-ext <= debounce.0.1.out
Thank you!
Please Log in or Create an account to join the conversation.
Time to create page: 0.059 seconds