Upload
c0rr0de
View
225
Download
0
Embed Size (px)
Citation preview
8/6/2019 Stepper Motor Through Laser
1/49
PROJECT REPORTON
LASER CONTROL OF STEPPER MOTOR
8/6/2019 Stepper Motor Through Laser
2/49
The aim of this project is to control the speedand direction of the stepper motor, using theoptical means through laser.This project consist of 2 parts
1. Transmitting part.2. Receiving part.
Laser is only providing the medium ofcommunication between the transmitting andreceiving end; hence allowing to control it from aremote area without being physically presentnear the motor.
8/6/2019 Stepper Motor Through Laser
3/49
BLOCK DIAGRAM OF THE PROJECT.
BRIEF WORKING
As already mentioned that this project consist of2 parts i.e. transmitter and receiver, transmitteris to generate the signals for specific purpose
(i.e. it is to control the speed and/or direction ofthe stepper motor) in the form of d.t.m.f (dualtone multiple frequency) through d.t.m.f encoder(ic91214). These signals are amplified and aregiven to the laser torch, as the signals are
8/6/2019 Stepper Motor Through Laser
4/49
electrical signals of different frequencies, socorresponding intensity of the laser torch isproduced.
receiver part:In the receiver region, infrared opto diode isused to receive the laser signals. These laserlight signals are converted again into electricalform. Now these electrical signals are given tothe d.t.m.f encoder (mt 8870 ) which convertthese signals into 4 bit binary sequence. Thesebinary sequences is given to the micro controllerwhich drives the stepper motor.
Main components used are..
1. D.T.M.F (Dual Tone Multi Frequency)
WHAT IS DTMF?
8/6/2019 Stepper Motor Through Laser
5/49
When we press a button in the telephone set keypad, a connection ismade that generates a resultant signal of two tones at the same time. Thesetwo tones are taken from a row frequency and a column frequency. Theresultant frequency signal is called "Dual Tone Multiple Frequency". Thesetones are identical and unique.
A DTMFsignal is the algebraic sum of two different audio frequencies,and can be expressed as follows:
f(t) = A0sin(2**fa*t) + B0sin(2**fb*t) + ........... ------->(1)
Where fa and fb are two different audio frequencies with A and B astheir peak amplitudes and f as the resultant DTMF signal. fa belongs to thelow frequency group and fb belongs to the high frequency group.
The amplitudes of the two sine waves should be such that
(0.7 < (A/B) < 0.9)V -------->(2)
The frequencies are chosen such that they are not the harmonics ofeach other.
When we send these DTMF signals to the telephone exchangethrough cables, the servers in the telephone exchange identifies thesesignals and makes the connection to the person you are calling.
The row and column frequencies are given below:
Fig (A)
When you press the digit 5 in the keypad it generates a resultanttone signal which is made up of frequencies 770Hz and 1336Hz. Pressing
8/6/2019 Stepper Motor Through Laser
6/49
digit 8 will produce the tone taken from tones 852Hz and 1336Hz.
Figure (E). Circuit diagram of the DTMF encoder
2. MT 8870 DTMF decoder:
This project will use very simple, cheap, and common electricalcomponents. This chip uses digital counting techniques for thedetection and decoding of all 16 DTMF tones, and delivers a binaryoutput corresponding to one of these DTMF tones. This output will befed directly into a micro controller 89C51 chip, which will drive the
Relays for activating and deactivating various appliances.The outputs of the 8870 chip will be fed into a micro
controller.
8/6/2019 Stepper Motor Through Laser
7/49
HOW TO DECODE DTMF
DTMF generated by rectangular pulses and RC filters works reliably. The
mentioned MT 8870 uses two 6th order band pass filters with switched
capacitors. These produce nice clean sine waves even from distorted inputs,with any harmonics suppressed.
IC MT8870/KT3170 serves as DTMF decoder .
Working of IC MT8870:
The MT-8870 is a full DTMF Receiver that integrates both band splitfilter and decoder functions into a single 18-pin DIP. Its filter section usesswitched capacitor technology for both the high and low group filters andfor dial tone rejection.
MT-8870 operating functions include a band split filter thatseparates the high and low tones of the received pair.
The low and high group tones are separated by applying the dual-tonesignal to the inputs of two 6th order switched capacitor band pass filterswith bandwidths that correspond to the bands enclosing the low and highgroup tones.
8/6/2019 Stepper Motor Through Laser
8/49
The input arrangement of the MT-8870 provides a differential inputoperational amplifier as well as a bias source (VREF) to bias the inputs atmid-rail. Provision is made for connection of a feedback resistor to the op-amp output (GS) for gain adjustment.
The internal clock circuit is completed with the addition of a standard
3.579545 MHz crystal.
8/6/2019 Stepper Motor Through Laser
9/49
4.Introduction to stepper motors..
Stepper Motor Basics
A stepper motor is an electromechanical device which converts
electrical pulses into discrete mechanical movements. The shaft
or spindle of a stepper motor rotates in discrete step increments
when electrical command pulses are applied to it in the propersequence..
Stepper Motor Advantages and Disadvantages
Advantages
1. The rotation angle of the motor is proportional to the inputpulse.
2. The motor has full torque at stand-still (if the windings areenergized)
3. Precise positioning and repeatability of movement since goodstepper motors have an accuracy of 3-5% of a step and this error
is non cumulative from one step to the next.
4. Excellent response to starting/stopping/reversing.
5. Very reliable since there are no contact brushes in the motor.
Therefore the life of the motor is simply dependant on the lifeof the bearing.
8/6/2019 Stepper Motor Through Laser
10/49
6. The motors response to digital input pulses provides open-loopControl making the motor simpler and less costly to control.
7. It is possible to achieve very low speed synchronous rotation
with a load that is directly coupled to the shaft.
8. A wide range of rotational speed can be realized as the speedis proportional to the frequency of the input pulses.
Disadvantages
1. Resonances can occur if not properly controlled.
2. Not easy to operate at extremely high speeds
There are three basic stepper motor.
1. Variable-reluctance
2. Permanent-magnet
3. Hybrid
8/6/2019 Stepper Motor Through Laser
11/49
Variable-reluctance (VR)
This type of stepper motor has been around for a long time. It iseasy to understand from a structural point of view
Figure shows a cross section of a typical V.R. stepper motor. Thistype of motor consists of a soft iron multi-toothed rotor and awound stator. When the stator windings are energized with DCcurrent the poles become magnetized .Rotation occurs when the
rotor teeth are attracted to the energized stator poles.
Permanent Magnet (PM)
The permanent magnet step motor is a low cost and lowresolution type motor with typical step angles of 7.5 to 15. (48 -
24steps/revolution) PM motors as the name implies havepermanent magnets added to the motor structure. The rotor no
longer has teeth as with the VR motor. Instead the rotor ismagnetized with alternating north and south poles situated in astraight line parallel to the rotor shaft.
8/6/2019 Stepper Motor Through Laser
12/49
These magnetized rotor poles provide an increased magnetic fluxintensity and because of this the PM motor exhibits improved
torque characteristics when compared with the VR type.
Hybrid (HB)
The hybrid stepper motor is more expensive than the PM steppermotor provides better performance with respect to step
resolution, torque and speed. Typical step angles for the HB
stepper moto range from 3.6 to 0.9 (100 - 400 steps perrevolution). The hybrid stepper motor combines the bestfeatures of both the PM and VR type stepper motors. The rotor
is multi-toothed like the VR motor and contains an axiallymagnetized con-centric magnet around its shaft. The teeth on
the rotor provide an even better path which helps guide the
8/6/2019 Stepper Motor Through Laser
13/49
magnetic flux to preferred locations in the air gap. This furtherincreases the detent, holding and dynamic torque characteristics
of the motor when com-pared with both the VR and PM types.
The two most commonly used types of stepper motors are thepermanent magnet and the hybrid types.
Size and Power
In addition to being classified by their step angle stepper motors
are also classified according to frame size which correspond tothe diameter of the body of the motor.
For instance a size 11 stepper motor has a body di-ameter ofapproximately 1.1 inches.
Likewise a size 23 stepper motor has abody diameter of 2.3
inches (58 mm),etc. As a general rule the available torque out-
put from a motor of a particular frame size will increase with
increased body length.
Power levels for IC-driven stepper motors typically range from
below a watt for very small motors up to 10 -20 watts for larger
motors. For example, a size 23 step motor maybe rated at 6V and1A per phase. Therefore, with two phases energized the motorhas a rated power dissipation of 12 watts. It is normal practiceto rate a stepper motor at the power dissipation level where the
motor case rises 65C above the ambient in still air.
They can be used to advantage in applications where we need to
control rotation angle, speed, position and synchronism.
8/6/2019 Stepper Motor Through Laser
14/49
Some of these applications include printers, plotters, high endoffice equipment, hard disk drives, medical equipment, fax
machines, automotive and many more. The Rotating Magnetic Field
When a phase winding of a stepper motor is energized withcurrent a magnetic flux is developed in the stator. Figure 5 showsthe magnetic flux path developed when phase B is energized with
winding current in the direction shown. The rotor then alignsitself so that the flux opposition is minimized. In this case the
motor would rotate clockwise so that its south pole aligns with
the north pole of the stator B at position 2 and its north polealigns with the south poleof stator B at position 6. To get the
motor to rotate we can now see that we must provide a sequenceof energizing the stator windings in such a fashion that provides a
rotating magnetic flux field which the rotor follows due tomagnetic attraction.Torque Generation
The torque produced by a stepper motor depends on several
factors.
1 The step rate.
2 The drive current in the windings.
3 The drive design or type.
In a stepper motor a torque is devel-oped when the magnetic
fluxes of the rotor and stator are displaced from each other.The stator is made up of a high permeability magnetic material.The presence of this high permeability material causes the
magnetic flux to be confined for the most part to the pathsdefined by the stator structure in the same fashion that
currents are confined to the conductors of an electronic circuit.
This serves to concentrate the flux at the stator poles. Thetorque output produced by the motor is proportional to the
8/6/2019 Stepper Motor Through Laser
15/49
intensity of the magnetic flux generated when the winding isenergized.The basic relationship whichdefines the intensity of
the magnetic flux is defined by: H = (N i)
where:
N= The number of winding turns
i=current
H=Magnetic field intensity
l=Magnetic flux path length
This relationship shows that the magnetic flux intensity and
consequently the torque is proportional to the number of windingturns and the current and inversely proportional tothe length ofthe magnetic flux path. From this basic relationship one can see
that the same frame size stepper motor could have very
different torque output capabilities simply by changing thewinding parameters. Moredetailed information on how thewinding
parameters affect the outputcapability of the motor can befoundin the application note entitled DriveCircuit Basics.Phases,Poles and SteppingAnglesUsually stepper motors have twophases,
but three- and five-phasemotors also exist.A bipolar motor with
two phaseshas one winding/phase and a unipolarmotor has onewinding, with a centertap per phase. Sometimes theunipolarstepper motor is referred to as a four-phase motor,even though it only hastwo phases.Motors that have two
separatewindings per phase also existthesecan be driven ineither bipolar orunipolar mode.A pole can be defined as one oftheregions in a magnetized body wherethe magnetic flux density
is con-centrated. Both the rotor and thestator of a step motorhave poles.Figure 2 contains a simplified pictureof a two-phase
8/6/2019 Stepper Motor Through Laser
16/49
stepper motor having 2poles (or 1 pole pairs) for each phaseonthe stator, and 2 poles (one polepair) on the rotor. In reality
severalmore poles are added to both the rotorand stator
structure in order to increase the number of steps perrevolutionof the motor, or in otherwords to provide a smaller basic(fullstep) stepping angle. The permanentmagnet stepper motor
contains anequal number of rotor and stator polepairs. Typicallythe PM motor has 12pole pairs. The stator has 12 pole pairsper
phase. The hybrid type steppermotor has a rotor with teeth.
Therotor is split into two parts, separatedby a permanantmagnetmaking halfof the teeth south poles and half
northpoles.The number of pole pairs isequal to the number ofteeth on one ofthe rotor halves. The stator of a hybridmotor also
has teeth to build up ahigher number of equivalent poles(smallerpole pitch, number ofequivalent poles = 360/teeth pitch)comparedto the main poles, on whichthe winding coils are wound. Usually4
main poles are used for 3.6 hybridsand 8 for 1.8- and 0.9-degreetypes.It is the relationship between thenumber of rotor poles and
the equival-ent stator poles, and the number thenumber of
phases that determines thefull-step angle of a steppermotor.Step angle=360 ? (N Ph)=360/NPhN =Number ofequivalent poles perPhphase = number of rotor polesPh=Numberof phasesN=Total number of poles for allphases togetherIf the
rotor and stator tooth pitch isunequal, a more-complicated
relation-ship exists.Stepping ModesThe following are the mostcommondrive modes.
1 Wave Drive (1 phase on)
2 Full Step Drive (2 phases on)
3 Half Step Drive (1 & 2 phases on)
4 Microstepping (Continuously varying motor currents)
8/6/2019 Stepper Motor Through Laser
17/49
For the following discussions pleaserefer to the figure 6.In WaveDrive only one winding isenergized at any given time. Thestator is
energized according to theA Bsequence A ? B ? ? and therotor
steps from position 8 ? 2 ? 4? 6. For unipolar and bipolar wound
8/6/2019 Stepper Motor Through Laser
18/49
motors with the same winding param-eters this excitation mode
would resultin the same mechanical position. Thedisadvantage ofthis drive mode is thatin the unipolar wound motor you areonlyusing 25% and in the bipolarmotor only 50% of the total
motorwinding at any given time. Thismeans that you are not ettinghemaximum torque output from themotor.
8/6/2019 Stepper Motor Through Laser
19/49
In Full Step Drive you are ener-gizing two phases at any giventime.The stator is energized according toA ABthe sequence AB?B ? ?Band the rotor steps from positionA1 ? 3 ? 5 ? 7 . Full step
moderesults in the same angular movementas 1 phase on drive but
the mechanicalposition is offset by one half of a fullstep. Thetorque output of theunipolar wound motor is lower thanthe
bipolar motor (for motors with thesame winding parameters)since theunipolar motor uses only 50% of theavailable windingwhile the bipolarmotor uses the entire winding.Half Step Drive
combines bothwave and full step (1&2 phases on)drive modes.
Every second step onlyone phase is energized and during theothersteps one phase on each stator.The stator is energized according
8/6/2019 Stepper Motor Through Laser
20/49
Torque vs Angle Characteristics
The torque vs angle characteristics ofa stepper motor are therelationshipbetween the displacement of the rotorand the torque
which applied to therotor shaft when the stepper motorisenergized at its rated voltage. An idealstepper motor has a
sinusoidal torquevs displacement characteristic asshown in figure8.Positions A and C represent stableequilibrium points when noexternalforce or load is applied to the rotorshaft. When you
apply an external to the motor shaft you inforce Taessencecreate an angulardisplacement, ? . This angularadisplacement, ? ,
is referred to as aalead or lag angle depending on wetherthe
motor is actively accelerating ordecelerating. When the rotorstopswith an applied load it will come torest at the positiondefined by thisdisplacement angle. The motor, in oppositiontodevelops a torque, Tathe applied external force in order
tobalance the load. As the load isincreased the displacement
angle alsoincreases until it reaches themaximum holding torque, T
, of thehmotor. Once T is exceeded the motorhenters an
unstable region. In thisregion a torque is the opposite direction iscreated and the rotorjumps over the unstable point to thenextstable point. The displacement angle is deter-mined by the
following relationship:X = (Z ?2p) sin(T ?T )where:a hZ =rotortooth pitch
T =Load torquea
T =Motors rated holding torqueh
X=Displacement angle.
Therefore if you have a problem with the step angle error of theloadedmotor at rest you can improve this by changing the
8/6/2019 Stepper Motor Through Laser
21/49
stiffness of the motor.This is done by increasing theholdingtorque of the motor. We can see thiseffect shown in the
figure 5.Increasing the holding torque for aconstant load causes a
shift in the lagangle from Q to Q .2 1
Step Angle Accuracy
One reason why the stepper motor hasachieved such popularity asa position-ing device is its accuracy and repeat-ability. Typically
stepper motors willhave a step angle accuracy of 35%of one
step. This error is also non-cumulative from step to step.Theaccuracy of the stepper motor ismainly a function of the
mechanicalprecision of its parts and assembly.Figure 9 shows atypical plot of thepositional accuracy of a stepper motor.Step
Position Error
The maximum positive or negativeposition error caused when themotorhas rotated one step from the previousholding position.Step
position error = measured stepangle - theoretical anglePositional
ErrorThe motor is stepped N times from aninitial position (N =360/step angle)and the angle from the initial positionis
measured at each step position. Ifthe angle from the initial
position tothe N-step position is ? and theNerror is ?? where:
N?? = ?? - (step angle) N.N N
The positional error is the differenceof the maximum andminimum but isusually expressed with a sign. Thatis:
1positional error = /2(?? - ?? )
Max Min
8/6/2019 Stepper Motor Through Laser
22/49
Hysteresis Positional ErrorThe values obtained from themeasure-ment of positional errors in bothdirections.
Mechanical Parameters,Load, Friction, InertiaThe performance ofa stepper motorsystem (driver and motor) is alsohighly dependent
on the mechanicalparameters of the load. The load isdefined aswhat the motor drives. It istypically frictional, inertial or
acombination of the two.Friction is the resistance to motiondueto the unevenness of surfaceswhich rub together. Frictionisconstant with velocity. A minimumtorque level is required
throughoutthe step in over to overcome thisfriction ( at least
equal to the friction).Increasing a frictional load lowers thetopspeed, lowers the acceleration andincreases the positional error.Theconverse is true if the frictional load isloweredInertia is the
resistance to changesin speed. A high inertial load requiresa highinertial starting torque and thesame would apply for braking. In-
creasing an inertial load will increasespeed stability, increase theamount oftime it takes to reach a desired speedand decrease the
maximum self startpulse rate. The converse is again trueif the
inertia is decreased.The rotor oscillations of a steppermotor willvary with the amount offriction and inertia load. Because ofthis
relationship unwanted rotor oscil-lations can be reduced bymechanicaldamping means however it is moreoften simpler toreduce theseunwanted oscillations by electricaldamping methods
8/6/2019 Stepper Motor Through Laser
23/49
such as switch fromfull step drive to half step drive.Torque vs,SpeedCharacteristics
The torque vs speed characteristics arethe key to selecting the
right motorand drive method for a specificapplication. Thesecharacteristics aredependent upon (change with) themotor,
excitation mode and type ofdriver or drive method. Atypicalspeed torque curve is shown infigure9.To get a betterunderstanding ofthis curve it is useful to define thedifferent
aspect of this curve.Holding torqueThe maximum torque producedbythe motor at standstill.
Pull-In Curve
The pull-in curve defines a area referedto as the start stopregion. This is themaximum frequency at which themotor can
start/stop instantaneously,with a load applied, without lossofsynchronism.
Maximum Start Rate
The maximum starting step frequencywith no load applied.
Pull-Out Curve
The pull-out curve defines an arearefered to as the slew region.It definesthe maximum frequency at which themotor can operate
without losing syn-chronism. Since this region is outsidethe pull-inarea the motor mustramped (accelerated or decelerated)into this
region.
Maximum Slew Rate
The maximum operating frequency ofthe motor with no load
applied.The pull-in characteristics vary alsodepending on the load.
8/6/2019 Stepper Motor Through Laser
24/49
The larger theload inertia the smaller the pull-inarea. We can seefrom the shape of thecurve that the step rate affects thetorque
output capability of steppermotor The decreasing torque output
asthe speed increases is caused by thefact that at high speedsthe inductanceof the motor is the dominant circuitelement.
The shape of the speed - torquecurve can change quitedramaticallydepending on the type of driver used.The bipolarchopper type driverswhich Ericsson Components produceswill
maximum the speed - torqueperformance from a given motor.
8/6/2019 Stepper Motor Through Laser
25/49
Mostmotor manufacturers provide thesespeed - torque curvesfor their motors.It is important to understand whatdriver type
or drive method the motormanufacturer used in developing
theircurves as the torque vs. speed charac-teristics of an givenmotor can varysignificantly depending on the drivemethod used.Single Step Response andResonancesThe single-step response
character-istics of a stepper motor is shown infigure 11.When onestep pulse is applied to astepper motor the rotor behaves in
amanner as defined by the above curve.The step time t is the
time it takes themotor shaft to rotate one step angleonce thefirst step pulse is applied.This step time is highly dependent
onthe ratio of torque to inertia (load) aswell as the type of driverused.Since the torque is a function of thedisplacement it follows
that the accel-eration will also be. Therefore, whenmoving inlarge step increments ahigh torque is developed andconsequentlya high acceleration. Thiscan cause overshots and ringing asshown.
The settling time T is the timeit takes these oscillations orringing tocease. In certain applications thisphenomena can be
undesirable. It ispossible to reduce or eliminate thisbehaviour by
microstepping thestepper motor. For more informationonmicrostepping please consult themicrostepping note. Steppermotors can often exhibit aphenomena refered to as resonanceatcertain step rates. This can be seen as asudden loss or drop in
torque at cer-tain speeds which can result in missedsteps or loss
of synchronism. It occurswhen the input step pulse rate coin-cides with the natural oscillationfrequency of the rotor. Often
there is aresonance area around the 100 200pps region and also
one in the highstep pulse rate region. The resonancephenomena ofa stepper motor comesfrom its basic construction and there-foreit is not possible to eliminate itcompletely. It is also dependent
uponthe load conditions. It can be reducedby driving the motor inhalf or micro-stepping modes.
8/6/2019 Stepper Motor Through Laser
26/49
Stepper motors translate digital switching sequences into
motion. They are used in printers, automated machinetools, disk drives, and a variety of other applications
requiring precise motions under computer control. Unlike
ordinary dc motors, which spin freely when power is
applied, steppers require that their power source be
continuously pulsed in specific patterns. These patterns, or
step sequences, determine the speed and direction of a
steppers motion. For each pulse or step input, the stepper
motor rotates a fixed angular increment ; typically 1.8 or
7.5 degrees. The fixed stepping angle gives steppers their
precision. As long as the motors maximum limits of speed
or torque are not exceeded, the controlling program knows
a steppers precise position at any given time. Steppers are
driven by the interaction (attraction and repulsion) of
magnetic fields. The driving magnetic field rotates as
strategically placed coils are switched on and off. Thispushes and pulls at permanent magnets arranged around the
edge of a rotor that drives the output shaft.
When the on-off pattern of the magnetic
fields is in the proper sequence, the stepper turns (when its
8/6/2019 Stepper Motor Through Laser
27/49
not, the stepper sits and quivers). The most common
stepper is the four-coil unipolar variety. These are called
unipolar because they require only that their coils be driven
on and off. Bipolar steppers require that the polarity of power to the coils be reversed. The normal stepping
sequence for four-coil unipolar steppers appears in figure.
There are other, special-purpose stepping sequences, such
as half-step and wave drive, and ways to drive steppers
with multi-phase analog waveforms, but this application
concentrates on the normal sequence. After all, its the
sequence for which all of the manufacturers specifications
for torque, step angle, and speed apply.
Figure. Normal stepping sequence.
If you run the stepping sequence in figure forward, the
stepper rotates clockwise ; run it backward, and the stepper
rotates counterclockwise. The motors speed depends on
how fast the controller runs through the step sequence. Atany time the controller can stop in mid sequence. If it
leaves power to any pair of energized coils on, the motor is
locked in place by their magnetic fields. This points out
another stepper motor benefit: built-in brakes.
8/6/2019 Stepper Motor Through Laser
28/49
Many microprocessor stepper drivers use four
output bits to generate the stepping sequence. Each bit
drives a power transistor that switches on the appropriate
stepper coil. The stepping sequence is stored in a lookuptable and read out to the bits as required.
This design takes a slightly different
approach. First, it uses only two output bits, exploiting the
fact that the states of coils 1 and 4 are always the inverse of
coils 2 and 3. Look at figure 3 again. Whenever coil 2 gets
a 1, coil 1 gets a 0, and the same holds for coils 3 and 4. In
microcontrollers designs, output bits are too precious towaste as simple inverters, so we give that job to two
sections of the ULN2003 inverter/driver. The second
difference between this and other stepper driver designs is
that it calculates the stepping sequence, rather than reading
it out of a table. While its very easy to create tables with
the Stamp, the calculations required to create the two-bit
sequence required are very simple. And reversing the motor
is easier, since it requires only a single additional program
step.
5.ULN 2003:-
The wires from the Logic PCB connector to the stepper motor in a TM100 Disk Driveare as follows
This means that, to use the stepping sequences as is, the Green and Brown wires are the
wrong way round. There is no need to alter the wires at the connector, of course - it canbe done in the cable from the PC parallel port or microcontroller.
8/6/2019 Stepper Motor Through Laser
29/49
If you have a stepper motor with different wiring, look here.
Four-Wire Connection
The ULN2003 / MC1413 is a 7-bit 50V 500mA TTL-input NPN darlington driver. This
is more than adequate to control a four phase unipolar stepper motor such as the KP4M4-001.
It is recommended to connect a 12v zener diode between the power supply and VDD (Pin
9) on the chip, to absorb reverse (or "back") EMF from the magnetic field collapsingwhen motor coils are switched off. (See Douglas W. Jones' rather more sophisticated
example)
Here's one I made earlier
I recycled the power and motor lead connectors from the TM100 Logic PCB. A
convenient source of 12v and 5v is an old IBM-PC power supply unit. The 9-way D-typeconnector is appropriate for the number of (parallel) control lines needed in the cable.
Here's some example software for this setup
y One of my student groups used an enhanced version of this circuit for theirRemote Control WebCam project.
y One of my individual students produced a microcontroller-driven version for hisSMACK project. Read his report for more details.
8/6/2019 Stepper Motor Through Laser
30/49
Two-Wire Connection
With the addition of a few resistors, you can control this kind of motor with only two data
lines (compared with the Four-Wire Connection, above). This uses the fact that, with
Two-Coil Excitation, at any time two of the coils have the inverse excitation (on/off) of
the other two.
(based on Parallax BASIC Stamp Application Note 6)
You only need to supply the on/off signals for coils 3 and 2, according to the Two-CoilExcitation sequence. The corresponding inverted signals for coils 1 and 4 are supplied by
the circuit itself.
I used this circuit (times two) for the StoneAge DiskDrive Logo Turtles and the Pan-and-Tilt Mount for a camera.
The same technique is used by the (discontinued) UDN2544B (PDF) Quad DarlingtonPower Driver chip from Allegro MicroSystems
A disadvantage of this method is that you cannot half-step the motor.
Allegro's UCN5804B Stepper-Motor Translator/Driver chip supports all three excitation
modes.
8/6/2019 Stepper Motor Through Laser
31/49
Allegro 5804B
This translator/driver chip provides complete control and drive for a four-phase unipolar
stepper motor.
from the data sheet (PDF)
The logic section provides the sequencing logic, DIRECTION and OUTPUT ENABLE
control, and a power-on reset function. Three stepper-motor drive formats, wave-drive(one-phase), two-phase, and halfstep are externally selectable.
Drive Format Pin 9 Pin 10
Two-Phase L LOne-Phase H L
Half-Step L H
Step-Inhibit H H
I used the following circuit (times two) for a third (different) controller board for mystudents.
8/6/2019 Stepper Motor Through Laser
32/49
With Pin 15 OUTPUT ENABLE tied to Ground (always enabled), four data lines arerequired to interface the chip, for all three drive formats to be selectable in software.
From the Data Port of the PC Parallel Port, I used:
Bit Function
0 Step Input
1 Direction CW/CCW
2 One-Phase/Two-Phase
3 Half-Step/Full-Step
Bits 1-3 need to be set to 1 or 0 to reflect the desired direction of rotation and drive
format. Bit 0 must be set to 1 initially. To step the motor, Bit 0 must be reset to zero for aminimum 3 sec then set back to 1.
Note: If the controller board is powered up but not connected to the PC and under
software control, the motor(s) will free run as Pin 11 STEP INPUT floats low. Thisbehaviour can be prevented by connecting a 10K pullup resistor between pin 11 and +5v.
8/6/2019 Stepper Motor Through Laser
33/49
The fol lowing is the basic circuit that makes the8051 works:
A struggle has been going on between MCU manufacturers
for quite a long time, each of them trying to best respond to
the ever-increasing demands of the market. Every couple of
days there is a brand new chip available, working at higher
8/6/2019 Stepper Motor Through Laser
34/49
frequency, with more memory or with better A/D converters.
And yet, a closer look to their interior reveals the same or at
least very similar structural design referred to as "8051
compatibility".
Although this family had quite limited capabilities by today's
notions, it quickly captivated the world and became the
standard for what is today understood as 'micro controller'.
The most significant cause for such a success can be found
in the cleverly chosen configuration which can satisfy adiversity of needs, yet allowing for continuous upgrades (in
form of new controllers). In a brief period of time, a decent
amount of software has been developed for 8051, making
further changes of the hardware core simply uneconomical.
Consequently, there is a variety of MCUs available today,
basically just the upgraded 8051 models. still manufacturedby all the major companies,
8/6/2019 Stepper Motor Through Laser
35/49
As can be seen on the image above, there is nothing
particularly remarkable about MCU 8051:
4 kilobytes of ROM is neither too little nor too much. 128 bytes of RAM (SFR registers included) can satisfy
the basic needs, but is not really astounding.
4 ports totaling 32 I/O lines , are usually sufficient for
connecting to the environs and are by no means luxury.
Obviously, 8051 configuration is intended to satisfy the
needs of programmers developing the controlling devices
and instruments. This is one part of its key to success: there
is nothing missing, yet there is no lavishness; it is meant for
the average user. The other clue can be found in the
organization of RAM, Central Processor Unit (CPU), and
ports - all of which maximally utilize the available resources
and allow further upgrades.
8/6/2019 Stepper Motor Through Laser
36/49
Pins On The Case
18: Port 1: Each of these pins can be used as either
input or output according to our needs. Also, pins 1 and
2 (P1.0 and P1.1) have special functions associated
with Timer 2.
9: Reset Signal: high logical state on this input halts
the MCU and clears all the registers. Bringing this pin
back to logical state zero starts the program anew as if
the power had just been turned on. In another words,
positive voltage impulse on this pin resets the MCU.
Depending on the device's purpose and environs, this
pin is usually connected to the push-button, reset-upon-
start circuit or a brown out reset circuit (covered in the
previous chapter). The image shows one simple circuit
for safe reset upon starting the controller. It is utilized in
situations when power fails to reach its optimal voltage.
8/6/2019 Stepper Motor Through Laser
37/49
10-17: Port 3: As with Port 1, each of these pins can be
used as universal input or output. However, each pin of
Port 3 has an alternative function:
Pin 10: RXD - serial input for asynchronous
communication or serial output for synchronous
communication.
Pin 11: TXD - serial output for asynchronous
communication or clock output for synchronous
communication
Pin 12: INT0 - input for interrupt 0
Pin 13: INT1 - input for interrupt 1
Pin 14: T0 - clock input of counter 0
Pin 15: T1 - clock input of counter 1
8/6/2019 Stepper Motor Through Laser
38/49
Pin 16: WR - signal for writing to external (add-on)
RAM memory
Pin 17: RD - signal for reading from external RAM
memory
18-19: X2 and X1: Input and output of internal
oscillator. Quartz crystal controlling the frequency
commonly connects to these pins. Capacitances within
the oscillator mechanism (see the image) are not critical
and are normally about 30pF. Instead of a quartz
crystal, miniature ceramic resonators can be used for
dictating the pace. In that case, manufacturers
recommend using somewhat higher capacitances
(about 47 pF). New MCUs work at frequencies from
0Hz to 50MHz+.
20: GND: Ground
8/6/2019 Stepper Motor Through Laser
39/49
21- 28: Port 2: If external memory is not present, pins
of Port 2 act as universal input/output. If external
memory is present, this is the location of the higher
address byte, i.e. addresses A8 A15. It is important to
note that in cases when not all the 8 bits are used for
addressing the memory (i.e. memory is smaller than
64kB), the rest of the unused bits are not available as
input/output.
29: PSEN: MCU activates this bit (brings to low state)
upon each reading of byte (instruction) from program
memory. If external ROM is used for storing the
program, PSEN is directly connected to its control pins.
30: ALE: Before each reading of the external memory,
MCU sends the lower byte of the address register
(addresses A0 A7) to port P0 and activates the output
ALE. External register (74HCT373 or 74HCT375
circuits are common), memorizes the state of port P0
upon receiving a signal from ALE pin, and uses it as
part of the address for memory chip. During the second
part of the mechanical MCU cycle, signal on ALE is off,
and port P0 is used as Data Bus. In this way, by adding
only one cheap integrated circuit, data from port can be
multiplexed and the port simultaneously used for
transferring both addresses and data.
8/6/2019 Stepper Motor Through Laser
40/49
31: EA: Bringing this pin to the logical state zero (mass)
designates the ports P2 and P3 for transferring
addresses regardless of the presence of the internal
memory. This means that even if there is a program
loaded in the MCU it will not be executed, but the one
from the external ROM will be used instead.
Conversely, bringing the pin to the high logical state
causes the controller to use both memories, first the
internal, and then the external (if present).
32-39: Port 0: Similar to Port 2, pins of Port 0 can be
used as universal input/output, if external memory is not
used. If external memory is used, P0 behaves as
address output (A0 A7) when ALE pin is at high
logical level, or as data output (Data Bus) when ALE pin
is at low logical level.
40: VCC; Power +5V
Input Output (I/O) Ports
Every MCU from 8051 family has 4 I/O ports of 8 bits each.
This provides the user with 32 I/O lines for connecting MCU
to the environs. Unlike the case with other controllers, there
is no specific SFR register for designating pins as input or
output. Instead, the port itself is in charge: 0=output, 1=input.
If particular pin on the case is needed as output, the
appropriate bit of I/O port should be cleared. This will
8/6/2019 Stepper Motor Through Laser
41/49
generate 0V on the specified controller pin. Similarly, if
particular pin on the case is needed as input, the appropriate
bit of I/O port should be set. This will designate the pin as
input, generating +5V as a side effect (as with every TTL
input).
Port 0
Port 0 has two-fold role: if external memory is used, it
contains the lower address byte (addresses A0-A7),
otherwise all bits of the port are either input or output.
Another feature of this port comes to play when it has been
designated as output. Unlike other ports, Port 0 lacks the
"pull up" resistor (resistor with +5V on one end). This
seemingly insignificant change has the following
consequences:
When designated as input, pin of Port 0 acts as high
impedance offering the infinite input resistance with no
"inner" voltage.
When designated as output, pin acts as "open drain".
Clearing a port bit grounds the appropriate pin on the
case (0V). Setting a port bit makes the pin act as highimpedance. Therefore, to get positive logic (5V) at
output, external "pull up" resistor needs to be added for
connecting the pin to the positive pole.
8/6/2019 Stepper Motor Through Laser
42/49
Therefore, to get one (5V) on the output, external "pull up"
resistor needs to be added for connecting the pin to the
positive pole.
Port 1
This is "true" I/O port, devoid of dual function characteristic
for Port 0. Having the "pull up" resistor, Port 1 is fully
compatible with TTL circuits.
Port 2
When using external memory, this port contains the higher
address byte (addresses A8A15), similar to Port 0.
Otherwise, it can be used as universal I/O port.
Port 3
Beside its role as universal I/O port, each pin of Port 3 hasan alternate function. In order to use one of these functions,
the pin in question has to be designated as input, i.e. the
appropriate bit of register P3 needs to be set. From a
hardware standpoint, Port 3 is similar to Port 0.
As can be seen from the individual descriptions of the ports,they all share highly similar structure. However, you need toconsider which task should be assigned to which port. Forexample: if utilizing port as output with high level (5V), avoidusing Port 0 as its pins cannot produce high logical level
8/6/2019 Stepper Motor Through Laser
43/49
without an additional resistor connected to +5V. If usingother port to a same end, bear in mind that built-in resistorshave relatively high values, producing the currents limited tofew hundreds of amperes as pin output.
8/6/2019 Stepper Motor Through Laser
44/49
CIRCUIT DIAGRAM..
8/6/2019 Stepper Motor Through Laser
45/49
8/6/2019 Stepper Motor Through Laser
46/49
Price list of components used in the project
PRICE OF COMPONENT
y 89c51 150/-
y L.C.D 16x2 350/-
y ULN 2003 50/-
y IC 91214 175/-
y IC 8870 53/-y BC 548 10/-
y Rx DIODE 65/-
MISCELLANEOUS:
y PRINTED CIRCUIT BOARD(P.C.B) 45/-
y CONNECTING WIRES 105/-
y BATTERY CONNECTOR 5/-(PER PC.)
y LASER TORCH 60/-
y +9 VOLTS BATTERY 20/-(PER PC.)y TRANSFORMER(12-0-12) 100/-
y 7805 35/-
y RESISTANCE MIX 10/-
y PRESET 12/-
y MICRO SWITCH 10/-
y AMPLIFIER (TBA 810) 45/-
8/6/2019 Stepper Motor Through Laser
47/49
y
The soldering kit
1. Soldering iron: as soldering is a process of joining together twometallic parts, the instrument which is used for doing this job isknown as soldering iron. Thus it is meant for melting the solderand to set up the metal parts being joined. Soldering iron israted according to their wattage, which varies from 10-200watts.
2. Solder: the raw material used for soldering is solder. It iscomposition of lead and tin. The good quality solder (a type offlexible naked wire) is 60% tin and 40% lead. Lead, which willmelt between 180 degrees to 200 degrees temperature.
3. Flux or soldering paste: when the points to be soldered areheated, an oxide film forms. This must be removed at once sothat solder may get to the surface of the metal parts. This isdone by applying chemical substance called flux, which boilsunder the heat of the iron remove the oxide formation and
enable the metal to receive the solder.
4. Blade or knife: to clean the surface and leads of components tobe soldered is done by this common instrument.
8/6/2019 Stepper Motor Through Laser
48/49
5. Sand paper: the oxide formation may attack at the tip of yoursoldering iron and create the problem. To prevent this, cleanthe tip with the help of sand paper time to time or you may useblade for doing this job.
Apart from all these tools, discussed the working bench
for soldering also includes desoldering pump, wink wire
(used for desoldering purpose), file, etc.
Tips for good soldering
1. Use right type of soldering iron. A small efficient soldering iron(about 10-25 watt with 1/8 or inch tip) is ideal for this work.
2. Keep the hot tip of the soldering iron on a piece of metal so thatexcess heat is dissipated.
3. Make sure that connection to the soldered is clean. Wax frayedinsulation and other substances cause poor soldering
connection. Clean the leads. Wires, tags etc. before soldering.
4. Use just enough solder to cover the lead to be soldered.Excess solder can cause a short circuit.
5. Use sufficient heat. This is the essence of good soldering.Apply enough heat to the component lead. You are not usingenough heat, if the solder barely melts and forms a round ball
of rough flaky solder. A good solder joint will look smooth,shining and spreaded type. The difference between good andbad soldering is just a few seconds extra with a hot iron appliedfirmly.
8/6/2019 Stepper Motor Through Laser
49/49
ADVANTAGESy Secure connection cannot be tempered easily.
y Cheaper than copper.
y Faster data transfer rate 3x108
m/sec.
y Higher Bandwidth.
Cannot be degraded by rainwater
DISADVANTAGE:-
y Point of throwing the laser beam should be in line of accepting it by IR Diode.4.ENCYCLOPEIDIA.
http://8052.com/www.ieee.org/www.projectguidance.com/guidance/details/id/585207798/title/remote%2Bcontrolled%2Bstepper%2Bmotorwww.geocities.com/ResearchTriangle/Lab/6584/motor_page.html