Controlling Step Motor With Microchip PIC

Thread Starter

qZanity

Joined Feb 2, 2014
4
Hello, I need to accurately control a 12v step motor from a PIC16F88.

I'm wondering what components I need to control it, as the PIC obviously can't directly control the motor due to current and the fact the pics running off a 5v power supply.

So I need to use some kind of transistor or something? What's the best way? Schematic would be awesome
 

GopherT

Joined Nov 23, 2012
8,009
Look up application notes on stepper motors from microchip.com.

Also, do not waste your time with such an old chip. The pic16f628A was the versatile successor and has internal oscillator - much easier. I think there is even successors to that now (and cheaper too).

You will need transistors (NPN or N-mosfets- just look in the app note for stepper motors). Well presented with sample code if I remember correctly).

http://ww1.microchip.com/downloads/en/AppNotes/00907a.pdf
 
You need a stepper driver with step and direction inputs, and for any kind of accuracy you need a shaft encoder on the stepper motor feeding back a position signal to the PIC.
 

BMorse

Joined Sep 26, 2009
2,675
You need a stepper driver with step and direction inputs, and for any kind of accuracy you need a shaft encoder on the stepper motor feeding back a position signal to the PIC.
Shaft encoders would only be really useful for a DC motor or servo setup, steppers do not need them since you should know what position you had it step to, unless you need a closed loop system in case any of the axis' are moved manually.
 

GopherT

Joined Nov 23, 2012
8,009
Hello, I need to accurately control a 12v step motor from a PIC16F88.

I'm wondering what components I need to control it, as the PIC obviously can't directly control the motor due to current and the fact the pics running off a 5v power supply.

So I need to use some kind of transistor or something? What's the best way? Schematic would be awesome
What is your goal? What are you controlling - and what accuracy/performance do you need?
 

BMorse

Joined Sep 26, 2009
2,675
As for an easy way to control a stepper with a pic, I would use a stepper driver IC such as the allegro A4988 stepper driver, you can find these on ebay for a few dollars already mounted to a circuit board. Thats if you are using a bi polar stepper motor, but since you did not include this info, one can only speculate.
 

THE_RB

Joined Feb 11, 2008
5,438
Hello, I need to accurately control a 12v step motor from a PIC16F88.

I'm wondering what components I need to control it, as the PIC obviously can't directly control the motor due to current and the fact the pics running off a 5v power supply.

So I need to use some kind of transistor or something? What's the best way? Schematic would be awesome

Check out the Linistepper;
http://www.piclist.com/techref/io/stepper/linistep/index.htm

It uses a PIC to provide microstepping, and linear motor coil drive for smoothness and reducing resonance.

There's a schematic linked on that web page and many people build their own. Or you can buy the kit. :)
 

Thread Starter

qZanity

Joined Feb 2, 2014
4
Look up application notes on stepper motors from microchip.com.

Also, do not waste your time with such an old chip. The pic16f628A was the versatile successor and has internal oscillator - much easier. I think there is even successors to that now (and cheaper too).

You will need transistors (NPN or N-mosfets- just look in the app note for stepper motors). Well presented with sample code if I remember correctly).

http://ww1.microchip.com/downloads/en/AppNotes/00907a.pdf
Are you sure your thinking of the right chip? The pic16f88 has an internal oscillator as far as I know.

What's a good general purpose 'newer' PIC, which as USB interface support?

And thanks to everyone for the comments, really helped.
 

GopherT

Joined Nov 23, 2012
8,009
Are you sure your thinking of the right chip? The pic16f88 has an internal oscillator as far as I know.

What's a good general purpose 'newer' PIC, which as USB interface support?

And thanks to everyone for the comments, really helped.
Do a parametric search on Microchips website. Pick the features you want/need.
 
Top