Stepper Motor Speed Control with PIC18F4550

Stepper Motor Drivers
USB Stepper Motor Driver
Stepper Motor Driver PIC18F4550
-Stepper Motor schematics
Stepper Motor Speed Controller
Stepper Motor driver PIC18F2550
IR Interterface to Stepper MotorStepper Motor Speed Control with ADC - PIC18F4550

Stepper Motor Speed controller using PIC18F4550

This tutorial is all about tuning the speed of a stepper motor using a potentiometer. The idea is to throttle up or down the speed of a stepper motor using inbuilt Analog to Digital Converter ( ADC ) of the PIC18F4550. Theoretically ADC convert the analog input to a digital output, we’re going to use this concept to control the speed of a running stepper motor.

The Stepper motor used here is a rusty old M35SP 8 stepper motor, which is a unipolar stepper. The coding style I used here is pretty much similar to my other articles on running the same with PIC18F microcontroller family, rather than using the pre coded PIC18F4550 stepper motor library. The reason for selecting a M35SP -8 motor is due to its step angle. It has a step angle of 7.5 Degrees, hence the total number of steps it would require for the motor for completing one revolution would be just 360/7.5 = 48 steps approximately.

Number of steps required for one Revolution = 360 / step angle of Stepper motor

Other inexpensive motor options such as 28byj-48 stepper Motor has lesser step angle, hence requires more number of steps to complete one revolution. Moreover even with the shortest possible delay it can read in-between each steps , the Need For Speed control seems trivial for this tutorial using such 28byj-48 stepper motor, as it already runs very slow no matter how much the delay is reduced in between each steps. Hence M35SP -8 motor works good for me.

Use the ADC module with the help potentiometer to control the delay in-between each steps of the stepper motor. Shorter the delay in-between each steps – faster the stepper motor runs and vice versa.

The output generated on the output pins on the PIC18F4550 Uno would be enough to glow few LED’s but definitely would not be enough to run the stepper motor, due to motor’s higher operating voltage ( say 9 v ) , hence an additional diver would be required with PIC18F4550 Uno to run such motors smooth.

Rather than buying a stepper motor driver module for PIC18F4550, i felt it little more inexpensive to use an ULN2003 IC as a driver for such operation.Stepper Motor Speed Control with PIC18F4550 schematich

Requirements

  • PIC18F4550
  • ULN2003
  • 10 k Pot
  • Unipolar Stepper Motor M35SP 8
  • Some wires and a breadboard
  • Few LEDS or Resistors ( if you want to monitor how the stepping are coming up)

Schematics : Stepper motor speed controller PIC18F4550

Eagle schematics layout.

PS: You can get a library for PIC18F4550 boards from E14 for Eagle layout designer.

For more detail: Stepper Motor Speed Control with  PIC18F4550

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter