Precision CNC Masking Machine using Node-RED Dashboard & GRBL32 CNC Control

I built a custom CNC control UI for a precision masking machine using Node-RED and NR Dashboard running on a Chipsee touchscreen with integrated Raspberry Pi 4 Compute Module. The actual CNC controller is a GRBL32 based control (xPro v5) that communicates with the UI using the serialport nodes.

The SVG scale shown on the screen is in mils (0.001" units). For reference, the yellow band where the masking ends is 0.010" wide (about 5 human hairs, shown on screen at ~20X). The video feed is from a Mokose 4K USB3 camera.

Click here to see a screen recording video of it in action...

As part of this project, I also created a NR node (@legacymachine/node-red-contrib-shuttlexpress) for the ShuttleXpress USB input device from Contour Design to have a physical motion control device for easy machine setup in addition to the on-screen soft controls.

This was a really fun project and I'm very pleased with how the UI turned out using NR & NR Dashboard.

I have many more ideas in store for other custom CNC UI controls using NR.

13 Likes

Awesome bit of kit. Great work.

1 Like

Both your UI and your machine look fun and impressive!

I am currently using Node-Red as a main component of a custom CNC machine control system. I started with UGS as my sender, now trying out CNCjs since it is browser friendly, but I have been hesitant to go all the way as you did within Node-Red. Curious if you are open to sharing your project and how you came to the decision to bring the gcode sender all the way into Node-Red?

I also like the Chipsee. Too bad it is a little too big for my setup. Thanks again for sharing!

"Curious if you are open to sharing your project and how you came to the decision to bring the gcode sender all the way into Node-Red?"

The decision to build the gcode sender into the project was simply so I didn't have any of those kinds of dependencies. I used the Streaming Protocol: Character-Counting section of the Grbl Interface guidelines as a reference.

If you are specifically interested in the gcode sender portion, I can take a look and see if I can make a generic flow for that portion of the project but there is also another significant portion of this project that I already plan to make into a public node for Node-RED... the Grbl message parser.

Thanks for the effort and sharing with the public. I would definitely be interested in peeking at any of the flow bits you could pass along. I am sure others would also be interested in being able to use Node-Red to drive machines as well.

I am working on a specialized 2 axis machine. In the end, I am not sure how much of a full sender's features I will try to pack into Node-Red vs trying to communicate with another sender. Not really looking to reinvent, but trying to bounce between Node-Red for the special features and then a sender, like UGS or CNCjs, has been a bit messy and less than robust than desirable. Still sorting through the best approaches.

For a specific feature of my controller, I have been streaming some basic jog-ish stuff with more of the Simple Send-Response method in an attempt to make a hybrid joystick/encoder controlled forward and backward drive of a line segment only gcode. I have yet to find anyone doing this, nor known if anyone else has a use for it. The intent is for the operator to be able to "drive" the gcode with forward feed, as responsive as possible, then be able to stop and/or reverse the feed direction to go back over the prior steps as far as they need.

Did you make any interface for loading gcode files, or are you simply running a hardcoded program for your application?

While a video feed is also something I am trying to include, I also need a visualizer/plotter of the path. Did you happen to look into how much effort that would need to bring it in as well?

On another note, curious if you built that masking machine for your own use and/or if you plan to sell them?

"For a specific feature of my controller, I have been streaming some basic jog-ish stuff with more of the Simple Send-Response method in an attempt to make a hybrid joystick/encoder controlled forward and backward drive of a line segment only gcode."

If I'm understanding this correctly, this sounds a lot like what I did with the ShuttleXpress control for this machine. I used the How to compute incremental distances section from the Grbl GitHub page as a reference.

"Did you make any interface for loading gcode files, or are you simply running a hardcoded program for your application?"

I did not make an interface to load gcode programs because this machine is for a specific, specialized purpose so it just generates the gcode in real-time based on the UI parameters, saves the gcode as a global variable then loads the grbl buffer using the send-response plus character counting method.

"While a video feed is also something I am trying to include, I also need a visualizer/plotter of the path. Did you happen to look into how much effort that would need to bring it in as well?"

I have not built-in a gcode visualizer but I have looked at the various components to do so referenced at the bottom of this GitHub page GitHub - cncjs/gcode-parser: G-code Parser.

"On another note, curious if you built that masking machine for your own use and/or if you plan to sell them?"

I built this machine as part of a project for the company I work for as an automation and manufacturing engineer.

Hi Josh, I see this is an old thread. I have put together some hardware for a project that is three axis, but not a true CNC. All movements will be from Zero in a positive direction only. I have used GCode sender to crudely jog the three steppers and prove it all functions.

Now my next step is to use node red flows to position the "pointer/tool". I would need NodeRed to read an outside source value, then reference a chart, and finally send the pointer off to the correct place in the air. The pointer will rest for seconds/ minutes or weeks till it is asked to run to another point in the air. It only has to jog from one point to another as needed and won't be actually following any type of shape.

The teensy 4.1 with a GrblHal breakout board may have been over kill for this application, but being a total novice, it was the only place I could figure out to start. I do not know how to code yet, so I am looking for help with this project.

Would you, or anyone out there be interested in working with me or sharing some node red flows for interfacing with a teensy 4.1. setup for GrblHal..(or some other method that is more efficient)?

Thanks,Tony

All you need to get basic functionality working is a serialport node connected to the Teensy running GrblHAL... then you can send any acceptable Grbl command to the serialport to execute that command.

The single character Grbl realtime commands (such as '?') do not require a newline terminating character but all other commands, including G-code commands do require a terminating character (e.g. G01 X0Y0Z0 F10\n).

Attached is an example flow with a pretty complete Grbl response parser to help get you started... just attach your Teensy via USB and setup both serialport nodes to connect to the Teensy.

grbl_example_flow.json (58.0 KB)

1 Like