Rpi for CNC & Laser

Bill Arnold

1974
Staff member
Messages
8,633
Location
Thomasville, GA
First of all, I want to thank Brent and Darren for their input on various aspects of my struggles with gcode senders on RPi. Their help and some perseverance on my part got me where I wanted to be.

A short walk through my history with this: Setting up an RPi3 was no issue in itself. My biggest problem was getting a sender running on RPi for evaluation.

UGS installed and ran just fine, but its graphics (Visualizer) won't work on RPi.

CNCjs had plenty of instructions but I never got it running until I found a CNCjs/RPi OS bundle. When I installed that, it worked great. It requires a browser on a PC to run it, but I wanted a headless system, if possible.

I tried bCNC via the detailed step-by-step commands for installation on RPi, but every time I made a step forward, there was another step back. Further research found instructions for the process of downloading a zip file for bCNC, loading it onto RPi and extracting it in place. I'm pleased to say it worked just fine - no problem.

Accessing the RPi remotely from a PC was no problem using the VNC application built into RPi.

File sharing was the next matter to deal with and that was accomplished with Samba. It required a number of configuration tweaks, but it works as it should. I map a drive letter via Windows File Manager and copy files both directions.

After getting everything working to satisfaction, I realized I hadn't detailed my steps well, so I went back through them and documented them.

When I was satisfied with the entire package, I read the SD card into an image file so I could replicate it onto other SD cards. I had built the system on an RPi3 I labeled 'RPi-LSR'. After writing the image onto another SD card for my CNC, all I had to do was change the device name and I was done.

Here's a view of bCNC via VNC Viewer:
2019-01-26-145853_1280x720_scrot.jpg

This process allows bCNC to run headless, so losing the connection between the PC and RPi won't kill a run.

Fun stuff!
 
Last edited:
Good deal Bill!

I've been having to use bCNC to control my CNC, It's the only one I've found that works well with the smoothie firmware I have loaded on my controller.

I use lightburn for the laser. I haven't got either of them running on a pi yet. I hadn't thought about running then through VNC. Interesting idea. Might have to give that a try!
 
One of the things that got my brain cells crossed during my journey was trying to do too many things at one time. Example: running a gcode sender on RPi with a 5" touch screen attached and also using a remote connection. One thing I encountered was the touch screen operates at 800x600 pixels, which translated to a smallish window remotely via VNC. When I experimented with using Windows Remote Desktop Connection, I found that I could leave the touch screen at its resolution and still get a full screen on the remote PC. I decided to get away from the touch screen in favor of spending my time getting a sender running on the pi headless.

Taking a step at a time, I got the pi running using an attached keyboard and monitor. Then, I added Samba and got file sharing going. The final step was finding the best way to install bCNC. With all of that running, operating remotely via VNC was a snap. I have the resolution on the pi set to 1280x720, a workable setting for my desktop and laptop PCs.

I haven't addressed adding a camera to my final configuration, but I did experiment with it a bit a couple of weeks ago. Of course, I could use a pi as a camera server with cameras attached for both the laser and CNC.
 
I've got a KVM (Keyboard Video Mouse) that lets me hook up 4 computers to my desktop keyboard. I've only got it connected to 3 computers, so it's really easy for me to just hook up the pi to the 4th slot and set them up that way.

After all you've gone through, hooking up a camera should be pretty easy. Really makes it nice for monitoring jobs, although I would never leave the laser running unattended.
 
For the initial setup of my RPi boards, I have a second keyboard and mouse by my shop computer. I have two monitors (one above the other), so I connect the RPi to a second port on the top monitor. Once the RPi OS is installed and I activate VNC, the remainder of the setup process is done via VNC, which means I can work on it on my laptop while kicked back in my easy chair in our family room. Lazy? Yep!!!

The main reason I'll eventually put cameras on my CNC and laser is to record a run occasionally.
 
Sounds like a nice setup Bill. I'm running them for the printers, but not yet setup anything for the laser, I rarely leave it unattended. I also may be able to use that on the next cnc, I can run a web cam on Mach3, but it's rare that I leave it while it's working either. The printers I do leave for hours at a time. I have setup a smoke alarm in the office which will notify me of any issues.
 
... I rarely leave it unattended. ... I have setup a smoke alarm ...

I wanted RPi on each machine for the convenience of not needing a wired setup. I don't leave the shop if the laser or CNC are running and I have a smoke detector in my shop. I've run Octopi on my 3d printer from the time I set it up, so I like being able to keep track of it remotely - especially with the length of some of the prints.
 
I definitely want to get the rpi's controlling mine, for that exact reason. On the controller I have for my cnc, just having it plugged into the usb port keeps it powered on. It can't do anything, but I don't like the idea of it being on when I have the computer on and I don't like plugging the usb in and out all the time.
 
... On the controller I have for my cnc, just having it plugged into the usb port keeps it powered on. ... I don't like plugging the usb in and out all the time.

I have a small 5vdc power supply on my systems to power the RPi via the GPIO strip. I use a 3-pin connector so I can align it with the end pin and push it on. The outside row on the 40-pin connector is assigned to +5vdc on pins 2 & 4; pin 6 is ground. This arrangement makes for a better supply to the RPi, since USB ports are minimal capacity at best.
 
Yeah, Thats how I do it on my machines, except I run a buck converter to drop the voltage from my 12 volt supply to 5 for the pi.

What I was talking about is my cnc controller is connected to my laptop via usb, and that keeps the controller, and the little lcd screen I have on it, powered up, even if I'm not using the cnc.

I just dont like pluggin/unplugging the cable all the time to turn it off if I'm not using the CNC
 
Well, I learned something new today! I didn't know about the buck converter until now. I'll bookmark that for next time.

The little 5vdc supply is only $11, but I coulda had a bunch of bucks for the same bucks! :hide:
 
Last edited:
Top