Nextion controller

Hello all you tinkering folk.

Not sure how I managed to delete all my accounts on my laptop during a changeover to a new one, but I did (bangs head on desk)… but back now

So… I hate the LCD controller, it just not that nice to use.

I have some Nextion touchscreens here, and they have really dropped in cost. If you can wait for China - £60 for a 7" touchscreen.

£30 -ish, gets you a perfectly fine 4.3" screen (which is what I am going to use).

So earlier tonight I started on a new controller. It will probably be like a tablet/dongle type thing… not sure yet.

Still bashing the code for the Pro-Mini that runs it, but I should be able to get this into a nice slim tablet style controller.

I also think I have got it to communicate with the Rambo without losing the LCD screen, or the PC connection.

Made myself some nice icons for specific functions I would like (such as full lift Z for tool change etc).

Has 5 pages (so far)…

Start splash page

Monitor page (Shows X,Y and Z in large Red LED style text. Plus spindle RPM)

Direct commands. Press a button to immediately action that G code request

Custom commands. A page with a keypad so you can enter your own commands, distances etc

Setup. Not sure what I need this for yet. Might bin this page.

The RPM is going to be monitored by either an infra-red or a laser optical sensor. I have both here, so going to experiment with both of them.

The photo with the X,Y,Z and RPM shown here, currently doesn’t have the numbers displayed yet.

I have been designing a vacuum shoe that wraps around the tool holder, rather than a single pipe going straight up. I have found the versions with the vacuum pipe going directly up the side of the Z mount loses you even more bed cutting area (due to it fouling the rails).

My slim wrap-around design doesn’t hit the rig, and will also include the spindle speed sensor and track the Z height with a small stepper motor, so that is can stay just above the part being machined automatically.

Fun times…


[attachment file=“122501”]
[attachment file=“122502”]
[attachment file=“122503”]
[attachment file=“122504”]



I should add, that once these fancy additions are finished, I will upload build details, files etc to my website.

Plus details of connections to the Rambo, the Arduino code etc

Might be handy for someone else who wants to tinker.


I’m very interested in this part.

The graphics look really good.

I have about 6 projects on the go at the moment, so this might take a few weeks to get a prototype together.

I also think I may add a small RF Module and make it a wireless tablet. Not sure yet.

To be honest, once the basics are done, it would be down to the user whether they made it wireless, tablet, static mounted etc.

Changed the custom G code page (shown here), I think you will need to see what you have typed, so I left a space at the top to show the command text you are assembling (before you press go).

Anyone played around with the G29 bed sampling feature?
Not that my bed appears to be out of level, but I wondered if anyone had enabled it in the Marlin config.h code and got it working.


I have for my printer. The bilinear feature. If you probed the spoil board, you can save it to eeprom and it will keep using it. It might be good, but I would like to figure out how to set a region with gcode and just probe the workpiece. I usually don’t care about Z unless I’m carving and that requires being level with the top surface, not the spoil board.

What about M, F? Those are used often. Sometimes S, P, especially for laser or spindle power. You could use the T9 phone tricks.

M, F, S P? Not sure what you refer to?
I have added a couple of buttons on the programming page above that enter ‘M’ or ‘G’ before your required entry.
This will be an ever evolving thing… You have to pre-program the buttons in Nextion, but in theory you could actually implement a ‘drag and drop’ style setup page that let you configure the pages how you wanted.
The time so far has been making individual icon buttons, but I have got that down to a quick format now.

What is the T9 Phone trick? A lot of this is new to me!

You know, the phones before blackberries but after text messaging. To send a ‘C’, you would hit 2 three times… Just a thought.

If you wanted to send G1 Z10 F300, you would need an F. Or M106 S255 to set the fan speed to max. M106 S255 P2 for the second fan. Not a big deal, I’m just brainstorming.

Oh right!. Well, I could add a button that steps through the prefix letters… G, M, S, etc

1 Like

That looks really nice! :astonished:
Hopefully you will share the plans and stuff. Maybe I’ll switch from my MKS gen 1.4 to that one. :slight_smile:

1 Like

Right then. Progress is being made. Been a bit busy on other stuff.

After tweaking around, and basically trying to work out what I would like it to do, I am starting to make headway.

Slightly redesigned the pages to allow for the icons I need (pretty easy to change them).

The lighting icon glows yellow when switched on, and the motor (spindle) and vacuum icons have animated spinning arrow on them when active.

This screen is 4.3" (about 100mmx60mm I would think), and plenty big enough.
However fitting it onto the larger 5" or 7" touchscreens would not be that difficult.

These 4.3" screens are about £35 and I happened to have one.
Probably going to use a Lipo and a small RF module and make this a fully wireless mini tablet.

Only needs a Pro Mini on board, so the whole handset should be something like 130mm x 80mm x 22mm. That might vary slightly.
Will design and 3d print a case later.

Managed to get Marlin Serial1 up and running reliably, so this tablet talk to the Rambo with Repetier and the LCD still connected and working alongside (never use the LCD anyway).

The RF module receiver could just connect to the Rambo. Not sure yet. Or I might add another Pro Mini at the receiving end, then I can use the outputs on that to control the spindle, vacuum, lights etc (rather than the Rambo outputs).

Page 1 shows RPM (using my optical sensor). And the X,Y,Z co-ords AS SET BY THIS HANDSET.
Shortcuts on the right are for:
G code shortcuts page (press a button and the complete command is sent for you)
Manual G code entry

The G Code shortcuts has all the usual ones you would need.

