Difference between revisions of "Raspberry Pi CNC v2.51"

From Protoneer - Wiki
Jump to: navigation, search
(bCNC [Python][Recommended])
m (F5dta moved page Raspberry Pi CNC to Raspberry Pi CNC v2.51 without leaving a redirect)
 
(36 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Overview==
 
==Overview==
[[File:Raspberry-Pi-CNC-Board-1.jpg|640px]]
+
[[File:Raspberry_Pi_CNC_Board_V215_Front2.JPG|640px]]
  
 
The RPI CNC Board combines a real-time CNC controller(Micro-controller running GRBL) with a powerful credit card size computer(Raspberry Pi).
 
The RPI CNC Board combines a real-time CNC controller(Micro-controller running GRBL) with a powerful credit card size computer(Raspberry Pi).
Line 7: Line 7:
  
 
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)
 
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)
<gallery mode=packed style="text-align:left" perrow=5>
 
File:Raspberry-Pi-CNC-Board-2.jpg
 
File:Raspberry-Pi-CNC-Board-3.jpg
 
File:Raspberry-Pi-CNC-Board-4.jpg
 
File:Raspberry-Pi-CNC-Board-5.jpg
 
File:Raspberry-Pi-CNC-Board-Back-2.jpg
 
File:Raspberry-Pi-CNC-Board-GPIO.jpg
 
File:Raspberry-Pi-CNC-Board-MCU.jpg
 
File:Raspberry-Pi-CNC-Board-Mounting.jpg
 
File:Raspberry-Pi-CNC-Board-Top.jpg|Top
 
File:Raspberry-Pi-CNC-Board-Bottom.jpg|Bottom
 
File:Raspberry-Pi-CNC-Board-Back-1.jpg|Back
 
  
 +
 +
<gallery mode=packed style="text-align:left" perrow=5>
 +
File:Raspberry_Pi_CNC_Board_V215_Front.JPG
 +
Raspberry_Pi_CNC_Board_V215_Top.JPG
 
</gallery>
 
</gallery>
 +
 +
==Availability, Update Notifications and Forums==
 +
: [http://stores.ebay.com/Protoneer Protoneer Shop]
 +
: [http://eepurl.com/DIq-z Raspberry Pi CNC Board News-Letter]
 +
: [http://forum.protoneer.co.nz/viewforum.php?f=7 Raspberry Pi CNC board forum section]
  
 
==Installation and configuration==
 
==Installation and configuration==
 
'''IMPORTANT''': None of the components should be powered while installing or configuring.   
 
'''IMPORTANT''': None of the components should be powered while installing or configuring.   
 +
 +
===Quick Start Guide===
 +
 +
'''WARNING:''' Do not power up the board with stepper drivers installed if they are not connected to stepper motors. The stepper drivers are current limiting and will overheat if they are not connected.
 +
 +
 +
'''[[Raspberry Pi CNC - Quick Start Guide]]'''
 +
 +
 +
----
 +
  
 
===Wiring Diagram===
 
===Wiring Diagram===
 
[[File:Raspberry_Pi_CNC_Wiring_diagram.png|480px]]
 
[[File:Raspberry_Pi_CNC_Wiring_diagram.png|480px]]
 +
... Diagram Will Be Updated To The 4 Stepper Setup Soon ...
  
===Installation===
 
# Start by fastening the spacers onto the Raspberry Pi.
 
# 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)
 
# 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.
 
# 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===
 
===Micro Stepping Jumpers===
 +
In the tables below High indicates that a Jumper is inserted and Low indicates that no jumper is inserted.
 
{| class="wikitable"
 
{| class="wikitable"
 
|+Pololu A4988 [https://www.pololu.com/product/1182 Link]
 
|+Pololu A4988 [https://www.pololu.com/product/1182 Link]
Line 120: Line 123:
 
|}
 
|}
  
==Software==
+
=== End Stops ===
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. [http://www.hobbytronics.co.uk/raspberry-pi-serial-port Raspberry Pi Serial Port setup]
+
End Stops use normally-open push-button type switches. The End-stop socket shares a common ground that connects to each axis end-stop. The pins are pulled high by the micro controller's internal pull-ups and will activate the end-stop when the pin is connected to ground.
  
===Firmware (GRBL + Micro-Controller)===
+
GRBL v0.9 setting $21 needs to be set to 1 to activate hard-limits. Setting $22 also activated the Homing functionality.
GRBL is the magic that does the actual control of the CNC machines.  
+
  
For more details : [https://github.com/grbl/grbl GRBL]
+
'''V2.51''' Introduces End-stop and Probe line filters to prevent noise on the lines.
  
The Raspberry CNC board comes pre-loaded with GRBL but can be updated as follows : [https://github.com/grbl/grbl/wiki/Flashing-Grbl-to-an-Arduino Flashing Grbl to an Arduino]
+
=== Clone Drive (Introduced with V2.51) ===
 +
The 4th Stepper Driver Socket can be configured to clone any of the other Axes. Configuration is done with the two rows of jumper headers situated under the Nano board.
  
  
----
+
<gallery mode=packed style="text-align:left" perrow=4>
===User Interfaces (Raspberry Pi)===
+
File:Raspberry_Pi_CNC_Clone_X.png|4th Socket Cloning X Axis
 +
File:Raspberry_Pi_CNC_Clone_Y.png|4th Socket Cloning Y Axis
 +
File:Raspberry_Pi_CNC_Clone_Z.png|4th Socket Cloning Z Axis
 +
File:UnConnected.png|4th Socket Disconnected
 +
</gallery>
  
 +
In the images above the green sections indicates a jumper positions to configure the 4th Stepper Motor Socket.
  
----
+
=== External Drivers===
====bCNC [Python][Recommended]====
+
Below are images of the pins(in red) needed to connect to an external stepper driver for each axis. External Drivers usually run at 3.3-5V logic with the Raspberry Pi CNC board using 5V. (Check the external driver details before connecting.)
bCNC is a GRBL CNC command sender, auto-leveller and g-code editor.
+
  
 +
Needed pins are as follow:
 +
* Stepper Pin
 +
* Direction Pin
 +
* Enable Pin
 +
* Ground Pin
  
 +
Special attention needs to be taken with the Enable pin. Pololu Drivers activate when the enable pin goes low/grounded. If the external drivers you are using needs active high you will not be able to use the enable pin but can instead just connect the external drivers enable pin to 5V to enable it.
  
'''Features:'''
+
<gallery mode=packed style="text-align:left" perrow=4>
* Compatible with GRBL 0.9i
+
File:ExternalDriver_Button_Pins.png|External Drivers and Control Button pins
* G-code sender
+
File:ExternalDrivers_X_Axis.png|X-Axis pins
* Workspace configuration (dialog for G54..G59 commands)
+
File:ExternalDrivers_Y_Axis.png|Y-Axis pins
* Auto leveling, Z-probing and auto leveling by altering the g-code during sending
+
File:ExternalDrivers_Z_Axis.png|Z-Axis pins
* Basic CAM features (profiling, drilling)
+
File:ExternalDrivers_Cloned_Axis.png|Cloned-Axis pins
* User configurable database of materials, endmills, stock
+
</gallery>
* Graphically moving and arranging objects
+
* G-code editor
+
* Web pendant to be used via smart phones
+
* Graphical display of the g-code, and workspace
+
* Extra's : Finger joint box generator
+
  
 +
=== Button Controls===
 +
The buttons : RESET,ABORT,HOLD,RESUME work with normally open buttons and gets activated when grounded. All buttons are pulled high.
  
[http://wiki.protoneer.co.nz/Raspberry_Pi_bCNC_Image We have created a special Raspberry Pi Image with bCNC pre installed and ready to go.]
+
===Coolant, Spindle Direction, Spindle Speed===
 +
'''GCode Commands''':
 +
* S0 - S1000 - This command set the spindle speed. (0-1000 with 1000 being 100% speed.)
 +
* M3 / M4 - Enables the spindle clockwise or anti-clockwise. The Spindle Direction pin is set accordingly(Anti-clockwise turns direction pin high). Sets the Spindle speed pin accordingly.
 +
* M5 - Disables and pulls spindle pin low.
  
[https://github.com/vlachoudis/bCNC/wiki bCNC Wiki]
+
Examples:
 +
M3 S500 -> Enables spindle in clockwise direction at 50% speed.  
  
 +
Keep in mind that the direction pin does not reset when the M5 command is used.
  
Source code is available at [https://github.com/vlachoudis/bCNC]
+
====Coolant====
Install instructions - [https://github.com/vlachoudis/bCNC/wiki/OS]
+
'''GCode Commands''':
 +
* M8 - Enables the coolant and pulls the pin high.
 +
* M9 - Disables and pulls the pin low.
  
 +
===Probe===
 +
...
  
----
+
==Software==
 +
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 good tutorial on how to set it up and test it. [http://www.hobbytronics.co.uk/raspberry-pi-serial-port Raspberry Pi Serial Port setup]
  
====Serial Interface====
+
===Firmware (GRBL + Micro-Controller)===
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 [http://www.hobbytronics.co.uk/raspberry-pi-serial-port minicom] or [http://blog.protoneer.co.nz/install-and-run-putty-on-your-raspberry-pi/ putty] to connect.
+
GRBL is the magic that does the actual control of the CNC machines.  
  
;Serial port details (GRBL 0.9):
+
For more details : [https://github.com/grbl/grbl GRBL]
: Port : /dev/ttyAMA0
+
 
: Baud Rate : 115200
+
The Raspberry CNC board comes pre-loaded with GRBL but can be updated as follows : [https://github.com/grbl/grbl/wiki/Flashing-Grbl-to-an-Arduino Flashing Grbl to an Arduino]
  
  
 
----
 
----
====G-Code streaming script for GRBL [Python] ====
+
==Hardware==
This is a simple [https://www.python.org/ Python] script that allows you to send G-Code files to GRBL.
+
===Version 2.58===
 +
* Replaced the Arduino Nano with a embedded micro-controller(ATMEGA328 - Arduino UNO compatible)
 +
* Add reset circuitry to enable programming directly from the Raspberry Pi. ISP pins added and preloaded with the Opti-Boot bootloader. This opens the door for other firmwares like Firmata.
 +
* Replaced clone jumpers with solder-able jumpers.
 +
* Later batches might have dip-switches instead of Jumper headers.
 +
* First Protoneer board to be mode on our Pick and Place machine.
  
Download : [https://github.com/grbl/grbl/tree/master/doc/script Stream.py]
+
<gallery mode=packed style="text-align:left" perrow=5>
 +
File:RPI-CNC-V258-Front.jpg
 +
File:RPI-CNC-V258-Front-MCU.jpg
 +
File:RPI-CNC-V258-Top.jpg
 +
File:RPI-CNC-V258-Back001.jpg
 +
File:RPI-CNC-V258-Clone.jpg
 +
File:RPI-CNC-V258-FrontSteppers001.jpg
 +
File:RPI-CNC-V258-FrontSteppers002.jpg
 +
File:RPI-CNC-V258-CAD-Front.jpg
 +
File:RPI-CNC-V258-CAD-Back.jpg
 +
</gallery>
  
 +
===Version 2.51===
 +
* Extra Stepper Drivers Socket that can clone one of the other Axes.
 +
* End-stop + Probe line noise filters. Allows end stops to work with normal un-shielded cable.
 +
* Breakout pins allowing external Stepper drivers to be hooked up.
  
----
 
====Raspberry Pi CNC - Web interface====
 
[https://github.com/Protoneer/Raspberry-Pi-CNC Raspberry Pi CNC]
 
 
==Hardware==
 
 
===Version 2.11===
 
===Version 2.11===
 
* Initial Version
 
* Initial Version
Line 193: Line 228:
 
* Coolant control pin. (Extra output pin)
 
* Coolant control pin. (Extra output pin)
  
==Availability and Update Notifications==
+
<gallery mode=packed style="text-align:left" perrow=5>
: [http://stores.ebay.com/Protoneer Protoneer Shop]
+
File:Raspberry-Pi-CNC-Board-2.jpg
: [http://eepurl.com/DIq-z Raspberry Pi CNC Board News-Letter]
+
File:Raspberry-Pi-CNC-Board-3.jpg
 +
File:Raspberry-Pi-CNC-Board-4.jpg
 +
File:Raspberry-Pi-CNC-Board-5.jpg
 +
File:Raspberry-Pi-CNC-Board-Back-2.jpg
 +
File:Raspberry-Pi-CNC-Board-GPIO.jpg
 +
File:Raspberry-Pi-CNC-Board-MCU.jpg
 +
File:Raspberry-Pi-CNC-Board-Mounting.jpg
 +
File:Raspberry-Pi-CNC-Board-Top.jpg|Top
 +
File:Raspberry-Pi-CNC-Board-Bottom.jpg|Bottom
 +
File:Raspberry-Pi-CNC-Board-Back-1.jpg|Back
 +
File:Raspberry_Pi_CNC_Wiring_diagram.png
 +
 
 +
</gallery>

Latest revision as of 22:30, 9 June 2016

Overview

Raspberry Pi CNC Board V215 Front2.JPG

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)


Availability, Update Notifications and Forums

Protoneer Shop
Raspberry Pi CNC Board News-Letter
Raspberry Pi CNC board forum section

Installation and configuration

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

Quick Start Guide

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


Raspberry Pi CNC - Quick Start Guide




Wiring Diagram

Raspberry Pi CNC Wiring diagram.png ... Diagram Will Be Updated To The 4 Stepper Setup Soon ...


Micro Stepping Jumpers

In the tables below High indicates that a Jumper is inserted and Low indicates that no jumper is inserted.

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

End Stops

End Stops use normally-open push-button type switches. The End-stop socket shares a common ground that connects to each axis end-stop. The pins are pulled high by the micro controller's internal pull-ups and will activate the end-stop when the pin is connected to ground.

GRBL v0.9 setting $21 needs to be set to 1 to activate hard-limits. Setting $22 also activated the Homing functionality.

V2.51 Introduces End-stop and Probe line filters to prevent noise on the lines.

Clone Drive (Introduced with V2.51)

The 4th Stepper Driver Socket can be configured to clone any of the other Axes. Configuration is done with the two rows of jumper headers situated under the Nano board.


In the images above the green sections indicates a jumper positions to configure the 4th Stepper Motor Socket.

External Drivers

Below are images of the pins(in red) needed to connect to an external stepper driver for each axis. External Drivers usually run at 3.3-5V logic with the Raspberry Pi CNC board using 5V. (Check the external driver details before connecting.)

Needed pins are as follow:

  • Stepper Pin
  • Direction Pin
  • Enable Pin
  • Ground Pin

Special attention needs to be taken with the Enable pin. Pololu Drivers activate when the enable pin goes low/grounded. If the external drivers you are using needs active high you will not be able to use the enable pin but can instead just connect the external drivers enable pin to 5V to enable it.

Button Controls

The buttons : RESET,ABORT,HOLD,RESUME work with normally open buttons and gets activated when grounded. All buttons are pulled high.

Coolant, Spindle Direction, Spindle Speed

GCode Commands:

  • S0 - S1000 - This command set the spindle speed. (0-1000 with 1000 being 100% speed.)
  • M3 / M4 - Enables the spindle clockwise or anti-clockwise. The Spindle Direction pin is set accordingly(Anti-clockwise turns direction pin high). Sets the Spindle speed pin accordingly.
  • M5 - Disables and pulls spindle pin low.

Examples: M3 S500 -> Enables spindle in clockwise direction at 50% speed.

Keep in mind that the direction pin does not reset when the M5 command is used.

Coolant

GCode Commands:

  • M8 - Enables the coolant and pulls the pin high.
  • M9 - Disables and pulls the pin low.

Probe

...

Software

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 good 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



Hardware

Version 2.58

  • Replaced the Arduino Nano with a embedded micro-controller(ATMEGA328 - Arduino UNO compatible)
  • Add reset circuitry to enable programming directly from the Raspberry Pi. ISP pins added and preloaded with the Opti-Boot bootloader. This opens the door for other firmwares like Firmata.
  • Replaced clone jumpers with solder-able jumpers.
  • Later batches might have dip-switches instead of Jumper headers.
  • First Protoneer board to be mode on our Pick and Place machine.

Version 2.51

  • Extra Stepper Drivers Socket that can clone one of the other Axes.
  • End-stop + Probe line noise filters. Allows end stops to work with normal un-shielded cable.
  • Breakout pins allowing external Stepper drivers to be hooked up.

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)