GRBL and TFT screens (and some WiFi too)

I figured I would put this here because I’ve seen more than a couple threads where this has been brought up. Yes, there are TFT touchscreens that work with GRBL. Here is what I have personally tested…




-UNO/CNCshield v3 stack
-RAMPS stack.


-RAMPS - GRBL-Mega5X 1.1q
-UNO and DLC - GRBL 1.1h
-TFT - MKS_TFT24_CNC_V1.0.1

Here’s the link to the TFT firmware.

Q and D tips

The TFT connects to the DLC and the RAMPS boards to AUX1 via an 8pin ribbon cable. You cannot use this cable to connect to the CNCshield board due to the different pinout. You need to either make a custom cable, or just use 2x2, or 4x1 Dupont cables. You would connect to the 5V and GND, and the TX/RX pins on the header above the end-stop header.

From what I have experienced, when using the TFT, you cannot have the USB COM connection in use on a connected computer because they share the serial line. You can have it plugged in, but not have any software connected to the COM port. Doing so causes random, unexpected comm errors and will usually cause your running job to fail. Now I think the RAMPS stack has multiple assignable serial ports, so that may work.

Since the CNCshield sources 5V from the USB, you would have to use the USB as a power source, or connect 5V to the board another way. And, if you thought ahead to avoid ruining the VR on your cheap MEGA2560 and removed the D1 from your RAMPS board :wink:, you will have to supply 5V to that as well through USB or otherwise.

Now Makerbase makes two other TFTs that support the CNC firmware. They are the TFT32, and TFT35. Remember, these are MKS TFTs, not BTT TFTs.

The TFTs have icons for homing, setting home, axis movement, spindle/LASER ON/OFF, spindle speed/LASER power, relative feed rate(%), SDcard file access, and also has slots for custom commands you can add by editing the config before loading the firmware to the TFTs.

My guess is that these TFTs will work with any board running GRBL that has a serial header on it.





So again, just thought I get this started. Please add to it!


At least in Marlin, separate serial hardware is not enough. The second serial port needs to be set up in software. Which makes sense, because the code needs to read the buffers separately for them to both work. I have no idea if you can configure Marlin that way.

Have you tried CNC mode with Marlin? I just wonder if that is a closer match. I know the messages going to marlin/grbl are mostly the same (gcode is sort of standard). But the replies are completely different.

Yeah, I haven’t dove that deep into the GRBL-Mega5X configs. I mostly just did that as a possible combination. I’m happy using the 328 based stuff. It does what I need it to do, no more, no less.

Maybe? I have tried BTT TFTs that work with Marlin natively (I have the BTT TFT24, and the BTT TFT35 v2), but they don’t talk to GRBL correctly. The MKS with the CNC firmware seems to handshake with GRBL at boot time but with the other TFTs you’ll always get the “no printer connected” message and none of the commands work. The MKS screens come with the normal 3D printer firmware that talks to Marlin right out of the box, but you have to flash them with the CNC firmware before they work with GRBL. I think it’s mostly an issue with the global commands and acknowledgements.

1 Like

I dunno if you can make heads or tails of this, but when I have the TFT connected, and UGS connected at the same time I get these messages in the UGS console. It just repeats every 5 seconds.

Marlin responds to everything with ‘ok’. So it looks like ugs doesn’t understand that. The screen is probably sending something to make sure it is alive.

We have highly edited firmware for the btt to communicate with Marlin but present cnc options. It is just a lot to maintain.

This is great, I was hoping to find something like this. Too bad the BTT TFT35 doesn’t play nice with this. Just looking, I’d love to get one of these 7" MKS screens working.

Tim O
That is the heatbeat from the TFT screen causing UGS to say “what?..I didn’t ask you anything”…

Have you got ‘show verbose output’ on?
LaserGRBL shows the lines but does not appear to error out with them.

And yes it does work on other boards with just a serial connection, I have tried it on a vanilla two port ‘Nano’ board I designed for my cantilever laser machine - but I found the TFT firmware to be…um…sub optimal :slight_smile: and decided it wasn’t worth it.
You will get occasional comms errors without separate comms channels
The ‘home’ on the lead page isn’t home, it is ‘go to 0,0’
The ‘localise’ is really ‘set to 0,0’
The ‘open/close’ is laser on/off
The ‘settings’ button gets you to four configurable buttons, one of which has to edited to either $H or $X to escape GRBL lockout.
The Icon editing is a bit of a mare.
Can’t see how to edit the titles
…I gave up

1 Like

The MKS firmware Tim O linked to does work with the TFT70

1 Like

I think I’ll just order one and give it a try!

I was playing around with the MKS TFT image convert utility and you’re right, it’s pretty rough going. I ended up making a test button and just put the title in the BMP.

I did the same

Incidentally, I did end up a couple of times where the display would not unlock GRBL with the $X button. It appears as though there was no comms over the Tx/Rx, even after reboot, even after a reboot without the USB connected, the only way I could get GRBL unlocked was to fire up LaserGRBL and issue the $X from there (or do a homing from LaserGRBL), after that the display commands seemed to work.
Also had some issues in getting the laser to fire up using the Open/Close icon on the first page, even after setting the power to be >0 - it would only work after resetting 0.0 with the ‘Localise’ button followed by selecting the ‘Home’ button. The laser would, however, work fine from my 2% button in the ‘Settings’ page, this macro sent M3 S2 so I wonder if the open/close icon omits the Sxxx and the 'home button has the Sxxx.
The mere fact that editing these screens and legends are beyond my expertise left me feeling it wasn’t worth proceeding with the screen.

