Raspberry Pi CNC v2.51

From Protoneer - Wiki
Revision as of 03:54, 19 July 2015 by F5dta (Talk | contribs)

Jump to: navigation, search



The RPI CNC Board combines a real-time CNC controller(Micro-controller running GRBL) with a powerful credit card size computer(Raspberry Pi).

By combining the two systems we have created an eco-system where the Raspberry Pi provides benefits like: Processing power, connectivity(IOT) and a well supported community.

The board plugs directly into the Raspberry Pi General Purpose Input/Output pins, with the micro-controller and Raspberry Pi communicating via serial. (/dev/ttyAMA0)

Installation and configuration

IMPORTANT: None of the components should be powered while installing or configuring.

Wiring Diagram

Raspberry Pi CNC Wiring diagram.png


  1. Start by fastening the spacers onto the Raspberry Pi.
  2. If the Stepper Driver micro-stepping jumper configuration is known it might be easier to install the jumpers before installing the Raspberry Pi CNC board.(Jumpers can also be fitted at a later stage)
  3. Plug the Micro-controller(Arduino Nano) and stepper drivers into the Raspberry Pi CNC board. We recommend turning the stepper driver current POD's to its minimum position.
  4. Plug the Raspberry Pi CNC board into the Raspberry Pi header and screw the board in place.

WARNING: Do not power up the board with stepper drivers installed if they are not connected to stepper motors. These stepper drivers are current limiting and will overheat if they are not connected.

Micro Stepping Jumpers

Pololu A4988 Link
Jumper 1 Jumper 2 Jumper 3 Microstep Resolution
Low Low Low Full step
High Low Low 1/2 step
Low High Low 1/4 step
High High Low 1/8 step
High High High 1/16 step
Pololu DRV8825 Link
Jumper 1 Jumper 2 Jumper 3 Microstep Resolution
Low Low Low Full step
High Low Low 1/2 step
Low High Low 1/4 step
High High Low 1/8 step
Low Low High 1/16 step
High Low High 1/32 step
Low High High 1/32 step
High High High 1/32 step


In order for the GRBL to communicate with the Raspberry Pi, the hardware serial port on the Raspberry Pi needs to be enabled and working. HobbyTronics has a nice tutorial on how to set it up and test it. Raspberry Pi Serial Port setup

Firmware (GRBL + Micro-Controller)

GRBL is the magic that does the actual control of the CNC machines.

For more details : GRBL

The Raspberry CNC board comes pre-loaded with GRBL but can be updated as follows : Flashing Grbl to an Arduino

User Interfaces (Raspberry Pi)

bCNC [Python][Recommended]

bCNC is a GRBL CNC command sender, auto-leveller and g-code editor.

alt bCNC


  • G-code sender + Editor - Compatible with GRBL 0.9i
  • Workspace configuration (dialog for G54..G59 commands)
  • Auto leveling, Z-probing and auto leveling by altering the g-code during sending
  • Basic CAM features (profiling, drilling)
  • User configurable database of materials, endmills, stock
  • Graphically moving and arranging objects
  • Web pendant to be used via smart phones
  • Graphical display of the g-code, and workspace
  • Extra's : Finger joint box generator

We have created a special Raspberry Pi Image with bCNC pre installed and ready to go.

bCNC Wiki

Source code is available at [1] Install instructions - [2]

Serial Interface

The micro-controller is connected to the Rapsberry Pi via the GPIO serial pins. To connect to the onboard serial port of the Raspberry Pi you will need a serial terminal application like minicom or putty to connect.

Serial port details (GRBL 0.9)
Port : /dev/ttyAMA0
Baud Rate : 115200

G-Code streaming script for GRBL [Python]

This is a simple Python script that allows you to send G-Code files to GRBL.

Download : Stream.py

Raspberry Pi CNC - Web interface

Raspberry Pi CNC


Version 2.11

  • Initial Version
  • 3-Axis (XYZ)
  • End Stop for each Axis (XYZ)
  • Variable Speed Spindle / Laser Intensity control (PWM Spindle pin and Direction pin)
  • Coolant control pin. (Extra output pin)

Availability and Update Notifications

Protoneer Shop
Raspberry Pi CNC Board News-Letter