PIC Dial Speed Controller

Reconn’s World has an interesting article with sample code of a stepper motor speed controller.

“While the stepper motor could be completely computer-controlled, I’d like to be able to change the speed of the motor by turning a dial. for this i’m using a linear potentiometer from radioshack (10kohm, RadioShack #271-1715.) I’ll read the voltage off of the middle pin — turning the potentiometer will cause this middle-pin voltage to swing from ground to +Vcc (5v in my case). I will read this voltage in via the PIC’s analog-to-digital converter and control the motor’s speed accordingly.”

3 Comments


  1. Not to be a smartypants, but you’ve connected a potentiometer to program a motor controller to vary the speed of a stepping motor. Wouldn’t it be simpler to run a DC motor with varying voltage?

    That said, I can think of a dozen reasons to do this, not the least of which being “because I can”. Good job!


  2. Hehe,

    the “because i can” excuse is certainly a good one :). and yes you could vary the voltage of a dc motor, the problem (depending on your goal) is that you have no idea what speed the motor is running. with a stepper motor (when it’s not under heavy load and slipping) you know the speed it’s rotating depending on how quickly you pulse it. in my application i want to have a good idea of it’s speed w/out building a feedback circuit (though i did use a mechanical switch to verify operation)

    check out the verfication bit at http://www.reconnsworld.com/plog/archives/7-PIC-Code,-Verified.html#extended


  3. that is a good idea i was just wondering is there anythor ways of doing that

Comments are closed.