...

CNC Shield


CNC V3 Shield for Mill Router Engraver + 4x DRV8825+ UNO R3 Arduino Compatible:

CNC V3 Shield for Mill Router Engraver + 4x DRV8825+ UNO R3 Arduino Compatible This kit is complete electronics package to build small CNC router, engraver, mill or robot. Kit includes CNC V3 Arduino shield, new yellow style Arduino UNO R3 Compatible board, it has all the latest changes and features and DRV8825 Stepper Drivers. UNO R3 Board has miniature micro USB connector for connection with the computer.

  • CNC V3 Shield features:
    • Can drive four axes: four receptacles
    • for A4988, DRV8825 or other StepStick compatible drivers.
    • Easy to reach Reset push button.
    • Headers for XYZA steppers, XYZA end stops, spindle control, ESTOP.
    • Screw terminal block for power input.
    • Compatible with GRBL firmware. GRBL instillation guide can be found here.
  • ATmega328P Arduino UNO R3 features:
    • older style DIP ATmega328P chip changed to flat package chip.
    • This board uses CH340 USB-to-serial interface chip, instead of 16U2 (USB drives installed automatically under Windows 7/8).
    • Added 3 rows of holes for wiring.
    • Added 2 rows of holes for dupont style headers (headers are useful if you connect cables directly to Arduino board).
    • USB connector receptacle changed to Micro USB connector receptacle.
  • Package contents:
    • 1 x CNC V3 Shield
    • 1 x UNO R3 Arduino compatible board
    • 3(or 4) DRV8825 Stepper Drivers with heatsinks
Sketch code sample to run steppers:
 
# define EN 8 // stepper motor enable , active low
# define X_DIR 5 // X -axis stepper motor direction control
# define Y_DIR 6 // y -axis stepper motor direction control
# define Z_DIR 7 // z axis stepper motor direction control
# define X_STP 2 // x -axis stepper control
# define Y_STP 3 // y -axis stepper control
# define Z_STP 4 // z -axis stepper control
/ *
// Function : step . function: to control the direction of the stepper motor , the number of steps .
// Parameters : dir direction control , dirPin corresponding stepper motor DIR pin
//  stepperPin corresponding stepper motor " step " pin , Step number of step of no return value.

* /
void step (boolean dir, byte dirPin, byte stepperPin, int steps)
{
digitalWrite (dirPin, dir);
delay (50);
for (int i = 0; i digitalWrite (stepperPin, HIGH);
delayMicroseconds (800);
digitalWrite (stepperPin, LOW);
delayMicroseconds (800);
}
}
void setup () {// The stepper motor used in the IO pin is set to output
pinMode (X_DIR, OUTPUT); pinMode (X_STP, OUTPUT);
pinMode (Y_DIR, OUTPUT); pinMode (Y_STP, OUTPUT);
pinMode (Z_DIR, OUTPUT); pinMode (Z_STP, OUTPUT);
pinMode (EN, OUTPUT);
digitalWrite (EN, LOW);
}
void loop () {
step (false, X_DIR, X_STP, 200); // X axis motor reverse 1 ring, the 200 step is a circle.
step (false, Y_DIR, Y_STP, 200); // y axis motor reverse 1 ring, the 200 step is a circle.
step (false, Z_DIR, Z_STP, 200); // z axis motor reverse 1 ring, the 200 step is a circle.
delay (1000);
step (true, X_DIR, X_STP, 200); // X axis motor forward 1 laps, the 200 step is a circle.
step (true, Y_DIR, Y_STP, 200); // y axis motor forward 1 laps, the 200 step is a circle.
step (true, Z_DIR, Z_STP, 200); // z axis motor forward 1 laps, the 200 step is a circle.
delay (1000);
}
Got from this seller's ebay listing.


grbl

downloaded grbl-master
renamed "Grbl" and moved to /usr/share/arduino/libraries


on linux-mint 16, installed arduino from software manager
installed version 1:1.0.5+dfsg2-1
Sketch -> Import Library -> Grbl
it came up with a bunch of includes
moves the "#include " to the first line
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
uploaded to arduino

Then connected to arduino using cutecom 115200 8N1 LF lineend
it responded with "Grbl 0.9g ['$' for help]"
typed in $$, it responded with current settings in eeprom
$0=10 (step pulse, usec)
$1=25 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=6 (dir port invert mask:00000110)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.020 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=0 (report inches, bool)
$14=1 (auto start, bool)
$20=0 (soft limits, bool)
$21=0 (hard limits, bool)
$22=0 (homing cycle, bool)
$23=0 (homing dir invert mask:00000000)
$24=25.000 (homing feed, mm/min)
$25=500.000 (homing seek, mm/min)
$26=250 (homing debounce, msec)
$27=1.000 (homing pull-off, mm)
$100=250.000 (x, step/mm)
$101=250.000 (y, step/mm)
$102=250.000 (z, step/mm)
$110=500.000 (x max rate, mm/min)
$111=500.000 (y max rate, mm/min)
$112=500.000 (z max rate, mm/min)
$120=10.000 (x accel, mm/sec^2)
$121=10.000 (y accel, mm/sec^2)
$122=10.000 (z accel, mm/sec^2)
$130=200.000 (x max travel, mm)
$131=200.000 (y max travel, mm)
$132=200.000 (z max travel, mm)
ok

changed the defaults for the fol;
$4=1 (to invert the step enable for the A4988 drivers that are being used here)
$100=314.961
$101=314.961
the stepper does 0.9 deg/step, and using 1/4-20 threaded rod, 
that is 20 turns per inch, = 1/20 = 0.05" per turn, 0.05*25.4 = 1.27mm per turn (360 deg),
360/1.27=283.4645 deg per mm, 283.4645/0.9 = 314.961steps / mm

https://gsnook.wordpress.com/tag/grbl/  (for some example grbl settings)