CNCjs handwheel pendant (detailed howto for nerds)

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.

Mmh. So for some reason the “A” signal is not read correctly, so we should first check whether the signal arrives from the pendant at all.
I don’t suppose you have a scope on hand to check that ?
When the dial is turned, a 5V pulsed signal should appear on the “A” wire. You could try and use a voltmeter between the Green wire (A) and GND, turn the dial continuously, see if the voltage is 0V when idle and jumps to non-zero values when the dial is turned. We’ll go from there.

EDIT: and assuming you do see some voltage coming to the green wire, next step would be to check whether the scaled down voltage is there in the middle point of the resistor divider, that’s the one that actually enters the GPIO.

I checked with a volt meter between green wire and ground and got around 3.6 as I continuously turned the wheel. https://drive.google.com/file/d/13pprFYLNdfCgddLVHr1fG6NGyfVbDVV9/view?usp=sharing

I then checked ground and TXD (I think thats what you meant by the middle point) and didn’t get anything when turning the wheel. Might have misunderstood what I needed to check there.

1 Like

Allright so the dial works.
Did you do that measurement with the green wire still connected to the top of the voltage divider? If so the pb would seem to be somewhere in the wiring/soldering of the top or bottom resistor. It’s getting late, I’m heading to bed, will check this thread tomorrow.

Just elaborating on my previous post, can you try and measure voltage like so:

  1. get GND anywhere convenient
  2. with everything plugged as in this photo, double check that you still get 3.7V at the top of the voltage divider (circled in red) when turning the dial
  3. just unplug TXD at the screw terminal and
  • do a continuity check with the voltmeter between the point circled in purple, and the extremity of the orange dupont wire
  • then turn the dial and measure voltage at that extremity.

But WAIT, after writing this, I took a second look at your picture, and I wonder about the color on that top resistor:

We don’t all see the colors the same way, but these two color bands look suspiciously close to being orange to me. If this is in fact orange, then the top resistor is 13.000ohms and you would get 2200/(13000+2200) * 3.7V at the middle point, so 0.5V, which is below the GPIO activation threshold, and mystery solved?

1 Like