Grbl Hand-held Controller with Jog Wheel, DRO and built-in sender

I am happy to answer questions on either site.

If it helps any, if I was assembling this again I would do it on a horizontal layout. Making sure there is access to the SD card on the Teensy, with the USB cables coming out from the top. I am right handed so I would put the wheel on the right. The handheld I made is a but wider than is comfortable to hold in one hand. This can be fixed too but I am not sure I laid it out in the best way when I was just trying to get it running.

Also, not all the functionality needs to be implemented right away or at all. If you only need the jogging then the button matrix is not needed, etc.

1 Like

Do you have any component details on the TFT display? I noticed in your images you had three SM resistors but I can’t work out the values. Do you have info on those?
EDIT:
Ah, found the recommended values on the back of the breakout board:
R101 10-20 Ohms
R102 10-20 Ohms
R103 10k Ohms (is the through hole component & the SMD R103 resistor both 10K?)
R104 10 Ohms at 3.3VCC

Also, based on the schematics, I’m guessing there might be a SMD Mosfet in there that I can’t see?

Cool project. I have considered a project like this some times too. I may have to build one of these.

Hey @AdamDouglas,
I really did a less than stellar job in documenting this… :). I just updated the breakout board on OSHPark, here is the new link to it: OSH Park ~.
It includes more details about the other components. The mosfet I used is a IRLML0040 N channel to drive the backlight on the TFT. It is not needed if you want to maintain the screen on all the time or don’t care for brightness control.
I also added a note about this on the schematic, but if you decide to use this TFT breakout board then there are two components on the schematic (a resistor and a FET) that need to be ignored since they are included in the breakout.

Hey @MarcoQuezada,
Could you just use an LCD like this one?

Edit: Originally linked the wrong one.

Hey @NeilFerreri1,
The short answer is yes.

Any display that can be configured and run with the microcontroller on the Teensy should work. However, there are a few things that would need to be modified:

Hardware:

  1. Verify the connections, since the display you linked uses SPI this should be very straightforward.

Firmware
1)The initialization commands are likely to be different. The display controller on this LCD is different, but from the same brand so likely not too different. In fact pretty sure there are already libraries out there that can be leveraged to do this.
2) This display has a lower pixel density so the drawing calls in the code need to be adjusted so the drawing fits the display. My code is not too smart in this regard.

I’d be happy to help out if you are willing to give this a try.

1 Like

Thanks for the edit on OSHPARK @MarcoQuezada
I can work out the details now. I do want to make use of controlling the brightness with the jog dial as I want to cram as much functionality into it as I can. I’m going to be using a 2N7002 MOSFET N channel for the BL. Its VGS(th) is 2.1V

Sounds good @AdamDouglas. That MOSFET should work quite well. Feel free to keep asking questions, good luck with the build, send some pictures when you get a chance :slight_smile: .

I would if I could. I haven’t workout how to attach pictures in forums replies yet. Or can I only link to pictures from elsewhere on the net?

At least in this forum, when I start a reply the text box says that it is possible to paste images into it:

I also have a Google photos album I dump images of my widgets into. This allows me to link individual pictures or the album.

what do you know :slight_smile: pasting worked! Thanks @MarcoQuezada
Here’s the button board while in progress and a second picture with everything cobbled together.
I’m currently waiting on delivery for some part for the screen before adding that.
Controls are:
Spindle on/off master switch
manual Spindle speed control potentiometer
switch between Gcode speed control, or manual.

Two selector switches but with 9 values each (I added 0.01 to the speed dial, and added XY control to the axis dial)

buttons will go to the right of that

off-screen is a similar sized sheet of paper with the layout for a screen, jog dial to the right of that, and finally, a separate button for selecting stuff. This button is the same as your rotary encoder, just on it’s own as mine didn’t have one integrated into it.

I’ll be making it as a controller that is attached to the table, rather that your nifty handheld one.
PXL_20211229_134727268

PXL_20220101_040549583

1 Like

This is great! The desk mount is a really cool idea and I am sure it will work very well. It is interesting to see how you are adapting it. I’m curious, what functionality are you tying to the XY switch position?

Also, I just wrote this to Neil on a separate message, I would like to share it with you because I had not really mentioned it before since no one had picked this project up before you guys.

