Вы находитесь на странице: 1из 49

PROJECT REPORT ON LASER CONTROL OF STEPPER MOTOR

The aim of this project is to control the speed and direction of the stepper motor, using the optical means through laser. This project consist of 2 parts 1. Transmitting part. 2. Receiving part. Laser is only providing the medium of communication between the transmitting and receiving end; hence allowing to control it from a remote area without being physically present near the motor.

BLOCK DIAGRAM OF THE PROJECT.

BRIEF WORKING As already mentioned that this project consist of 2 parts i.e. transmitter and receiver, transmitter is to generate the signals for specific purpose (i.e. it is to control the speed and/or direction of the stepper motor) in the form of d.t.m.f (dual tone multiple frequency) through d.t.m.f encoder (ic91214). These signals are amplified and are given to the laser torch, as the signals are

electrical signals of different frequencies, so corresponding intensity of the laser torch is produced. receiver part: In the receiver region, infrared opto diode is used to receive the laser signals. These laser light signals are converted again into electrical form. Now these electrical signals are given to the d.t.m.f encoder (mt 8870 ) which convert these signals into 4 bit binary sequence. These binary sequences is given to the micro controller which drives the stepper motor.

Main components used are..

1.

D.T.M.F (Dual Tone Multi Frequency)

WHAT IS DTMF?

When we press a button in the telephone set keypad, a connection is made that generates a resultant signal of two tones at the same time. These two tones are taken from a row frequency and a column frequency. The resultant frequency signal is called "Dual Tone Multiple Frequency". These tones are identical and unique. A DTMF signal 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 as their peak amplitudes and f as the resultant DTMF signal. fa belongs to the low 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 of each other. When we send these DTMF signals to the telephone exchange through cables, the servers in the telephone exchange identifies these signals 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 resultant tone signal which is made up of frequencies 770Hz and 1336Hz. Pressing

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 electrical components. This chip uses digital counting techniques for the detection and decoding of all 16 DTMF tones, and delivers a binary output corresponding to one of these DTMF tones. This output will be fed 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.

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 split filter and decoder functions into a single 18-pin DIP. Its filter section uses switched capacitor technology for both the high and low group filters and for dial tone rejection. MT-8870 operating functions include a band split filter that separates the high and low tones of the received pair. The low and high group tones are separated by applying the dual-tone signal to the inputs of two 6th order switched capacitor band pass filters with bandwidths that correspond to the bands enclosing the low and high group tones.

The input arrangement of the MT-8870 provides a differential input operational amplifier as well as a bias source (VREF) to bias the inputs at mid-rail. Provision is made for connection of a feedback resistor to the opamp output (GS) for gain adjustment. The internal clock circuit is completed with the addition of a standard 3.579545 MHz crystal.

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 proper sequence.. Stepper Motor Advantages and Disadvantages Advantages 1. The rotation angle of the motor is proportional to the input pulse. 2. The motor has full torque at stand-still (if the windings are energized) 3. Precise positioning and repeatability of movement since good stepper 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 life of the bearing.

6. The motors response to digital input pulses provides open-loop Control 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 speed is 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

Variable-reluctance (VR) This type of stepper motor has been around for a long time. It is easy to understand from a structural point of view Figure shows a cross section of a typical V.R. stepper motor. This type of motor consists of a soft iron multi-toothed rotor and a wound stator. When the stator windings are energized with DC current 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 low resolution type motor with typical step angles of 7.5 to 15. (48 24steps/revolution) PM motors as the name implies have permanent magnets added to the motor structure. The rotor no longer has teeth as with the VR motor. Instead the rotor is magnetized with alternating north and south poles situated in a straight line parallel to the rotor shaft.

These magnetized rotor poles provide an increased magnetic flux intensity 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 stepper motor 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 per revolution). The hybrid stepper motor combines the best features of both the PM and VR type stepper motors. The rotor is multi-toothed like the VR motor and contains an axially magnetized con-centric magnet around its shaft. The teeth on the rotor provide an even better path which helps guide the

magnetic flux to preferred locations in the air gap. This further increases 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 the permanent 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 to the diameter of the body of the motor. For instance a size 11 stepper motor has a body di-ameter of approximately 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 output 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 and 1A per phase. Therefore, with two phases energized the motor has a rated power dissipation of 12 watts. It is normal practice to 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.

Some of these applications include printers, plotters, high end office 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 with current a magnetic flux is developed in the stator. Figure 5 shows the magnetic flux path developed when phase B is energized with winding current in the direction shown. The rotor then aligns itself 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 pole aligns with the south poleof stator B at position 6. To get the motor to rotate we can now see that we must provide a sequence of energizing the stator windings in such a fashion that provides a rotating magnetic flux field which the rotor follows due to magnetic 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 paths defined 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. The torque output produced by the motor is proportional to the

