using the stellaris® lm3s615 and lm3s316 microcontrollers...

28
AN01246-00 Copyright © 2007 Luminary Micro, Inc. Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine APPLICATION NOTE

Upload: trandiep

Post on 01-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

AN01246-00 Copyr ight © 2007 Luminary Micro, Inc.

Using the Stellaris® LM3S615and LM3S316 Microcontrollers to

Control a CNC MachineAPPLICATION NOTE

Page 2: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

January 30, 2007 2

Legal Disclaimers and Trademark InformationINFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH LUMINARY MICRO PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN LUMINARY MICRO’S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, LUMINARY MICRO ASSUMES NO LIABILITY WHATSOEVER, AND LUMINARY MICRO DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF LUMINARY MICRO’S PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. LUMINARY MICRO’S PRODUCTS ARE NOT INTENDED FOR USE IN MEDICAL, LIFE SAVING, OR LIFE-SUSTAINING APPLICATIONS.

Luminary Micro may make changes to specifications and product descriptions at any time, without notice. Contact your local Luminary Micro sales office or your distributor to obtain the latest specifications before placing your product order.

Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Luminary Micro reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.

Copyright © 2007 Luminary Micro, Inc. All rights reserved. Stellaris is a registered trademark and the Luminary Micro logo is a trademark of Luminary Micro, Inc. or its subsidiaries in the United States and other countries. ARM and Thumb are registered trademarks, and Cortex is a trademark of ARM Limited. Other names and brands may be claimed as the property of others.

Luminary Micro, Inc.108 Wild Basin, Suite 350Austin, TX 78746Main: +1-512-279-8800Fax: +1-512-279-8879http://www.luminarymicro.com

Page 3: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

January 30, 2007 3

Table of ContentsIntroduction ......................................................................................................................................................... 4Features.............................................................................................................................................................. 4Block Diagram .................................................................................................................................................... 4CNC Machine Description .................................................................................................................................. 6

Mechanical Design.......................................................................................................................................... 6Stepper Motors ............................................................................................................................................... 7Control Electronics.......................................................................................................................................... 8User Interface Electronics............................................................................................................................. 10Software Description..................................................................................................................................... 10Development Tools ....................................................................................................................................... 11

Future Enhancements ...................................................................................................................................... 11Interfaces .......................................................................................................................................................... 11Component Placement ..................................................................................................................................... 12Bill of Materials ................................................................................................................................................. 14Schematics ....................................................................................................................................................... 17Conclusion ........................................................................................................................................................ 18References ....................................................................................................................................................... 18

Page 4: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

IntroductionComputer Numerical Control (CNC) milling machines are undoubtedly the ultimate workshop tool. They transform blank work pieces into precise shapes using a series of computer controlled cutting operations. With the correct tool and speed selection, almost any material is a candidate for cutting, routing, engraving, drilling, or smoothing. Common CNC machine applications include tool-making, printed circuit board (PCB) manufacture, and sign-making.

Unfortunately, these capabilities come with a heavy price tag that places CNC milling machines beyond the budget of most home workshops. Not to be deterred, some hobbyists and small businesses have designed and built their own machines—establishing the perfect challenge for the avid hobbyist. Many do-it-yourself machine designs have impressive specifications and capabilities. Resolution and tolerances are often better than a few thousands of an inch, and building a CNC machine allows the designer to adapt the design to suit a specific cutting tool or end application.

The Luminary Micro CNC machine combines mechanics built from a set of purchased plans with a custom control board and software. The Luminary CNC machine features the Stellaris ARM® Cortex™-M3-based microcontroller. In addition to on-chip motor-control-related peripherals, Stellaris microcontrollers have significant processing capabilities—thanks to a Cortex™-M3 microprocessor. This ability allows the CNC machine to operate autonomously, without a host PC.

FeaturesThe three-axis mill supports several tool attachments for machining and marking a variety of materials. An LCD-based user interface allows the operator to run and modify pre-defined milling programs. A USB interface connects to a PC for downloading additional or complex milling programs and real-time monitoring of machine activity. Although operational speed is not important with hobbyist CNC machines, we decided that our implementation should be able to quickly complete simple milling jobs. This was a consideration in the design of the electronics and implementation of the mechanical design. The CNC machine has the following features:

Self-contained CNC machine

Large three-dimensional workspace

LCD touch panel interface

Interchangeable tools

Demo mode engraves custom nameplates and the Luminary Micro logo

RS232 and USB links for optional file transfer from a PC

Block DiagramFigure 1 shows the block diagram for the CNC machine.

January 30, 2007 4

Page 5: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

Figure 1. CNC Machine Block Diagram

text

LM3S615

Microcontroller

LM3S316

Microcontroller

1MB Serial

Data Flash

(optional)

USB to

Serial

Device

RS232 Line

Transceiver

3.3V

Power

Supply

12V

Power

Supply

X Axis Stepper

Motor

Y Axis Stepper

Motor

Z Axis Stepper

Motor

Limit Switches

(x6)

Emergency

Shutdown Switch

Tool Power

Control RelayRelay Driver

MOSFET

H-bridge

(x2)

MOSFET

H-bridge

(x2)

MOSFET

H-bridge

(x2)

High and

Low Side

Gate

Drivers

High and

Low Side

Gate

Drivers

High and

Low Side

Gate

Drivers

QVGA

LCD Touch Panel

Luminary Microo CNC Control Board

24V 3A Supply

SWD/JTAG

SWD

+3.3V+12V

SPI (touch data)Parallel

SPI

USB

RS232

Speaker

Ba

cklig

ht

Pw

r

I2C

January 30, 2007 5

Page 6: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

CNC Machine DescriptionThis section describes the CNC machine including the mechanical design, stepper motors, control electronics, user interface electronics, software description, and development tools. Figure 2 shows the completed CNC machine.

Figure 2. Luminary Micro’s CNC Machine with LCD Touch Panel

Mechanical DesignThe CNC machine was constructed from a set of plans by David Steele (see Figure 3). These can be purchased from www.solsylva.com. The design uses stepper motors and a lead-screw arrangement to provide motion on each of three axes. Apart from the motors and timing belt components, all mechanical parts are readily available from home-improvement stores.

