I´m working on a simple project for school now and I have to use a stepper motor, but it doesn´t turn. The LEDs go on, the motor gets hot and the motor vibrates. When I adjust the sleep/function, the vibration pulses go quicker or slower. Yet the motor doesn´t turn. What can I do?
This is the script I use in Python on my Raspberry Pi. I'm not receiving any error.
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
control_pins = [7,11,13,15]
for pin in control_pins:
GPIO.setup(pin, GPIO.OUT)
GPIO.output(pin, 0)
halfstep_seq = [
[1,0,0,0],
[1,1,0,0],
[0,1,0,0],
[0,1,1,0],
[0,0,1,0],
[0,0,1,1],
[0,0,0,1],
[1,0,0,1],
]
for i in range(512):
for halfstep in range(8):
for pin in range(4):
GPIO.output(control_pins[pin], halfstep_seq[halfstep][pin])
time.sleep(0.001)
GPIO.cleanup()
GPIO BOARD pin goes to the minus
pin 4 to plus
ln4 to 17
ln3 to 15
ln2 to 13
ln1 to 7
The stepper motor is ROHS 28BYJ-48 5Voltage DC