intensity of the magnetic flux generated when the winding is energized.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 winding turns and the current and inversely proportional tothe length of the 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 the winding parameters. Moredetailed information on how thewinding parameters affect the outputcapability of the motor can be foundin 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 one winding, with a centertap per phase. Sometimes the unipolarstepper 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 in either bipolar orunipolar mode.A pole can be defined as one of theregions in a magnetized body wherethe magnetic flux density is con-centrated. Both the rotor and thestator of a step motor have poles.Figure 2 contains a simplified pictureof a two-phase

stepper motor having 2poles (or 1 pole pairs) for each phaseon the 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 perrevolution of 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. Typically the 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 permanant magnetmaking halfof the teeth south poles and half northpoles.The number of pole pairs isequal to the number of teeth on one ofthe rotor halves. The stator of a hybridmotor also has teeth to build up ahigher number of equivalent poles(smaller pole pitch, number ofequivalent poles = 360/teeth pitch)compared to 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-degree types.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 stepper motor.Step angle=360 ? (N Ph)=360/NPhN =Number of equivalent poles perPhphase = number of rotor polesPh=Number of 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 most commondrive 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)

For the following discussions pleaserefer to the figure 6.In Wave Drive 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

motors with the same winding param-eters this excitation mode would resultin the same mechanical position. Thedisadvantage of this drive mode is thatin the unipolar wound motor you areonly using 25% and in the bipolarmotor only 50% of the total motorwinding at any given time. Thismeans that you are not etting hemaximum torque output from themotor.

In Full Step Drive you are ener-gizing two phases at any given time.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. The torque output of theunipolar wound motor is lower thanthe bipolar motor (for motors with thesame winding parameters) since theunipolar motor uses only 50% of theavailable winding while 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 theother steps one phase on each stator.The stator is energized according

Torque vs Angle Characteristics The torque vs angle characteristics ofa stepper motor are the relationshipbetween the displacement of the rotorand the torque which applied to therotor shaft when the stepper motor isenergized at its rated voltage. An idealstepper motor has a sinusoidal torquevs displacement characteristic asshown in figure 8.Positions A and C represent stableequilibrium points when no externalforce or load is applied to the rotorshaft. When you apply an external to the motor shaft you inforce Taessence create an angulardisplacement, ? . This angularadisplacement, ? , is referred to as aalead or lag angle depending on wetherthe motor is actively accelerating ordecelerating. When the rotor stopswith an applied load it will come torest at the position defined by thisdisplacement angle. The motor, in opposition todevelops 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 is created and the rotorjumps over the unstable point to thenext stable point. The displacement angle is deter-mined by the following relationship:X = (Z ?2p) sin(T ?T )where:a hZ =rotor tooth pitch T =Load torquea T =Motors rated holding torqueh X=Displacement angle. Therefore if you have a problem with the step angle error of the loadedmotor at rest you can improve this by changing the

stiffness of the motor.This is done by increasing the holdingtorque 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 as a 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 a typical plot of thepositional accuracy of a stepper motor.Step Position Error The maximum positive or negativeposition error caused when the motorhas 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 and minimum but isusually expressed with a sign. Thatis: 1positional error = /2(?? - ?? ) Max Min

Hysteresis Positional ErrorThe values obtained measure-ment of positional errors in bothdirections.

from

the

Mechanical Parameters,Load, Friction, InertiaThe performance of a stepper motorsystem (driver and motor) is alsohighly dependent on the mechanicalparameters of the load. The load isdefined as what the motor drives. It istypically frictional, inertial or acombination of the two.Friction is the resistance to motiondue to the unevenness of surfaceswhich rub together. Friction isconstant 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 thetop speed, 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 high inertial starting torque and thesame would apply for braking. Increasing an inertial load will increasespeed stability, increase the amount 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 will vary with the amount offriction and inertia load. Because ofthis relationship unwanted rotor oscil-lations can be reduced by mechanicaldamping means however it is moreoften simpler to reduce theseunwanted oscillations by electricaldamping methods

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. These characteristics aredependent upon (change with) themotor, excitation mode and type ofdriver or drive method. A typicalspeed torque curve is shown infigure9.To get a better understanding ofthis curve it is useful to define thedifferent aspect of this curve.Holding torqueThe maximum torque produced bythe motor at standstill. Pull-In Curve The pull-in curve defines a area referedto as the start stop region. This is themaximum frequency at which themotor can start/stop instantaneously,with a load applied, without loss ofsynchronism. 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-in area 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.