The manual G code page works by pressing the prefix button (left of the top text slot).
This cycles through the first letter (G,M,F etc).
Then simply enter your required code and press GO.

Settings has Piezo on/off, limit switch facilities, bed levelling etc. I will probably fill this out as I discover new features I would like.
Currently have voltages on this page.

I may add the facility to have a speed slider (Feedrate) or something. Who knows!

My biggest ‘to do’ (as mentioned in a different post), is to possibly try and find a way of ‘aligning’ the Repetier and my controllers co-ords.

Currently, my controller tracks its own position, as does the Rambo and Repetier.
Not so worried about Repetier, but it would be nice to retrieve the position from the Rambo and use that.

I have managed to obtain a whole pile of serial data upon each move from the Rambo. I have yet to determine (or even look at) the pile of bytes it spits out.


Just as a side note. I may add a Bluetooth receiver to the Rambo, so that at a later date, I can replicate the above controller as an App for my Galaxy tablet or my Samsung phone.

1 Like

Hello all.
Just realised I never updated this thread about my wireless tablet controller.

So, a little tweaking to go, but essentially there.

The receiver is mounted under the CNC with the relays. This talks to the Rambo controller on it’s own serial port, so you can still use Repetier on the USB socket and the LCD screen all at the same time.

Upon CNC boot (Rambo boot), it retrieves the current data and also will home X, Y and Z if you wish (a handy function I find).

The wireless handset is very light, and I might even shrink it down further.
Has a 4000mAh Lipo inside. Runs for most of the day without issue.
A tilt switch inside shuts the screen off after 2 minutes if it hasn’t moved. Comes on upon movement.

4x Buttons on the left control the LED bed lighting, tool power (both laser and router), extractor and I have put the facility for a later date lubrication pump.

Displays X, Y and Z - taken from the Rambo. It tracks it’s own position commands (if you send X+100, then it updates it’s own screen first). But every 60 seconds, it does a compare with the Rambo to ensure they both match.

RPM is not quite finished. I have made a digital to analogue converter and its all working, but I need to install the optical disc on the router to deduce the IR pulse.

There is a page for direct typed commands. You press the >_ button and it steps through F, G and M.
Then simply enter your bespoke command and press GO.

There is a G code preset page. This allows you to quickly jog the machine in multiples of 0.01, 0.1, 1, 10 and 100.
You can also home All, just X and Y, Just Z, raise Z for tool change and reset the X,Y and Z position (zero them).
Also lock/unlock the steppers.

The setup page has the same home functions and set zero.
Plus you can calibrate the bed, turn the piezo on/off (in the handset), turn the endstop microswitches on and off, request the status of the endstops and quiz the Marlin controller for data (Marlin Debug).

I also added a fast tap move function. This allows you to touch the screen (which has a scaled box the size of the bed) and it plots a cross where you touched.
Hit GO and it will zoom over there at high speed.

Voltages are also shown on the setup page. The adjustment pots are the fine tuning for how much the voltage has to drift, before it updates the handset (you don’t want it polling the handset constantly with updates on every 0.01v fluctuation).
I have it set at 0.5v.

Oh, and every page has an emergency stop button.

Can’t lie… it’s been a right pain to get working.
Will get a video done asap.


Holy crap! That is epic! Way above what I thought you were doing. It looks awesome.

I probably should mention that the entire thing has probably cost around £70 for both transmitter and receiver.

WHAAAAT! Next level setup. WOW

Got my redesigned adjustable vacuum duct fitted, and the RPM sensor in place.
I have a better disc arrangement for the RPM sensor, but it’s still at work (I have a spare collet with a welded disc attached).


That vacuum duct looks great!

I was thinking about designing something like this too. I think the existing ducts are a little hard to work with. How does yours work exactly? Where does the hose connect? At the top outside of the part shown on the pictures?

I designed my own dust shoe that is attached to the Z axis just below the router, with a pipe going up next to the router. Another vertical pipe mounted to the center assembly slips over it. When the Z axis moves, the two pipes just slide. (I wanted to put a kind of seal of printed flexible filament inside, but I don’t think it was necessary). My main aim was to have as little torque on the Z axis from the vacuum as possible. It worked quite well.

However, if you cut flat sheets of thick material, the dust shoe gets in the way. Then I printed a dust shoe designed by someone else that is fixed to the gantry only. But I found it a but cumbersome to work with and does not suck as well because there is a larger gap between the router and the dust shoe.

Very unique! I can not wait to see what you think of it in use. Vac shoes are pretty hard to get right.

Glad you have a metal RPM disk, plastic ones always fail eventually and make serious shrapnel!

I just designed them in Tinkercad. Took a basic ‘foot’ design off of Thingyverse and butchered it.
I wanted the actual duct to mimic the diameter of the router and stay quite tight to the assembly.
A round vacuum pipe going up the side of the router would foul the frame when it homes.
It simply clamps to the router at the bottom, and the top is held with a strip of velcro.
At a later point, I will make a proper clip for the top of the assembly, so that I don’t need the velcro strap.
At the top of the curved duct section, it converts to my 40mm vacuum pipe which is supported from the workshop ceiling. I is a very lightweight pipe and doesn’t seem to affect the rig at all.
The curved duct piece slide inside each other nicely, and you set the height with a small screw.
But, I have allowed a mounting position for a small stepper motor, and at a later date, I may play around with having it track the height of the work (maybe ultrasonic range module or something).
I can add a brush strip to the base of the vacuum shoe if needed.


Just in case anyone is interested… made it in a hurry, so it ain’t great