![]() |
|
[Python] Unipolar stepper motor control - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] Unipolar stepper motor control (/showthread.php?tid=5720918) |
Unipolar stepper motor control - SIM-1517404 - Sep 19, 2017 I've been working on this project for a little while now, and just a couple of days ago it worked fine, but now suddenly it doesn't work at all. I'm trying to run it with Python on a Raspberry Pi 3 model B. At this point, when I run the code, there is no movement in the motor at all. I can feel it tighten up a bit if I try to turn it while the code is running, but nothing else, not even vibrating. I've tried different sequences, different GPIO pins, different RPis, different drivers, switched out all the cables and changed power source. Have anyone had a similar problem, or able to make out what the problem may be? The wiring is messy, so I drew it instead ![]() The code I'm running: Code import RPi.GPIO as GPIO* - Goodies - Sep 19, 2017 I assume you have experience with RPis, but the first thing I'd ask if you're sure of the GPIO mode. I know different RPi models have different BCM values for the pins. If you use GPIO.BOARD, you can use the pin values that are printed on the board itself. Seems to me like you've changed out everything but the motor. Verify that there is current flowing using a multimeter. If there is, it could be the motor. Looking at the diagram, the pins do look correct. Multimeter time! * - SIM-1517404 - Sep 19, 2017 (Sep 19, 2017 03:01 PM)Goodies Wrote: I assume you have experience with RPis, but the first thing I'd ask if you're sure of the GPIO mode. I know different RPi models have different BCM values for the pins. If you use GPIO.BOARD, you can use the pin values that are printed on the board itself. I've tried using GPIO.BOARD also, no difference. I've also put voltage directly to the motor, energising each coil, and the motor steps when I do this. I energise it in the sequence that is written in the code, and it steps clockwise. |