The larger theload inertia the smaller the pull-inarea. We can see from 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 speeds the inductanceof the motor is the dominant circuitelement.

The shape of the speed - torquecurve can change quite dramaticallydepending on the type of driver used.The bipolar chopper type driverswhich Ericsson Components produceswill maximum the speed - torqueperformance from a given motor.

Mostmotor manufacturers provide thesespeed - torque curves for 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 given motor 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 one step 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 the first step pulse is applied.This step time is highly dependent onthe ratio of torque to inertia (load) aswell as the type of driver used.Since the torque is a function of thedisplacement it follows that the accel-eration will also be. Therefore, whenmoving in large step increments ahigh torque is developed andconsequently a high acceleration. Thiscan cause overshots and ringing asshown. The settling time T is the timeit takes these oscillations or ringing tocease. In certain applications thisphenomena can be undesirable. It ispossible to reduce or eliminate thisbehaviour by microstepping thestepper motor. For more informationon microstepping please consult themicrostepping note. Stepper motors can often exhibit aphenomena refered to as resonance atcertain 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 coincides 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 of a stepper motor comesfrom its basic construction and there-fore it is not possible to eliminate itcompletely. It is also dependent uponthe load conditions. It can be reducedby driving the motor in half or micro-stepping modes.

Stepper motors translate digital switching sequences into motion. They are used in printers, automated machine tools, 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. This pushes 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

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. At any 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.

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 lookup table 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 to waste 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 Drive are 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 can be done in the cable from the PC parallel port or microcontroller.

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 KP4M4001.

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 collapsing when 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-type connector is appropriate for the number of (parallel) control lines needed in the cable. Here's some example software for this setup
y y

One of my student groups used an enhanced version of this circuit for their Remote Control WebCam project. One of my individual students produced a microcontroller-driven version for his SMACK project. Read his report for more details.

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-Coil Excitation 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-andTilt Mount for a camera. The same technique is used by the (discontinued) UDN2544B (PDF) Quad Darlington Power 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.

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 One-Phase Half-Step Step-Inhibit L H L H L L H H

I used the following circuit (times two) for a third (different) controller board for my students.

With Pin 15 OUTPUT ENABLE tied to Ground (always enabled), four data lines are required 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 a minimum 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. This behaviour can be prevented by connecting a 10K pullup resistor between pin 11 and +5v.

The follo wi ng is the basic circuit that m akes the 8051 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

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 a diversity 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 manufactured by all the major companies,

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.

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-uponstart 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.

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

   

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

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.

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

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 high impedance. Therefore, to get positive logic (5V) at output, external "pull up" resistor needs to be added for connecting the pin to the positive pole.

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 has an 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 to consider which task should be assigned to which port. For example: if utilizing port as output with high level (5V), avoid using Port 0 as its pins cannot produce high logical level

without an additional resistor connected to +5V. If using other port to a same end, bear in mind that built-in resistors have relatively high values, producing the currents limited to few hundreds of amperes as pin output.

CIRCUIT DIAGRAM..

Price list of components used in the project


PRICE OF COMPONENT y y y y y y y 89c51 L.C.D 16x2 ULN 2003 IC 91214 IC 8870 BC 548 Rx DIODE 150/350/50/175/53/10/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/-

The soldering kit


1. Soldering iron: as soldering is a process of joining together two metallic parts, the instrument which is used for doing this job is known as soldering iron. Thus it is meant for melting the solder and to set up the metal parts being joined. Soldering iron is rated according to their wattage, which varies from 10-200 watts. 2. Solder: the raw material used for soldering is solder. It is composition of lead and tin. The good quality solder (a type of flexible naked wire) is 60% tin and 40% lead. Lead, which will melt between 180 degrees to 200 degrees temperature.

3. Flux or soldering paste: when the points to be soldered are heated, an oxide film forms. This must be removed at once so that solder may get to the surface of the metal parts. This is done by applying chemical substance called flux, which boils under 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 to be soldered is done by this common instrument.

5. Sand paper: the oxide formation may attack at the tip of your soldering iron and create the problem. To prevent this, clean the tip with the help of sand paper time to time or you may use blade 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 that excess heat is dissipated.

3. Make sure that connection to the soldered is clean. Wax frayed insulation 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 using enough 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 and bad soldering is just a few seconds extra with a hot iron applied firmly.

ADVANTAGES
Secure connection cannot be tempered easily. y Cheaper than copper. 8 y Faster data transfer rate 3x10 m/sec. y Higher Bandwidth. Cannot be degraded by rainwater
y

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%2Bsteppe r%2Bmotor www.geocities.com/ResearchTriangle/Lab/6584/motor_page.html

Вам также может понравиться