The firmware is no longer being developed by MKS and they have released the source code, but it is a hashed up version of the 3d printer firmware again and well beyond my abilities… Interesting…but no cigar!

I’ve sent off for the wifi module to see how that performs on these displays

I thought the same thing but in my experience, it works fine if you have it hooked up to a 3D printer with the original firmware. As for getting anything CNC/GRBL related to work over the wifi, I haven’t been able to crack it. I tried creating virtual COM ports mapped to IP sockets to try and use Lightburn or UGS, Laser GRBL using Telnet, and other gcode apps on my phone, but the only thing that worked was either 3DFox or Astroprint, I forget which one it was, and again, just for marlin based 3D printing. I think the WiFi adaptor is just meant for their cloud based service which I wasn’t about to try.

I was able to connect to it with PuTTY (Telnet IP at port 8080)and got the TFT heartbeat, but it wouldn’t respond to any commands issued to it.

If you get it figured out, let me know!

he may be referring to the ESP wifi mod. since i have gotten Bart’s 6 pack esp32 based board i have been doing a lot of research on it. apparently there is a mod that attaches an ESP32 or ESP2866 to the serial port of a marlin or grbl controller and allows for the use of the ESP webUI. witch is effectively a light weight G-code sender. i have heard of entire jobs being run from Bluetooth and Bart himself says connecting it to your home wifi system makes the system very stable. i imagine it would work just as well as a RPI interface that seems to be very stable.

EDIT: as a side note, i love using 3dfox as a wired terminal for my marlin printer that is too far away from my computer to connect directly. helps a lot with calibration and troubleshooting.

I discovered the interface is not as dodgy as I had first thought. It appears that the comms is pretty stable, but there is a long delay between rebooting the display and/or the Nano before comms works. If I reboot either device and then hit my $H home icon it will home the machine…after about 15 seconds, after that all appears ok. It appears I am too impatient.

I have one of Barts earlier boards and have played around with ESP32-WebGUI - apart from a problem caused by the CH340 serial interface chip not initialising properly it worked really well. The CH340 is a feature of some of the cheaper versions of the ESP32, the best version uses a CP2102 instead and I had no problem with that ESP32.
Not sure how you are going to get the GUI firmware onto the Nano though - might be easier to design a PCB to accept an ESP32 and two driver modules to fit the laser cutter machine…mmmmmmmm! :slight_smile:

What would be really nice would be for someone with the relevant skills (and time) to build a display firmware from the ground up designed just for CNC and/or laser machines without all the 3d printer guff clogging up the works… and in a format that allows reasonably easy editing of icons, labels and functions… how hard can it be?



You don’t put the web ui on a nano, you connect an esp32 to the laser board via serial connection. Kind of like if you want wifi on your computer, you plug a USB wifi stick into it :wink:

Bart has a bunch of esp32 boards. Two that I know of are for lasers. One for drv8825 style drivers and one for tmc2130s. I’ve got one of each and they are what I used in my camera slider snd zenxy prototypes.

1 Like

So here’s what I’ve found after some testing.

I can send Gcode commands in plain ascii with trailing CR and LF to the MKS WiFi adaptor via a network socket in this case, but only Gcodes. Any control codes won’t work. So if I send $H, or $X, it does nothing, but if I send G0 X100, it operates as expected. I’m guessing there’s some sort of header that must be used otherwise. I couldn’t get the setting right in PuTTY so I tried sending them from my home automation controller. Not really a real world fix, but I’m getting a handle on how some communications are formatted.

Here is the link to their communications protocol document. This stuff always makes my head hurt. :dizzy_face:

@jeffeb3 Yes - I’m aware of Barts boards but I would want a much smaller 2 stepper PCB to fit the machine and the ESP32 modules I have ! I have just sent off for the PCB’s

@Strider_Matic Interesting…I’m no programmer but it looks suspicious to me that the format for sending the packet to the MCU includes a ‘$’ symbol (Data=$Gcode Command String +"/r/n" )…this is more Jeffs domain!

Even when/if someone figures this out I can’t help but think there is still a problem with the lack of GRBL status being returned to the display. It should be possible to sort out the comms format for the status but hacking the screen firmware to be able to display it will be another matter…


1 Like

…but if you don’t have the ESP32 as the controller, you have a Nano that talks to the display over serial…having the Nano control the laser machine and a ESP32 talking to the nano just so you can use the WEB_UI is just a little OTT. …I was making a joke about it…easier to design the ESP32 board to fit my machine.

Guess that depends on what you mean by OTT, that is the exact kind of thing the esp32 was designed for. And it works with the esp8266 as well, you can get one for like 1.50. You will spend far more then 1.50 in time and energy designing a new board (you’ll spend more than that buying one of bart’s boards) so is the hardware overkill for the application. Sure, however it is cheaper then any alternatives. Witch means it Is practical, I would say it is OTT to spend days (probably longer if thats not what you do for a living) designing a board just so you don’t have more processing power than you need.

1 Like