How to build a $12 wireless joystick for ChiliPeppr CNC control.

How to build a $12 wireless joystick for ChiliPeppr CNC control.

I loved this video John. Im rebuilding my machine so have to focus on not getting too distracted by future possibilites.

Id have to think that the analogue nature of the joystick feels more natural than the discrete speed steps when using the shuttle.

Thanks Grant! It was a lot of fun to make and super useful, especially since this ESP32 is battery powered and has a simple switch. So I just turn it on, jog, then turn it off. Of course now I want to add code to put the thing to sleep automatically after 5 minutes of no use to save on batter if I forget to turn it off.

I also want to make the push button built into the joystick do something, which makes me think that should allow toggle to the Z axis for up/down. Then push button again to get back to XY jog.

Also, since it’s connected to SPJS via a websocket, I have all the other data coming to the ESP32 like XYZ coordinates, so that makes me want to show that on an OLED (which is getting a bit out of focus for the device’s original goal).

One really cool thing to also point out here is that the ESP32 code auto-finds the Serial Port JSON Server on your network. The reason is that version 1.94 and later of SPJS listens for broadcast UDP packets and so any device that sends out an “announce” via the Cayenn protocol will get back an “i-am-your-server” response from SPJS. So, this makes this device totally auto-config. It’s actually easier to get to your SPJS from the ESP32, than from your browser where you have to manually type the SPJS address.

@jlauer Re the Z axis control - I was thinking about a the joystick for x-y and a spring loaded - self centering potentiometer for the Z (I have these on my drone controller). Thumb controls Z, index finger controls x-y for single handed controller shaped in a pistol grip arrangement.

LCD display DRO.

My motivation is that I literally do not have space for a tablet pr a laptop where my machine is located.

(I can see this is going to get out of hand :slight_smile:

This is the ESP32 I used in the video, but with an OLED attached . This could be your core base. Maybe joystick on top like I did, and a joystick on bottom for Z. Although, I still think the push button is ok for toggling to Z. Just make the display show a big Z indicating you are jogging Z, because that’s the scarier axis to jog because you can break end mills with Z jogs. Or put a joystick on the bottom for Z.