Feedhold (the definitive thread?)

Julien, thanks for starting this thread. Yesterday I got inspired (by crashing my Z axis) to build up a hold button for my machine and it works great. Just an NO momentary switch in a 3d printed enclosure. It’s a bit of an annoyance that CNCJS can’t restart without issuing the “~” command, but honestly I use the console so much now that I’m running it, it’s not all that much of an inconvenience. Definitely worth it to have a quick “oh shit” button when something doesn’t look right vs trying to rely on the unreliable CNCJS web interface.

2 Likes

Yeah, I was hoping to add a custom “Resume” button in the “Axes” widget to automate sending the “~”, unfortunately the Axes widget is disabled/greyed-out after Feedhold, so that won’t work. I agree, the console is right there in the interface so just typing one character is not that big a deal, especially when Feedhold is not supposed to be a frequent thing anyway.

2 Likes

@Kai If you have the newer boards with the A3 pin “easily” available, you could alter the grbl source to use it as a resume switch. I don’t have that board, so I don’t know if there’s an rc filter on that pin (default is used as an output to trigger coolant). I’d recommend adding a filter if you use it.
That said, as @Julien mentioned, this is for those who feel comfortable going away from stock and potentially jacking things up.
I hope the next c3d board iteration has all pins broken out (and user replaceable drivers).

By the way, I completely forgot due to my hardware “solution”, but CNCjs DOES have a built-in cycle start button.
image

2 Likes

I think you’re better off just changing to a different board if that’s what you want. There’s even an eagle schematic/board kit floating around for an arduino shield that makes a reasonable start if you’d like to make your own from scratch (which might be a fun project…using an S3 to do isolation routing on a new board for an S3…)

There are a number of sources of GRBL boards, some much better than others. I wasted a lot of time with a couple of particularly bad ones which turned out to be poor copies of better boards, but got me annoyed enough to just go all the way to a board that did exactly what I wanted instead of halfway there.
Junk: (terrible support, and awful connectors) https://www.ebay.com/itm/KEYESTUDIO-CNC-GRBL-0-9-Microcontroller-Board-for-Arduino-Laser-Engraving-Shield/253941089007?hash=item3b201182ef:g:GSUAAOSwVYhb49Xu
Junk: (Just…no. All the boards that have this look come from the same board design, which is outdated for current GRBL, and I haven’t seen one yet that wasn’t really poorly made) https://www.ebay.com/itm/CNC-Shield-V3-0-4Pcs-A4988-Motor-Driver-Kit-for-Arduino-UNO-GRBL-Engraver-MCU/264330280631?hash=item3d8b4ffeb7:g:zggAAOSwww5c2sDI

My favorite is actually this one -> https://shop.tomsrobotics.com/product/grbl32-3-axis-cnc-controller-g32f13-150khz/

It uses a (very well done) 32bit port of GRBL on ARM. Onboard or offboard drivers, every useful pin is broken out, and there are some additional GPIO’s available (and can be used via g-code additions). It has a few small nuances to be aware of around enabling the spindle pwm, but overall it’s a really well done board. It’s a little bit of a hassle to set up inductive limit switches, but that’s true of basically every board I’ve seen (inputs are 5v, and most inductive switches are 6-30v input/output…5v input switches appear to actually be “binned” 6v switches, and I’ve had two such switches stop working at 5v after a while) One of the things I like about this board is that it uses a standard STM32 Blue Pill as a CPU board, which plugs right in. That gives you some additional flexibility, as there are variants of that with significantly more memory if you’re feeling like adding some features.

My second favorite is this one: https://supergerbil.com/product/starter-super-gerbil-cnc-controller/
This one is also GRBL on ARM, but the port they are using is not particularly clean. I had to make changes to their firmware (that I believe they now include in their code) to make it work properly with lightburn, CM, and a couple other senders. It does have some support in the hardware for a toolchanger, but the software isn’t complete for that. It’s possible to put the GRBL32 port from the Tom’s board onto this one, but requires remapping the IO which takes a little code work to do (and a really irritating development environment). My understanding is there is a new version of this board coming, but I don’t know when. The board is fully opto-isolated, which is a nice addition, and is also polarity independent on most inputs. Not the easiest board to set up, as it requires a number of input power supplies, but very flexible, as it supports multiple power supplies and voltages for different things on the board. Has a nice spindle controller option that may allow you to forgo a VFD in comes cases. It will do onboard drivers, or offboard. This board that the same issues every other board does with non-5v inductive switches. I used this board for quite a while until an unfortunate accident had me looking elsewhere.
There’s a really nice view of the board and it’s options here:
https://supergerbil.com/2019/05/sg-board-configuration/

