Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stall on milling #595

Open
lolowl-coder opened this issue Jan 30, 2019 · 25 comments
Open

Stall on milling #595

lolowl-coder opened this issue Jan 30, 2019 · 25 comments

Comments

@lolowl-coder
Copy link

Hi. I've encountered communication issues with Arduino Uno r3 clone board, equipped with 16u2 chip.
Suddenly, my Arduino and GCode streaming software freeze when milling.
What I tried:

  • GRBL v1.1 (grbl-1.1f.20170801), v0.9j
  • Firmware update for 16u2 as recommended here
  • Baud rates (9600, 115200, 230400)
  • UniversalGCodeSender, bCNC
  • Different usb cables:
    • 0.3 m, shielded supplied with arduino uno
    • 1.35 m, shielded
    • 1 m, diy cable from mobile phone
  • GCode-file ~10 Mb 1001.nc

After these steps problem still remains.
How to fight this? Any help will be appreciated.

@HuubBuis
Copy link

Consider using Bluetooth or WiFi in stead of USB for elimination ground loops and interference from the high current stepper controllers. I use WiFi for about 2 years and it has never let me down!

@lolowl-coder
Copy link
Author

@HuubBuis, thank you for fast response.
Is this board suitable for your idea?
Should I change something in firmware?

@viewsat
Copy link

viewsat commented Jan 31, 2019

@lolowl-coder
You can use Grbl-Panel to send g-code.
Line 11 of 1001.nc is an unsupported command
1001

@swarfer
Copy link

swarfer commented Jan 31, 2019

I have just run your job through my clone Uno with CH340 chip in check mode with success.
all 490000 lines of it, but I did edit out the toolchange line (maybe you should use a different Fusion post, one really made for GRBL :-) https://github.com/swarfer/GRBL-Post-Processor

What does this mean?
you say 'suddenly it stops' which I take to mean it used to work perfectly but now it does not. This indicates something has changed, maybe the USB driver got updated? or the Uno got hot once too often and there is now a dry joint. MAybe point a fan at it while it runs and see if that helps. If so then the problem is heat related.
is the PC staying on during the job? maybe it is trying to sleep (yes the screensaver/power setting can change during a Windows update)

@HuubBuis
Copy link

HuubBuis commented Jan 31, 2019

@HuubBuis, thank you for fast response.
Is this board suitable for your idea?
Should I change something in firmware?

You don't need to change anything in firmware.

This board isn't GRBL compatible due to the ATMEGA4809 processor used. You need a standalone WiFi board like ESP-01 (ESP8266) or a arduino uno https://robotdyn.com/uno-wifi-r3-atmega328p-esp8266-32mb-flash-usb-ttl-ch340g-micro-usb.html or mega https://robotdyn.com/mega-wifi-r3-atmega2560-esp8266-flash-32mb-usb-ttl-ch340g-micro-usb.html having a builtin ESP8266.

I use the arduino Uno and (soon) Mega version having the builtin ESP8266 module, that works great, no additional wiring, no level converters needed and programming is done by just setting a few dipswitches. I have written a manual and a ESP8266 sketch to use these boards http://www.mwt.messageboard.nl/forum/viewtopic.php?f=4&t=11

If your GCode sender doesn't support WiFi, you also need a USB to WiFI converter at the computer site. For this you could also use a ESP8266 [https://www.ebay.nl/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=ESP8266&_sacat=0](url) module and a USB adapter for using and programming this boardhttps://www.ebay.nl/itm/CH340-USB-to-ESP8266-ESP-01-Wifi-Module-Adapter-1394D1/163459070459?hash=item260eeb79fb:g:kyYAAOSwQhBcKQOv:rk:3:pf:0
I haven't written a sketch for the ESP8266 module at the computer site but if you need it, I will do it.

Beware, to connect the standalone ESP-01 (ESP8266) to a standard arduino you need a level converter board like this one https://www.ebay.nl/itm/Adattatore-per-modulo-WI-FI-ESP-8266-ESP-01-arduino-level-converter-module/223322486589?hash=item33ff0eb73d:g:bkQAAOSwgyZcOi8m:rk:1:pf:0

@MeJasonT
Copy link

MeJasonT commented Jan 31, 2019

Does reducing the status query period on your GUI help, you can have too much data. 200ms is certainly fast enough for human monitoring. I found the GUI Candle https://github.com/Denvi/Candle was set by default to 40ms, so that's 25 responses per second with a string 70 characters long being reported back from GRBL. It caused a few data dropouts for me until i reduced it. GRBL keeps track of its location the response messages are just for the users reference/display purposes so you can see what the machine thinks it is doing.

@lolowl-coder
Copy link
Author

lolowl-coder commented Jan 31, 2019

@swarfer,

What does this mean?

It means my machine starts normally and after some (random) time movement slows down (may be without slowdown) and steppers stops to move.

MAybe point a fan at it while it runs and see if that helps.

It's not overheating. Tried with cooler 80x80 mm.

is the PC staying on during the job? maybe it is trying to sleep (yes the screensaver/power setting can change during a Windows update)

Yes, PC is on and normally operated (not trying to sleep, etc.)

