Silicon Laboratories Stepper Machine Bedienungsanleitung Seite 1

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Stepper Silicon Laboratories Stepper Machine herunter. AN155: Stepper Motor Reference Design Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 36
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
Rev. 1.1 7/08 Copyright © 2008 by Silicon Laboratories AN155
AN155
STEPPER MOTOR REFERENCE DESIGN
1. Introduction
Stepper motors are used in a wide variety of
applications. They are prevalent in consumer office
equipment such as printers, plotters, copiers, and
scanners. Stepper motors are also used in automotive
applications for electronic throttle control, dashboard
indicators, and climate control systems. Stepper motors
are also found in industrial equipment such as robotics,
electronic component handlers, testers, dispensers, and
other manufacturing equipment.
Stepper motors are often controlled using special
function ICs that provide limited control functionality.
Such ICs often employ a rudimentary step forward and
back interface to the microprocessor that limits system
performance. Other stepper motor systems are PC card
based and use a host PC to provide high performance
control.
In embedded systems it is much better to use a small
microcontroller to directly control the stepper motor. A
very small microcontroller such as the C8051F300 is
capable of providing a high performance motion control
solution. The microcontroller implements a linear-
velocity profile, generates the precise timing required,
and outputs the stepping pattern used to drive the
motor. The microcontroller directly drives the power
MOSFETs and no addition gate drive circuitry is
required.
The microcontroller also provides serial
communications for remote control and distributed
systems. This reference design uses a RS232 port
operating at 57600 bps. This demonstrates the
feasibility of using serial control. It is equally feasible to
use SMBus, I2C, RS485, or some more advanced
UART based network protocol. The C8051F300 is
housed in a very small form factor MLP11 package,
measuring only 3 mm square. The entire stepper motor
drive can easily be integrated onto the back of a small
stepper motor. A system with multiple motors may use a
single small microcontroller for each motor.
The C8051F300 is ideally suited for driving a stepper
motor. The small form factor lends itself to integrated
motor solutions. The on chip UART and SMBus provide
serial communication and control. The calibrated
internal oscillator eliminates the cost and pin-count of
using an external crystal, while providing an accurate
time base for high speed UART and precise motor
timing. The low-pin count package has enough pins to
drive the stepper motor and RS232 transceiver, with two
additional I/O pins left over for special functions.
This reference design demonstrates a high
performance stepper motor system using the
C8051F300. The reference design provides for both
stand-alone demo operation and UART control. The
reference design may also be used as a platform for
stepper motor code development using the C2D two-
wire on-chip debug and Flash programming interface.
The reference design is complete with schematic, bill of
materials, printed circuit board artwork, code flowcharts,
and source code. The software is also available for
download from the Silicon Laboratories web site.
2. Using the Stepper Motor
Reference Design
2.1. Quick Start
The recommended stepper motor listed in the Bill of
Materials is the GBM model number 42BYG205,
available from Jameco Electronics
®
. Connect the GBM
42BYG205 stepper motor to the stepper motor
reference design using the color code shown in Table 1.
Connect the 9 V DC power supply to the 2.1 mm power
connection on the stepper motor reference design. Plug
the power supply into 120 VAC power source. The LED
labeled “PWR” should illuminate.
Press the function switch labeled “FUNC”. The stepper
motor should turn four turns. The green status LED
labeled “STAT” should illuminate while the motor is
Table 1. GBM 42BYG205 Color Code
Color Name
red A+
yellow Acommon
blue A-
green B+
orange Bcommon
brown B-
Seitenansicht 0
1 2 3 4 5 6 ... 35 36

Inhaltsverzeichnis

Seite 1 - TEPPER MOTOR REFERENCE DESIGN

Rev. 1.1 7/08 Copyright © 2008 by Silicon Laboratories AN155AN155STEPPER MOTOR REFERENCE DESIGN1. IntroductionStepper motors are used in a wide varie

Seite 2 - 2.3. Command Line Operation

AN15510 Rev. 1.1regulator. The total worst-case VDD current draw for theboard is about 25 mA. This condition occurs when bothLEDS are on and the seria

Seite 3 - 3. Theory of Operation

AN155Rev. 1.1 115.2. User InterfaceThe primary user interface is an ASCII terminal with abaud rate of 57,600 bps. The main loop of the codeparses the

Seite 4 - 4 Rev. 1.1

AN15512 Rev. 1.1and set the doneFlag. The doneFlag is used as ahandshaking mechanism for the main loop to displaythe done message.If the motor state i

Seite 5 - 3.4. Stepping Patterns

AN155Rev. 1.1 13APPENDIX A - SCHEMATIC

Seite 6 - 3.5. Stepping Algorithm

AN15514 Rev. 1.1APPENDIX B - BILL OF MATERIALSQty Designator Description Value pkg mfr PN Manufacturer1 C1 electrolytic capacitor 470 u EEU-FC1E471 Pa

Seite 7 - 3.6. Common Mistakes

AN155Rev. 1.1 15APPENDIX C - PCB ARTWORKFigure C1. Silk LayerFigure C2. Top Layer

Seite 8 - ±2% at test. This is

AN15516 Rev. 1.1rFigure C3. Bottom LayeFigure C4. Top Solder Mask