Construction went fairly smoothly, but a few design changes were made as assembly progressed. The first item was to redesign the timing belt tensioner system so that the belt could not slip out of position. A more drastic change was to replace the standard all-thread lead-screws with precision acme-threaded rods. This yielded a 4x increase in traverse speed and satisfied our original design objective. The 3/8 inch acme rod has two thread starts and eight threads/inch so four revolutions move the nut exactly 1 inch. Acme lead-screws are readily available from engineering material suppliers and specialty motion control sources.

January 30, 2007 6

Page 7: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

Figure 3. CNC Machine by David Steele

Stepper MotorsThe plans for the CNC machine accommodate NEMA23 size stepper motors. Our implementation uses three bipolar stepper motors from Stepper3 (www.stepper3.com). This class of motor is commonly used in automation applications and has significantly higher torque (260 oz-in) and smaller step angle (1.8°) than standard unipolar stepper motors.

Table 1 shows the stepper motor specifications.

The step rate needed to achieve a certain traverse speed can be calculated as follows:

Step Rate = Speed * Turns per inch * 360 / Step Angle

So, a transverse speed of 2 inches/second requires 1600 steps/second. Resolution calculates out to 0.00125 inches/step—more than adequate for most applications.

Table 1. Stepper Motor Specifications

Item Detail

Part Number S23HT260-S

Configuration Bipolar

Step Angle 1.8º/step

Starting torque 260 oz-in

Rated Voltage 3.2 Vdc

Phase Current 2.8A/phase

Winding Resistance 1.13 Ω

Body Length 3.0 inches

January 30, 2007 7

Page 8: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

Control ElectronicsThe CNC Machine is controlled by a single circuit board containing processing, monitoring, power electronics, and user interface circuitry. In order to provide a clean separation of functions, two Stellaris microcontrollers were used in the design as shown in Figure 4 on page 8. The first device is the LM3S615 microcontroller which handles all motor-control-related tasks. The second device, the LM3S316 microcontroller, manages the user interface—in this case a QVGA touch panel.

Figure 4. Control Board Featuring Stellaris LM3S615 and LM3S316 Microcontrollers

The largest block in the control electronics is the 3-channel stepper motor control circuit. Each motor has two coils, each of which must be driven by a full H-bridge. The LM3S615 microcontroller’s advanced PWM block generates 6 independent PWM signals; one to each H-bridge.

Chopper control is used to give stepping rates much greater than the 100 step/sec limit for simple control methods. Chopper control uses a supply voltage much higher than the motor’s rated voltage to increase the rate at which the current rises in the active coil. Six pulse-width modulated (PWM) outputs from the main Stellaris microcontroller each control the current into a coil. The PWM duty cycle is adjusted while the coil is energized to keep the current close to, but not in excess of, the motor’s rated current. This control technique yields optimal torque speed performance.

Each stepper motor axis uses dual H-bridges, requiring a total of eight MOSFETs. By selecting small SO-8 packages, each containing two N-channel MOSFETS, the space required for the MOSFETs is minimized. There are no thermal issues thanks to the low 0.040Ω Rds(on) characteristic of the Fairchild FDS6930 devices.

Two high-side/low-side gate drivers control each H-bridge. The Fairchild FAN7380 devices use a flying-capacitor circuit to bootstrap the supply for the high-side gate control. They also have integral dead-time control to prevent cross-conduction during switching.

January 30, 2007 8

Page 9: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

The control sequence for full-step operation is shown in Table 2.

Operator safety is an important consideration. Each MOSFET gate control circuit is AND-ed to a common enable signal. A normally-closed panic switch, mounted on the machine, can shut down the stepper motors without microprocessor intervention if necessary.

Limit switches on each axis serve two functions. The first is to provide a reference point at which the CNC machine can automatically zero its coordinate counters. The second is to prevent self-destruction – a likely scenario given the considerable forces that can be exerted by a lead-screw arrangement. Each axis has two limit switches that are connected to a single GPIO via a simple RC circuit. The limit switches are distinguished by measuring the time to charge the capacitor in the RC circuit. See Figure 5 for details of the limit switch wiring.

Figure 5. Limit Switch Multiplexing

Supply voltage sensing capability allows the main microcontroller to adjust the PWM depth at low step rates, based on the ratio between the supply voltage and the motor’s rated voltage. A 21:1 resistor divider was selected to give a full-scale range of 63 Vdc.

High-side current sensing allows the microcontroller to monitor total motor current (for all motors). Full-scale current is 15 A with a 0.01Ω sense resistor and a sense amplifier with a gain of 20.

Each motor has a common low-side current sense resistor. The signal is fed through a low-pass filter and into the inverting input of the LM3S615 microcontroller’s internal comparator. The comparator

Table 2. Full-Step Operation Control Sequence

Stepa

a. Each step moves the rotor 1.8º.

A1 A2 B1 B2 PWM_MnA PWM_MnB POL_MnA POL_MnB

1 +b

b. + and – indicate the relative voltage potential on the motor coils.

-b + - PWM PWM LOW LOW

2 - + + - PWM PWM HIGH LOW

3 - + - + PWM PWM HIGH HIGH

4 + - - + PWM PWM LOW HIGH

5 + - + - PWM PWM LOW LOW

R1 1K

0.01UF

C6

+3.3 V

SW1

Limit Switch

SW2

Limit Switch R2 2K

LM3S615

GPIO

Vgpio TimeSW2SW1

January 30, 2007 9

Page 10: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

reference (non-inverting input) threshold is set to the current trip point. This can either be set using the internal programmable reference, or an external resistor divider (if internal reference cannot hit the required level). This circuit can provide over-current protection.

A regulated 24 V 3 A source is required to power the CNC machine. Two buck converters take the 24 V supply and generate 12 V and 3 V supply rails for the electronics.

An external communications link is jumper selectable between a standard RS232 port and a USB port. The USB interface uses an FT232RL device from FTDI which appears as a virtual COM port when connected to a PC.

User Interface ElectronicsThe CNC machine’s user interface consists of a QVGA (320 x 240 resolution) LCD touch panel. The LCD has an internal frame buffer and controller which connect with an 8-bit parallel interface to the LM3S316 microcontroller. The LCD does not have built-in character memory or fonts, so all text is generated by the microcontroller using bitmaps stored in on-chip flash memory.

The LCD module has an integrated resistive touch panel with a convenient Serial Peripheral Interface (SPI) bus. The LM3S316 microcontroller takes the raw touch data, calculates coordinates, handles debouncing, and manages touch zones.

