ST EPPER MOTOR CONTRO L USIN G 89C51 MICROCONTRO LLER
#1

Here’s a stepper motor controllerbased on 89C51 microcontroller tocontrol the rotation of a DC steppermotor in clockwise and anti-clockwisedirections. The controller is simple andeasy-to-construct, and can be used in manyapplications including machine control androbotics for controlling the axial rotation inXY plane. A similar circuit can be added tocontrol the rotation of the motor in eitherXZ or YZ plane.Fig. 1 shows the block diagram of thestepper motor control system. The powersupply section (in Fig. 2) consists of a stepdowntransformer (7.5V AC, 1A), bridgerectifier (comprising diodes D1 throughD4), filter capacitors (C1 and C2) andregulator IC 7805.We have used here an Atmel makelow-power, high-performance, 8-bit CMOSmicrocontroller AT89C51 with 4 kB of Flashprogrammable and erasable read-onlymemory (PEROM). It has a 128x8-bit internalRAM, 32 programmable input/output(I/O) lines and two 16-bit timer/counters.The on-chip Flash allows the programmemory to be reprogrammed in-systemor by a conventional non-volatile memoryprogrammer. By combining a versatile 8-bit CPUwith Flash on a monolithic chip, AtmelAT89C51 is a powerful, highly flexible andcost-effective solution to many embeddedcontrol applications. From traffic controlequipment to input devices, computernetworking products and stepper motorcontrollers, 89C51 microcontrollers delivera high performance with a choice of configurationsand options matched to thespecific needs of each application.IC AT89C51 features:1. 8-bit CPU with math registers Aand B2. 16-bit program counter (PC) anddata pointer (DPTR)3. 8-bit program status word (PSW)4. 8-bit stack pointer (SP)The control switches for the motor areconnected to Reset and Port P0.7 pins of themicrocontroller.
Circuit description
When powersupply switch S1 is closed, LED1 glowsto indicate the presence of power in thecircuit. Capacitor C3 connected to pin 9(RST) provides the power-on reset to themicrocontroller.The stepper motoris connected to portpins P2.4 throughP2.7 of the microcontroller(IC2) throughthe motor -dr ivercircuit consisting offour Darlington pairscomprising transistorsBC548 and SL100(T1-T2, T3-T4, T5-T6and T7-T8). Coils1 through 4 are the stepper motor coils.When transistors conduct, 5V (Vcc) isapplied to the coils and the currents flowingthrough them create magnetic fieldsand the motor starts rotating. The magneticfield energy thus created is stored in thecoils.When transistors stop conducting,power to the coils is cut off, the magneticfield collapses and a reverse voltage (calledinductive kickback or back emf) is generatedin the coils. The back emf can bemore than 100 volts. The diodes connectedacross the coils absorb the reverse voltagespike. This voltage, if not absorbed by thediodes, may produce opposite torque andcause improper rotation of the motor andalso damage the transistors. You can usevirtually any type of rectifier or switchingdiodes of appropriate current and reversevoltage breakdown rating.Clock and reset circuit. Two 33pFcapacitors (C4 and C5) are connected topins 18 and 19 of the microcontroller,respectively, with an 11.059MHz piezoelectriccrystal (XTAL1) across them. The clock frequency of the microcontrollerdepends on the frequency of the crystaloscillator used. Typically, the maximumand minimum frequencies are 1 MHz and16 MHz, respectively, so we should use apiezoelectric crystal with a frequency inthis range. The speed of the stepper motoris proportional to the frequency of the inputpulses or it is inversely proportional tothe time delay between pulses, which canbe achieved through software by makinguse of instruction execution time.The time taken by any instruction toget executed can be computed as follows:where ‘C’ is the number of cycles an instructiontakes to execute and ‘F’ is thecrystal frequency.The crystal frequency in this circuitis 11.059 MHz, so the time taken toexecute, say, ADD A, R1 (single-cycleinstruction), is about one microsecond(μs). Use of a 6MHz crystal will bringdown the instruction execution speed toto 2 μs.When power is applied, the reset inputmust first go high and then low. A resistorcapacitorcombination (R1-C3) is used toachieve this until the capacitor begins tocharge. At a threshold of about 2.5V, thereset input reaches a low level and the microcontrollerbegins to function normally.Reset switch (S2) allows you to reset theprogram without having to interrupt thepower.One major feature of 89C51 microcontrolleris the versatility built into the I/Ocircuits that connect the microcontroller tothe outside world. Ports P0 through P3 ofthe microcontroller are not capable of drivingloads that require tens of milliamperes(mA). Logic level current, voltage andpower requirement for different versions ofmicrocontrollers are given in Table I.Driver circuit design. The microcontrolleroutputs a current of 1.7 mA. Todrive the coil of a stepper motor requiringa torque of 7 kg-cm, 12V DC and 2amp/phase, we have to use a driver circuitthat amplifies the current from 1.7 mA to3 amp.As mentioned earlier, we have usedBC548 and SL100 as the driver transistorsfor driving a low-power rated steppermotor such as the one used in earlier14cm (5.5-inch) floppy drives. But for a7 kg-cm stepper motor, a driver circuit usingtransistors SL100 and 2N3055 wouldbe needed to amplify the current to 2.72amp. Typically, SL100 and 2N3055 each has a gain (hfe) of 40, but 2N3055 canhandle larger current since it belongsto the family of power transistors. So aheat-sink is required to dissipate the heatgenerated.The output gain of the Darlington pairof SL100 and 2N3055 transistors is:AVo = AV1 × AV2= 40×40= 1600AVo = Io/Iin = 1600where Io is the output current and Iin isthe input current of the Darlington pair.Io = 1600×1.7 mA Since the stepper motor has four coils,we need to use four Darlington pairs.
Programming
The program is written in Assembly languageand compiled using ASM51 crossassembler.The listing file is given at theend of this article. 89C51 microcontrolleris programmed using Atmel’s Flash programmer.One-step rotation of the stepper motorused in this project equals 1.8o. When youprogram the motor for 200 steps, the motormakes one complete revolution, i.e. 360o.In the program, the line ‘MOV R7, #0CAH defines the rotation by 202 steps. Thehex number ‘0CAH’ equals the decimalnumber ‘202.’ However, one can changethe number of steps in the program as perone’s requirement.The step sequence is defined by theline ‘MOV A, #033H.’ Table II shows thestep sequence for 100 steps to energise thewindings of the stepper motor in clockwiseand anti-clockwise directions. The rotor ofthe stepper motor is in a position of minimumreluctance and maximum flux. Thusby energising the windings (representedby A1, A2, B1 and B2), the rotor takesthe position accordingly. In the program,the instructions ‘RR A’ and ‘RL A’ areused for clockwise and anti-clockwise,


