CNC style Pendant



  • Hey Guys,
    I am a CNC machinist by profession. There is a very critical feature missing from every single 3d printer out there and I believe you guys can change that. When I fire up my CNC at work, one of the first things I do after homing is to pick up my pendant and move my tool. Just as with my CNC machines, I need to jog my 3D printer head around frequently for various things like filament changes, cleaning debris, adjusting components, checking for wear, or just moving it out of the way so I can clear off the build platform, I guess you could call it sheer laziness to a certain extent, but I miss having my pendant in hand so so so much. If you go search amazon for "CNC Pendant" there are an entire assortment of pendants to choose from given any price range, but the ones that communicate over USB are incredible for the price. It adds a really professional look, function, and selling point. Have you guys explored supporting such a feature?



  • There have been a few discussions before, you might find something suitable in here: https://forum.duet3d.com/search/?term=pendant&in=titlesposts



  • While I do see the point you're making, the need is more limited in a 3d printer and between macros for filament change and/or print head maintenance that is available either on a smart phone or a PanelDue the printer is jogged very little (and that is still accomplished by both a smart phone or a PanelDue).

    That said; "what he said" ☝ lots of information in the forum. I'm in the process of migrating my little CNC router from LInuxCNC/G540 to a Duet, so this is something I will be digging into, but in short until we see wide adaption of Duet 3 which runs together with a SBC like Raspberry Pi it is not possible* to support USB style CNC pendants, but that should make it possible to use any USB HID device with some custom code to control a duet. Most USB pendants, gamepads etc are USB HID devices so there should be a wide selection to choose from at that point, but the Duet 3 is also expected to be a bit pricier than the current range of Duet boards.

    *)except through a host computer running DuetWebControl


  • administrators

    This is something we've looked at before. There are plenty of CNC pendants with TTL outputs (e.g. https://www.ebay.co.uk/itm/Universal-5V-100PPR-CNC-4-Axis-MPG-Pendant-Handwheel-Emergency-Stop-pa1898-UK/283351035077), which could be adapted to drive the PanelDue port using a small board based on an attiny microcontroller. We may well manufacture such a device in the future, but unfortunately we don't have time to progress this at present. I may be able to provide a suggested design if anyone is interested in making it.



  • I've seen plenty of pendants similar to the one DC42 linked, with individual wires from the switches and the phases of the handwheel. Some of them even have wiring diagrams!!

    ATtiny or similar is the way to go for commercial production, making dozens to hundreds of boards... for a hobbyist who will produce one for themselves and documentation for others to copy, an Arduino Micro, Adafruit Trinket, or even an ESP8266* or ESP32 are better choices. Less PCB skill, and less coding skill, required. Cost is parity or possible even cheaper, for "one off" (vs ATtiny and PCB).

    If anyone is interested, I'd be willing to help create one down that path. Assuming that a strategy of "listening" for "quiet" moments between the PanelDue and the Duet is "good enough", this would be DIRT SIMPLE.

    Note: A PanelDue would not be absolutely required.

    Anyone interested?

    *ESP8266, in particular, has gotten cheaper than Arduino Micro. We'd just ignore the radio, and use it as a small imbedded controller for GPIO.



  • I have bought a similar pendant to try and use it with the duet board. I have build a cnc style machine this winter that I use to do 3D printing, CNC work, and laser engraving. For the CNC work I would like to try to use the pendant to adjust the position of the mill. I was wondering if it is possible to send Gcode commands to the duet from a arduino board. I also was looking into the possibility of using the endstops as external inputs to trigger macro files to move the head. I don't have enough knowledge off programming to be able to make the arduino communicate with the duet WIFI directly. So I am erry interested in your input.

    kind regards

    Jan



  • @janvdg said in CNC style Pendant:

    I was wondering if it is possible to send Gcode commands to the duet from a arduino board.

    Yes, very easy. Very, very, very easy. Did I mention that it is fairly straightforward? Probably not hard? Have I beat this dead horse enough?

    The port on the Duet that is intended to connect to a PanelDUE is a 3.3V TTL level serial port. The serial port on a standard Arduino is a 5 volt TTL level serial, so you'd need a level translator (couple of bucks from Sparkfun)... or, there are 3.3V microcontrollers, such as the ESP32 or ESP8266, both of which can be programmed from the Arduino environment. Very easy.

    As I said in the post above, given one or two assumptions about "being in parallel with" a PanelDUE (or just not having a PanelDUE at all), this is extremely simple.

    The key is, I'm not really interested in having a pendant, so I need to know that some number of people ARE interested... and if those people will post here in this thread, and/or contact me at "danal (dot) estes (at) gmail (dot) com", we can discuss how to prototype and pursue this.



  • To build one:

    • Either of these:

    https://www.ebay.com/itm/6-Axis-CNC-Pendant-Handwheel-5V-100PPR-with-Emergency-Stop-Switch-MPG-ot16/123833021868

    https://www.ebay.com/itm/Universal-Cnc-4-Axis-Mpg-Pendant-Hand-Wheel-100-Pulse-5V-Emergency-Stop-Cnc/264417325608

    • Plus this:

    https://www.amazon.com/HiLetgo-ESP-WROOM-32-Development-Microcontroller-Integrated/dp/B0718T232Z/

    • Or plus this, if you want a display on the pendant (which will take a LOT more code... doable, just more work).

    https://www.amazon.com/dp/B07DKD79Y9/

    And some very simple code, very basic arduino stuff that reads a pin and outputs some stuff on the serial port, and voi​là, a CNC style pendant for a Duet. Quite a bit more code for the display, if we go down that road. As stated above, very doable.

    What would you pay for a hobbyist-grade pre-made one? Parts add up to $80 to $100 US (when connectors, 3D printed case, etc, are considered). Would you pay $200 for a pre-made one? That is backed by a 1 year warranty for repair/replacement (not refund)? Knowing that it is a fellow hobbyist, not a huge company?

    Again, for "let's do it together" post here or contact me. For "I want to just buy one, for around $200", also post here or contact me.


  • administrators

    @danal glad you are taking the lead on this. we should chat to ensure is forward compatible to Duet 3.



  • For duet 3, wouldn't a cheap USB-HIDdevice with a script talking to DuetSoftwareFramework be comparatively simple. I'll definitively have a stab at using a $2 gamepad when autumn sets in. That also allows users to pick and choose wireless or wired and use the same code.



  • I think most printers don't need it, but when I run my larger machine I wish I had some kind of pendant-like device.



  • @jrdm said in CNC style Pendant:

    I think most printers don't need it, when I run my larger machine I wish I had some kind of pendant-like device.

    Agreed, that's why I'm not all that personally interested... pendant not really needed for printers. I've never had the slightest hint of desire for one, even on my biggest printers (which are bigger than I am). PanelDUE and/or DWC, with appropriate Macros, works far too well. In fact, if I had a "jog pendant", I doubt I'd use it, vs. a screen with macros.

    CNC, on the other hand, pendant is almost a must have. At the moment, my CNC stuff has "TinyG" controllers installed. Unfortunately, development for these has stopped. And the "TinyG2" project that supposedly displaced it seems non-viable as well. Therefore, I'm changing my biggest, and most used, CNC machine over to PlanetCNC. And... I've pre-ordered a Duet3. Odds are about 50.50 that it will go in a 3D printer, or a CNC. If it goes in CNC, I'll be darn sure pursuing the pendant idea, as well as an alternative UI.



  • @t3p3tony said in CNC style Pendant:

    @danal glad you are taking the lead on this. we should chat to ensure is forward compatible to Duet 3.

    @bearer said in CNC style Pendant:

    For duet 3, wouldn't a cheap USB-HIDdevice with a script talking to DuetSoftwareFramework be comparatively simple. I'll definitively have a stab at using a $2 gamepad when autumn sets in. That also allows users to pick and choose wireless or wired and use the same code.

    @T3P3Tony , I would like to chat and ensure that. At the same time, I think @bearer is correct.

    Given a Single Board Computer, i.e. an RPI4, one of the wired or wireless USB pendants, plus a bit of relatively simple scripting, it seems that will probably be a quite effective method.

    Those USB pendants basically send "keycodes" (more technically correct, they are HID devices that send byte or multi-byte payloads when a switch or the wheel is actuated). Guessing that it will be dead simple to look up those codes, just through experimentation, and send appropriate commands onward to RepRap/Duet. Very close to a one line script + a data table.



  • yeah, the usb hid pendants are popular with the LinuxCNC crowd, both the gamepads and more traditional looking, but while more accurate i found the traditional single mpg pendants cumbersome to use as you need to select one axis to jog at the time.

    the basic gamepad provides enough inputs to control jogging and probing, and it's accurate enough to jog around and start probing.

    refrences
    https://github.com/chrishamm/DuetSoftwareFramework/blob/master/examples/CodeConsole/Program.cs
    https://sourceforge.net/p/joy2key/code/HEAD/tree/joy2key.c



  • @dc42 said in CNC style Pendant:

    could be adapted to drive the PanelDue port using a small board based on an attiny microcontroller

    How will this work, in addition to the Panel Due or instead of it?

    I am using a tethered PanelDue, so almost a pedant, and having a mechanical or even virtual joystick would simplify moving in x/y and Z compared to the existing Move screen.


  • administrators

    Very good point! In other win for SBC choice on Duet3!


  • administrators

    @zapta said in CNC style Pendant:

    @dc42 said in CNC style Pendant:

    could be adapted to drive the PanelDue port using a small board based on an attiny microcontroller

    How will this work, in addition to the Panel Due or instead of it?

    I am using a tethered PanelDue, so almost a pedant, and having a mechanical or even virtual joystick would simplify moving in x/y and Z compared to the existing Move screen.

    Either. From an earlier post:

    @danal said in CNC style Pendant:

    Note: A PanelDue would not be absolutely required.

    BTW, PanelDue has a connector with 3 spare inputs on it. I intended this to be used to support a rotary encoder with push button. This connector might be useful to connect a pendant, however I expect a pendant would need more than 3 inputs.



  • @dc42 said in CNC style Pendant:

    BTW, PanelDue has a connector with 3 spare inputs on it. I intended this to be used to support a rotary encoder with push button. This connector might be useful to connect a pendant, however I expect a pendant would need more than 3 inputs.

    Most of them (that are not USB) just break out all the switch contacts, plus a A,B,A-,B- for the rotary. It would be possible to diode or resistor matrix several of the switches and therefore use fewer pins... however... given that a widely available 3.3V candidate, the ESP32, has LOTS of input pins, my inclination for hobbyist/one-off is to just hook everything to a separate pin, and handle it in the script. Easier to understand for people new-ish to hardware and scripting.

    Summary: Probably a small number of pins (but more than 3) in a truly engineered product that will be built in hundreds or thousands; probably a dozen to fourteen pins in a one-off hobbyist style.

    P.S. I have been contacted by one user who sent me a wiring diagram. I'll post some of my thoughts here in the next few days.



  • Nice idea

    With 3 inputs we can do all we want

    The encoder need only 2 inputs
    And the third can be for "activate pendant wheel"

    All the other feature like :

    • axis select
    • ratio select

    can be done on paneldue



  • @fdem said in CNC style Pendant:

    All the other feature like :

    • axis select
    • ratio select
      can be done on paneldue

    Sorry, but no. That usage pattern REALLY misses the point of having a pendant on a CNC machine.

    I hope that does not come across as critical... I am only attempting to clearly communicating the "use case" or "user story".

    It is often true that when the machine operator is using a pendant, the main HMI (Human Machine Interface, in this case the PanelDue), is out of reach. Far out of reach. Like "Out Of Reach" being defined as "Operator has to get up from laying on the floor and walk completely around a piece of equipment" or similar. Again, this is VERY common on CNC, and can even be the case on 3D Print (I have printer setups that require six or more steps to get from some of the places where I'd be using a pendant, to get from there to the Panel Due... and my stride is almost a meter because I am just a hair under two meters tall.)

    Short version: When using a pendant, don't expect to reach other controls. That's why pendants have all of those switches, and not just a wheel.


Log in to reply