The LCD is backlit with a string of white LEDs which are controlled with a MOSFET switch from a single GPIO line. A simple 1Ω series resistor sets the backlight current at 140 mA.

An LM3S316 microcontroller PWM output connects to a small piezo sounder to generate audible feedback when the screen is touched.

An I2C bus connects the user interface microcontroller to the main microcontroller and needs only two pins from each device.

Software DescriptionThe software for the CNC machine is divided into two self-contained applications; one that runs on the user interface microcontroller (LM3S316), and one that runs on the main microcontroller (LM3S615). Each application is separately developed, built, and debugged.

The user interface microcontroller provides a virtual keyboard on the LCD. This keyboard allows entry of text, selection of the demonstration to perform, and selection of the tool in use (pen or router). The code on the user interface microcontroller uses approximately 16 KB of flash memory, 0.5 KB of SRAM, and 0.5 KB of stack.

The main microcontroller application drives the stepper motors on the machine, handles input from the various switches (limit and panic), and receives commands from the user interface microcontroller via its I2C slave interface. The code on the main microcontroller uses approximately 26 KB of flash memory (10.5 KB of which is vector image data and 3 KB of which is the vector font), 0.75 KB of SRAM, and 0.5 KB of stack.

The various demos work by machining or drawing a sequence of lines. A derivative of the Hershey simplex vector font is used for drawing text; vectorized graphics are used for the remainder of the drawings. Because of the use of vectorized drawing methods, all text and images can be drawn at

January 30, 2007 10

Page 11: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

