Raspberry Pi g-code senders for Grbl

Discussion about the arduino based g-code interpreter, grbl
Post Reply
chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Raspberry Pi g-code senders for Grbl

Post by chamnit » Thu Apr 23, 2015 3:07 pm

All,

I've been testing two Grbl g-code senders, GrblWeb and bCNC, that run on the RPi for the last week. Here's what I found so far.

GrblWeb:
It's a Javascript and NodeJS web server that runs on the RPi in the background. You connect to it through any web browser (laptop, tablet). You can control as many machines as is connected to the RPi (maybe at the same time. Didn't test). To upload a job, just drag and drop the g-code program into the browser. Click Run. That' s it. Overall, it works really well and it is very responsive by its design. There is nearly zero lag time between a jog/control command and it being executed on the machine. However, it has *really* simple interface and some control buttons behave a little weird. I really like it and would love to see this get adopted by the community to push it forward. This is a great solution if you have a network with an RPi and a computer, that runs the web browser, in a fixed location somewhere near, but not next to, your machines.
EDIT: GrblWeb also integrates JSCut into it, making it really easy to generate g-code and get things running quickly.

bCNC:
It's written in Python and tk, so it's fully cross-platform and was easy to install on the RPi. It runs within the RPi's GUI and even has an additional virtual pendant that you can pull up on a smartphone or tablet web browser to help you set up a job right at the machine. This project is nearly full-featured with a g-code visualizer, code editor, virtual pendant, jogging, easy coordinate system setup, MDI mode commands, and some integrated auto-g-code generation for certain tasks like finger-joint boxes. BUT, after some more testing last night, it's slow on the RPi. There are some lag issues with button presses and when it is executed on the machine (turns out the virtual pendant has the same problem). The visualizer is likely the main culprit and I'm working to help fix/identify some of these problems. This would be also be a great solution if you don't have a network in your shop and like to sneaker-net (flash drive) the g-code programs to your RPi. Or, you need more advanced features for your work flow. It'll require a monitor/HDMI TV, keyboard, and mouse at your machines. (VNC remote desktop also works, but increases the lag even more.)

If you all have tried these, what are your thoughts? Also, I don't know of any other RPi g-code senders for Grbl. Are there any that I'm missing?
Last edited by chamnit on Thu Apr 23, 2015 5:24 pm, edited 1 time in total.

WillAdams
Posts: 8542
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by WillAdams » Thu Apr 23, 2015 3:14 pm

From the wiki:

https://github.com/unicornswag/Universal-CNC-Controller --- Simple *nix CLI for streaming G-code to and jogging a grbl-controlled machine. Written in Shell as a wrapper to the stream.py python script. Runs on Linux, OSX, and BSD with py-serial installed. Ideal for low-powered hardware such as the Raspberry Pi.

https://github.com/PxT/OctoPrint --- Communication program which allows submission of jobs, previewing, monitoring and control through a web interface. Unique in being suitable for Grbl as well as 3D printer firmwares. New version will round to 3 decimal places to preclude the too long line problem. Instructions for installing on a Raspberry Pi. Original version.

http://chilipeppr.com/tinyg --- 3D Viewer. Gcode Sender. Jog controls. Has a Serial Port JSON Server you put on device with serial port like Win/Mac/Linux/Raspberry Pi/BeagleBone/etc, but run jobs from your local laptop/desktop browser. Exists as a "Hardware Fiddle" with ability to fork all code. [17] Google forum There are now SPJS downloadables for Pi1 and Pi2.[18]

And while it's not noted as such on the Comm / Control page, http://www.shapeoko.com/wiki/index.php/Grbl_Controller is able to run on a Raspberry Pi: http://zapmaker.org/raspberry-pi/runnin ... pberry-pi/ --- added that.

Really, any of the Linux things should, so https://github.com/Highlander01/PythonCNCGUI-GRBL should be worth trying as well.
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets
Nomad 883 Pro #596 (bamboo)

chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by chamnit » Thu Apr 23, 2015 3:33 pm

Thanks Will! Some of those I know of, other not so much. I suppose what I'm looking for is the right one for the community to adopt and get pushed forward. I firmly believe that the RPi is the best and cheapest way to control Grbl so you don't have to put your expensive Macbook Pro right next to a machine that is flinging aluminum chips or dust and may some questionable electronics wiring that could fry something expensive. It's super easy to make and support an RPi image to get anyone up and running quickly.

- Universal CNC Controller: Wow. That's about as simple as it can get. Not sure if its a general solution, because it's all text-based and you'd need to know what you are doing. Honestly, I'll probably use this one, because I generally only use Grbl's streaming script for long jobs. I know that it's 100% dependable and no funny business is going on.

- OctoPrint: Super surprised to see this, as I love OctoPrint for 3d printing. It doesn't seem to be active anymore. OctoPrint is great for 3d printers, but not sure how well it translates to CNC milling and the tools required for it. I have a certain knee-jerk reaction when I see programs that state that they can do it all. Usually that's not the case and do nothing very well.

- Chilipeppr for Grbl: Yup. It's nice, slick, and very ambitious. I got running well on my aggressive test job that I normally run. I still don't trust the JSfiddle model and having to depend on that for stability. There is too much going on to make it work and requires a modern computer to run the GUI (super GPU-heavy).

- Grbl Controller: I've had problems with this one. It doesn't stream g-code appropriately according to the official Grbl streaming protocol. In the past, it has led to strange problems users have reported to me, which ended up being caused by this controller. Maybe I give this one a try, if they fixed the streaming problem.

- PythonCNCGUI-Grbl: This one has been inactive for 5 years. Probably should remove this from the Wiki.

WillAdams
Posts: 8542
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by WillAdams » Thu Apr 23, 2015 3:44 pm

chamnit wrote:...This one has been inactive for 5 years. Probably should remove this from the Wiki.
What?!? Remove an entry from the wiki? Blasphemy! That'd interfere w/ my goal to ``collect 'em all''!

Seriously, okay, good point. I don't research stuff as much as arguably I should (I do occasionally ask people to look into things....) so I'll edit the placement of that one, and am _really_ looking forward to adding what you've found / shared thus far (if that's okay).

Thanks!
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets
Nomad 883 Pro #596 (bamboo)

bengtec
Posts: 46
Joined: Mon Dec 29, 2014 2:09 pm
Location: Wiltshire, UK

Re: Raspberry Pi g-code senders for Grbl

Post by bengtec » Fri Apr 24, 2015 5:33 am

I'm using GRBLWeb (or at least I will when I actually get my SO2 upgraded and set up in its proper home). I did find the interface a little lacking, however with not a huge amount of effort I have added some extra buttons for some of the functions I use more regularly. As it is all html and js it was just a case of looking at what the existing buttons were doing then copying and editing for the new ones.

I was originally running on a pi model b but the wifi dongle didn't work without a powered usb hub and it took a while to start up, I've upgraded to the pi2 which does power the wifi and boots much quicker. I did find, however that the image for grblweb doesn't work on the pi2 and has to be first run on an original pi and upgraded first. I also had trouble installing grblweb into an existing install of raspbian following the instructions on github (I'm usually good with computers but linux isn't really my thing)
Ben
Stock SO2 #7722, Dremel 3000, Arduino Uno, G-shield, GRBL 0.9g
Rhino>CamBam>Raspberry Pi with GRBLWeb

chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by chamnit » Fri Apr 24, 2015 2:19 pm

@bengtec : Agreed on all part. The interface is bit too simple, but the backing code is just as simple and easy to change. I did find that the RPi image that Andrew Hodel supports was not plug-n-play. I had to do a few things to get Wifi working that was non-standard. He's usually busy with other projects, but he stated that will update the image and make it fully plug-n-play shortly. Although, I'd love to see someone pick it up, fork it, and push it to help mature it quicker. I don't have the JS background to do it right.