A very important thing, and a bit of a disclaimer, please take all precautions when you get to the point of plugging this to your CNC. I’ve tried my best to make sure the g-code passing through it is unaffected and that the g-code it generates itself is compliant with Grbl’s interface. But I have only one CNC that I have been able to test it on so I can’t fully vouch for how others may react :). Also, I have been working on an update to the code that implements a mechanism that prevents the jog movements from exceeding the limits declared in the grbl EEPROM but I have not fully finished it and is not in the main development branch. So be gentle with your machine. Especially the dynamic jogging mode may need a bit of tweaking to match your machine’s speeds and inertias.

Anyway, good luck!

2 Likes

All good @MarcoQuezada - while I wait to get the basic functionality working (using a spare UNO for the dummy GRBL controller), I’ll make a pass through the GRBL code this week to ensure it’ll work on my machine as expected without any worries.

Anything you want me to look at for possible improvements while I do a deep dive on the code?

1 Like

@AdamDouglas good idea. I do the same thing to test before connecting to the machine.
As I said, the master branch has no limit protections so it is possible to jog the axes against their stops.
I’ve gotten quite comfortable in using the pendant, but I also know where there may be shortcomings in the code that I wrote. I am looking forward to how others use it and what ideas for change or improvement come out of it. Please make use of the issue tracker on GitHub.

The g code streaming from the SD card is the youngest part of the code, and the user interface for picking files is very basic. For example, it does not handle directories, only the root of the card. So this is definitely an area for improvement.

In general, the user interface on the display is something I’m ok with but could be more user friendly.

I’ve also felt like the probe commands could use some way of specifying and storing the distances and speeds to use instead of having the hardcoded to what works for me. Same for other parameters to tune the performance.

An editor mode for messing with the grbl settings is another feature on the back of my mind.

Anyhow, don’t get bogged down on my suggestions, give it a try and see if it meets your needs :).

I have been following this thread with great interest as I would like to make something similar. I did have questions about a statement you made in your first post. Can you elaborate more on the statement:

Maybe in a different thread or DM or something? I am curious about this part.

@JasonWillis I sent you a DM as you suggested. Let me know what I can further explain about the quote above.

@MarcoQuezada just to clarify - are pins 15 & 14 on your display board going to 3v3 and pin36 (14 labelled) on teensy respectively? Also in the schematic, is pin 15 from the display meant to go through R104 instead of R101? Can I tie pins 15 &8 together with VCC & the backlight 3v3?

@AdamDouglas sorry for the confusion, I need to clean the schematic up. In the meantime, here is the answer:

No, 15 goes to 3v3 but 14 goes to pin36(TFT_BL). This is the pwm signal that drives the N channel FET on the oshpark board.
Yes, when using the oshpark board, pin15 (3v3) goes through R104.

IF using the oshpark board, you may tie 15 and 8 together as long as VCC (pin 8) is also 3.3v because that is the maximum allowed voltage for the backlight on the display (LEDK pin 15). I did not tie them together on the oshpark board to give folks flexibility on how the display is both powered and backlit. Also, if tying 15 and 8 together, make sure the source of the 3v3 can provide the required current. The regulator on the Teensy 4.1 does and so you may use pin15 on the Teensy to tie 8 and 15 on the oshpark. But make sure you keep track of this if in the future you add other current sinks to that 3v3 regulator.

R101 and Q1 from the schematic are used only if the oshpark board is not used. My original design is not using the oshpark board, which is what the schematic matches, but I’m going to clean it up because now that you mention it I very much see the ambiguity. Thank you for pointing it out.

@AdamDouglas and @NeilFerreri1,

I apologize for the confusion created by the schematic. I have updated it so as to include the electrical diagram of the oshpark board. One can choose to order/build the breakout and connect to the 15 pin header or build it’s functionality into the larger project including all the same parts and labels and connect directly to them and the 50 pin FPC connector.

It should be clear that the connections using this LCD interface schematic are for the specific display called out in the BOM. There’s a note explaining this in page 3/3.

By the way, I totally had forgotten, that pins 15 and 8 are tied together by default in this design, so one better stick to the 3v3 supply limit if using the oshpark board. The jumper can be cut and different supply sources can be used if desired.

The other jumper by default expects the FET to be on the board, otherwise an alternate mechanism to control the display’s back light cathode needs to be provided.

2 Likes