any size desired (within the physical constraints of the machine's capability); the only drawback is the fact that the vector nature of the source can become more apparent at larger sizes.

Development ToolsThe source for the CNC control board can be built using GCC and debugged using GDB. There are separate projects for the main motor control microcontroller and the user interface microcontroller. Luminary Micro’s EKK-LM3S811 Evaluation Kit provides a debugger interface using serial wire debug (SWD). SWD was chosen over JTAG to free additional GPIO pins.

Future EnhancementsThe 30 V MOSFETs are satisfactory for operating stepper motors at up to 24 Vdc. To increase the maximum step rate, the motor supply voltage could be raised to 36 Vdc. This would require 60 V MOSFETs. Changing the MOSFETs requires a change in the gate drive circuit, because the FDS6930 MOSFETs used in the design are low gate capacitance types. The recommended MOSFET for 60V operation is Zetex ZXN6A090. A minor schematic and layout change is necessary to accommodate the International Rectifier IR2183S gate drivers. This combination has been tested and shown to give excellent electrical performance.

Presently, software supports autonomous operation, but the source code could easily be extended to accept G-code from PC-based CNC software.

InterfacesThis section shows the connector pin assignments for the CNC machine. Figure 6 on page 11 shows the control connector pin assignment. Figure 7 on page 12 shows the motor connector pin assignment. Figure 8 on page 12 shows the power connector pin assignment.

Figure 6. Control Connector Pin Assignments

GN

D

+12V

VMO

TOR

PAN

IC

+3.3

V

GN

D

GN

D

GN

D

GN

D

20 2

19 1

TOO

L O

UT

ALI

VE

PAN

IC

Z LI

MIT

Y L

IMIT

X L

IMIT

January 30, 2007 11

Page 12: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

Figure 7. Motor Connector Pin Assignments

Figure 8. Power Connector Pin Assignments

Component PlacementFigure 9 on page 13 shows the component placement for the CNC machine.

MO

TOR

Z B

2

MO

TOTZ

A2

GN

D

MO

TOR

Y B

1

MO

TOR

Y A

1

MO

TOR

X B

2

MO

TOR

X A

2

14 2

13 1

MO

TOR

Z B

1

MO

TOR

Z A

1

MO

TOR

Y B

2

MO

TOR

Y A

2

GN

D

MO

TOR

X B

1

MO

TOR

X A

1

GN

D

+24V

IN

4 2

3 1

GN

D

+24V

IN

January 30, 2007 12

Page 13: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

Figure 9. CNC Machine Component Placement Diagram

January 30, 2007 13

Page 14: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

Bill of MaterialsTable 3 shows the bill of materials (BOM) for the CNC machine.

Table 3. CNC Machine BOM

Item Designator Qty Part Number Description Manufacturer

1 BZ1 1 PKM13EPY-4000 Piezo Sounder, 12mm Murata

2 C4, C5, C10, C11, C14, C16, C18, C19, C22, C23, C24, C25, C26, C29, C32, C33, C34, C35, C36, C38, C39, C42, C43, C44, C45, C46, C47, C48, C51, C52, C55, C56, C59, C60, C63, C64, C67, C68, C76, C77, C78, C79, C80

43 C0805C104M5RAC7800 Capacitor 0.1uF 0805 50V X7R 20%

Kemet

3 C40, C41 0 Capacitor, Do Not Populate

4 C20, C21, C30, C31

4 80-C0805C180J5G Capacitor 18pF 0805 NPO 5-v 5%

Kemet

5 C1, C2, C3, C6-9, C12, C15, C71

10 C0805C103K5RAC7800 Capacitor, 0.01uF 0805 50V X7R 20%

6 C13, C17 2 T491B106K020 Capacitor 10uF Tantalum Size B 20V 10%

Kemet

7 C72, C73, C74, C75

4 MV50VC101M10X10TP Capacitor, 100uF 50V Electro 10x10mm SMT

UCC

8 C27, C28, C37, C49, C50, C53, C54, C57, C58, C61, C62, C65, C66, C69, C70

15 C0805C105K4RACTU Capacitor 1uF 16V 10% X7R 0805

Kemet

9 D1, D2, D18 3 SS26 Diode Schottky 60V 2A Fairchild

10 D3, D4, D5 3 SML-LX1206GC-TR LED 1206 Green Lumex

11 D6, D7, D8, D9, D10, D11, D12, D13, D14, D15, D16, D17, D19, D20

14 CD0805-S0180 Diode 80V 100mA Fast 0603 Bourns

12 F1a 1 BK/GMA-5A Fuse, 5A 5x20mm Fast Bussmann

13 F1b 1 6490000 Fuse Holder 5x20mm Wickmann

January 30, 2007 14

Page 15: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

14 J1 1 FH12-26S-1SH SMT Flex Connector 26way 1mm pitch bottom contact

Hirose

15 J2 1 KMBX-SMT-5S-S-30TR Connector USB Mini B 5-pin Kycon

16 J3, J4 0 852-10-010-10-001000 Header 0.050" 2x10Do not fit for production (debug headers)

Samtec

17 J5 1 1-1586041-4 Header, 14 pos 4.20mm PE Series Right Angle

AMP

18 J6 1 1586041-4 Header, 4 pos 4.20mm PE Series Right Angle

AMP

19 J7 1 2-1586041-0 Header, 20 pos 4.20mm PE Series Right Angle

AMP

20 JP1, JP2 2 TSW-103-07-G-S Header, 3 pos SIL Sullins

21 L1, L2 2 SWS-3.00-77 Inductor 77uH 3A 150kHz SMD Telema

22 J8 1 22-23-2041 Header, 4-Pin KK Series Header Molex

23 P11 1 747840-4 Connector, DB9 Male Amp

24 Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10, Q11, Q12, Q13, Q14

14 FDS6930A Dual N-Channel N-CH MOSFET 30V 5.5A

Fairchild

25 R1, R3, R5, R9, R10, R13, R17, R38, R47, R49, R50, R54, R55, R56, R57, R58, R97, R99, R100, R101

20 Resistor 10K 5% 0805 Generic

26 R2, R4, R6 3 Resistor 0.1 Ohm 2W 2512 1% IRC

27 R7, R12 2 Resistor 27 Ohms 5% 0805 Generic

28 R8, R26, R28, R35, R95, R103

6 Resistor 1.0K 1% 0805 Generic

Table 3. CNC Machine BOM (Continued)

Item Designator Qty Part Number Description Manufacturer

January 30, 2007 15

Page 16: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

29 R11, R59, R60, R61, R62, R63, R64, R65, R66, R67, R68, R69, R70, R71, R72, R73, R74, R75, R76, R77, R78, R79, R80, R81, R82, R83, R84, R85, R86, R87, R88, R89, R90, R91, R92, R93, R94

37 Resistor 10 Ohms 5% 0805 Generic

30 R22, R30 2 Resistor 169K 1% 0805 Generic

31 R23, R31 2 Resistor 105K 1% 0805 Generic

32 R48 1 Resistor 1 Ohm 0805 Generic

33 R25 1 Resistor 3.74K 1% 0805 Generic

34 R27 1 Resistor 2.4K 1% 0805 Generic

35 R29 1 Resistor 150 5% 0805 Generic

36 R32 1 Resistor 360 Ohms 1% 0805 Generic

37 R33 1 LRC-LRF2512-01-R010-F Resistor 0.01 Ohms 2W 2512 Generic

38 R34 1 Resistor 20K 1% 0805 Generic

39 R36, R37 2 Resistor 2.7K 5% 0805 Generic

40 R18, R19, R20, R21, R24, R96

6 Resistor 0 Ohms 0805 Generic

41 R14-16, R39-44, R45, R53

0 Resistor 0805 OMIT Generic

42 R46 0 Resistor 2512 OMIT Generic

43 R51 1 TC33X-2-103E Trimpot 10K 3mm SMD Cermet Bourns

44 R52, R98 2 Resistor 4.7K 5% 0805 Generic

45 R102, R104, R105, R106, R107, R108, R109

7 Resistor 100K Ohms 5% 0805 Generic

46 SW1 1 SW-B3S-1000 Switch, Tact 6mm SMT Omron

47 U1, U2 2 LM25007SD 42V, 0.5A Step-Down Switching Regulator

National

48 U3 1 MAX4080TAUA 76V High-Side Current Sense Amp with Voltage Output

Maxim

Table 3. CNC Machine BOM (Continued)

Item Designator Qty Part Number Description Manufacturer

January 30, 2007 16

Page 17: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

SchematicsThe figures starting on page 19 through page 28 provide the schematics for the CNC machine:

“Main Contents Page” on page 19

“Primary Microcontroller” on page 20

“User Interface Microcontroller and LCD Panel” on page 21

“Switch, Tool Control, and Audio” on page 22

“USB and Serial Interfaces” on page 23

“X-Axis MOSFET Drivers” on page 24

“Y-Axis MOSFET Drivers” on page 25

49 U4 1 SST25VF080 SST Serial Data Flash 8Mbit SO-8 20MHz

SST

50 U5 1 LM3S615-CQN IC, LM3S615 ARM Microcontroller TQFP48

Luminary Micro

51 U6 1 LM3S316-CQN IC, LM3S316 ARM Microcontroller TQFP48

Luminary Micro

52 U7 1 FT232RL USB UART Asynchronous Serial Data Transfer Chip, SSOP28 Pb-free

FTDI

53 U8 1 MAX3226E IC, RS232 Line Transceiver with SD SSOP16

Maxim

54 U9, U10, U16, U17, U22, U23, U29, U30, U35, U36, U42, U43

12 FAN7380M Half-Bridge Gate Driver 600V Fairchild

55 U11, U12, U13, U14, U18, U19, U20, U21, U24, U25, U26, U27, U31, U32, U33, U34, U37, U38, U39, U40, U44, U45, U46, U47

24 SN74LVC1G11DBVR Triple 3-Input Positive-AND Gate TI

56 U15, U28, U41 3 SN74HC04DBR Hex Inverter TI

57 Y1 0 OMIT Crystal - Do not fit Generic

58 LCD 1 MTG-F32240NFWHSGW-05B

LCD Panel QVGA STN, White LED backlight, resistive touch

Microtips

59 Y2, Y3 2 FOXSDLF/060-21 Crystal 6.00Mhz HC-49SD Fox

Table 3. CNC Machine BOM (Continued)

Item Designator Qty Part Number Description Manufacturer

January 30, 2007 17

Page 18: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

Application Note Using the Stellaris® LM3S615 and LM3S316 Microcontrollers to Control a CNC Machine

“Z-Axis MOSFET Drivers” on page 26

“H-Bridge Power State” on page 27

“Power Supplies” on page 28

ConclusionThe control board for the Luminary Micro CNC machine is a multi-faceted design which includes elements that are applicable to many embedded applications. Sophisticated graphical user interfaces, simultaneous control of multiple motors, and a wide range of peripherals are all easily managed by Stellaris microcontrollers. A challenging project like a CNC milling machine is a good match for an advanced microcontroller like those in the Stellaris family.

ReferencesThe following documents are available for download at www.luminarymicro.com:

Stellaris® LM3S316 Microcontroller Data Sheet, Publication Number DS-LM3S316

Stellaris® LM3S615 Microcontroller Data Sheet, Publication Number DS-LM3S615

Stellaris® CNC Machine Software, Order Number SW01246, (includes Stellaris® CNC Machine Software Reference Manual)

Controlling an Autonomous 3-Axis Milling Machine using Stellaris® Microcontrollers white paper, Publication Number WP03880

Company InformationLuminary Micro, Inc. designs, markets, and sells ARM Cortex-M3 based microcontrollers for use in embedded applications within the industrial, commercial, and consumer markets. Luminary Micro is ARM's lead partner in the implementation of the Cortex-M3 core. Please contact us if you are interested in obtaining further information about our company or our products.

Luminary Micro, Inc.108 Wild Basin, Suite 350Austin, TX 78746Main: +1-512-279-8800Fax: +1-512-279-8879http://[email protected]

Support InformationFor support on Luminary Micro products, contact:

[email protected]+1-512-279-8800, ext. 3

January 30, 2007 18

Page 19: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

1

1

2

2

3

3

4

4

5

5

6

6

D D

C C

B B

A A

Document Number:

RevSheetDate: of10/6/2006 1 10

Drawing Title:

Page Title:

Size

Leonardo CNC Machine

Main Contents Page

B

A2

1

U_Leonardo Primary MCULeonardo Primary MCU.SchDoc

U_Leonardo Sec MCULeonardo Sec MCU.SchDoc

U_Leonardo H-bridgesLeonardo H-bridges.SchDoc

U_Leonardo Power SuppliesLeonardo Power Supplies.SchDoc

U_Leonardo USB SerialLeonardo USB Serial.SchDoc

U_Leonardo X axis DriveLeonardo X axis Drive.SchDoc

U_Leonardo Y axis DriveLeonardo Y axis Drive.SchDoc

U_Leonardo Z axis DriveLeonardo Z axis Drive.SchDoc

U_Leonardo InterfacesLeonardo Interfaces.SchDoc

Revision Date Description

A Aug 4, 06 Release for Rev A PCB

History

A2 Sep 13, 06 Incorporate modifications to PWM circuit and shutdown circuit.

Page 20: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

1

1

2

2

3

3

4

4

5

5

6

6

D D

C C

B B

A A

Document Number:

RevSheetDate: of10/6/2006 2 10

Drawing Title:

Page Title:

Size

Leonardo CNC Machine

Priminary MCU

B

A2

2

1 2Y3

6MHZ

0.1UF

C22

0.1UF

C23

0.1UF

C24

0.1UF

C25

+3.3V

0.1UF

C26

1UF

C27

LDO1

18PF

C20

18PF

C21

OSC0POSC1P

SST25VF080

SI 5

SCK 6nWP 3

nCE 1

nHOLD 7VDD8

VSS4 SO 2

U4

SST25VF080

+3.3V+3.3V

SWCLKSWDIO

1MB DATA FLASH MEMORY

PRIMARY MICROR362.7K

R372.7K

+3.3V +3.3V

R39

OMIT

TXDRXD

M2_ISENSEM1_ISENSE

I2C_SCLI2C_SDA

CLK_6MHZ

PWM_M1APWM_M1BPOL_M1APOL_M1BPOL_M2APOL_M2B

M3_ISENSE

PWM_M3APWM_M3B

POL_M3APOL_M3B

PWM_M2APWM_M2B

0.1UF

C19

VSENSEISENSE

PRIMARY MCU SWD

R3810K

+3.3V

+3.3VSWDIOSWCLK

RESETn

TOOL_CTRL

R40OMIT

R43OMIT

+3.3V

M1_REF

R41OMIT

R44OMIT

+3.3V

M2_REF

R42OMIT

R45OMIT

+3.3V

M3_REF

EXTERNAL CURRENT SENSE REFERENCES (omit)

LIMIT_XYZ

SHUTDOWNn

1 23 45 67 89 10

J3

SAMTEC-FTSH-110-01-F-D

R5410K

R5510K

+3.3V

LIMIT_XLIMIT_YLIMIT_Z

RESETn

M1_REF

M2_REFM3_REF

PA0/U0Rx17

PA1/U0Tx18

PA2/SSIClk19

PA3/SSIFss20

PA4/SSIRx21

PA5/SSITx22

PC0/TCK/SWCLK40

PC1/TMS/SWDIO39

PC2/TDI38

PC3/TDO/SWO37

PC4/PhA14

PC5/C1+/C0o13

PC6/C2+/PhB12

PC7/C2-11

PD0/PWM0 25

PD1/PWM1 26

PD2/U1Rx 27

PD3/U1Tx 28

PD4/CCP0 45

PD5/CCP2 46

PD6/Fault 47

PD7/IDX 48

VDD 7

VDD 15

VDD 23

VDD 32

GND8

GND16

GND24

GND31

RST5 LDO 6

OSC09

OSC110

PB0/PWM2 29

PB1/PWM3 30

PB2/I2CSCL 33

PB3/I2CSDA 34

PB4/C0- 44

PB5/C1- 43

PB6/C0+ 42

PB7/TRST 41

PE0/PWM435

PE1/PWM536

PE2/CCP44

PE3/CCP13

PE4/CCP32

PE5/CCP51

U5

LM3S6150.1UF

C80

Page 21: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

1

1

2

2

3

3

4

4

5

5

6

6

D D

C C

B B

A A

Document Number:

RevSheetDate: of10/6/2006 3 10

Drawing Title:

Page Title:

Size

Leonardo CNC Machine

User Interface MCU and LCD Panel

B

A2

3

1 2Y2

6MHZ

0.1UF

C32

0.1UF

C33

0.1UF

C34

0.1UF

C35

+3.3V

0.1UF

C36

1UF

C37

LDO2

18PF

C30

18PF

C31

I2C_SCLI2C_SDA

OSC0SOSC1S

USER INTERFACE MICRO

123456789

1011121314151617181920212223242526

J1

HIROSE-HFH26T

QVGA STN LCD PANEL

MICROTIPS MTG-F32240NFWHSGW-05B

+3.3V

LCD[0..7]

LCD0LCD1LCD2LCD3LCD4LCD5LCD6LCD7

LCD0LCD1LCD2LCD3LCD4LCD5LCD6LCD7

LCD_A0LCD_WRnLCD_E

1234

J8

Header 4

LCD BACKLIGHT POWER

+3.3V

R46

OMIT

LCD_Vee

TOUCH_CLKTOUCH_CSnTOUCH_DINTOUCH_DOUTTOUCH_PENTOUCH_PEN1

TOUCH_CLKTOUCH_CSnTOUCH_DOUTTOUCH_DIN

LCD_A0LCD_WRnLCD_E

TOUCH_PENTOUCH_PEN1

R53

OMIT

RESETn

COMMON POWER ON RESET CIRCUIT

1UF

C28

R4710K

+3.3V

USER INTERFACE MCU JTAG/SWD

TDO2

TMS2TCK2

TDI2

R5110K

R5010K

R524.7K

+3.3V

+3.3V

R48

1.0

+12V

4

35,

6 Q14BSI4936DY

R4910K

BEEP_PWM

0.1UF

C29

+3.3V

TDO2TDI2

TCK2TMS2

CLK_6MHZ

RESETn

CONTRAST ADJUST

1 23 45 67 89 10

J4

SAMTEC-FTSH-110-01-F-D

R9910K

R10010K

R10110K

+3.3V

RESETn

I2C_SCLI2C_SDA

D19CD0805-S0180

PA0/U0Rx17

PA1/U0Tx18

PA2/SSIClk19

PA3/SSIFss20

PA4/SSIRx21

PA5/SSITx22

PC0/TCK/SWCLK40

PC1/TMS/SWDIO39

PC2/TDI38

PC3/TDO/SWO37

PC4/PhA14

PC5/C1+/C0o13

PC6/C2+/PhB12

PC7/C2-11

PD0/PWM0 25

PD1/PWM1 26

PD2/U1Rx 27

PD3/U1Tx 28

PD4/CCP0 45

PD5/CCP2 46

PD6/Fault 47

PD7/IDX 48

VDD 7

VDD 15

VDD 23

VDD 32

GND8

GND16

GND24

GND31

RST5 LDO 6

OSC09

OSC110

PB0/PWM2 29

PB1/PWM3 30

PB2/I2CSCL 33

PB3/I2CSDA 34

PB4/C0- 44

PB5/C1- 43

PB6/C0+ 42

PB7/TRST 41

PE0/PWM435

PE1/PWM536

PE2/CCP44

PE3/CCP13

PE4/CCP32

PE5/CCP51

U6

LM3S316

SW1SW-B3S1000

0.1UF

C79

+3V

Page 22: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

1

1

2

2

3

3

4

4

5

5

6

6

D D

C C

B B

A A

Document Number:

RevSheetDate: of10/6/2006 4 10

Drawing Title:

Page Title:

Size

Leonardo CNC Machine

Switch, Tool Ctrl and Audio

B

A2

4

+

-2

1

BZ1BUZZER CEM-1206S

USER INTERFACE AUDIO

+3.3V

4

35,

6 Q13BFDS6930

R727

R1010K

BEEP_PWM

TOOL CONTROL

+12V

2

17,

8 Q14ASI4936DY

R1227

R1310K

TOOL_CTRL

2

17,

8 Q13AFDS6930

R81K

ENABLE

EMERGENCY SHUTDOWN

CIRCUIT

+3.3V0.1UF

C4

0.1UF

C5R910K

LIMIT SWITCHES

R14OMIT

R15OMIT

R16OMIT

R1710K

0.01UF

C6

0.01UF

C7

0.01UF

C8

0.01UF

C9

R18

0 OHMR19

0 OHMR20

0 OHMR21

0 OHM

+3.3V

"ALIVE" LAMP POWER CONTROL

R11

10

TOOL_OUT

+12V+VIN

CONTROL CIRCUIT CONNECTOR

LIMIT_X_IN

LIMIT_Y_IN

LIMIT_Z_IN

LIMIT_XYZ_IN

SD_SWITCH1SD_SWITCH2

ALIVE_OUT

TOOL_OUT

R103

1K

R102

100KSHUTDOWNn

ALIVE_OUT

LIMIT_X

LIMIT_Y

LIMIT_Z

LIMIT_XYZ

123456789

1011121314151617181920

J7

2-1586041-0

D1SS26

NOTES:

1) Do not connect to LIMIT_XYZ_IN

