I want to move stepper motors by coding from Jetson nano. I am using tb6600 motor drivers. I saw it in a post here and added a logic converter(TXS0108E) but I cannot move the motors. What can I do to fix the problem?
-Arda
I want to move stepper motors by coding from Jetson nano. I am using tb6600 motor drivers. I saw it in a post here and added a logic converter(TXS0108E) but I cannot move the motors. What can I do to fix the problem?
-Arda
Hi Arda,
Are you using the devkit or custom board for Jetson Nano?
What’s the Jetpack version in use?
Is it your custom driver?
Have you also asked your vendor for the usage or any porting guide?
It seems like a level shift, how do you connect it for your use case?
I found this in our school’s atelier so there is no guide other than the one I found on the internet.
jetpack 4.6.1 -Devkit
I tried to draw something like datasheet by myself for all system. It was something simple, sorry about that. Here it is;
It was working while I was using Arduino but I’m trying to do without it. I’m sure about the motor driver, step motor and the battery is working properly. I’m also adding the code that I used for trying.
import Jetson.GPIO as GPIO
import time
# Define GPIO pins using Jetson Nano's SOC GPIO names
STEP_PIN = "GPIO09" # STEP pin - Physical Pin 32
DIR_PIN = "GPIO10" # DIR pin - Physical Pin 36
ENABLE_PIN = "GPIO11" # ENABLE pin - Physical Pin 12
# Set GPIO mode to use Tegra SOC naming
GPIO.setmode(GPIO.TEGRA_SOC)
# Set up pins as outputs
GPIO.setup(STEP_PIN, GPIO.OUT)
GPIO.setup(DIR_PIN, GPIO.OUT)
GPIO.setup(ENABLE_PIN, GPIO.OUT)
# Enable the motor (LOW enables most motor drivers)
GPIO.output(ENABLE_PIN, GPIO.LOW)
# Set motor direction (HIGH = one direction, LOW = opposite)
GPIO.output(DIR_PIN, GPIO.HIGH) # HIGH = Forward direction
# Motor control loop
try:
while True:
# Generate step pulse
GPIO.output(STEP_PIN, GPIO.HIGH)
time.sleep(0.001) # Pulse width (shorter = faster speed)
GPIO.output(STEP_PIN, GPIO.LOW)
time.sleep(0.001) # Time between steps
except KeyboardInterrupt:
print("Program terminated by user")
finally:
# Clean up GPIO on exit
GPIO.cleanup()
I found this in our school’s atelier so there is no guide other than the one I found on the internet.
It seems a custom driver and you should find the author for the usage since I can’t find it on upstream linux.
image782×621 27.7 KB
Is the left side you motor device?
I’m not clear about what’s the interface of this motor. Controlled by GPIO?
I’m also adding the code that I used for trying.
From your code, it seems you are controlling GPIO high/low for your device.
If your motor is not working, please check the manual of your motor device.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.