Controlling Stepper Motors with a PIC Microcontroller

If your motor does not move at all when the program is active, then the most likely problem is that the diodes are facing the wrong direction. Check the schematic for proper wiring.

If the motor is moving, but does so only sporadically or jiggles back and forth, then there can be a number of possible causes:

1. There is not enough power going to the motor. This is often the case when using batteries which cannot support the drain of the motor. It is recommended that you use a wall transformer to power the motor in combination with a 7805 voltage regulator to power the circuitry.

2. You are not using TIP 120 transistors, or a variation that is not able to support the load of the stepper motor.

3. The stepper motor is not wired to the correct transistor. Check the coil resistance with an ohm meter and rewire properly. For motors purchased from us, the pinouts are available here.

4. The pulse frequency is higher than that which the motor can react to, causing a malfunction. The programs in this article use the delay variable to control pulse frequency. Try increasing the value to decrease pulse frequency.

Catalog page for PIC Microcontrollers
(a kit containing all necessary components is available)

Catalog page for Stepper Motors

Back to Robotics Articles