Seite 9 - 4.3. Voltage Regulator

AN155Rev. 1.1 17Figure C5. Bottom Solder Mask

Seite 10 - 5. Software Design

AN15518 Rev. 1.1APPENDIX D - CODE FLOWCHARTSFigure D1. Main LoopmainInit SYSCLK.Init Port.Init Timer.Init UART.Init motorvariables.Enable Interrupts.m

Seite 11 - 5.4. Timer ISR

AN155Rev. 1.1 19Figure D2. Move (Profiler)movetarget =position?target >position?set forward flag.calculate length.clear forward flag.calculate leng

Seite 12 - 6. References

AN1552 Rev. 1.1turning. Press the function switch again. The motor willrotate four turns the other direction.It the LED does not illuminate, check the

Seite 13 - APPENDIX A - SCHEMATIC

AN15520 Rev. 1.1Figure D3. Timer ISRTimer_ISRforward ?increment StepIndex.increment position.done ?get value from table.multiply by Tzero.write value

Seite 14 - PPENDIX B - BILL OF MATERIALS

AN155Rev. 1.1 21Figure D4. UART ISRUART_ISRreceiverinterrupt flagset?receive bufferfull?clear receiver flag.read SBUF sfr.put into readBuffer.Incremen

Seite 15 - APPENDIX C - PCB ARTWORK

AN15522 Rev. 1.1APPENDIX E - CODE LISTING//-----------------------------------------------------------------------------// Stepper.c//----------------

Seite 16 - Figure C4. Top Solder Mask

AN155Rev. 1.1 23// stepper motor linear velocity profile// 255 * [sqrt(n+1)-sqrt(n)]// n = 0 to 255//const unsigned char code StepTable[256]={ 0xFF,

Seite 17 - Figure C5. Bottom Solder Mask

AN15524 Rev. 1.1//// BUFFERED UART FUNCTION PROTOTYPES//--Top Level - User Functions ------------------------------------------------// put a string

Seite 18 - APPENDIX D - CODE FLOWCHARTS

AN155Rev. 1.1 25unsigned char Tzero; // initial period, sqrt(2/alpha)unsigned char PatternIndex; // index for step patter

Seite 19 - Figure D2. Move (Profiler)

AN15526 Rev. 1.1 theChar = getc(); // get character to be parsed switch(theChar) // parse character

Seite 20 - Figure D3. Timer ISR

AN155Rev. 1.1 27// PORT_Init//-----------------------------------------------------------------------------//// Configure the Crossbar and GPIO ports.

Seite 21 - Figure D4. UART ISR

AN15528 Rev. 1.1 putc('>');}//-----------------------------------------------------------------------------void delay (void)

Seite 22 - APPENDIX E - CODE LISTING

AN155Rev. 1.1 29 { if (target > Position) { Forward = 1; // set forward flag length = target - Positio

Seite 23

AN155Rev. 1.1 3integer. The range is 0 to 255. If you enter 256 it will beinterpreted as a zero. The number 257 will beinterpreted as a one. Entering

Seite 24

AN15530 Rev. 1.1 PatternIndex &= 0x07; // fix modulus 8 counter Position--; // increment Position }

Seite 25

AN155Rev. 1.1 31 putc(*string); // put character at pointer in buffer string++; // increment pointe

Seite 26

AN15532 Rev. 1.1 } return i; // return uchar value}//-------------------------------------------------------------------

Seite 27

AN155Rev. 1.1 33// readc()//// The readc() function is the lowest level function which provides// direct access to the read buffer. It reads one chara

Seite 28

AN15534 Rev. 1.1}//-----------------------------------------------------------------------------void uartISR(void) interrupt 4 // main UART in

Seite 29 - udblbyte time;

AN155Rev. 1.1 357. Notes:

Seite 30 - // calculate new time

AN15536 Rev. 1.1CONTACT INFORMATIONSilicon Laboratories Inc.400 West Cesar ChavezAustin, TX 78701Tel: 1+(512) 416-8500Fax: 1+(512) 416-9669Toll Free:

Seite 31

AN1554 Rev. 1.1voltage. A clamped unipolar drive circuit is shown in Figure 2.When Q1 is turned on, current will flow from the +12Vsupply, through the

Seite 32

AN155Rev. 1.1 5The performance differences between unipolar andbipolar drives are subtle. The unipolar drive only useshalf of the actual motor winding

Seite 33

AN1556 Rev. 1.1Four of these states only have one transistor on at anyone time. The half-step pattern allows a positioningaccuracy of 0.9° for a 1.8°

Seite 34

AN155Rev. 1.1 7Solving Equation 3 for time gives the results shown inEquation 4. This is the absolute time required to providea linear acceleration pr

Seite 35 - 7. Notes:

AN1558 Rev. 1.1In contrast the linear-acceleration profile is much morecomplex. A single fixed table cannot be used. The initialconditions of each acc

Seite 36 - CONTACT INFORMATION

AN155Rev. 1.1 9swapped during the layout phase for optimum routing tothe MOSFET gates. The stepping pattern has beenchanged accordingly. The port outp

Kommentare zu diesen Handbüchern

Keine Kommentare