Support for a manual jog box / CNC MPG
-
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:
(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:2313781A 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.