meikj
Posts: 9
Joined: Sat Apr 04, 2015 1:22 am

Re: Raspberry Pi g-code senders for Grbl

Post by meikj » Sat Apr 25, 2015 2:12 am

I have a Raspberry Pi connected to my CNC router. I use it in two ways - one, running Universal Gcode Sender along with TightVNC. UGCS was a bit pokey on the RPi, but since upgrading to Raspberry Pi 2, it smokes. Went from 100% CPU to about 7%. The VNC connection works great. My second and now preferred way is with Chilipeppr. I love the ShuttleXpress jog control! It works extremely well. Chilipeppr can be a resource hog, so I usually disable the 3D viewer, which significantly reduces CPU usage. I never could get GRBL Controller to work properly.

MeanderBolt
Posts: 560
Joined: Mon Nov 04, 2013 6:45 pm
Location: Georgia
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by MeanderBolt » Sat Apr 25, 2015 3:29 am

chamnit wrote:I firmly believe that the RPi is the best and cheapest way to control Grbl so you don't have to put your expensive Macbook Pro right next to a machine that is flinging aluminum chips or dust and may some questionable electronics wiring that could fry something expensive.
Amen! I have been doing exactly that and I have been worried that this will be the exact end to my MBP.

I was looking to, and have purchased a RPi2 for this purpose. After seeing that folks have used ChiliPeppr. I have come to depend on so many of the CP extras.
Shapeoko 2 # 3569 - DW660
Current tool chain > Draftsight > CamBam > ChiliPeppr
Build log

chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by chamnit » Sun Apr 26, 2015 2:05 am

I'll have to re-investigate Chilipeppr. It's been a good 6 months since I last used it, and it's intriguing that there is an RPi build of sorts. I'll take a look tomorrow.

There also seems to be some other GrblWeb forks that are around that I'll look into. They have additional features that the main repo doesn't have.

As for bCNC and after a lot of testing, it's hamstrung by tkinter. In particular, the visualizer is really slow, even on a Macbook Pro, but Vasilis is looking into disabling it for RPi's. It's still a nice solution and Vasilis updates the code amazingly fast and is super responsive. The virtual pendant is useable, but the lag in responsiveness turned out to be due to touch screen OS's in general. For example, iOS has a 300ms delay before executing something to determine whether a tap is a single tap or a double tap. This led to jogging being a little bit hard to navigate. Overall, there work to be done, but once it gets ironed out, it's a solid GUI that can be run network-free and with a monitor, or through VNC remote desktop. With VNC, you start a job, close VNC, and never have to worry about a web browser crashing or accidentally closing it. It has auto-leveling and some advanced features that most other GUIs don't have. It's just not for prime time just yet. If people do use it, please let Vasilis know in his github issues thread.

meikj
Posts: 9
Joined: Sat Apr 04, 2015 1:22 am

Re: Raspberry Pi g-code senders for Grbl

Post by meikj » Sun Apr 26, 2015 4:06 am

chamnit wrote:I'll have to re-investigate Chilipeppr. It's been a good 6 months since I last used it, and it's intriguing that there is an RPi build of sorts. I'll take a look tomorrow.
I agree with some of your thoughts on Chilipeppr, and JSFiddle. It would be great to run standalone, for those that don't have network access in their shops. I would love to see something similar to the serial port JSON server that could be used as a "generic" serial port extender to Raspberry Pi.

But the functionality of Chilipeppr for me outweighs the drawbacks. The shuttle control is really slick. Take a look at Jarret's development workspace (chilipeppr.com/jarret) to see some of the enhancements that are in the works. There is a nice macro for z probing.

I usually run Chilipeppr on a MacBook or Chromebook, connected via serial port JSON server to RPi. The ShuttleXpress is also plugged in to RPi, and communicates via SPJS.

Post Reply