2) Two N/O switches connect in parallel to each limit input

3) External switches should have either 1k or 2k series resistors

+3.3V

D20

CD0805-S0180

Page 23: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

1

1

2

2

3

3

4

4

5

5

6

6

D D

C C

B B

A A

Document Number:

RevSheetDate: of10/6/2006 5 10

Drawing Title:

Page Title:

Size

Leonardo CNC Machine

USB and Serial Interfaces

B

A2

5

VCC15

C2+ 5

C2- 6

C1+ 2

C1- 4

INV10

V+3

V-7

TIN 11TOUT13

GND 14

ROUT 9RIN8

FOFF16 FON12

READY1

U8

MAX3226E

TXD 1

DTRn 2

RTSn 3

VCCIO4

RXD 5

RIn 6

GN

D7

NC8 DSRn 9

DCDn 10

CTSn 11

CBUS4 12

CBUS2 13

CBUS3 14

USBDP15 USBDM16

3V3OUT17

GN

D18

RESETn19

VCC20

GN

D21

CBUS1 22CBUS0 23

NC24

AG

ND

25

TEST

26

OSCI27

OSCO28

U7

FT232RL

+3.3V

594837261

1011

P11DB9_M

1 2 3

JP11X3HDR

1 2 3

JP21X3HDR

