I wanted a jogging keyboard for my CNC, and obviously (why?!) wanted to build it myself.
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 :)
@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
Got the PCB, Everything is assembled and.... working!
Now for the case and key caps :)
Wow, looks great!
And the (almost) final result - with the charging circuit, an enclosure and printed key caps:)
Wow, very cool! I hadn't even considered printing key caps!
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem