Five StepStick drivers left alone
TMC2208, TMC2209, TMC2100, DRV8834 and DRV8880 on one 200 Hz clock each: left alone, each steps at its own default resolution. There is no microcontroller in it: the simulator solves the 15 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.
Teaching? Assign it to your class in one click.
Intermediate About 15 minutes to build and run. Runs in your browser. Free, and no account needed.
The parts retail for about $94. On Mokxi they're free.
What you'll learn
- How a STEP pulse moves a stepper by one microstep
- Microstepping and why the default mode changes the speed
- How the DIR pin sets rotation direction
- The sleep pin on the DRV chips and its pull-down
- Difficulty: Intermediate
- Time: About 15 minutes
- Parts: 25
How it works
Five stepper driver boards sit side by side: a TMC2208, TMC2209, TMC2100, DRV8834 and DRV8880. Each drives its own NEMA 17 motor. Each STEP input gets a 200 Hz clock, DIR is tied to ground, and the logic runs from 5 V. The motors run from 12 V, and the DRV8834 from 9 V.
The mode pins are left alone, so each chip uses its default microstepping: 1/8 on the TMC2208, TMC2209 and DRV8880, 1/16 on the TMC2100, and 1/4 on the DRV8834. The same 200 pulses a second therefore turn each shaft at a different speed.
Parts list
25 parts, plus the jumper wires. They retail for about $94; on Mokxi they're free.
- 1 × TMC2208 stepper driver
- 5 × Stepper motor, NEMA 17
- 5 × ClockIn Logic Lab Kit.
- 4 × Power, 12 V
- 5 × Power, 5 V
- 1 × TMC2209 stepper driver
- 1 × TMC2100 stepper driver
- 1 × DRV8834 low-voltage stepper driver
- 1 × Power, 9 V
- 1 × DRV8880 stepper driver
Wiring table
Every connection, pin by pin, read from the circuit itself. Each row joins the pin on the left to the pin on the right, by a jumper wire or a breadboard strip.
| Part and pin | Connects to |
|---|---|
| Clock (1) pin OUT | TMC2208 stepper driver pin STEP |
| TMC2208 stepper driver pin DIR | Ground |
| TMC2208 stepper driver pin VM | 12 V |
| Stepper motor, NEMA 17 (1) pin A1 | TMC2208 stepper driver pin M2B |
| Stepper motor, NEMA 17 (1) pin A2 | TMC2208 stepper driver pin M2A |
| Stepper motor, NEMA 17 (1) pin B1 | TMC2208 stepper driver pin M1A |
| Stepper motor, NEMA 17 (1) pin B2 | TMC2208 stepper driver pin M1B |
| TMC2208 stepper driver pin VIO | 5 V |
| TMC2208 stepper driver pin GND | Ground |
| Clock (2) pin OUT | TMC2209 stepper driver pin STEP |
| TMC2209 stepper driver pin DIR | Ground |
| TMC2209 stepper driver pin VM | 12 V |
| Stepper motor, NEMA 17 (2) pin A1 | TMC2209 stepper driver pin M2B |
| Stepper motor, NEMA 17 (2) pin A2 | TMC2209 stepper driver pin M2A |
| Stepper motor, NEMA 17 (2) pin B1 | TMC2209 stepper driver pin M1A |
| Stepper motor, NEMA 17 (2) pin B2 | TMC2209 stepper driver pin M1B |
| TMC2209 stepper driver pin VIO | 5 V |
| TMC2209 stepper driver pin GND | Ground |
| Clock (3) pin OUT | TMC2100 stepper driver pin STEP |
| TMC2100 stepper driver pin DIR | Ground |
| TMC2100 stepper driver pin VM | 12 V |
| Stepper motor, NEMA 17 (3) pin A1 | TMC2100 stepper driver pin M2B |
| Stepper motor, NEMA 17 (3) pin A2 | TMC2100 stepper driver pin M2A |
| Stepper motor, NEMA 17 (3) pin B1 | TMC2100 stepper driver pin M1A |
| Stepper motor, NEMA 17 (3) pin B2 | TMC2100 stepper driver pin M1B |
| TMC2100 stepper driver pin VIO | 5 V |
| TMC2100 stepper driver pin GND | Ground |
| DRV8834 low-voltage stepper driver pin SLP | 5 V |
| Clock (4) pin OUT | DRV8834 low-voltage stepper driver pin STEP |
| DRV8834 low-voltage stepper driver pin DIR | Ground |
| DRV8834 low-voltage stepper driver pin VMOT | 9 V |
| Stepper motor, NEMA 17 (4) pin A1 | DRV8834 low-voltage stepper driver pin B2 |
| Stepper motor, NEMA 17 (4) pin A2 | DRV8834 low-voltage stepper driver pin B1 |
| Stepper motor, NEMA 17 (4) pin B1 | DRV8834 low-voltage stepper driver pin A1 |
| Stepper motor, NEMA 17 (4) pin B2 | DRV8834 low-voltage stepper driver pin A2 |
| DRV8834 low-voltage stepper driver pin GND | Ground |
| DRV8880 stepper driver pin SLP | 5 V |
| Clock (5) pin OUT | DRV8880 stepper driver pin STEP |
| DRV8880 stepper driver pin DIR | Ground |
| DRV8880 stepper driver pin VMOT | 12 V |
| Stepper motor, NEMA 17 (5) pin A1 | DRV8880 stepper driver pin B1 |
| Stepper motor, NEMA 17 (5) pin A2 | DRV8880 stepper driver pin B2 |
| Stepper motor, NEMA 17 (5) pin B1 | DRV8880 stepper driver pin A2 |
| Stepper motor, NEMA 17 (5) pin B2 | DRV8880 stepper driver pin A1 |
| DRV8880 stepper driver pin GND | Ground |
The notes that come with it
There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.
// Five StepStick carriers side by side, each on its own 200 Hz clock.
//
// No board: a clock on each STEP, DIR left low, 12 V on each motor rail (9 V
// on the DRV8834, which is rated to 10.8 V) and 5 V for the logic. Watch what each does when its mode pins are left alone:
//
// TMC2208, TMC2209 1/8 step (MS1 and MS2 pulled down)
// TMC2100 1/16 step (CFG1 and CFG2 open)
// DRV8834 1/4 step (M0 open, M1 pulled down), SLEEP tied high
// DRV8880 1/8 step (M0 open, M1 pulled down), SLEEP tied high
//
// The same 200 pulses a second turn each shaft at a different speed. Pull the
// 5 V wire off a DRV's SLEEP and it stops: SLEEP is pulled down in the chip.
Troubleshooting
The usual mistakes with this circuit, and the fix for each.
- A DRV8834 or DRV8880 motor does not turn This project
Check its SLEEP pin is wired to 5 V. The pin is pulled low inside the chip, so without 5 V it stays asleep. - A motor does not turn at all This project
Check the motor supply and ground, and that the clock is connected to STEP. - The motor does not move. The EN pin is active low, so it must be tied to GND, and the motor supply VM must be present (4.75 to 36 V). TMC2208 stepper driver
Connect EN to GND, VM to the motor supply with a 100 uF cap, and VIO to your logic voltage. Join the grounds. Send pulses on STEP and set DIR. - The motor runs hot or loses steps. The current is set by the Vref potentiometer, and plugging or unplugging the motor while powered can kill the driver. TMC2208 stepper driver
Set Vref for the motor current, and never connect or disconnect the motor with power on. The default is 1/8 microstepping, so step counts are eight times the full steps. - The motor buzzes, shudders, or only vibrates instead of turning. Stepper motor
Coils are swapped. Find the two coil pairs by measuring resistance with a meter (a few ohms between wires of one coil). Connect each pair to one driver coil output, A to A and B to B. - The motor stalls or loses steps when you speed up. Stepper motor
A stepper cannot jump to a high speed. Start with slow step pulses and ramp up gradually. Check the driver current limit (Vref) and give the supply enough voltage, such as 12 V. - The circuit does not behave as expected at the set frequency. Clock
Pick a frequency slow enough to watch, such as 1 Hz, when learning. Fast clocks look like steady signals. Make sure the clock output and your circuit share a ground. - A counter or flip-flop skips steps. Clock
Check that the clock edge matches the chip, rising or falling. Slow, clean edges are best. Do not connect a mechanical switch as a clock without debouncing it.
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.