RXD

TXD

USB PORT

RS232 PORT

CLK_6MHZ

RXD

TXD

CLK_6MHZ

+3.3V

SERIAL TYPE SELECT

0.01UF

C71

0.1UF

C38

+3.3V

R9710K

R984.7K

0.1UFC39

OMITC40

OMITC41

0.1UF

C43

0.1UF

C45

0.1UF

C42

0.1UF

C44

R5610K

R5710K R58

10K

0.1UFC46

1 2Y1

OMIT

5V D- D+ ID G

1 2 3 4

G2

5

G1

J2USB MINI B RECEPTACLE

A Note about System clocks:The schematics allow for several clocking options, including clocking all devices from the on-chip USB clock. Clock-out from the USB is only active when a PC is connected, so the micros must be clocked independently. The USB controllers internal clock is adequate, so crystal Y1 is not installed.

Page 24: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

1

1

2

2

3

3

4

4

5

5

6

6

D D

C C

B B

A A

Document Number:

RevSheetDate: of10/6/2006 6 10

Drawing Title:

Page Title:

Size

Leonardo CNC Machine

X-axis Mosfet Drivers

B

A2

6

5 6

U15C

SN74HC04DBLE

89

U15D

SN74HC04DBLE

R62

10

R64

10

1UF

C50