Here’s the thread where I replaced my Keye’s board with supergerbil.

Here’s where I made the original jump from the CM board to the keyes studio board.

4 Likes

Agreed…

A2 is resume by default. You do need to solder to the ATmega pin. You don’t need to modify code at all. I have it running with a rev E board and CM. Adding a filter is probably a good idea but easy enough.

3 Likes

Yup, you could always do that. Although the pin is on the corner, you still need to be pretty confident with the soldering iron.
Do you use a filter? I’d especially be cautious of I had a spindle controlled by the board. You wouldn’t want that to be unpredictable.

1 Like

Agreed it would be much nicer if the pin was brought to a header. Luckily in the world of surface mount components this is a big pin. I don’t have a filter at this point, I’m in the early testing stage. Right now I have the carbide compact router that is simply on/off control with an IOTrelay. The signal is internally pulled to +5V so I’m less concerned about noise issues than I would be with a pin that needed to be brought high. I will however run some tests to see what extra resume pulses do (while cutting air). When the implementation is finalized it will be thru an optocoupler running the switch from 24V using a zener diode, current limiting resistor and bypass caps to provide some noise immunity.

I think we should centralize all of this hardware knowledge in one place. Is there a good place for it?

I’ve been working on @mikep’s suggestion of using a different controller and have successfully driven the machine with stock GRBL running on an Arduino Uno and g2core running on an Arduino Due, with a variety of stepper drivers.

FWIW, I think the gShield is the nicest drop-in board for an Arduino Uno (GRBL) and the g2core is nice for the Due (g2core).

Anyhow, to get all that working, I had to figure out most of the connectors on the board, along with part numbers and mating connectors. I think it’d be helpful to document all of this in one place.

I’ve also been working on a PCB “breakout board” that bridges the various connectors to screw terminals so that you can easily interface with a different controller. It also has sockets for Polulu-style stepper drivers. I can put everything on Github if people are interested (once I get the thing working). I don’t have much experience with PCB design so feedback would be nice.

1 Like

I am sorry, but I never did get an answer to this?

In Julien’s initial entry in this thread he shows the feed hold the 2 pin connector outlined. The pin on the left is the input the one on the right is ground. Verify this with an ohm meter by measuring to the GND pin on the adjacent connector. The input needs to be connected to ground to signal a feedhold.
image

5 Likes

Perfect! Thank you very much.

Are you as confused as I am about what it does?

With parking and “safety door” enabled (default in Carbides version of the grbl config), a feedhold will:
Slow retract a small amount (5mm default)
Power off spindle
Fast retract to machine Z-5mm

On resume/cycle start (~), it reverses the procedure and continues with the gcode.

3 Likes

@Moded1952: there is the Shapeoko3 wiki, which @WillAdams maintains but everyone’s contribution is welcome. I see the wiki and forum as complementary: the wiki for keepting structured info and collections of interesting references, and the forum for more contextual discussions on a particular topic, like this thread.

3 Likes

Some (all?) versions of CM and PCBs on Nomads and Shapeokos default settings do this?

  1. Initiating and maintaining a “contact closure” on the PCB’s “Feed Hold” input pins (the inboard pin is pulled up to 5V with a ? Ohm resistor) causes this sequence of events?
  2. The controller on the PCB stops all feed (stepping the motors) near instantaneously and notifies the CM software that it has done so?
  3. The software will have the PCB slowly lift the endmill 5mm?
  4. The software will have the PCB turn the spindle off?
  5. The software will have the PCB rapidly lift the endmill another 5mm?
  6. The software waits for notification from the PCB that the “Contact Closure” has been removed?
  7. The software then waits for operator to “Push” the GUI’s resume button, then?
  8. The spindle is turned back on?
  9. The endmill is (rapidly?) lowered 10mm?
  10. The machine continues cutting?

What happens if the “Contact Closure” is removed in steps 2-5?

In case there is any confusion in the far future from those less experienced reading the thread, this should be done with the power to the board removed.

1 Like
  1. Maintaining contact is not required. A momentary contact will initiate the parking motion.
  2. Not sure about CM, but the controller enters a “Door” state, of which I believe there are three variants (parking, holding, resuming). Up to the GUI to interpret.
  3. Yes, default is a feed of 100mm/min
  4. Yes.
  5. Not quite. It will lift to 5mm below the limit (default).
  6. And also for a cycle start.
  7. Answered in #6. Can also be a physical switch.
  8. Rapid (500mm/min default)movement to wherever that 5mm retract was. Then spindle, then slow plunge.
  9. Above.
  10. Yup

Finishes parking and waits for cycle start.

2 Likes

What’s a “cycle start”?

What does that mean?

This is the resume softkey.