Skip to content

Modular, opensource, high performance G-code interpreter and CNC controller written in Object-Oriented C++

Notifications You must be signed in to change notification settings

Bobgee/Smoothieware

 
 

Repository files navigation

Overview

This is a fork of Smoothie http://smoothieware.org/ which is a free, opensource, high performance G-code interpreter and CNC controller written in Object-Oriented C++ for the LPC17xx micro-controller ( ARM Cortex M3 architecture ). It will run on a mBed, a LPCXpresso, a SmoothieBoard, R2C2, MotionBoard or any other LPC17xx-based board. The motion control part is a port of the awesome grbl.

These instructions are targetted at the MotionBoard connected to an EMC02 board from : http://firepickdelta.dozuki.com

NOTE it is not necessary to build Smoothie yourself unless you want to. Prebuilt binaries are availble here in the following file location : Firmware/firmware.bin

Quick Start

These are the quick steps to get Smoothie dependencies installed on your computer:

  • Pull down a clone of the Smoothie github project to your local machine.
  • In the root subdirectory of the cloned Smoothie project, there are install scripts for the supported platforms. Run the install script appropriate for your platform:
    • Windows: win_install.cmd
    • OS X: mac_install
    • Linux: linux_install
  • You can then run the BuildShell script which will be created during the install to properly configure the PATH environment variable to point to the required version of GCC for ARM which was just installed on your machine. You may want to edit this script to further customize your development environment.

NOTE: all commands are case-sensitive

Building Smoothie

From a shell, you need to start a "BuildShell", so go to the root Smoothie project directory and run:

./BuildShell
make clean
make all

To upload you can do

make upload

if you have dfu-util installed.

Alternatively copy the file LPC1768/main.bin to the sdcard calling it firmware.bin and reset.

Getting you FirePick Delta operational

Onto a blank FAT32 formatted SD card, copy the following files

Firmware/firmware.bin
ConfigSamples/Firepick.delta/config

Now you may need to edit the config file and change the parameters if you are not using DRV8825 at 32 microsteps and 0.9 degree (400 steps per revolution) stepper motors. Read through the config file, the instructions on what to do are already in there. Press reset on your SmoothieBoard or MotionBoard (This is the FirePick derivate of the Smoothieware board and is recommended for you FirePick delta) and wait a few moments while the new firmware is loaded into flash memory, and then executed.

Z-Probing & Calibrating

The config file is already configured for Z-Probing.

(1) Attach the Z-Probe between 1.27 and GND (Normally open, closed when the probe is activated)

Note that Smoothie requires you to define its trigger point in terms of an offset of X/Y/Z from the origin (0/0/0), when we have a tool head that is a Z-Probe, I will integrate that into the config file, in the mean time, you will need to update the leveling-strategy.ZGrid-leveling.probe_ofsets X,Y,Z parameter, e.g.

leveling-strategy.ZGrid-leveling.probe_ofsets 29,7,1.1

(2) Issue the automated Z-Probe command

G32

If it does something very strange, for example the Z-Probe misses the bed, press the RESET button on your MotionBoard or SmoothieBoard and then figure out mechanically what is wrong.

(3) Place an engineers steel ruler along the X-axis so Y=0 on the bed and the centre of the tool you have in the ATD is directly above 100mm on the ruler.

(4) Issue a

G0X100

command and see how close to 200mm it gets to (remember that X=-100 is 0 on the ruler, X=0 is 100 on the ruler and X=+100 is 200 on the ruler) and note the difference.

(5) Issue a

G0X0

and check that it returns to 100mm on the ruler.

(6) Issue a

G0X-100

and measure the deviation from 0mm on the ruler.

(7) The deviations in steps (4) and (6) should be the same; if not, then you need to re-align the arm supports so they are the same (shims, etc) NOTE: you will observe that as a result of step (2), your FPD should be tracking much closer to horizontal on the Z Plane (i.e. X & Y movements, in this case, near Z=0), but we are not there yet.

(8) Using the difference in (4) and (6): (a) issue an

M92

and read the values for X/Y/Z as these are the steps/mm Smoothie uses to drive the FirePick's Rotary Delta arm solution, these should all be the same value. e.g. M92 returns M92X338Y338Z338 (plus other things we don’t care about).

(b) Determine the ratio of the difference as 100/difference measured e.g. 100/104=0.961538

(c) Calculate the what the steps/mm should be as the value from (9a) multiplied by the (9b) ratio e.g. 338*0.961538=325

