attaching a joystick / gamepad / industrial controller ..


  • administrators

    You might want to search this forum for "CNC pendant" because that's a related topic.

    BTW the PanelDue hardware includes provision to connect a rotary encoder. If anyone is sufficiently interested, I can extend PanelDueFirmware to support it.



  • @smece said in attaching a joystick / gamepad / industrial controller ..:

    Is there a way to attach an external device to control the movement?

    The port PanelDue uses is "TTL Serial". An arduino, or ESP, or similar 3.3V device can interface to almost any input device you can think of and issue commands via this port.

    If you wish to interface via the network, a simple Telnet session to the printer (wired or wireless) accepts G-Code commands. So just send "G0 X...Y...Z..." or similar. Again, an ESP can be coded up to interface to any number of devices or encoders or even simple buttons, and send those commands up a Telnet session. VERY simple if you can get past the learning curve of ESP8266 or ESP32 in general. I pick those two because getting them on a Wireless network is a matter of a couple of statements... and there are TONS of examples.



  • I was looking at this earlier; maybe some inspiration too.
    https://cncmakerzone.co.uk/make-a-grbl-cnc-pendant-with-a-bluetooth-data-link
    This uses bluetooth serial for the command path, but would adapt trivially to a wired serial connection, and that would allow you to bring power in the same leash.



  • lot of data, thank you all 😄

    @dc42 hah, "cnc pendant", great tip, looking 😄
    as for the encoder, would make sense but attaching encoder to my current setup is ~ same amount of work as banging a joystick on esp32 board so I would not go that direction .. as for the changes to paneldue I can suggest a "second move window" that would work like octoprint's move interface.. it makes much more sense for my fat stubs of fingers 😄 .. I'm running a 5" screen and I have issues with existing buttons even while looking at the screen 😄

    43f30091-5831-41d2-8151-03fecd944ff6-image.png

    prontrface interface is even better only I'd use the "whole pads" for movement and add buttons on the side for 0.1, 1, 10, 100..
    52b7c511-68b0-48bc-816e-23d0c38d32a9-image.png

    ideally all styles available so one can choose 😄



  • @bearer I do have RPI (octoprint) attached there as that's Enter5 in process of upgrade and original marlin without octoprint is imo unusable so pi is there, that's actually not a bad idea as there's probbly already a gamepad plugin for octoprint 🙂 will check .. I was not sure if pi will stay attached to this printer but looks like they DWC still isn't close to replacing it so.. we'll see



  • @EasyTarget sorry mate but rpi4 is not entering my home in forceable future 😄 ... I have enough devices that require active cooling here... I mostly use orangepi devices (i have 100+ of them here, running different tests with them, have only maybe 10 rpi3b+ and 5 other rpi's ... oranges are waaaaaaay better .. and I'm on the path to start using rocks too)



  • @Danal said in attaching a joystick / gamepad / industrial controller ..:

    The port PanelDue uses is "TTL Serial". An arduino, or ESP, or similar 3.3V device can interface to almost any input device you can think of and issue commands via this port.

    Yes, PD connects to Duet trough serial port, that's ok, but that's not a bus, it is 1:1 so in order to attach another serial device I'd have to remove the PD and that's not really the idea. I want another device besides paneldue, not instead of it. Only if PD have some external serial port on it that I have not seen (I don't have original PD, I got this one as a gift from a friend it's some integrated 5" lcd + controller on one board)

    If you wish to interface via the network, a simple Telnet session to the printer (wired or wireless) accepts G-Code commands.

    Yes, that I already tried and works, question was if anyone (@dc42 maybe) knows if allowing telnet uses up valuable resources or not. I have ton of esp8266 and esp32 modules here so it's an easy project but it's something that takes at least a weekend to make and with 2 small kids and bunch of projects.. I tend to see if there's something I can just "buy that works" rather than "make new from scratch" 😄



  • @smece said in attaching a joystick / gamepad / industrial controller ..:

    I'd have to remove the PD

    The panel need not be removed.

    It is perfectly OK, hardware wise, to "Y" connect to the RX pin (on the Duet) to two TX sources. The pendant/game device can transmit during quiet moments, when the Panel is not transmitting. In order to do the best possible job of that, the pendant/game should also be have its own RX pin (or a secondary RX pin) "Y" to the lash up described above, and listen before transmitting. This will not be perfect; there is always the possibility of both devices transmitting at the exact same instant (exact being defined as one character time)... however losing a single message is not a big deal in this usage scenario.

    In short: Hook them both up. It will work amazingly well.


  • administrators

    @Danal said in attaching a joystick / gamepad / industrial controller ..:

    It is perfectly OK, hardware wise, to "Y" connect to the RX pin (on the Duet) to two TX sources. The pendant/game device can transmit during quiet moments, when the Panel is not transmitting. In order to do the best possible job of that, the pendant/game should also be have its own RX pin (or a secondary RX pin) "Y" to the lash up described above, and listen before transmitting. This will not be perfect; there is always the possibility of both devices transmitting at the exact same instant (exact being defined as one character time)... however losing a single message is not a big deal in this usage scenario.

    Alternatively, route the PanelDue data through the pendant/game device, which can buffer up commands from PanelDue while the pendant/game device is transmitting.



  • I checked out the pendant talk and it's mostly what I'm thinking except no ready made .. now since I'm reeeeeealy fed up with this bed constantly droping (after you add 4mm glass on top of Ender5 bed it drops like a rock when you disable drivers) and need to add that relay mod asap, I'll use the same project to draw up a simple esp board to add 2 buttons few leds and a joystick .. have all the parts lying around 😄 .. a small nokia 3310 battery with charger on board and I'm golden 🙂



  • @smece An easy way to stop the bed from dropping is to change the lead screws from 8mm lead/pitch to 2mm lead pitch...makes quite a difference. I put them on the corexy I built which is a 6mm cast aluminum bed on it and I can sit a filament spool on it while moving the printer and the bed doesn't move. Only thing you'll have to find is new leadscrew nuts that will work if they are shaped anything like the ones on my Ender 3. I'm sure they are out there, I just never looked.

    EDIT: looks like it uses a standard round one so shouldn't be a big deal.



  • yes, standard round one, I measured pitch on this one and it's 2mm but looks like it's 2start (or even 4start) I didn't notice that .. I should have 2mm pitch single start, few of them, just not sure if they are straight and if they are long enough.. I was actually considering switching to ballscrew 1605 but can't find the darn thing, I have few lying around here somewhere but that would be even worse


Log in to reply