Firmware Configuration
December 01, 2008 03:36AM
I'm trying to figure out how to configure my Arduino firmware (GCode method) using the standard Keling Nema 23 motors I got from Zach's store. Several questions:

1) So the spec-sheet [www.kelinginc.net] says there are 200 steps/revolution. But with a half-stepping setting available on the RRRF stepper-motor boards, do I use the 400 steps/rev value instead?

2) I noticed from the single Arduino wiring diagram [reprap.org] that the "enable" wires (from the stepper-motor boards) aren't connected to the Arduino. But in the _init file from "GCode_Interpreter.pde", it is connect to Analog1_Digital15 on the Arduino. Which is correct?

Thanks for any guidance!

-Arthur


......

This is the contents of the _init file (part of "GCode_Interpreter.pde"):


// define the parameters of our machine.
#define X_STEPS_PER_INCH 416.772354
#define X_STEPS_PER_MM 16.4083604
#define X_MOTOR_STEPS 400

#define Y_STEPS_PER_INCH 416.772354
#define Y_STEPS_PER_MM 16.4083604
#define Y_MOTOR_STEPS 400

#define Z_STEPS_PER_INCH 16256.0
#define Z_STEPS_PER_MM 640.0
#define Z_MOTOR_STEPS 400

//our maximum feedrates
#define FAST_XY_FEEDRATE 1000.0
#define FAST_Z_FEEDRATE 50.0

// Units in curve section
#define CURVE_SECTION_INCHES 0.019685
#define CURVE_SECTION_MM 0.5

// Set to one if sensor outputs inverting (ie: 1 means open, 0 means closed)
// RepRap opto endstops are *not* inverting.
#define SENSORS_INVERTING 0

// How many temperature samples to take. each sample takes about 100 usecs.
#define TEMPERATURE_SAMPLES 5

/****************************************************************************************
* digital i/o pin assignment
*
* this uses the undocumented feature of Arduino - pins 14-19 correspond to analog 0-5
****************************************************************************************/

//cartesian bot pins
#define X_STEP_PIN 2
#define X_DIR_PIN 3
#define X_MIN_PIN 4
#define X_MAX_PIN 9
#define X_ENABLE_PIN 15

#define Y_STEP_PIN 10
#define Y_DIR_PIN 7
#define Y_MIN_PIN 8
#define Y_MAX_PIN 13
#define Y_ENABLE_PIN 15

#define Z_STEP_PIN 19
#define Z_DIR_PIN 18
#define Z_MIN_PIN 17
#define Z_MAX_PIN 16
#define Z_ENABLE_PIN 15

//extruder pins
#define EXTRUDER_MOTOR_SPEED_PIN 11
#define EXTRUDER_MOTOR_DIR_PIN 12
#define EXTRUDER_HEATER_PIN 6
#define EXTRUDER_FAN_PIN 5
#define EXTRUDER_THERMISTOR_PIN 0 //a -1 disables thermistor readings
#define EXTRUDER_THERMOCOUPLE_PIN -1 //a -1 disables thermocouple readings
Re: Firmware Configuration
December 01, 2008 08:51PM
1 - yes, half stepping on the Arduino driver boards will get you 400 steps per revolution with the Kelling steppers; that's what I'm using. You loose a bit of torque, but it hasn't been a problem for me. I get 8 steps per mm with cast BfB toothed pulleys on the X and Y, and 320 on the Z.

2- I'm not using the enable signal, which means I have to make sure I don't have my stepper drivers set to full power (via the potentiometer); the motors might overheat. The Z axis is the only one that comes close to the limit; it gets warm, but levels off at around 65 deg C.

Hope that helps!

Wade
Re: Firmware Configuration
December 02, 2008 03:06AM
Thanks Wade -- will give a try.

I suppose the # steps are different for X/Y vs Z because of different pulley radii?
Re: Firmware Configuration
December 02, 2008 12:31PM
For Darwin's Z axis, it's the thread pitch and step angle that determine steps per mm. Pretty sure the pulleys don't factor into the equation.

Using the toothed pulleys from McMaster for X and Y and M8 threaded rod for Z, my settings are 9.8 steps/mm on X and Y and 320 on Z.

The calculations I use are:

X or Y steps/mm = 360/((tooth pitch in mm)*(step angle in degrees)*(number of teeth))
For mine, that's 360/(2.032*0.9*20) = 9.8

Z steps/mm = 360/((thread pitch in mm)*(step angle))
For mine, that's 360/(1.25*0.9) = 320
Re: Firmware Configuration
December 02, 2008 01:49PM
Makes sense -- thanks a lot Steve.

I'm doing the McWire repstrap. For X/Y/Z (for the Keling motors set to half-stepping and using the 1/4"-20 threaded rods for all axis'):

STEPS_PER_INCH = (20 turns/in)*(400 steps/turn) = 8000

STEPS_PER_MM = (8000 steps/in)*(in/2.54cm)*(cm/10mm)= 314.96063

MOTOR_STEPS: Keling's do 200 steps/revolution, but with half-stepping enabled... = 400

-Arthur
Sorry, only registered users may post in this forum.

Click here to login