Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4060

Automation, sensing and robotics • Precise stepper motor with rpi5

$
0
0
I am using TB6600 Stepper Motor Driver with a Raspberry Pi 5. I have some fixture arrangement on shaft of motor. I am using 12V,5A SMPS for motor Nema 17. Motor is rotating in good speed if I run only motor code.
If I run it in main.py, it rotate very slowly. In main.py, while motor is rotating, no other part of code is running. simple loop is there like, if left sensor trigger then stop motor.
Below are pins,
dir_pin = OutputDevice(26) # DIR +
step_pin = OutputDevice(16) # PUL +
DIR-, PUL-, ENA- and ground are shorted.
A+, A-, B-,B- = to stepper motor.

we have changed settings on TB6600 Stepper Motor Driver to maintain current & check steps. But, no success.
dir_pin.value = CW # Set direction to Clockwise
while not ss_left.is_pressed:
step_pin.on()
sleep(STEP_DELAY)
step_pin.off()
sleep(STEP_DELAY)

What others factors need to check ?

Statistics: Posted by spatil — Wed Aug 14, 2024 11:13 pm



Viewing all articles
Browse latest Browse all 4060

Trending Articles