+12V

R60

10

R61

10

R63

10LIN1

HIN2

VC

3

CO

M4

LO 5

VS 6

HI 7

VB

8U9FAN7380

1UF

C49

+12V

R59

10

M1GATEA1HI

M1GATEA1LO

M1GATEA2HI

M1GATEA2LO

M1A2

POL_M1An

POL_M1A

PWM_M1A

R68

10

R70

10

1UF

C54

+12V

R66

10

R67

10

R69

10

1UF

C53

+12V

R65

10

M1GATEB2HI

M1GATEB2LO

M1B2

M1GATEB1HI

M1GATEB1LO

M1B1

POL_M1Bn

POL_M1B

PWM_M1B

1 2

U15A

SN74HC04DBLE

3 4

U15B

SN74HC04DBLE

1011

U15E

SN74HC04DBLE

1213

U15F

SN74HC04DBLE

MOTOR 1 (X-AXIS) DRIVE CIRCUIT

136

4

U11

SN74LVC1G11DBVR

136

4

U13

SN74LVC1G11DBVR

136

4

U12

SN74LVC1G11DBVR

136

4

U14

SN74LVC1G11DBVR

136

4

U18

SN74LVC1G11DBVR

136

4

U20

SN74LVC1G11DBVR

136

4

U19

SN74LVC1G11DBVR

136

4

U21

SN74LVC1G11DBVR

UNUSED

2 1D6

CD0805-S0180

2 1D8

CD0805-S0180

2 1D7

CD0805-S0180

2 1D9

CD0805-S0180

ENABLE ENABLE

ENABLE ENABLE

0.1UF

C47

0.1UF

C51

0.1UF

C48

0.1UF

C52

POL_M1A

PWM_M1A

POL_M1B

PWM_M1B

ENABLE

M1A1

LIN1

HIN2

VC

3

CO

M4

LO 5

VS 6

HI 7V

B8U10

FAN7380

LIN1

HIN2

VC

3

CO

M4

LO 5

VS 6

HI 7

VB

8U16FAN7380

LIN1

HIN2

VC

3

CO

M4

LO 5

VS 6

HI 7

VB

8U17FAN7380

0.1UFC76

+3.3V

+3.3V

+3.3V

R106100K

R107100K

Page 25: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

1

1

2

2

3

3

4

4

5

5

6

6

D D

C C

B B

A A

Document Number:

RevSheetDate: of10/6/2006 7 10

Drawing Title:

Page Title:

Size

Leonardo CNC Machine

Y-axis Mosfet Drivers

B

A2

7

5 6

U28C

SN74HC04DBLE

89

U28D

SN74HC04DBLE

R74

10

R76

10

1UF

C58

+12V

R72

10

R73

10

R75

10LIN1

LIN2

VC

3

CO

M4

LO 5

VS 6

HI 7

VB

8U22FAN7380

1UF

C57

+12V

R71

10

M2GATEA1HI

M2GATEA1LO

M2GATEA2HI

M2GATEA2LO

M2A2

POL_M2An

POL_M2A

PWM_M2A

R80

10

R82

10

1UF

C62

+12V

R78

10

R79

10

R81

10

1UF

C61

+12V

R77

10

M2GATEB2HI

M2GATEB2LO

M2B2

M2GATEB1HI

M2GATEB1LO

M2B1

POL_M2B

PWM_M2B

1 2

U28A

SN74HC04DBLE

3 4

U28B

SN74HC04DBLE

1011

U28E

SN74HC04DBLE

1213

U28F

SN74HC04DBLE

MOTOR 2 (Y-AXIS) DRIVE CIRCUIT

136

4

U24

SN74LVC1G11DBVR

136

4

U26

SN74LVC1G11DBVR

136

4

U25

SN74LVC1G11DBVR

136

4

U27

SN74LVC1G11DBVR

136

4

U31

SN74LVC1G11DBVR

136

4

U33

SN74LVC1G11DBVR

136

4

U32

SN74LVC1G11DBVR

136

4

U34

SN74LVC1G11DBVR

UNUSED

2 1D10

CD0805-S0180

2 1D12

CD0805-S0180

2 1D11

CD0805-S0180

2 1D13

CD0805-S0180

ENABLE ENABLE

ENABLE ENABLE

0.1UF

C55

0.1UF

C56

0.1UF

C59

0.1UF

C60

ENABLE

POL_M2A

PWM_M2A

POL_M2B

PWM_M2B

M2A1

POL_M2Bn

LIN1

LIN2

VC

3

CO

M4

LO 5

VS 6

HI 7V

B8U23

FAN7380

LIN1

LIN2

VC

3

CO

M4

LO 5

VS 6

HI 7

VB

8U29FAN7380

LIN1

LIN2

VC

3

CO

M4

LO 5

VS 6

HI 7

VB

8U30FAN7380

0.1UFC77

+3.3V

+3.3V

+3.3V

R108100K

R109100K

Page 26: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

1

1

2

2

3

3

4

4

5

5

6

6

D D

C C

B B

A A

Document Number:

RevSheetDate: of10/6/2006 8 10

Drawing Title:

Page Title:

Size

Leonardo CNC Machine

Z-axis Mosfet Drivers

B

A2

8

5 6

U41C

SN74HC04DBLE

89

U41D

SN74HC04DBLE

R86

10

R88

10

1UF

C66

+12V

R84

10

R85

10

R87

10LIN1

HIN2 VC

C3

CO

M4

LO 5

VS 6

HI 7

VB

8U35FAN7380

1UF

C65

+12V

R83

10

M3GATEA1HI

M3GATEA1LO

M3GATEA2HI

M3GATEA2LO

M3A2

POL_M3An

POL_M3A

PWM_M3A

R92

10

R94

10

1UF

C70

+12V

R90

10

R91

10

R93

10

1UF

C69

+12V

R89

10

M3GATEB2HI

M3GATEB2LO

M3B2

M3GATEB1HI

M3GATEB1LO

M3B1

POL_M3Bn

POL_M3B

