Support for a manual jog box / CNC MPG



  • This is something I've been wanting for my printer for a long time - a manual jog box.

    The Panel Due and/or LCD works great for general movements and stuff, but when I'm calibrating my bed or adjusting babysteps or something, it would be extremely useful to have something with tactile feedback for moving without having to look at a screen.

    Something like this:
    0_1544130759255_d26413b7-7c18-49e4-96e7-e9ab0eb4816b-image.png

    I'm not sure what the easiest way to go about interfacing it would be - probably using SPI - but it wouldn't take me too long to design up a PCB for one of these. If support for something like this gets added to the firmware, I solemnly swear that I am up to no good I'll design one and post the schematics and stuff on github.


  • administrators

    The PanelDue hardware can support a rotary encoder, however we've never implemented firmware to support it because there has been little demand for it. That could change now that more people are using Duets to control CNC machines.



  • By the way, I have a wireless one of those, probably the EXACT one in the picture, and I hate it. Laggy, skips and doubles, etc. With two different control PCs (Mach and Chilipeppr), so it does appear to be the pendant, not the control software.

    I've been thinking about ordering a hardwired one... to see of they are any better.



  • @dc42 While a rotary encoder on the PanelDue is a great idea, when jogging one usually holds the MPG in his hand. With the 30cm length limit imposed on the PanelDue that is close to impossible. So it would be better to change the current 3.3V communication to RS-422 and allow for much longer cables, maybe with a very small daughter board near the Duet board. And, in order to have enough power for everything on the PanelDue, go for power supplied directly from the PSU and a small DC/DC converter on the PanelDue. These changes should allow for 5m connection cables or even more.

    Especially in the CNC world, the controller is further away from the machine easily accessible areas. And it is also pretty well enclosed because of all the debris that could affect it.

    On the wireless vs hardwired matter, Danal is right. While a wireless MPG might seem a very nice thing to have, it may be trickier at times. Being by default a wired device, I suspect all those USB/wireless adapters are not proper WiFi interfaces but some kind of very simple RF chips communicating on frequencies around 430MHz. If so, those I would seriously avoid using near heavy industrial equipment. But the problem with lag, skipped and double steps may also indicate a problem with the rotary encoder and not with the communication. There are quite a few rotary encoders that have a simple PCB with several contacts, encoding the absolute position to 6 or 7 bits. If so, their lifespan is kind of limited and after some time they develop those exact defects. Quadrature encoders are simpler to connect, always reliable, but they are only incremental (though that should be enough for a MPG!). Optical rotary encoders are pricier, they draw some current, though a good quality one has a very long lifespan.



  • @catalin_ro said in Support for a manual jog box / CNC MPG:

    With the 30cm length limit imposed on the PanelDue that is close to impossible. So it would be better to change the current 3.3V communication to RS-422 and allow for much longer cables, maybe with a very small daughter board near the Duet board.

    You can use external converters:

    https://www.ebay.com/itm/RS422-Mutual-transfer-TTL-bi-directional-Signal-Module-Full-duplex-422-to-s-B4A9/173631547293

    (just check for 3.3V compatibility)...



  • I have actually also started looking into this for my CNC machine.

    Regarding the PanelDue having to be no further away than 30cm, that is not true, unless you want to connect it with the SD Card compatibility (something I decided against, due to the debris that may enter the screen's enclosure at that hole; my enclosure for a PanelDue 5i have a hole for the wires, that gets almost completely covered when installed) using the 10-wire ribbon cable. The PanelDue comes with an about 1m 4 wire cable with pre-crimped connectors on both sides (for my display location, I had to add about 20cm more wire, but it works without issue).

    From what I found:

    • The Duet boards can take UART from the PanelDue and from USB, and other protocols like the SPI from the network. I am focusing on that USB (which in my case is not used).
    • The Duet boards are a USB device, and not USB Host (so we can't directly plug a USB MPG into it).
    • The MPG's are mostly also USB devices, so we can't plug the Duet into it.
    • What we can do, is use an intermediary USB Host. This can be as simple as a RaspberyPi, that simple listens on the MPG, and reformat the details (if needed) as the correct Gcode to be sent to the Duet. This should allow USB cables to be used, which have a typical range of 2m (if not amplified or if not using an active USB cable, which can give you range of over 5m) between the USB Host and the USB Device (if the USB Host is placed in the middle, this can give you 4m between the MPG and the Duet).

    Personally I want to remain as close to stock firmware as possible (for both the Duet and PanelDue), so for me anything that can simply plug in and speak Duet is the better option.



  • There is a double thread, where I put some thoughts about the jog wheel. I put it here, so the other thread can be deleted. My thoughts have a different direction than your thoughts, but maybe have worth:

    I expect your solution (i.e. a Mach3 based job wheel) to be complicated to implement, as it is based on Mach3 interface, which is a CNC proprietary, parallel port based protocol.

    Estlcam, a CNC software, uses a DIY jog wheel here: https://www.estlcam.de/handrad.php but it is closed source.

    There is software to support 3rd party jog wheels: https://www.cnc-invent.de/projekte-module/jog-wheel-communicator-jwc/

    The creator of Estlcam discusses here http://www.cnc-area.de/wbb3/index.php?thread/6777-estlcam-cnc-steuerug-handrad/ that using a wheel is often too slow, he recommends using a gamepad instead.

    On thingiverse is a G-Code sender:
    https://www.thingiverse.com/thing:2105847
    and remote version: https://www.thingiverse.com/thing:2313781

    A remote sender like the thingiverse one, using an Arduino which produces G-Code and mimics the DWC, seems to be the best option imho.

    There is no finished project yet, maybe it would be better to ask for help in the DIY reprap forum for a generic solution for all 3d printers.



  • A couple of clarifications from several above posts:

    • The lag/drop/dup is unlikely the rotary encoder, in that it affects "membrane" buttons, that are in great shape, as well.

    • The "Mach3" wheels will be no more or less complicated than anything else, as they emulate keystrokes. Mach doesn't really enter into it (there is a plugin, but again, that doesn't really affect the pendant itself).

    • IMHO The "pi in the middle" of a USB chain is a great idea. Simple, cheap, reliable, and I'm willing to be that 99% of the translation would be a simple lookup. Given time, I may look into this. (Of course, "Given time, hydrogen introspects".)



  • @danal As the lag/drop/dup in your message was not specifically related to any item on the MPG, I suspected the rotary encoder as sometimes really cheap ones are used. Clearly, if you say that everything is like that, the problem is either in the MPG itself or in the controller to which it is connected.

    "Pi in the middle" sounds like a great idea, but I think that it would be a lot better to somehow have a version of PanelDue with a rotary encoder. The PanelDue would cover all buttons and status display, with the rotary encoder allowing fine control over the actual jog. Alternatively, a MPG for Duet boards, to use instead of the PanelDue, should not be too problematic to develop from scratch.

    I'm against he idea of game pad like approach, with only buttons. For anyone that ever operated a proper short wave radio receiver, the tuning knob on it is something highly desired as option for the modern, PC operated alternatives. And there are quite a few companies offering such products.

    As for the Estlcam DIY jog described here - https://www.estlcam.de/handrad.php - all I can say is that one should avoid potentiometers at all costs as they are pretty unreliable on long term!



  • @catalin_ro I remember jog wheels for videorecorders (Panasonic SVHS), where a small rotations means slow motion and big rotation means fast motion. Releasing leads to zero position. This would be cool for a CNC/3D controller.

    Do you have recommendations what to use instead of potentiometers, or in general: which components are best to be used?



  • @joergs5 The jog wheels for videorecorders were kind of different - spring loaded and returning to 0 when released. Quite easy to get to a dangerous situation (break something) if used for CNC, not to mention the potential reverse brief move when releasing the wheel (mechanical oscillations around 0).

    For jogging I'm considering mostly optical rotary encoders where you keep turning to move the tool, like repeatedly pressing the jog buttons on the interface, with separate control of the jog speed (the distance for each position change in the encoder). You might also find rotary encoders with magnetic breaks, although that is something relatively easy to add.



  • @catalin_ro said in Support for a manual jog box / CNC MPG:

    @danal As the lag/drop/dup in your message was not specifically related to any item on the MPG, I suspected the rotary encoder as sometimes really cheap ones are used. Clearly, if you say that everything is like that, the problem is either in the MPG itself or in the controller to which it is connected.

    I'm pretty convinced it was the wireless link. The wheel seemed OK, "local" effects (the pendant had a display) were completely reliable, and the Mach controller responded to all other input devices very quickly and cleanly. Also, at one point Mach was ripped out and replaced by TinyG/Chilipeppr. Same problems with pendant.

    Sort of leaves the wireless link.

    Of course, I could really prove that for under $100, by purchasing the exact equivalent pendant, same manufacturer, in wired.

    Just might do that.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.