download full report
http://kitsnsparesadmin/pdffiles/Stepper%20Motor%20Control%20using%20Microcontroller.pdf
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: microcontroller based security system usin, 66kv relay contro ppt, lcd interface with 89c51, carrito seguidor de linea 89c51, karmasangtan epper, rpm control of induction motar usin microcontroller, at cmgw example 89c51,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Ultrasonic Motor computer science crazy 3 3,775 20-03-2013, 12:59 PM
Last Post: computer topic
  GSM (SMS) Controlled DC Motor seminar class 2 3,191 03-03-2012, 12:00 PM
Last Post: seminar paper
  switched reluctance motor full report project report tiger 3 5,462 29-02-2012, 10:17 AM
Last Post: seminar paper
  SPEED CONTROL OF DC MOTOR USING PULSE-WIDTH MODULATION seminar class 1 2,448 09-02-2012, 04:29 PM
Last Post: seminar paper
  Simulation of six-step inverter induction motor drive seminar class 1 2,464 08-02-2012, 10:09 AM
Last Post: seminar addict
  SPEED CONTROL OF THREE PHASE INDUCTION MOTOR USING DSPIC30F4011 seminar class 6 5,073 12-11-2011, 09:20 AM
Last Post: seminar addict
  MICROSTEPPING STEPPER MOTOR DRIVE USING PEAK DETECTING CURRENT CONTROL seminar class 0 1,456 05-05-2011, 09:57 AM
Last Post: seminar class
  Ultrasonic Sensor Based DC Motor Control Using LabVIEW seminar class 0 3,749 07-03-2011, 11:56 AM
Last Post: seminar class

Forum Jump: