Not Another Jog Controller

Like many other people around here, I’ve been wanting a standalone controller for my MPCNC to jog the machine around during setups. Taking some ideas from @jamiek and @stevolution, I decided to make a project out of it and design my own with the functionality that I wanted (warning: I’m a mechanical engineer by day so all of this electronics stuff is all new for me).

I wanted to have the basic X,Y,Z controls as well as various G-code commands to take care of various things that I use often.

Here’s what I came up with:


  • A rotary encoder to select the jog distance ranging from .001" - 3"
  • Buttons to set X, Y, and Z zeros (ie G92)
  • Endstop homing
  • Pause/Resume (toggles between M01 and M108 commands, works standalone but haven’t tested during an actual job–now wondering if it’s just a risk of messing up the serial connection)
  • A button to go to my spoilboard origin (I have it doweled for positioning the workpiece).
  • Buttons to Go to Z0, X0 Y0.

With some struggle and a lot of learning, I designed and soldered up the circuit on perfboard and wrote all the code to make it work. So far, it seems to be working pretty well. This uses the Marlin second serial pin to send gcode commands the same way that @stevolution did with his controller. I do have occasional strange behavior due to the serial connection, but it otherwise works very well!

9 Likes

Nice job Alec

Yes, the Marlin is a little bit temperamental!
You have to watch that the Marlin serial comms link doesn’t get clogged up with temperature reporting commands… which I think it does as default.

Can’t remember, but I think I sent Serial1.println(F(“M155 S0”)); at boot to turn that off.

Pause/resume can be another issue. It doesn’t like to resume, once you have paused a project.
I therefore, made my own ‘pause’ by stopping all movement and raising the Z axis. It stores the positions and returns to them upon ‘resume’

3 Likes

Thanks! Not too fancy but it works.

This is a good point. It looks like it can actually just be disabled in Marlin altogether so maybe thats a cleaner approach? From Configuration_adv.h:

/**
 * Auto-report temperatures with M155 S<seconds>
 */
#define AUTO_REPORT_TEMPERATURES

/**
 * Include capabilities in M115 output
 */
#define EXTENDED_CAPABILITIES_REPORT

I’ll give this a shot and see if it causes any issues.

I had issues with resuming from pause, but so far enabling “#EMERGENCY_PARSER” in Marlin config and using M108 for resume seems to work. I am curious how you implemented your method though?

1 Like

Realized I had never shared my code for this, so I just uploaded it to Github incase anyone finds it useful. Definitely not a software developer so don’t expect much! :slight_smile:

Jog Controller Github Repo

If there is any real interest I could try to scrap together a circuit diagram for how I did the buttons, but you’ll see in the code I’m using an analog buttons library to allow me to put multiple pushbuttons on one pin using a voltage divider.

5 Likes