GCode Jogging Keyboard

Posted on
  • I wanted a jogging keyboard for my CNC, and obviously (why?!) wanted to build it myself.
    Searching "ESP32 Javascript" on google lead me to Espruino and i'm really embarrassed I didn't know of it until now. This is amazing! Wow the experience of using JS, with all of its ecosystem, for microcontroller development is simply awesome! A huge thanks to @Gordon and the team for developing and maintaining this

    To the project:
    To those not familiar with CNC work - Positioning the tool head at a certain position is part of the setup process. This is how you set the starting position of the program. It is not very convenient doing it with the controlling computer, and better off being done near the machien itself. CNC machines are usually controlled with GCode (just like 3D printers).

    It's an ESP32 based project, with an rotary encoder (w/push button), a 4x3 button matrix, and an LCD. The whole thing will be mounted on a custom PCB and powered by a rechargeable 18650 battery. And a 3D printed case :)
    Each button in the matrix will send a GCode command set to jog the toolhead (X, Y and Z), and the encoder is used to set the jogging increment. 6 more button from the matrix will be used for custom macros.
    Since a lot of modern controllers host a web server to control the machine, the GCode is sent to the controller via http requests.
    The keyboard also exposes an http server with a portal to edit settings like the main network to connect to, the controller server address and the implementation to use, as well as the GCode to send per each button.

    The project is written in TypeScript and transpiled suing @swc/core to ES5 before sending to the device - I hope the world appreciates enough how crazy it is this sentence is written about a microcontroller project :)

    Github - https://github.com/idobh2/gcode-keyboard­
    In the uploaded files you can see the PCB design and here as a video of a breadboard prototype with 4 buttons controlling my 3D printer through OctoPrint (which, as said, is similar to controlling a CNC machine)

    More updates to come :)


    2 Attachments

  • @idobh2, really NICE work!

  • That's really neat! Have you managed to assemble the final PCB yet, or are you waiting for it to come back?

    So does your 3D printer have the web server itself, or are you using something like Octoprint?

  • Waiting for the PCB to be delivered - hopefully in the next day or two...
    Yes the printer is controlled with Octoprint. The project is structured in such way that handling GCode is sent using an implementation of an abstract interface, so currently I only implemented Octoprint, and soon i'll implement the WebUI one, which is what I have on my CNC

  • Update
    Got the PCB, Everything is assembled and.... working!
    Now for the case and key caps :)


    3 Attachments

    • 20230323_063954.jpg
    • 20230323_063828.jpg
    • 20230323_063819.jpg
  • Wow, looks great!

  • And the (almost) final result - with the charging circuit, an enclosure and printed key caps:)


    5 Attachments

    • 20230331_135648.gif
    • 20230331_140438.jpg
    • 20230331_140337.jpg
    • 20230330_061048.jpg
    • 20230330_083123.jpg
  • Wow, very cool! I hadn't even considered printing key caps!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

GCode Jogging Keyboard

Posted by Avatar for idobh2 @idobh2

Actions