How about buildung up a USB handwheel instead of using an existing gamepad?

How about buildung up a USB handwheel instead of using an existing gamepad?

This way the user must select the axis first by a rotary selector switch and then turn the handwheel to move (less safety issues).

Did somebody try something like this or are there already solution available?

27a2e6532df5ad53f806ee4da5fffcc1.png

If you can point me to a web API for USB handwheels. Last time I searched I couldn’t find anything.

How about pulling apart an old USB keyboard and use its controller? The handwheel sends out pulses, right? With the rotary selector the pulses are sent to the preselected axis. Each pulse (turn cw or ccw) is then a specific keypress.

Probably it’s not that trivial… :wink:

Handwheels send out quadrature-encoded pulses. Keyboard controllers don’t understand that.

If you’re going to build something, the easiest method may be to use an Arduino to decode the handwheel and emulate a USB keyboard.

@Todd_Fleming Thank you very much. :slight_smile:

Use a Leonardo and build up yours. You can emulate a ton of usb devices

Yikes! I read @Jorge_Robles reply too quickly; I didn’t see the word “build” at first :slight_smile:

You can swap that cheap encoder for the aliexpress cnc handwheel

I just received one in the mail today that I had ordered. Going to see if I can integrate it with an arduino based CNC pendant for GRBL that I found in another users github.

@funinthefalls Are you talking about the PUB @Jorge_Robles ​ just mentioned or the CNC handwheel?

CNC handwheel.

@funinthefalls Glad to see other makers with the same goals. :slight_smile:

Why not trying to use one of the cheap handwheels from aliexpress? Should be possible to reverse engineer the protocol and simulate keypresses.
https://www.aliexpress.com/item/CNC-Mach3-USB-Handwheel-4-Axis-Pulse-50PPR-Optical-Encoder-Generator-MPG-Pendant/2045554376.html?spm=2114.search0104.3.9.lU1y4v&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10065_10151_10068_10344_10342_10343_10340_10341_10307_10137_10060_10155_10134_10154_10056_10055_10054_5470020_10059_100031_10099_5460020_10338_10339_10103_10102_440_10052_10053_10142_10107_10050_10051_5380020_10326_10084_10083_10080_10082_10081_10177_10110_10111_10112_10113_10114_143_10312_10313_10314_10078_10079_10073,searchweb201603_2,ppcSwitch_5&btsid=38604aec-38ec-42dd-a010-3df76874ee1a&algo_expid=c9e7366f-308e-48a6-90f9-3debf32f5aeb-1&algo_pvid=c9e7366f-308e-48a6-90f9-3debf32f5aeb

It would probably make sense to connect to handwheel to the server and send the commands directly to to the controller or frontend, depenting on type of command. And the server could send position messages to the handwheel too.

I created a new MPG branch of lw.comm-server and got my Mach3 MPG basically working (jog, setZero, gotoZero, pause, resume, reset) :slight_smile:
The display on the MPG is not yet working, because I didn’t find any communication details for that.

The MPG acts as a HID device and can be read by node-hid.

@enhydra If you use an arduino which is able to simulate HID, that will work too.

In case this may help generate ideas…

This one is used with Chillipepper … using the “ShuttleXpress Jog Dial” widget.