(d) issue and

M92X<value from (9c)>Y<value from (9c)>Z<value from (9c)>

e.g.

 M92X325Y325Z325

(9) Repeat this process from (2) until you are happy with your set up (it may take several iterations as the approximation in step (8) needs to be iteratively refined).

(10) Issue a

M30 ZGrid

command to delete any previous ZGrid compensation file off your SD card in the MotionBoard.

(11) Issue a

M374

which saves the deviations in a

ZGrid

file on the SD card on the MotionBoard/Smoothie Board.

Now, when ever you start the FPD, issue a M375 and this loads you compensation file from the SD card and applies the necessary corrections to Smoothie, and then away you go.

Using the above method I an getting rather good 3D printing, but I notice that downward movement in the Z axis still exhibits an increasing outward deviation as Z moves from say 100mm down to 0mm the further out the head is from X/Y = 0, i.e. towards the out parts of the bed, though this is substantially reduced by the above process, but is not quite perfect.

3D Printing - Important hardware fix for the MotionBoard + EMC02

There is currently an issue where the Thermistors are not connected to the VREFP on the LPC1769 so you get crazy temperature readings, typically 20 degress C below what they are.

Here is a low cost fix to get you started on 3D printing.

First, here is the issue with the way the Thermistors are wired on the EAT001 tool board:

On the EAT001 board, the thermistor no connected to VREFP on the LPC1769

The fix is to remove R8 and instead wire R8 to the VREFP on the MotionBoard.

Here is where R8 normally resides on the back of the EAT001 PCB

Remove R8 and solder two wires to it, then cover in heat-shrink to protect it

Remove R8 and solder two wires to it, then cover in heat-shrink to protect it

This is how the EAT001 now looks with R8 removed and one end routed to the AIN of the EAT001 PCB, so the other can got to the MotionBoard

This is how the EAT001 now looks with R8 removed and one end routed to the AIN of the EAT001 PCB, so the other can got to the MotionBoard

Now we need to replace the two pin connector with a 3 pin connector so we can easily get at the "VREF" which we will wire to VREFP on the LPC1769

Now we need to repalae the two pin connector with a 3 pin connector so we can easily get at the "VREF" which we will wire to VREFP on the LPC1769

Now we need to put a wire between the VREF pin and the AREFP on the MotionBoard PCB

Now we need to put a wire between the VREF pin and the AREFP on the MotionBoard PCB

And here is where we connected the other end of the 4k7 wire to AREF which is really VREFP

And here is where we connected the other end of the 4k7 wire to AREF which is really VREFP

Now we get the correct readings!!

NOTE: Make sure you either have a jumper shorting the EPO pin, or an actual Emergency Power Off switch installed or the motors and hot-end / heated bed will not turn on. The EPO 2 pin socket is on the EMC02 immediately below the Ethernet port on the MotionBoard.

OpenPnP

Premilinary support for OpenPnP has been added.

(1) A sample config file is provided

ConfileSamples/FirePick.delta/config_OpenPnP

Simply copy this to your SD card and rename to

config

(2) The firmware has been updated to support this, copy the following file to your SD card:

Firmware/firmware.bin

Note: I have hard coded the PROTOCOL_VERSION to 0.1 for the mean time.

Also, when you are following the openPnP instructions, here are the sample settings for the downward looking camera used by the FirePick Delta hardware:

<cameras>
<camera class="org.openpnp.machine.reference.camera.OpenCvCamera" id="d66faf53-05e1-4629-baae-b614c5ed8320" name="C1" looking="Down" rotation="90.0" device-index="0">
<units-per-pixel units="Millimeters" x="0.023" y="0.023" z="0.0" rotation="0.0"/>
<vision-provider class="org.openpnp.machine.reference.vision.OpenCvVisionProvider"/>
<head-offsets units="Millimeters" x="0.0" y="-32.0" z="-20.0" rotation="0.0"/>
</camera>
</cameras>

And also to use the correct Smoothie driver:

<driver class="org.firepick.driver.SmoothieDriver" port-name="/dev/ttyACM0" baud="115200" feed-rate-mm-per-minute="5000.0"/>

Noting that you may need to change the port to suit your platform. This works on Ubuntu.

About

Modular, opensource, high performance G-code interpreter and CNC controller written in Object-Oriented C++

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 49.5%
  • C 47.1%
  • HTML 1.1%
  • Makefile 1.1%
  • Ruby 0.3%
  • Shell 0.3%
  • Other 0.6%