PRINTER
Author Andrea Missaglia1
1
Phases
2
Steps/Revolution
200
Angle Resoution
1.8
Step Accuracy
5%
IP Rating
40
Operating Temp -20 to +40
Insulation Class
B
Stack
Single
Lenght
39.8
Rated current
1.8
Holding Torque
400
Rotor Inertia
57
Motor weight
0.28
Hardware Description
In a standard 3D delta printer there exist four stepper
motors. Each one is controlled by a single stepper motor driver who is connected to the common Ramp. The
ramp is superimposed to the Arduino Mega Board that
is in connection with respect the pc. In the figure 2 it
is schematised the hardware set-up previously described.
The power supply has been neglected from the rappresentation. The stepper motors SM1, SM2 and SM3 are used
to control the three vertical pulleys connected to the end
effector. The material is feeded to the end effector by the
last stepper motor SM4.
[n]
[step/360deg]
[deg/step]
[%]
[-]
[C]
[-]
[-]
[mm]
[A]
[mNm]
[gcm2]
[kg]
Homework
Table 1: Characteristics
of the stepper motor
Excitation Mode
2 Phase
1-2 Phase
W1-2 Phase
2W1-Phase
4W1-2 Phase
The step size specification (1.8 or 200 steps per revolution) is the full steps, but a microstepping driver such
as the A4988 allows higher resolutions by allowing intermediate step locations, which are achieved by energizing
the coils with intermediate current levels. For instance,
driving a motor in Sixteenth-Step mode will give the 200step-per-revolution motor 3200 microsteps per revolution
by using sixteenth different current levels. More information regarding drivers could be found at [1] and [?].
Ramps 1.4
Ramps 1.4, also known as RepRap Arduino Mega Pololu
Shield, is designed for Arduino MEGA. This complex electronic board is capable to allocate multiple electronic connections and functions. In figure 4 are shown the main
connections that we have to use in our application.
The four blue boxes rappresent the A4988 stepper drivers
locations. The boxes are marked with the relative stepper motor ID-code. For example, the stepper motor that
control the movement along the axis-1 is drived by the
A4988-SM1, instead the A4988-EXR is associated with
the extruder stepper motor. Each driver produces an output signal for its relative motor. Each output signals is
sent to the stepper through the use of four wires that
are put in evidence by means of rounded-blue-rectangles.
The four wires that connect every single motors are colored red, blue, green, black in sequence. Reversing the
color sequence, the stepper will run on the contrary.
In each driver we can seen the pins denominated MS1,
MS2 and MS3. Using jumpers we have to realize a certain logic set up of these pins. Using binary logic and
three state variable we can achieve nine different combination but we can seen from table 2 taht the motor driver
allows only five different combinations of the microstep
resolution. We set the three pins to logical state High
in order to achieve tha highest resolution. The type of
driver define an upper constraint to the maximum resolution achievable. So, our maximum resolution using this
pin configuration, these motors and these drivers is:
Res = 200x16 = 3200st/rev
(1)
with two wires: the first is labeled with S for the signal
and the second is labeled with GND for the ground connection. In the Marlin firmware they are tipically set to
NO (normally open). It is possible to use M119 to check
your endstops status.
Example M119 Returns the current state of the configured ES1, ES2, ES3 endstops. Takes into account any
inverted endstop settings, so one can confirm that the
machine is interpreting the endstops correctly.
Example If X1 = ES1 M119 X1 1 This will invert end
stop X1 (Inverted means switch is connected in Normally
Open state (NO) and viceversa)
In the red-box there are two pins of the thermistor. In
this application we use 100k thermistor (best choice for
EPCOS 100k (4.7k pullup)). More information regarding
the thermistor and ramps1.4 could be found looking at [5]
and [4], respectively.
Homework
References
[1] https://www.pololu.com/product/1182
[2] http://reprap.org/wiki/Stepper_Motors
[3] http:
//reprap.org/wiki/Pololu_stepper_driver_board
[4] http://reprap.org/wiki/RAMPS_1.4
[5] http://media.digikey.com/pdf/Data%20Sheets/
Epcos%20PDFs/B57540.pdf
[6] http://arduino.cc/en/Reference/Stepper
[7] http://www.airspayce.com/mikem/arduino/
AccelStepper/AccelStepper-1.53.zip
1 First programs
Sketch 1: A flashing LED on a protoboard
#d e f i n e
#d e f i n e
#d e f i n e
#d e f i n e
#d e f i n e
X_STEP_PIN
X_DIR_PIN
X_ENABLE_PIN
X_MIN_PIN
X_MAX_PIN
54
55
38
3
2
#d e f i n e
#d e f i n e
#d e f i n e
#d e f i n e
#d e f i n e
Y_STEP_PIN
Y_DIR_PIN
Y_ENABLE_PIN
Y_MIN_PIN
Y_MAX_PIN
60
61
56
14
15
#d e f i n e
#d e f i n e
#d e f i n e
#d e f i n e
#d e f i n e
Z_STEP_PIN
Z_DIR_PIN
Z_ENABLE_PIN
Z_MIN_PIN
Z_MAX_PIN
46
48
62
18
19
#d e f i n e E_STEP_PIN
#d e f i n e E_DIR_PIN
#d e f i n e E_ENABLE_PIN
26
28
24
#d e f i n e Q_STEP_PIN
#d e f i n e Q_DIR_PIN
#d e f i n e Q_ENABLE_PIN
36
34
30
#d e f i n e SDPOWER
#d e f i n e SDSS
#d e f i n e LED_PIN
1
53
13
#d e f i n e FAN_PIN
#d e f i n e PS_ON_PIN
#d e f i n e KILL_PIN
12
1
#d e f i n e
#d e f i n e
#d e f i n e
#d e f i n e
10
8
13
14
HEATER_0_PIN
HEATER_1_PIN
TEMP_0_PIN
TEMP_1_PIN
// ANALOG NUMBERING
// ANALOG NUMBERING
void setup ( ) {
pinMode (FAN_PIN , OUTPUT) ;
pinMode (HEATER_0_PIN , OUTPUT) ;
pinMode (HEATER_1_PIN , OUTPUT) ;
pinMode (LED_PIN , OUTPUT) ;
pinMode (X_STEP_PIN
pinMode (X_DIR_PIN
, OUTPUT) ;
, OUTPUT) ;
pinMode (X_ENABLE_PIN
, OUTPUT) ;
,
,
,
,
,
LOW) ;
LOW) ;
LOW) ;
LOW) ;
LOW) ;
void loop ( ) {
i f ( m i l l i s ( ) <5 0 0 )
d i g i t a l W r i t e (LED_PIN, HIGH) ;
i f ( m i l l i s ( ) <5 0 0 ) {
d i g i t a l W r i t e (HEATER_0_PIN , HIGH) ;
d i g i t a l W r i t e (HEATER_1_PIN , HIGH) ;
d i g i t a l W r i t e (FAN_PIN, HIGH) ;
}
i f ( m i l l i s ( ) <2 0 0 0 ) {
d i g i t a l W r i t e (X_DIR_PIN
, HIGH) ;
d i g i t a l W r i t e (Y_DIR_PIN
, HIGH) ;
d i g i t a l W r i t e (Z_DIR_PIN
, HIGH) ;
d i g i t a l W r i t e (E_DIR_PIN
, HIGH) ;
d i g i t a l W r i t e (Q_DIR_PIN
, HIGH) ;
}
else {
d i g i t a l W r i t e (X_DIR_PIN
, LOW) ;
d i g i t a l W r i t e (Y_DIR_PIN
, LOW) ;
d i g i t a l W r i t e (Z_DIR_PIN
, LOW) ;
d i g i t a l W r i t e (E_DIR_PIN
, LOW) ;
d i g i t a l W r i t e (Q_DIR_PIN
, LOW) ;
}
d i g i t a l W r i t e (X_STEP_PIN
d i g i t a l W r i t e (Y_STEP_PIN
, HIGH) ;
, HIGH) ;
d i g i t a l W r i t e (Z_STEP_PIN
d i g i t a l W r i t e (E_STEP_PIN
d i g i t a l W r i t e (Q_STEP_PIN
i f ( m i l l i s ( ) > 4000 ) {
d i g i t a l W r i t e (X_STEP_PIN
d i g i t a l W r i t e (Y_STEP_PIN
d i g i t a l W r i t e (Z_STEP_PIN
d i g i t a l W r i t e (E_STEP_PIN
d i g i t a l W r i t e (Q_STEP_PIN
}
}
, HIGH) ;
, HIGH) ;
, HIGH) ;
,
,
,
,
,
LOW) ;
LOW) ;
LOW) ;
LOW) ;
LOW) ;