I am new to using stepper motors and micropython. I am having trouble getting my stepper motor to turn. I am using a raspberry pi pico and a tmc 2208 driver to control my stepper motor. I can hear the coils being powered on and off, but I get no motion.
Here is my script
from machine import Pin import utime direction = Pin(14, Pin.OUT) step = Pin(15, Pin.OUT) enable = Pin(13, Pin.OUT) enable.low() direction.high() def stepOne(): step.high() utime.sleep(0.001) step.low() while True: stepOne() utime.sleep(0.1)
- 1how much time is
utime.sleep(0.001)? – jsotola 7 hours ago
- 1Nice picture but it does not help me much. A schematic showing all connections including power, power source, etc would help a lot. Post a link to the hardware items that has technical information. I will guess and it sounds like you are short on power, voltage and or current. This can be confirmed with more information. – Gil 6 hours ago
- (1) First thing first, the TMC2208datasheet: trinamic.com/fileadmin/assets/Products/ICs_Documents/… – tlfong01 3 hours ago
- (2) Next, a quick and dirty summary: 2-phase stepper, 32 uSteps, 36VDC, internal current sensing, hard/soft(uart) config, … – tlfong01 3 hours ago
- (3) Get a couple of assembled modules: pt.aliexpress.com/item/… – tlfong01 3 hours ago
(1) First thing first, the TMC2208datasheet: trinamic.com/fileadmin/assets/Products/ICs_Documents/… – tlfong01
(2) Next, a quick and dirty summary: 2-phase stepper, 32 uSteps, 36VDC, internal current sensing, hard/soft(uart) config, … –
(3) Get a couple of assembled modules: pt.aliexpress.com/item/… –
(4) I am too lazy to upload pics in Imrur and link them here. So I cheat by using my answer space.
(5) Skim the module user guide.
(6) Show the Pico + TMC2208 Wiring/Schematic.
(7) Compare and contrast the wiring with a similar and already debugged project, say the very popular A4899, to make sure no important wiring is missing.
(8) Manual testing, using (a) Manaul jumper wiring, (b) manual configurable PWM sig gen.
/ to continue, …
(9) Software testing, using Pico.
/ to continue, …