Claw type game XY table driven by a touchscreen GUI - advice requested

Hi, I’m making a claw type arcade game for fun, with a very precise positioning system that I want to drive from a touchscreen. I would like to know what would be reccomended for creating the graphical interface. For control I’m open to whatever makes the most sense, I thought, ages ago when I first came up with the idea , of using an arduino with lots of ports for position sensors, and multiple axes controls, but when I would finally settle on the ‘right’ board, it would get discontinued. I’m a newbie so go easy on me. Certainly not asking for anyone to figure all this out for me, I just need to know which tools will be able to do the following: X ,Yand Z motor control with accurate repeatable positioning. The Z axis raises and lowers a holder with pan and tilt positioning. So that’s 5 axes total with positioning sensors, and the ability to run 2 or three of these systems at the same time from the same computer. So… what control board to use, what software to drive it, what platform to run it on, what to use for a touchscreen GUI, and can I run it all from a web interface so that it can be driven from anywhere?

Thank you all.

Keith.

Welcome to the forum Keith !

Interesting project you’re looking at - and there are, as always, more than one way to achieve it.

My thoughts are :

Use GRBL on an Arduino with a CNC shield for your XYZ movement. The precision is already there, you’ll just need homing switches and then send GCODE to the desired position. It’s all very well established, and a lot of hobby CNC do the same thing. You will typically only get 3 axis though from the standard library. I’ve built a CNC and use exactly that, and had no problems with it for years.

For the other axis, I’d just add another Arduino and CNC shield. These are comparatively cheap components.

GCODE to both would be through serial ports (USB these days).

For the touchscreen, I’d go for a Raspberry PI. There are plenty of screens available to suit your budget / needs. You can use bCNC (it’s free!) to test your setup, generate GCODE - then learn from there what commands you will need.

I would think your GUI would be custom in the end. Most touchscreens come with libraries / examples for creating buttons and events.

I hope that helps ! Keep us up-to-date with the project !

1 Like

I’m with Jammy on this, use a 3D printer board( dozens of them ) put GRBL on it with standard cheap stepper motor drivers for X, Y and Z and make the upper X/Y platform an H-bot configuration. You can put the Z axis stepper motor right where the 3D printer head would go and that would control your claw mechanism’s up/down motion. Because of the weight of the claw, you’ll probably want to used a geared stepper motor on the Z axis so it won’t unwind when de-powered.

And since it’s just GCode controlling it like any CNC, 3D printer or laser cutter then you can use lots of existing apps to get the hardware going and tested while you work on a GUI to send the right GCode based on user input.

1 Like

Hi Julien, thank you for taking the time to respond.

What you are saying makes sense, every time I need to control an extra ‘group’ of axes, just add another Aduino with a CNC shield. The thing is, with the need to control so many axes, isn’t it awkward to drive multiple arduinos from one control surface?Maybe it’s easy, I don’t know, that is why I’m asking.
I do have a ton of Intel NUC style PC’s at my disposal. I was also wondering if anyone makes a CNC shield for PC?

As far as the GUI is concerned, I do want to use some kind of standard display, be it a touchscreen monitor, or a tablet, and have it be accessible via a web client. This way the User interface platform is not so tied to my specific hardware.

My goal is to see an ovehead representation of the ‘field’ on a monitor or tablet, touch the destination and then have the ‘claw’ go there. For the Z and the pan/tilt, my plan was to enter those desired values in a window and hit ‘GO’ and then the cnc directs the motion.

I am definitely designing the GUI graphic layout myself, I know exactly what the layout needs to look like. Any GUI maker that can display on PC or tablet would be fine.

Im not sure how many axis you need.

Arduino with CNC shield will control 3 independent steppers - so X, Y, and Z is covered.

Add another Arduino for the claw, and unless im missing something, you should have enough.

The advantage of using Ardiuno with GRBL is the fact it becomes a dedicated controller. They use very precise timing. If you tried using windows, and a multi-tasking OS, you could get interruption to the control.

As for your GUI, that sounds feasable. Using the hardware etc ive described, you could translate the touch into MM coords. You simply tell the arduino to move X 50mm and Y 150mm (as an example) and away it will go.

Apologies for any spelling errors - typing on my phone!

Get a controller like this( Bigtreetech Skr V1.4 Turbo Kit Btt Skr 2 Motherboard 3d Printer Parts Skr 1.4 Mks Sgen L Tmc2209 Tmc2208 Ender3 V2 Upgrade - 3d Printer Parts & Accessories - AliExpress ) and get it with the TMS2209 stepper motor drivers. Connect your stepper motors, put flags(tape) on the output shafts and load GRBL onto this( or Smoothie ) and then use bCNC or CNCjs, or Pronterface, or ? to control it and get familiar with what is going on.

From your comments it seems you have not done anything with 3D printers, laser cutters or CNCs before. There is a controller board on the machine(see the link above) and that controller has firmware(embedded software) on it which does all the work of moving the motors, triggering on end-stop switches, moving servo’s etc. The input to command the controller board is a serial cable where GCode commands are sent to the controller. Google “what is GCode” and read up on what GCode is.

After you have done all that I mentioned above, look up things like what and H-Bot 3D printer is because then you’ll know what I was talking about regarding how to make your claw machine.

2 Likes

The structure of your code cold be close to what we have done with LaserWeb.

The backend is a “server” app programmed in node.js and the frontend is a “website” (html, css, js). They communicate over network socket protocol (like telegramms). The backend then connects to the machine via serial or USB. There could be multiple machine controllers connected to the same backend, as long as you have enough USB or serial ports.

You could then use pultiple arduinos with CNC shields or any other controller board that supports gcode firmware (like grbl, smoothie, marlin, repetier, reprap…) and address the correct board with the backend code.

Backend and frontend can run on the same PC or on separate PCs (or combined). The backend could be run on any OS that is supported by node.js.

Thank You Claudio. This sounds like an excellent way to manage multiple layers of xyz from the same interface. You have given me a lot to think about.

1 Like