G-CODE SENDERS FOR Pi 5 & Pi 4
HOW TO INSTAL G-CODE SENDERS ON THE RASPBERRY PI 5 (Or 4.....)
Alright, so let's kick things off with what's nice about using a Raspberry Pi for CNC control. First its compact, low power requirements, and dose not have a lot of fans sucking in dust from your shop. Also windows will not try and turn off your USB connection, or update and change something to break your work flow.
With the Pi5 what changes are we getting from the Pi4? The CPU went from a 1.8 GHz on the Pi4 to 2.4 GHz, the GPU has 800 MHz vs the previous 500 MHz. This bump in preference is noticeable especially if you are coming from a Pi3. The Pi5 does change up power requirements we now need a 5V 4amp power supply, and finally there is a Soft Power Button, but does any of that matter if it can't run the software you want?
The big change in the Pi world is that the Pi5 is 64 bit only, no more 32 bit. While the Pi4 and older support the 32 bit, the Pi5 will only support 64 bit. I tried to flash a micro SD card with 32bit Buster onto the Pi5, but it will not get pass the boot screen.
I tried 4 G-Code Sender and only got 3 to run on the Pi5. LinuxCNC, UGS, & CNCjs. gSender unfourtunatly is not working with 64bit OS yet, but if that changes I will update this. For now I will put what you need to do to run it on the Pi4, and the OS you need to use.
NOTE:
So we got 3 out of 4 of the senders I tried working, yes there are others, but hey there are only so many hours in a day. Just like I did not have time to run 10 + hour cuts with each sender to see if any stalled or had issues. I want to be clear this is not an endorsement for any of these senders, this was just a test to see if I could even get them to install/run and control the machine. Just because they installed does not mean they will work perfectly or have issues down the road. If you have senders you want me to test out, send me an email.
This is an affiliate link that help support the channel and add nothing to your overall cost.
This is the Pi I used for this project, you can get it in a 8GB Ram or 4GB Ram. There are other full kits out there or just the board itself. Find what works for you.
Raspberry Pi 5 Starter Kit 128GB - 8GB Ram
Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
Includes 128GB Samsung EVO+ Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
CanaKit Turbine Black Case for the Raspberry Pi 5
CanaKit Low Noise Bearing System Fan
Mega Heat Sink - Black Anodized
CanaKit 45W PD Power Supply for the Raspberry Pi 5
linux CNC
If you are using USB to connect to your CNC Machine, you will want to look at other g-code senders. Linux CNC connects using Serial Port only, NO USB.
Linux CNC has it owns OS image so we will need to flash the image to our micro SD Card, instead of installing the the Pi OS
!!!THIS DOES NOT SUPPRT GRBL!!!
DOWNLOAD IMAGE: https://linuxcnc.org/downloads/
INSTALL:
Open Raspberry Pi Imager. Select our device in this case the Raspberry Pi 5.
For Operating system, go to Use Custom, and select the file you downloaded.
Then select your Micro SD Card and click next to begin.
We then power up the Pi, and goto the Terminal Emulator (Upper left hand corner click on Applications), and type in:
sudo apt-get update
sudo apt-get upgrade
OPTIONAL: Once that is done you can reboot, if you choose to.
If you did not edit the settings in OS customization then:
USER NAME: cnc
PASSWORD: cnc
To configure wifi, and time zones, and other data type the following into the Terminal Emulator:
sudo menu-config
Now click on Applications go to CNC, and then click on LinuxCNC
This will open the LinuxCNC Configuration Selector. Choose which option corresponds with your machine set up and click OK.
LinuxCNC starts up, now you can start cutting.
UGS - (Universal G-code Sender)
Supports Serial Port & USB connection for CNC Machines. It is compatible with GRBL, TinyG, g2core, and Smoothieware
DOWNLOAD TAR FILE: https://winder.github.io/ugs_website/download/
OR:
DOWNLOAD TAR FILE: https://github.com/winder/Universal-G-Code-Sender
NOTE: Use Raspberry Pi Imager to flash your Micro SD Card with Raspberry Pi OS (64-Bit), for this build I used the Debian Bookworm.
INSTALL:
For the Pi5 I used the ARM64 v2.1.4
Once the file is downloaded Extract the tar.gz file
I dragged the extracted file out of downloads and onto the desktop, but you can put it where ever you want.
To get it up and running, double click on the folder, then double click on bin.
Next double click on ugsplatform and either Execute or Execute in Terminal.
Once open before we move on we need to run the Setup Wizard.
Go to Machine
Setup Wizard
Port
Select if you will be using Serial or USB
Then press Connect
You can import Setting
Change Motor Wiring if neeeded
Adjust your step calibration
Limit Switches
Homing
Soft Limits
After that you are ready to import G-Code
CNCjs
Supports Serial Port & USB connection for CNC Machines. It is compatible with GRBL, GRBL-Mega, TinyG, g2core, and Smoothieware
DOWNLOAD: https://github.com/cncjs/cncjs-pi-raspbian
NOTE: Use Raspberry Pi Imager to flash your Micro SD Card with Raspberry Pi OS (64-Bit), for this build I used the Debian Bookworm. CNCjs does recommend you use the Lite version, but I did use the full desktop verion and have not had any issues so far. Will update.
INSTALL:
Open a Terminal Interface
MAXIMIZE the Terminal before typing anything
Type in or copy and paste (Method 1)
URL="https://raw.githubusercontent.com/cncjs/cncjs-pi-raspbian/master/cncjs_install.sh"
curl -sSL ${URL} | bash
If that does not get the installer going you can try (Method 2)
URL="https://raw.githubusercontent.com/cncjs/cncjs-pi-raspbian/master/cncjs_install.sh"
wget -O cncjs_install.sh "${URL}"
cat --number cncjs_install.sh
sudo bash cncjs_install.sh
The first screen on the installer will let us select a couple different options on how we want CNCjs to run on our Pi, and if we want it to Check or update. Select the options you need or want. Then press OK.
A00 - System Check
A01 - System Update
A02 - Install/Update Node.js & NPM via Package Manager
A03 - Install CNCjs Pendants & Widgets
A04 - Create CNCjs Service for Autostart
A07 - Setup Web Kiosk
A08 - Install & Setup Streamer
A09 - Install & Setup FFmpeg
A10 - Reboot (After Install)
A12 - Remove Old NodeJS & NPM Packages
Next we have the Pendants & Widgets Screen - select what is applicable to you.
Widget Boiler Plate
Pendant TinyWeb
Kiosk Custom Webpage
Pendant Shopfloor Tablet
The install will start, and then it will ask what version of CNCjs we want to use. For this build I used 1.10.3
The last screen will ask to confirm the Port to use. I left at this at the default.
REBOOT the Pi
Once rebooted you can open the web browser and type in the following if you did not an auto start for CNCjs: (If you changed the default port in step 8 change it to what you used)
Select what kind of connectino you are using, in this case I am using Grbl, and then from the drop down I choose
gSender
gSender as of 02-17-24 only runs on 32bit OS
Last gSender 32bit build is 1.2.2
!!!WILL NOT WORK ON Pi5!!!
Works on Pi4 32bit Buster OS Only
The Pi Imager does not have Buster as an option in the Operating system it only has Bookworm & Bullseye. So we will need to download Buster and do a custom OS install just like with linuxCNC.
DOWNLOAD: https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2021-05-28/
FILE: 2021-05-07-raspios-buster-armhf.zip
INSTALL
Open Raspberry Pi Imager. Select our device in this case the Raspberry Pi 5.
For Operating system, go to Use Custom, and select the file you downloaded and unzipped.
Then select your Micro SD Card and click next to begin.
Now boot up your Pi and configure your Pi
Once thats done lets go to:
https://github.com/Sienci-Labs/gsender/releases/
Scroll down to the bottom of the page and navigate until you can find v1.2.2 of gSender
Click on the Assets and find:
Once it is downloaded right click on the file and right click
Click on Properties
Click on Permisions
Change Execute from Nobody to Anyone
Double click on the gSender AppImage and then Execute or Execute in Terminal
SCREEN RESOLUTION
If everything looks small when you boot into Buster, you can change the resolution by:
Preferences
Screen Configuration
Layout
Screens
HDMI1
Resolution
Change to 1920x1080 (Or your screen resolution)
Then Apply