1 2

U41A

SN74HC04DBLE

3 4

U41B

SN74HC04DBLE

1011

U41E

SN74HC04DBLE

1213

U41F

SN74HC04DBLE

MOTOR 3 (Z-AXIS) DRIVE CIRCUIT

136

4

U37

SN74LVC1G11DBVR

136

4

U39

SN74LVC1G11DBVR

136

4

U38

SN74LVC1G11DBVR

136

4

U40

SN74LVC1G11DBVR

136

4

U44

SN74LVC1G11DBVR

136

4

U46

SN74LVC1G11DBVR

136

4

U45

SN74LVC1G11DBVR

136

4

U47

SN74LVC1G11DBVR

UNUSED

2 1D14

CD0805-S0180

2 1D16

CD0805-S0180

2 1D15

CD0805-S0180

2 1D17

CD0805-S0180

ENABLE

ENABLE ENABLE

0.1UF

C63

0.1UF

C67

0.1UF

C64

0.1UF

C68

POL_M3A

PWM_M3A

POL_M3B

PWM_M3B

PWM_M3A

PWM_M3B

ENABLE

M3A1

LIN1

HIN2 VC

C3

CO

M4

LO 5

VS 6

HI 7

VB

8U36FAN7380

LIN1

HIN2 VC

C3

CO

M4

LO 5

VS 6

HI 7

VB

8U43FAN7380

LIN1

HIN2 VC

C3

CO

M4

LO 5

VS 6

HI 7

VB

8U42FAN7380

0.1UFC78

+3.3V

+3.3V

+3.3V

R104100K

R105100K

Page 27: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

1

1

2

2

3

3

4

4

5

5

6

6

D D

C C

B B

A A

Document Number:

RevSheetDate: of10/6/2006 9 10

Drawing Title:

Page Title:

Size

Leonardo CNC Machine

H-Bridge Power Stage

B

A2

9

4

35,

6 Q1BFDS6930

VMOTOR

R20.1 1W

M1GATEA2HI

M1GATEA2LO 4

35,

6 Q3BFDS6930

M1GATEB1HI

M1GATEB1LO

M1GATEB2HI

M1GATEB2LO

X-AXIS MOTOR

M1A1M1A2

M1B1M1B2

M1_ISENSE

4

35,

6 Q5BFDS6930

VMOTOR

R40.1 1W

M2GATEA2HI

M2GATEA2LO 4

35,

6 Q7BFDS6930

2

17,

8 Q8AFDS6930M2GATEB1HI

M2GATEB1LO

M2GATEB2HI

M2GATEB2LO

Y-AXIS MOTOR

M2A1M2A2

M2B1M2B2

M2_ISENSE M2_ISENSE

4

35,

6 Q9BFDS6930

VMOTOR

R60.1 1W

M3GATEA2HI

M3GATEA2LO

2

17,

8 Q11AFDS6930 2

17,

8 Q12AFDS6930M3GATEB1HI

M3GATEB1LO

M3GATEB2HI

M3GATEB2LO4

35,

6 Q10BFDS6930

Z-AXIS MOTOR

M3A1M3A2

M3B1M3B2

M3_ISENSE

M1GATEA1HI

M1GATEA1LO

M3GATEA1HI

M3GATEA1LO

M2GATEA1HI

M2GATEA1LO

R3

10K

0.01UFC2

M1_ISENSER1

10K

0.01UFC1

M3_ISENSER5

10K

0.01UFC3

2

17,

8 Q1AFDS6930

4

35,

6 Q2BFDS6930

2

17,

8 Q2AFDS6930 2

17,

8 Q3AFDS6930 2

17,

8 Q4AFDS6930

4

35,

6 Q4BFDS6930

4

35,

6 Q6BFDS6930

2

17,

8 Q5AFDS6930 2

17,

8 Q6AFDS6930

4

35,

6 Q8BFDS6930

2

17,

8 Q7AFDS6930

4

35,

6 Q11BFDS6930 4

35,

6 Q12BFDS6930

2

17,

8 Q9AFDS6930 2

17,

8 Q10AFDS6930

M1A1M1A2M1B1M1B2

M3A1M3A2M3B1M3B2

M2A1M2A2M2B1M2B2

MOTOR POWER CONNECTOR

M1A1M1A2M1B1M1B2

M2A1M2A2M2B1M2B2

M3A1M3A2M3B1M3B2

123456789

1011121314

J5

1-1586041-4

Page 28: Using the Stellaris® LM3S615 and LM3S316 Microcontrollers ...d1.amobbs.com/bbs_upload782111/files_13/ourdev_425692.pdf · smaller step angle ... The step rate needed to achieve a

1

1

2

2

3

3

4

4

5

5

6

6

D D

C C

B B

A A

Document Number:

RevSheetDate: of10/6/2006 10 10

Drawing Title:

Page Title:

Size

Leonardo CNC Machine

Power Supplies

B

A2

10

24-36VDC POWER INPUT

SW 1

BST 2

RCL3

RTN4 FB 5

RON/SD6

VCC 7VIN8

EXPA

D9

U1

LM25007

0.01uF

C12

R24

0 Ohm

R253.74K

R261.0K

10uF

C13T491B

+12V

0.1uF

C10

R22

169K

R23

105K

0.1uF

C11

12V 0.4A SWITCHING REGULATOR

VMOTOR +12V +3.3V

SUPPLY RAIL INDICATORS

+VIN

VMOTOR+VIN

NC6

VCC2 RS+

1

GN

D4

OUT 5

NC3

NC7

RS-

8U3MAX4080

R33

0.01 1W

ISENSE

VSENSE

MOTOR CURRENT AND VOLTAGE MONITOR

SW 1

BST 2

RCL3

RTN4 FB 5

RON/SD6

VCC 7VIN8

EXPA

D9

U2

LM25007

0.01uF

C15

R96

0 Ohm

R32360

R951.0K

10uF

C17T491B

+3.3V

0.1uF

C16

R30

169K

R31

105K

0.1uF

C14

3.3V 0.4A SWITCHING REGULATOR

+VIN

R3420K

R351.0K

0.1uF

C18

R272.4K

R281K

R29150

D3 D4 D5

100uF 50VC75

1234

J6

1586041-4

77uH

L1

77uH

L2

F1

5A

D2SS26

D18SS26

100uF 50VC74

100uF 50VC72

100uF 50VC73