Home › Forums › TinyG › TinyG Support › Motors stop but TinyG thinks everything's OK
- This topic has 8 replies, 2 voices, and was last updated 4 years, 11 months ago by cmcgrath5035.
-
AuthorPosts
-
November 24, 2019 at 7:41 pm #11683S221BMember
OK – so here’s a puzzler.
I first noticed something odd on a G28.2 homing command – Z axis homed, then X just stopped mid-way to the homing switch. I thought “that’s weird”, entered a G28.2 again, and that time it homed normally.
Next – jogging to position, I did a X+100mm command, and again, it just stopped about 75mm in. I tried moving over with a Y=25, heard a distinct “click” of motor powering up, and got no motion. I homed again, started over, and everything seemed OK.
I ran a simple G-code file (cutting a 20mm ring out of ABS sheet) that should have been no problem for the machine (I was taking 1mm cuts with a 1/8” end mill, my machine cut stuff tougher than this before), but I noticed some odd “jogs” in the cut line like it was missing steps occasionally. After two trips around the ring, it just stopped moving entirely.
The sender (CNCjs) seemed to still believe the cycle was going on – the “pause” button was clickable. No error codes, no blinking red light, nothing to indicate that anything bad was happening. I hit pause, and then resume – *and this is probably important* – when resuming, the spindle moved to a totally inappropriate location and started cutting again.
All this points to a condition where the motors stop moving, but TinyG thinks that everything is still moving along normally.
Now, my machine was running fine all summer, with one exception – I had a squirrelly connection to one of my (NC) limit switches which would occasionally fault out and stop a job due to a bad connection at one of the 1/8” phone jacks I was using to connect the switches to my control box. I re-wired the limit switches with better jacks (RCA-style), and, for good measure, used shielded cable.
I also grounded the cable to the chassis of the machine, and then grounded the machine itself to an earth ground. (I thought “as long as I’m doing this I might as well overkill it.”) I also ran a common ground wire between all moving segments of the machine, linking the Z-carriage to the Y-gantry to the X base.
*It was at this time that the weird behavior started.*
My thinking is that, in some way, grounding/bonding the machine has caused this behavior. I haven’t had time to go out and disconnect all the grounding wires yet (first step in troubleshooting), but I am baffled how this could cause the motors to stop. The random stops have occurred on all three axes so I don’t think it’s just a bad jack or a loose connection. Have I somehow created some kind of a bizarre ground loop or unintentional-capacitor effect? Any ideas on what could be causing this?
Any input is appreciated.
November 25, 2019 at 6:56 am #11684cmcgrath5035ModeratorAs I was reading the top of your post, I was thinking noise issue. So as I reached the bottom of your post, I see you are already suspicious of grounding issue as well.
From what I read, you have turned the entire machine structure into an antenna for noise that will couple into the limit switch inputs.
Here are suggestions for limit switch wiring
– Use shielded twisted pair
– Connect the shield at the tinyG end to the power supply negative input on the tinyG. Better to make that connection directly at the Power In “-” rather than on the switch input terminal switches; noise currents flow directly to the Power supply (an input filtering) rather than across the tinyG board
– Make no connections at the limit switch end except the switch terminals, do not connect the “gnd” wire of the twisted pair to the machine structure itself.
– You may find that using shielded cable for connecting the 4 stepper wires
for each motor will help. Ground that shield at tinyG end, to Power supply negative as well.
– Shielded cable for your spindle might help as well. If problems persist, using a separate power supply for the spindle might be appropriateNovember 25, 2019 at 7:03 am #11685cmcgrath5035ModeratorI’ll add that bonding all the machine metal together an then to ground is probably unnecessary. but if you choose to do it, connecting to the power supply earth (green wire in line cord) is probably best, or to the DC negative at the power supply output, but not both.
Transformerless AC to DC power supplies typically do not have a direct connection between the + and – outputs to that earth AC input.
November 25, 2019 at 5:29 pm #11687S221BMemberUpdate – I didn’t have much time tonight, but I disconnected the lead that was linking the machine chassis to Earth ground. This Earth ground connection was the same one used by the 24V power supply, just further upstream.
I did a number of jogs and homing cycles and everything seems normal so far – no mystery stalling or weird behavior. I will try to run a part tomorrow.
Here’s the real stumper – whatever was going on wasn’t triggering the limit switches; there was no blinky light and no alarm status on the machine. The machine acted like everything was normal. The only thing I can figure is that whatever combination of ground loops I created was inducing a back-EMF in the motor leads that was preventing the field coils in the steppers from energizing. I can’t think of anything else that would have caused this.
I’ll play with it again tomorrow and report what happens.
Cheers!
November 26, 2019 at 8:31 am #11689cmcgrath5035ModeratorI thought a bit more on your problem and wondered as well, you did say that motion terminated but did not say it was a flashing leds/ limit exceeded sort of event.
My guess would be that the coupled noise somehow affected code execution in the tinyG controller, although explaining how the program execution could remain ‘sane’ is a bit of a stretch. Best guess would be corruption of the dynamic part of the process (RAM values)while the tinyG FW and parameters, in non-volatile storage remained in-tact.
November 27, 2019 at 10:06 am #11691S221BMemberUpdate:
Well, with the chassis lead to Earth ground removed, everything seems to be normal now. I ran a full Gcode file with no issues, homing is back to normal, jogging is fine.
I am utterly baffled how I managed to create enough EM interference to disrupt the TinyG by grounding the chassis…I would have expected exactly the opposite. That being said, it’s not broken, so I’m going to stop fixing it!
December 2, 2019 at 7:00 am #11700cmcgrath5035ModeratorI understand your baffle.
In a typical machine, none of the active devices (steppers, limit switches, spindles, etc) should have any electrical connection to the machine framework.If you wanted to pursue understanding what was going on, I would start by attempting to understand in detail how your power supplies are connected.
The Low cost (relatively speaking) compact transformer-less DC supplies typically used in this space have a indeterminate relationship, output wise, to AC Line-in and Neutral. Some have their positive output sitting one one two diodes above at below Line in, while – output 24V below Neutral. Way back at your breaker box, Neutral and earth (green wire) are connected.
But other designs are just the opposite, – out is referenced to Neutral and + output 24V above neutral.
Very strange things can happen if you connect the wrong things together.December 4, 2019 at 2:50 pm #11701S221BMemberWell…the mystery now seems solved. There were actually two things going on.
In search of a ground fault, I opened up the control box for the machine. (My TinyG board, power supply, fan, and jacks for motor and switch connections are contained in a plywood cabinet with a plexiglas top.) I discovered that the power supply, which is mounted to the box with four screws, had just a tad of wiggle in it. (The holes the screws pass through are intentionally slightly oversized.) Apparently, vibration from the machine running loosened them up slightly. This was allowing the PS to move around (maybe just +/- 1mm any direction), but I found a witness mark on it’s aluminum case to suggest it was touching the metal plate on the side of the box where the jacks to the switches are located.
This plate is connected to the TinyG ground, and thus to PS negative. The exterior of the PS is connected to earth ground. Thus, when the PS touched the metal plate, I was intermittently connecting PS negative/TinyG ground to Earth ground.
By itself, this shouldn’t really matter, but the fact that this unintentional connection was intermittent (as the PS jiggled around in the box) was probably not great, and I suspect may have been confusing the TinyG.
I stuck a piece of electric tape over the spot where it had touched, re-tightened the screws, and this seemed to fix everything at first.
As I proceeded with some test runs cutting foam, I found some odd Z-axis behavior was persisting. Upon inspection (thinking of how the PS had loosened up) I discovered that the connections to the motor wires on the TinyG board had loosened a bit, and that Z was particularly loose. I snugged them all back up now everything seems fine – I ran several jobs without incident.
The moral of this story:
1) either ground your PS negative to earth, or don’t, but don’t let it intermittently jump around.
2) fasteners loosen with vibration
3) if the motors are acting weird, double check all connections from the board all the way to the motorI’m just happy to have everything working properly again!
December 6, 2019 at 5:56 am #11702cmcgrath5035ModeratorThanks for the follow-up, some good suggestions.
This is a world where hobbyist techniques, connectors and layouts meet industrial applications.I’ll add to your list a caution that dealing with the typically fine gauge wires that connect stepper motors to the rest of the world can be difficult to work with and maintain. A forum suggestion a few years back suggested using wire ferrules, I found them very handy. Here is what I used:
Wire FerrulesI suggest not connecting either Power – or Power + to Earth ground unless you really understand ALL the elements in your system.
There are no universal standards for implementation of transformerless power supplies. Look at and read the schematics of your subsystems.
Using optically coupled switches for interfaces like the tinyG output port that controls spindle motors can help. If your system uses external stepper drivers that connect to the internal logic ports on the tinyG controller, you will find that virtually all the available off the shelf units are opto-isolator coupled -
AuthorPosts
- You must be logged in to reply to this topic.