You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<imgalign="right"src="images/module.png"width="350px">Combining smooth acceleration profiles with a _SilentStepStick_ driver, the _Bpod Stepper Module_ allows for virtually noiseless operation of a stepper motor - either as a module for _Bpod state machine r2_ or as a stand-alone USB device.
4
-
5
-
## Serial Command Interface
6
-
7
-
### Moving the Motor
8
-
The following serial commands control the movement of the motor. All movements can be interrupted by activation of an end-switch or issuance of a stop command. The Stepper Module will try to keep track of the position at all times (it should be able to do so unless there is a loss of steps). This way, you can target absolute positions. Some of the following commands can also be [bound to one of the IO ports](#bind-movement-trigger-to-IO-port).
9
-
10
-
*#### Move forwards
11
-
Start continuous movement forwards.
12
-
13
-
PUT 1 uInt8: 70 ('F')
14
-
15
-
*#### Move backwards
16
-
Start continuous movement backwards.
17
-
18
-
PUT 1 uInt8: 66 ('B')
19
-
20
-
*#### Move to a relative position
21
-
Move a defined number of steps relative to the current position. Positive numbers will result in clockwise, negative numbers in counter-clockwise rotation.
22
-
23
-
PUT 1 uInt8: 83 ('S')
24
-
PUT 1 Int16: relative position [steps]
25
-
26
-
*#### Move to an absolute position
27
-
28
-
PUT 1 uInt8: 80 ('P')
29
-
PUT 1 Int16: absolut position [steps]
30
-
31
-
32
-
*#### Move to a predefined target
33
-
See also: [*predefined targets*](#predefined-targets).
34
-
35
-
PUT 1 uInt8: 1 … 9 [target ID]
36
-
37
-
*#### Get current position
38
-
This will return the current position of the motor. The command can also be used to monitor ongoing movements.
39
-
40
-
PUT 2 uInt8: 71, 80 ('GP')
41
-
GET 1 Int16: absolute position [steps]
42
-
43
-
*#### Reset absolute position
44
-
This command will reset the current position to zero (without moving the motor).
45
-
46
-
PUT 1 uInt8: 90 ('Z')
47
-
48
-
49
-
### Stopping the motor
50
-
In addition to using end-switches, the motor can also be stopped by means of serial commands. Either of the two stop commands can be [bound to one of the module's IO ports](#bind-movement-trigger-to-IO-port).
51
-
52
-
*#### Soft stop
53
-
Decelerate the motor to a complete standstill.
54
-
55
-
PUT 1 uInt8: 120 ('x')
56
-
57
-
*#### Emergency stop
58
-
Stop the motor abruptly. Depending on motor speed this will lead to a loss of steps.
59
-
60
-
PUT 1 uInt8: 88 ('X')
61
-
62
-
63
-
### Predefined targets
64
-
The stepper module can store up to 9 target definitions, along with individual peak velocities and accelerations.
65
-
Movement to one of these targets can be triggered by a single byte serial command (see [*Moving the Motor*](#move-to-a-predefined-target)).
66
-
Alternatively, you can [bind a trigger to one of the IO ports](#bind-movement-trigger-to-IO-port).
67
-
68
-
69
-
*#### Define a target
70
-
71
-
PUT 1 uInt8: 84 ('T')
72
-
PUT 1 uInt8: 1 … 9 [target ID]
73
-
PUT 1 Int32: target position [steps]
74
-
PUT 1 uInt16: peak velocity [steps / s, 0 = use global peak velocity]
75
-
PUT 1 uInt16: acceleration [steps / s^2, 0 = use global acceleration]
76
-
77
-
*#### Get the definition of a target
78
-
79
-
PUT 1 uInt8: 71 ('G')
80
-
PUT 1 uInt8: 1 … 9 [target ID]
81
-
GET 1 Int32: target position [steps]
82
-
GET 1 uInt16: peak velocity [steps / s, 0 = use global peak velocity]
83
-
GET 1 uInt16: acceleration [steps / s^2, 0 = use global acceleration]
84
-
85
-
86
-
### Configuration of movement parameters
87
-
All of the motors movements are defined by an acceleration phase, a peak velocity and a deceleration phase (the sole exception being the [emergency stop](#emergency-stop)).
88
-
89
-
*#### Set Acceleration
90
-
This parameter is valid for, both, the acceleration and the deceleration phase.
91
-
92
-
PUT 1 uInt8: 65 ('A')
93
-
PUT 1 uInt16: acceleration [steps / s^2]
94
-
95
-
*#### Get Acceleration
96
-
97
-
PUT 2 uInt8: 71, 65 ('GA')
98
-
GET 1 uInt16: acceleration [steps / s^2]
99
-
100
-
*#### Set peak velocity
101
-
102
-
PUT 1 uInt8: 86 ('V')
103
-
PUT 1 uInt16: peak velocity [steps / s]
104
-
105
-
*#### Get peak velocity
106
-
107
-
PUT 2 uInt8: 71, 86 ('GV')
108
-
GET 1 uInt16: peak velocity [steps / s]
109
-
110
-
111
-
### Configuration of motor parameters
112
-
113
-
*#### Set RMS current
114
-
Set the driver's RMS current output to the motor (up to 850mA for TMC2130, up to 2000mA for TMC5160).
115
-
116
-
PUT 1 uInt8: 73 ('I')
117
-
PUT 1 uInt16: RMS current [mA]
118
-
119
-
*#### Get RMS current
120
-
121
-
PUT 2 uInt8: 71, 73 ('GI')
122
-
GET 1 uInt16: RMS current [mA]
123
-
124
-
*#### Set hold current
125
-
Set the current for standstill (up to 850mA for TMC2130, up to 2000mA for TMC5160; 0mA corresponds to free-wheeling mode).
126
-
127
-
PUT 1 uInt8: 73 ('i')
128
-
PUT 1 uInt16: hold current [mA]
129
-
130
-
*#### Get RMS current
131
-
132
-
PUT 2 uInt8: 71, 73 ('Gi')
133
-
GET 1 uInt16: hold current [mA]
134
-
135
-
*#### Set chopper mode
136
-
You can select between three different chopper modes: a PWM chopper ("spreadCycle"), a voltage chopper ("stealthChop") and a classical constant off-time chopper. The voltage chopper offers extremely quiet operation at standstill and low to medium speeds. Depending on the use case, the PWM chopper can perform better at higher speeds. The constant off-time chopper will perform similarly to the PWM chopper but produce more noise. Refer to [the Trinamic website](https://www.trinamic.com/technology/motor-control-technology/chopper-modes/) for more details.
|| Watterott | 1 |[201899-001](https://shop.watterott.com/SilentStepStick-TMC5160-Stepper-motor-driver-10-35V-V15)| Stepper motor driver |
3
+
<imgalign="right"src="images/module.png"width="350px">The *Bpod Stepper Module* enables virtually noiseless operation of a stepper motor by combining smooth acceleration profiles with a *SilentStepStick* driver. You can use it either as a module for *Bpod state machine r2* or as a stand-alone USB device.
245
4
5
+
## Wiki
246
6
7
+
Please refer to [**the wiki**](../../wiki) for documentation.
247
8
248
9
## Credits ##
249
10
@@ -252,8 +13,8 @@ This enables the use of the Stepper Module as a headless unit (i.e., without con
252
13
* PCB layout partially based on:
253
14
*[Bpod Teensy Shield](https://github.com/sanworks/Bpod-CAD/tree/master/PCB/Modules/Gen2/Bpod%20Teensy%20Shield) by Sanworks ([GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html))
254
15
*[SilentStepStick Protector](https://github.com/watterott/SilentStepStick) by Watterott ([CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/))
255
-
*Firmare uses the following libraries:
256
-
*[ArCOM](https://github.com/sanworks/ArCOM) by Sanworks ([GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html))
16
+
*Library dependencies:
17
+
*[ArCOM](https://github.com/bimac/ArCOM) by Sanworks ([GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html))
257
18
*[TeensyStep](https://github.com/luni64/TeensyStep) by luni64 ([MIT](https://opensource.org/licenses/MIT))
258
-
*[SmoothStepper](https://github.com/bimac/SmoothStepper) by Florian Rau ([GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html))
259
19
*[TMCStepper](https://github.com/teemuatlut/TMCStepper) by teemuatlut ([MIT](https://opensource.org/licenses/MIT))
20
+
*[Teensy3x_QuadDecode](https://github.com/bimac/Teensy3x_QuadDecode.git) by TLB ([MIT](https://opensource.org/licenses/MIT))
0 commit comments