Build a Physical Jog Pendant for GRBL CNC Routers: Rotary Encoder, Feed Override, and Wireless Option
Jogging a CNC router by clicking arrow buttons in gSender or CNCjs on a laptop across the shop works, but it's slow and imprecise compared to a dedicated physical pendant — a rotary encoder for smooth jogging, a step-size selector, and buttons for cycle start/pause/feed-hold, all within reach at the machine. This project builds one around an Arduino or ESP32 that emulates keyboard shortcuts or sends GRBL real-time commands directly over serial to control a Wolfpawn 4040 Pro or any other GRBL-based router.
Two Approaches: Keyboard Emulation vs Serial Pass-Through
There are two workable ways to get pendant input into your CNC control software:
- USB HID keyboard emulation — a board like an Arduino with native USB HID support (Leonardo, Pro Micro, or an ESP32-S2/S3 with USB OTG) presents itself as a keyboard, sending the same keystrokes gSender or CNCjs already map to jog/feed-hold/cycle-start. This is the simpler path since it needs no changes to your CNC control software's configuration — it just looks like someone typing.
- Direct serial injection — the pendant board sits between your computer and the GRBL controller (or taps the same serial line), injecting GRBL real-time commands like $J= jog commands, ! for feed hold, and ~ for resume directly. This gives finer control (smooth continuous jogging rather than discrete keystrokes) but requires either a second serial connection to the GRBL board or software on the PC side to merge the streams.
For a first build, keyboard emulation is the easier and more broadly compatible starting point — it works with whatever GRBL sender you're already using without touching its configuration.
Wiring the Core Controls
ControlFunctionWiring notes Rotary encoder (main dial)Continuous jog along the selected axisTwo quadrature pins to interrupt-capable GPIOs for clean direction/step reading Encoder push buttonCycle jog step size (0.01 / 0.1 / 1 / 10mm)Built into most EC11 encoders — a third pin, debounce in firmware Axis select buttons (X/Y/Z)Choose which axis the dial jogsSimple momentary buttons to GPIO with internal pull-ups Cycle start / pause / feed holdSends corresponding keystroke or GRBL realtime byteMomentary buttons, ideally distinct shapes/colors by feel OLED status displayShows current axis, step size, and feed overrideI2C, shares bus with nothing else on this simple buildThe E-Stop Button: Read This Before You Wire It
This is the most important section of this build. A mushroom-head button wired into the pendant's microcontroller, sending a software feed-hold command, is not an emergency stop and must never be treated as one. A real emergency stop cuts power to the spindle/router motor and drive electronics directly, in hardware, independent of any software or microcontroller being responsive. A software feed-hold command can be delayed, ignored if the serial connection or sender software has hung, or simply not fast enough if a bit is about to break or a workpiece is about to come loose.
If your Wolfpawn 4040 Pro or other machine already has a proper wired E-stop in its control box (see this site's CNC router safety guide), keep using that as the real safety stop. The mushroom button on this pendant is a convenience feature for pausing a job cleanly during normal operation — label it as such, and don't let its presence create a false sense of security that a hardware stop isn't also within reach.
Firmware Approach
For keyboard-emulation mode on a HID-capable board:
- Read the encoder's quadrature signal in an interrupt handler, incrementing/decrementing a position counter.
- Map counter changes to repeated arrow-key or custom-mapped keystrokes matching whatever jog shortcuts your sender software uses (both gSender and CNCjs allow custom keybinds, which is worth setting up specifically for this pendant rather than fighting the defaults).
- Debounce all momentary buttons in software (a simple 20-30ms debounce timer per pin is sufficient) — mechanical switch bounce sending duplicate keystrokes is the most common early bug in a build like this.
- Update the OLED on every state change so the current axis and step size are always visible without needing to check the laptop screen.
Wireless Option
If running a physical USB tether across the shop is inconvenient, an ESP32-based build can use Bluetooth HID directly (see this site's coverage of Flipper Zero's Bluetooth HID for the same underlying concept applied to a different device) to pair as a wireless keyboard, eliminating the cable entirely. Battery life on a small LiPo cell is typically good for a full shop day of intermittent use, since the pendant spends most of its time idle between jog inputs.
Housing
A 3D-printed or laser-cut handheld enclosure sized to sit comfortably in one hand, with the encoder dial positioned under the thumb and the E-stop-style button placed prominently but not so it can be triggered accidentally by normal handling. Route the USB cable (if wired) through a strain-relief grommet at the base rather than a bare hole — pendant cables get pulled and flexed far more than typical enclosure cabling.
This is a build that pays for itself quickly in shop time saved — once you've jogged a router with a real dial instead of clicking a screen, going back feels like a real downgrade. Keep the safety framing straight throughout, though: this pendant makes jogging and pausing more convenient, and does not replace a certified hardware emergency stop wired directly into the machine's power path.
Related Guides
- Homing and Limit Switches for GRBL CNC Routers: Wiring, Configuration, and Safe Homing Cycles
- gSender Complete Workflow: Connect, Zero, Run, and Recover
- Mounting a Diode Laser Module on Your CNC Router: Dual-Use Gantry Conversion
- CNC Touch Probes for Desktop Routers: Wiring, Tool Length Offset, and Work Zero Setup
- Setting Up CNCjs on a Raspberry Pi for Web-Based CNC Control
- CNC Controller Firmware Compared: GRBL, grblHAL, Smoothieware, and Duet/RepRapFirmware
- Adding a 4th-Axis Rotary to the Wolfpawn 4040 Pro: Wiring and Your First Cut
- Wolfpawn 4040 Pro — Machine Reference & Connection Guide