Next thing i tried - process same file (in first post) with spindle disabled.
File was successfully processed.
I think the cause of problem was interferences from spindle (500w, brushed, aliexpress).
Does anyone know how to ensure in this?

I like wifi-approach, as @HuubBuis recommends. I'll try it.

I'm also interesting in how grbl behaves if it can't confirm, that gcode line is successfully processed?
Is such case a deadlock (no confirmation, no next GCode line, freeze)?

@HuubBuis
Copy link

I think the cause of problem was interferences from spindle (500w, brushed, aliexpress).
Does anyone know how to ensure in this?>

  • If the brushes wear out, they will make less contact and generate more interference
  • If the grounding of the spindle changes (more, less, none) interference also changes. Check for lose bolts on wiring and mounting or oxidation
  • Did you change the wall outlet
  • Did you change, add or remove other equipment (Zero probe)

@nsiatras
Copy link

I experience the same problem. Do you connect the Arduino GND pin to A/C Earth ?

@HuubBuis
Copy link

The Arduino GND pin should not be connected to AC/Earth. This is basically the same for every electronic device. The problem is that if you connect multiple electronic devices, earth current/spike go's the easiest way, which could be the electronics GND connected to ground. It could not only lead to erratic behavior but also destroy the electronics.

@nsiatras
Copy link

nsiatras commented Feb 14, 2019 via email

@HuubBuis
Copy link

I checked the Arduino Uno R3 schematic and yes, the USB shielding is connected to the Arduino GND by a small coil. This is probably done by a lack of a shielding Pin. This could results in ground loops and is in my opinion a design failure. I also have checked my own processor boards and I have made the same mistake (oeps)!
Shielding can be very useful. The basic rule is to connect shielding only at one side, the most sensitive side and connect the shielding to earth.
The easiest way to do this, is to cut the shielding at the Arduino end of the cable. This way you have a proper shielding and if your computer has a earth outlet, the shielding works even better.

@nsiatras
Copy link

nsiatras commented Feb 14, 2019 via email

@109JB
Copy link

109JB commented Feb 14, 2019

According to this document http://www.ti.com/sc/docs/apps/msp/intrface/usb/emitest.pdf the USB shield should be tied to the ground plane. See section 5.4 where it states:

Full speed devices use a shielded cable which requires that the connector shell be tied to the ground plane.
It is important to note that a ground plane does not behave like an equipotential surface at high
frequencies.

@HuubBuis
Copy link

@109JB
According to this documentation you are right and this document wasn't written by dummy's.

The fact remains that connecting cable shields on both sides results in ground loops, ground loops results in troubles and for proper shielding only one side of the shield needs to be connected. I don't know what is wise to do, but without changes there is not improvement.

After reading this document I still think it is worth a try to use a USB cable having the shielding cut at one side.

@langwadt
Copy link

cutting the shield won't do much since there is a ground wire in parallel with it, USB needs ground

@HuubBuis
Copy link

The problem are not the 2 USB ground connections, but the earth current that could and will flow when earth grounds of different electronics are connected and this connection isn't a star topologie (single point central earth)

@langwadt
Copy link

but if the PC grounds the shield cutting the shield will not break the loop since there's still the ground wire to break the possible loop you need an USB isolator or use a laptop running on battery

@n0th1n6
Copy link

n0th1n6 commented Feb 15, 2019 via email

@HuubBuis
Copy link

The Arduino has no connection to earth ground so ground currents can't travel trough the arduino to reach earth ground.

If at the PC side, the GND is connected to the Earth ground (probably yes), then the shortest route for the earth currents to travel will not be via the Arduino USB back and forth but via the PSU (power outlet) connection.

@n0th1n6
Copy link

n0th1n6 commented Feb 15, 2019 via email

@dcavataio
Copy link

Same issue, the choke on the spindle took care of the stall.

@matrix-wrangler
Copy link

@n0th1n6 @dcavataio facing same issue here, please let us know the parameters of choke that fixed the problem and specs of your spindles.

@n0th1n6
Copy link

n0th1n6 commented Sep 17, 2019

@matrix-wrangler, choke did not solve the issue for me. Following solved this issue 100%

  1. Use high quality USB cable. The shorter the cable the better.
  2. Using dremel cause this stall even when USB cable is short and of good quality.
  3. Move the mains cable away from the USB cable. These are the mains cable for your stepper and spindle.
  4. Most important, use a dedicated computer for your CNC. If you can't, just unplug other USB device while cutting.

@matrix-wrangler
Copy link

Thank you @n0th1n6 , 3 and 4 has always been the case that i followed strictly. Got a dedicated laptop on the cnc and a UPS + PSU for the CNC away from the mains to avoid interference. It's an old board that i'm using, i eventually figured out that sparks from brushed spindle (both old and new) is causing a lot of interfere for the machine to stall, as opposed to the cnc completes the job flawlessly when it's not connected to the spindle. Easier option would be to replace the board (woodpecker 3.2), which i did, but i wanted to go a little further to find a solution without a replacement board. I'll certainly try the high quality cable, but the params on choke can also help if it manages to negate the fluctuations caused by spindle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests