CNCjs handwheel pendant (detailed howto for nerds)

Wow that was fast!. I feel like I’m missing a step but I think i need to clone the modified code into /bin right?

into the /bin of what ?

You can clone the pendant code anywhere, go in any directory you like and do the git clone thing, it will create a cncjs-pendant-raspi-jogdial subdir, and then to launch the pendant (assuming CNCjs is already running), go into that subdir and type:

node bin/cncjs-pendant-raspi-jogdial

I wanted to pass along my thanks for this writeup. I now have a working pendant! The only issue i have is that I am still able to jog with the estop activated. Is that a feature or a bug?

1 Like

Sweet! The e-stop button is just not managed at all in the current implementation, because I had no real use for it (since I have another e-stop on my power control box already). If you think of a useful CNCjs action that you’d like mapped to the e-stop button on the pendant, let me know and I’ll add it.

Could it be used as a feedhold ?

Yes, and that’s probably the most sensible use. I’ll update the code over the week-end to support this, I had to do an update it anyway because I changed my GRBL params to greater max speeds, and need to adjust the smooth jog message timings anyway.

I’ll need instructions on how to update also please :wink:

would this work with a PC running CNCjs? :slight_smile:

the remote keypad pendant for CNCjs ? definitely, on a linux PC, possibly on a Windows PC.
I just ordered one RII remote keypad on Amazon, it was only 15 euros and I figured I would find some use for it. It’s coming in the mail tomorrow, right on time for some week-end coding.

Yeah Windows PC interest.

I have a headless setup and CNCjs running. I’d like to have a mechanical pendant for mostly jogging around. Find it would be quicker and less likely to fat finger than tapping on a screen.

@DiscoJon,

I updated the code to do feedhold/resume upon pushing/releasing the Estop button

The modified code is up on github, just replace the cncjs-pendant-raspi-jogdial file in the bin directory, relaunch the pendant, and you should be good to go.

@PaulAlfaro: I’ll be posting in that thread once I’ve progressed on the keyboard pendant for CNCjs on Windows. Once I have a Windows Node.js environment that works, both the remote keypad and this jog wheel pendant should work.

4 Likes

First try here

2 Likes

@Julien

Your post is very interesting. It opens up possibilities.
I was looking out of curiosity, and there are USB remotes, what do you think?
Maybe it could avoid another control card for the remote control?

@Julien - Looks like there was a data loss and this thread disappeared :frowning:

The last thing I believe I asked was about the enable/disable button working, hold feed working, but the jog dial doesn’t seem to do anything.

I am going to add some more debug code tomorrow, but I believe you referenced a specific wire to check on that could be to blame here?

So I was basically saying that if you see the enable working, then the X1/X10/X100 selector is working (since it reads that to figure out if the enable button is pushed)
The passive switches (open/closed circuits) are probably all working, but the dial is special, that part of the pendant needs 5V to work, so double check whether your red and black wires are properly connected to GND and 5V on the breakout board.
Debug traces in the code should help you figure out what still does not work after that, let me know.
Now I’ll go and cry in a corner, thinking about my 6 days worth of posts lost :cry:

2 Likes

I feel like I have tripled checked everything - Tried on both my Pi4 and Pi3, both with the same result.

Here is a link to a few pictures of my wiring, but as far as I can tell, everything is where it should be.

https://drive.google.com/drive/folders/13MzCk-z4ySclluocFOlR4jbTPSty-gxo?usp=sharing

So I double-checked your wiring photos compared to mine (which I re-post here for future use)

and it all matches.

Did you do the changes in /boot/config.txt to configure the GPIOs to use internal pull-up ?
Let me know if you want me to do a version of code with traces in the right places to investigate this (unless you have done that already?)

I did add that line to the boot/config file as well :X -

If you are able to make a branch for debugging, that would be super helpful (for others too I’m sure).

Can you please try this version (a few log traces added in key places),
cncjs-pendant-raspi-jogdial.zip (5.3 KB)

and try:

  1. push and hold enablebutton (keep it held throughout the test)
  2. turn dial (either way)
  3. change XYZ4 and X1/X10/X100 selectors to various positions, and turn dial again

and let’s see what is displayed then

Doesn’t appear to be making it to your console.log("DIAL TURNED") line. When I engage the side button, the enable/disable logs, as well as each change to X1/X10/X100, but nothing when turning the dial while the button is pressed.