Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Stepper Motor Interface PIC16F | Picmicrolab

1 de 3

Home

Projects

Site Map

Contact

http://www.picmicrolab.com/stepping-motor-interface-pic16f/

Video

Shop

Home Stepping Motor Stepper Motor Interface PIC16F

Stepper Motor Interface PIC16F


Posted on March 25, 2014 by admin No Comments

< >
US Ship Nema 17
Stepper Motor Bipolar
$8.59

US Ship 5pcs Nema


17 Stepper Motor
$58.00
Free Shipping

NEW Stepper motor


Nema17 - CNC Mill

Here is a simple example for PIC microcontroller interfacing Unipolar stepping motor with
assembly code. Instead of using a dedicated stepper motor driver IC like very popular L293D
PIC16F with ULN2003A were used. Just 4 I/O Pins are required to drive each coil of the
motor. By energizing each coil in a particular sequence you can control the speed and
direction of the motor. 4 lower bits of PORTC are used for controlling the step motor , triple
nested loop is used to delay winding switching to about 200ms. Decrease the delay for more
speed but not too much, otherwise your motor will stall . More advanced code should be
available in a few weeks. Im planning to expand a Solar Power Charger design by adding

$7.59

Nema17 Stepper
Motors 2 Phase &
$9.40

solar tracking capabilities using stepping motors, so this small project is a good beginning for
testing various designs and interfacing techniques. 4 Unipolar step motors were tested (5
leads), see attached schematic and pin out for each motor, these motors were dismantled
from old printers and scanners.

07/09/2015 13:04

Stepper Motor Interface PIC16F | Picmicrolab

2 de 3

http://www.picmicrolab.com/stepping-motor-interface-pic16f/

Remotely access your Pi


A remote terminal for your Raspberry Pi. Sign up today

So now well need to identify the individual coils and common connection of the motor. Use
your DVM to measure resistance between pairs of wires, it should be around 120 Ohm. The
terminal with half of measured resistance is a common wire, connect it to positive voltage
5-12V depending on the motor.For identifying each coil there are a lot of techniques available,
however Ive used PIC to help me to find out the winding and connect them correctly. As
explained above PIC will repeatedly send 1 to each coil according to its number. At this
point you know were common wire is and its already should be connected to a positive
voltage. Take one of the wires and assume that its Coil 4 and connect it to ULN2003A Coil 4
output. Now you can use your fingers to feel the small movements every pulse and its
direction. Take additional wire and connect it for example to Coil2 output, feel the direction of
the movement. If its a correct wire the direction will be the same and the duration will
increase with each attached wire till you have assembled them in correct order. At this point
you can slightly decrease the switching delay to get continues rotation. Ive used this method
on 4 motors and managed to find the correct winding in 15 minutes.
First step motor is Mitsumi M42SP-4NP.Common Red,W4 Yellow,W3 Orange,W2
Black,W1 Brown.

Stepper Motor & Drive


International Shipping by Fedex Credit Card Accepted

Next is PM35S-048-ZTP8 Minebea Electronics. Common Red,W4 Brown,W3


Yellow,W2 Black,W1 Orange.

Now for Canon QH4-4115 Stepper Motor. Common Black,W4 Red,W3 White,W2
Yellow,W1 Brown.

The last motor had no marking, but its wires configuration was the simplest among all tested
steppers. If you hold it looking at the back of the motor the first wire from the left is a common
followed by W1,W2,W3,W4.

07/09/2015 13:04

Stepper Motor Interface PIC16F | Picmicrolab

3 de 3

http://www.picmicrolab.com/stepping-motor-interface-pic16f/

Click here to download Assembly/hex files


Thats it for now. Ive also found 2 Bipolar motors with 4 leads well see if a simple PIC
interface can be built and published.

Solar Power
Mobile Charger

Solar Tracking
System

DC Motor
Controller

Serial LCD
Interface I2C

75 Dot Matrix
Character
Generator

Solar Power Mobile Charger

Solar Tracking System

Posted in Stepping Motor

Site Map

2015 Picmicrolab

Responsive Theme powered by WordPress

07/09/2015 13:04

You might also like