Example 7. Belt Drive

Previous examples show how to assemble the structure for the belt drive. The remaining steps are electronics and firmware.


The stepper motor is driven by the stepper driver board which is powered by the PC power supply and controlled by the Arduino controller. In this example Arduino runs Reprap GCode Interpreter firmware, which processes G-codes sent to it from the computer and tells the stepper driver board to pulse the motor certain number of steps in certain direction, enabling precise control over the position of the sliding element. Limit switches are connected to Arduino via stepper driver board - they tell Arduino when the sliding element has reached the end of axis.

Stepper driver board runs hot which is why it is heatsinked to the frame. This also connects the stepper driver ground to the frame. A ground wire connects the frame to Arduino GND pin. Another ground wire connects the frame to the sliding element. This is necessary for limit switches to work because sliding elements are isolated from the rail by UHMWPE pads. Stepper motor driver is connected to five Arduino pins (for example 2-6). They are: ENABLE, STEP, DIR, MIN, MAX on SMD v1.1. On SMD v1.2 they are in the following order: STEP, DIR, ENABLE, MIN, MAX (see http://www.reprap.org/bin/view/Main/Stepper_Motor_Driver_1_2#IDC_Connector).


The official page for Arduino GCode Interpreter is here: http://reprap.org/bin/view/Main/Arduino_GCode_Interpreter and it's useful to get an idea what it does and how to configure it; but the release we're interested in is Chris Meighan's rewrite of the interpreter, available here: http://forums.reprap.org/read.php?12,19155 (see attachments at the end of the first post). It implements several nice things that original interpreter doesn't have, for instance hardware timer stepping, acceleration, true arcs, G-code lookahead.

The _init.pde values for an axis connected to Arduino pins 2-6 (SMD v1.1):

#define X_ENABLE_PIN 2
#define X_STEP_PIN 3
#define X_DIR_PIN 4
#define X_MIN_PIN 5
#define X_MAX_PIN 6

If your stepper driver board is connected to different pins, use those. For example, for SMD v.1.2 the pins may be as follows:

#define X_STEP_PIN 2
#define X_DIR_PIN 3
#define X_ENABLE_PIN 4
#define X_MIN_PIN 5
#define X_MAX_PIN 6

The _init.pde values for the belt drive are as follows (if you want to use metric, convert inches to mm and use *_MM definitions):

#define X_STEPS_PER_INCH 200
#define MAX_ACCEL_INCH 500

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License