Hacking the X-Controller

I have had the urge to put a dedicated front end and pendant on Grbl for a while. I thought the X-Controller might be a good platform to try this on.

While searching for some deals on a bunch of parts for a Raspberry Pi based solution, I stumbled upon cheap Chinese tablets that dual boot Windows 10 and Android. This would be much easier to develop and package. I found a nice 8” (1920x1200) one that fit the top of the X-Controller perfectly for $83 (free delivery).

A key feature is USB “On The Go” mode. This allows it to be a master or a slave USB port. This would allow it to control a serial port.

I wrote a custom touch friendly GCode sender based on some existing code I had. I wanted it to have a full screen Windows app look to it. The app auto connects whenever it sees the X-Controller COM port. It also monitors a selected folder for gcode files. If it sees a new one, it offers to load it with one touch I have this synced with Dropbox. I also added support for the Shuttle Pro as a pendant.

The packaging is simply a new 2 piece cover consisting of a flat acrylic base and a machined HDPE bezel.

Note: This was totally an at home side project. It is not an Inventables project.

20 Likes

PLEASE, TAKE MY MONEY!!! That looks incredible!

2 Likes

That looks great!

@AngusMcleod Yes, Windows only. It was specifically designed for this tablet, but it should auto scale to most devices in portrait mode.

The tablet has a dual boot for Windows 10 Home and Android 4.4. Android is an interesting idea, but a lot more work. I did try a simple terminal to Grbl using my Android phone and it worked fine.

1 Like

This needs to be an inventables product. Slap it on the x-controller. I’ll buy today.

Or, make it so I can use on my pc. As I see zero x,y,z all seperate. I’m sold.

2 Likes

Wow this should be an option for the X-controller,id buy it 100%

Btw way is there any news on when the x-controller will be ready ?

@HelgeDokken All parts for a large order are in process. The parts that take the longest time are the end plates. The finish and silkscreen involves several steps. We hope to see them in about 3-4 weeks.

2 Likes

Man, that would be SUCH an improvement! Being able to directly control the X-Carve with a touch-screen right there for zeroing? Awesome stuff!

This looks great! So this is basically make the X-Carve a Headless units, love it!

Can you share the link for the tablet/app you are using? Would this technically work with the gshield?

1 Like

@Rusty The tablet is a Chuwi Hi8. It is easy to find with searches. There are a lot of video reviews of it on You Tube.

The app is not ready for release. I wrote it before the tablet arrived and had to do some messy hacks to get the scaling to work in full screen tablet mode. I want to clean it up and run a lot more jobs on it.

I can’t guarantee I will ever release it, so don’t buy one unless you are ready to program it yourself. It is actually a pretty nice tablet though. It is very fast. The Android side has a few Chinese characters even with English selected. The case is a little plasticy, but it is very light.

2 Likes

Nice, thanks! I’ve done a bit of programming in the past, so I’m not afraid to attempt to learn. You would have some resource I could use to start looking into what it would take to program a controller for this would you? Since it runs windows was it programmed using .net? or am I out to lunch on that?

@Rusty It was programmed with Visual Studio 2015 (free version). A sender for Grbl can be pretty easy to write. The Grbl wiki has all the details.

I wrote a normal desktop type program and faked the full screen look and feel with dynamic scaling of normal controls and a borderless form.

1 Like

Awesome, I have some experience with Visual Studio so that probably wouldn’t be too bad! The hard part is finding the time now! Thanks for your help!

That is very nice indeed! Did you use a standard USB library or did you need to write your own communications handler. I have thought about writing a Gcode sender myself but I was not sure how to handle the buffer requirements.

@AllenMassey You don’t deal with the USB. The driver makes it look like a serial port. It is very easy. You could make a manual terminal to grbl in about 2 minutes from scratch.

Most of the work for me was setting up a queue to work with command pacing protocol of Grbl and mixing in regular position status updates. Laying out a decent dynamic interface takes time too.

Is there any chance you could post an example shell of the code. Just showing the basic communication loop you are using. It has been a while since I used Visual Studio so any example code you could provide would be extremely useful.

I am much better with the UI elements than the real time communications portion.

2 posts were split to a new topic: Software Development - Grbl GUI

A post was merged into an existing topic: Software Development - Grbl GUI

Bart’s like a brother from another mo… you get the idea. This is so awesome! FYI - TURN WINDOWS UPDATES OFF! The expended files hang around and then your tablet locks up because you ran out of internal storage. Unfortunately, this also disables the “built in reset and fresh install” option. So it is a real pain to get it working again as true ‘hard resets’ are not typically included in these tablets. But you probably already know this. Nice work!

so, I’ll state my position: something like this is the future of hobbyist CNC. In the future, CNC machines will not be hooked up with serial cables, and there will not be realtime sending/buffering of commands to some tiny amount of RAM on a microcontroller. Things like the raspberry pi offer a gig of RAM and many gigabytes of storage. So, I would imagine that files could be dropped somewhere and the user wouldn’t need to think about buffering to a microcontroller. (I know there are real-time OS issues with using a non-realtime OS like Raspbian, but bear with me here.) The general point i’m trying to make is, while the Arduino is nice, eventually the interface to the machine will be ethernet and abstracted away from the user. And on the other side of that ethernet will be enough storage to hold the entirety of your GCODE, even for a huge program.

So, given that, I would love to see a full fledged PC, like a Pi, or BBB, or a tablet like this one, become the primary controller for a CNC machine. And with touchscreens, like this one, or the new one just released for the Pi, you can run your GCODE sender directly on the machine. I personally would love to see both Easel and Chilipeppr running on a tablet or raspberry Pi touch screen like this.

And lastly, the jog dial… oh how I love a jog dial. This really should be an integral part. If all of the GCODE softwares allow easy shortcut keys for various jogging functions, then this should be a no-brainer. I’ve got the shuttleCP project going to let me use my shuttle xpress with Chilipeppr from a raspberry pi, but I’d love to see something more integrated and using keystrokes instead.

Anyhow, I know that is a long post, but I just wanted to thank you for your work on this and draw more attention to it. I think PC based CNC controllers with touch screens integrated in are the future of CNC machines. They should become more of an appliance on the network rather than a serial peripheral.

Thanks Bart! Fantastic work.