You are on page 1of 29

Using the Stellaris® LM3S615 and

LM3S316 Microcontrollers to Control a CNC


Machine

Application Note

AN01 246 -0 3 Co pyrigh t © 2 007– 200 9 Te xas In strumen ts


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

Copyright
Copyright © 2007–2009 Texas Instruments, Inc. All rights reserved. Stellaris and StellarisWare are registered trademarks of Texas Instruments.
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.

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

June 24, 2009 2


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

Table of Contents
Introduction ......................................................................................................................................................... 4
Features.............................................................................................................................................................. 4
Block Diagram .................................................................................................................................................... 4
CNC Machine Description .................................................................................................................................. 6
Mechanical Design.......................................................................................................................................... 6
Stepper Motors ............................................................................................................................................... 7
Control Electronics.......................................................................................................................................... 8
User Interface Electronics............................................................................................................................. 10
Software Description..................................................................................................................................... 10
Development Tools ....................................................................................................................................... 11
Future Enhancements ...................................................................................................................................... 11
Interfaces .......................................................................................................................................................... 11
Component Placement ..................................................................................................................................... 12
Bill of Materials ................................................................................................................................................. 14
Schematics ....................................................................................................................................................... 17
Conclusion ........................................................................................................................................................ 18
References ....................................................................................................................................................... 18

June 24, 2009 3


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

Introduction
Computer 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.

Features
The 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 Diagram
Figure 1 shows the block diagram for the CNC machine.

June 24, 2009 4


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

Figure 1. CNC Machine Block Diagram

Luminary Micro CNC Control Board


USB USB to
Serial
Device High and
MOSFET
Low Side X Axis Stepper
H-bridge
Gate Motor
(x2)
Drivers

RS232 RS232 Line


Transceiver
High and
MOSFET
LM3S615 Low Side Y Axis Stepper
H-bridge
Microcontroller Gate Motor
(x2)
Drivers
SWD

High and
1MB Serial SPI MOSFET
Low Side Z Axis Stepper
Data Flash text H-bridge
Gate Motor
(optional) (x2)
Drivers

+12V +3.3V I2C


Limit Switches
(x6)

SWD/JTAG
12V 3.3V
Power Power Emergency
Supply Supply LM3S316 Shutdown Switch
Microcontroller

Speaker
Backlight Pwr

Tool Power
Relay Driver
Control Relay

Parallel SPI (touch data)

24V 3A Supply

QVGA
LCD Touch Panel

June 24, 2009 5


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

CNC Machine Description


This 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 Design
The 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.

June 24, 2009 6


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

Figure 3. CNC Machine by David Steele

Stepper Motors
The 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.

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

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.

June 24, 2009 7


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

Control Electronics
The 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.

June 24, 2009 8


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.

Table 2. Full-Step Operation Control Sequence

Stepa A1 A2 B1 B2 PWM_MnA PWM_MnB POL_MnA POL_MnB

1 +b -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

a. Each step moves the rotor 1.8º.


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

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

Vgpio
+3.3 V
SW1 SW2 Time
LM3S615

SW1
GPIO
R1 C6
1K
Limit Switch 0.01UF

SW2

R2
2K
Limit Switch

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

June 24, 2009 9


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 Electronics


The 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 Description
The 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

June 24, 2009 10


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 Tools
The 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 Enhancements
The 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.

Interfaces
This 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


VMOTOR

PANIC

+3.3V
+12V
GND

GND

GND

GND

GND

20 2

19 1
ALIVE
TOOL OUT

Z LIMIT

Y LIMIT

X LIMIT
PANIC

June 24, 2009 11


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

Figure 7. Motor Connector Pin Assignments

MOTORX B2

MOTORX A2
MOTORY B1

MOTORY A1
MOTORZ B2

MOTOTZ A2

GND
14 2

13 1
MOTORZ B1

MOTORZ A1

MOTORY B2

MOTORY A2

MOTORX B1

MOTORX A1
GND

Figure 8. Power Connector Pin Assignments


+24V IN
GND

4 2

3 1
GND

+24V IN

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

June 24, 2009 12


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

Figure 9. CNC Machine Component Placement Diagram

June 24, 2009 13


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

Bill of Materials
Table 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, 43 C0805C104M5RAC7800 Capacitor 0.1uF 0805 50V X7R Kemet
C11, C14, C16, 20%
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

3 C40, C41 0 Capacitor, Do Not Populate

4 C20, C21, C30, 4 80-C0805C180J5G Capacitor 18pF 0805 NPO 5-v Kemet
C31 5%

5 C1, C2, C3, C6-9, 10 C0805C103K5RAC7800 Capacitor, 0.01uF 0805 50V X7R
C12, C15, C71 20%

6 C13, C17 2 T491B106K020 Capacitor 10uF Tantalum Size B Kemet


20V 10%

7 C72, C73, C74, 4 MV50VC101M10X10TP Capacitor, 100uF 50V Electro UCC


C75 10x10mm SMT

8 C27, C28, C37, 15 C0805C105K4RACTU Capacitor 1uF 16V 10% X7R Kemet
C49, C50, C53, 0805
C54, C57, C58,
C61, C62, C65,
C66, C69, C70

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, 14 CD0805-S0180 Diode 80V 100mA Fast 0603 Bourns
D10, D11, D12,
D13, D14, D15,
D16, D17, D19,
D20

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

13 F1b 1 6490000 Fuse Holder 5x20mm Wickmann

June 24, 2009 14


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

Table 3. CNC Machine BOM (Continued)

Item Designator Qty Part Number Description Manufacturer

14 J1 1 FH12-26S-1SH SMT Flex Connector 26way Hirose


1mm pitch bottom contact

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 Samtec


production (debug headers)

17 J5 1 1-1586041-4 Header, 14 pos 4.20mm PE AMP


Series Right Angle

18 J6 1 1586041-4 Header, 4 pos 4.20mm PE AMP


Series Right Angle

19 J7 1 2-1586041-0 Header, 20 pos 4.20mm PE AMP


Series Right Angle

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, 14 FDS6930A Dual N-Channel N-CH MOSFET Fairchild
Q5, Q6, Q7, Q8, 30V 5.5A
Q9, Q10, Q11,
Q12, Q13, Q14

25 R1, R3, R5, R9, 20 Resistor 10K 5% 0805 Generic


R10, R13, R17,
R38, R47, R49,
R50, R54, R55,
R56, R57, R58,
R97, R99, R100,
R101

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, 6 Resistor 1.0K 1% 0805 Generic


R35, R95, R103

June 24, 2009 15


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

Table 3. CNC Machine BOM (Continued)

Item Designator Qty Part Number Description Manufacturer

29 R11, R59, R60, 37 Resistor 10 Ohms 5% 0805 Generic


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

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, 6 Resistor 0 Ohms 0805 Generic


R21, R24, R96

41 R14-16, R39-44, 0 Resistor 0805 OMIT Generic


R45, R53

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, 7 Resistor 100K Ohms 5% 0805 Generic


R105, R106,
R107, R108,
R109

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

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


Regulator

48 U3 1 MAX4080TAUA 76V High-Side Current Sense Maxim


Amp with Voltage Output

June 24, 2009 16


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

Table 3. CNC Machine BOM (Continued)

Item Designator Qty Part Number Description Manufacturer

49 U4 1 SST25VF080 SST Serial Data Flash 8Mbit SST


SO-8 20MHz

50 U5 1 LM3S615-CQN IC, LM3S615 ARM Luminary Micro


Microcontroller TQFP48

51 U6 1 LM3S316-CQN IC, LM3S316 ARM Luminary Micro


Microcontroller TQFP48

52 U7 1 FT232RL USB UART Asynchronous Serial FTDI


Data Transfer Chip, SSOP28
Pb-free

53 U8 1 MAX3226E IC, RS232 Line Transceiver with Maxim


SD SSOP16

54 U9, U10, U16, 12 FAN7380M Half-Bridge Gate Driver 600V Fairchild


U17, U22, U23,
U29, U30, U35,
U36, U42, U43

55 U11, U12, U13, 24 SN74LVC1G11DBVR Triple 3-Input Positive-AND Gate TI


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

56 U15, U28, U41 3 SN74HC04DBR Hex Inverter TI

57 Y1 0 OMIT Crystal - Do not fit Generic

58 LCD 1 MTG-F32240NFWHSGW- LCD Panel QVGA STN, White Microtips


05B LED backlight, resistive touch

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

Schematics
The 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

June 24, 2009 17


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

Conclusion
The 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.

References
The 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)

June 24, 2009 18


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

Important Notice
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements,
improvements, and other changes to its products and services at any time and to discontinue any product or service without notice.
Customers should obtain the latest relevant information before placing orders and should verify that such information is current and
complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard
warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where
mandated by government requirements, testing of all parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and
applications using TI components. To minimize the risks associated with customer products and applications, customers should provide
adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work
right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used.
Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or
services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other
intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied
by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive
business practice. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional
restrictions.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all
express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not
responsible or liable for any such statements.
TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would
reasonably be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically
governing such use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications,
and acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related requirements concerning their
products and any use of TI products in such safety-critical applications, notwithstanding any applications-related information or support
that may be provided by TI. Further, Buyers must fully indemnify TI and its representatives against any damages arising out of the use of
TI products in such safety-critical applications.
TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are
specifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet military
specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely at
the Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use.
TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are
designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-designated
products in automotive applications, TI will not be responsible for any failure to meet such requirements.
Following are URLs where you can obtain information on other Texas Instruments products and application solutions:
Products Applications
Amplifiers amplifier.ti.com Audio www.ti.com/audio
Data Converters dataconverter.ti.com Automotive www.ti.com/automotive
DLP® Products www.dlp.com Broadband www.ti.com/broadband
DSP dsp.ti.com Digital Control www.ti.com/digitalcontrol
Clocks and Timers www.ti.com/clocks Medical www.ti.com/medical
Interface interface.ti.com Military www.ti.com/military
Logic logic.ti.com Optical Networking www.ti.com/opticalnetwork
Power Mgmt power.ti.com Security www.ti.com/security
Microcontrollers microcontroller.ti.com Telephony www.ti.com/telephony
RFID www.ti-rfid.com Video & Imaging www.ti.com/video
RF/IF and ZigBee® Solutions www.ti.com/lprf Wireless www.ti.com/wireless

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2009, Texas Instruments Incorporated

June 24, 2009 19


1 2 3 4 5 6

U_Leonardo Primary MCU U_Leonardo Sec MCU U_Leonardo Interfaces U_Leonardo USB Serial
Leonardo Primary MCU.SchDoc Leonardo Sec MCU.SchDoc Leonardo Interfaces.SchDoc Leonardo USB Serial.SchDoc History
Revision Date Description

A A Aug 4, 06 Release for Rev A PCB A


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

U_Leonardo X axis Drive U_Leonardo Y axis Drive U_Leonardo Z axis Drive U_Leonardo H-bridges
Leonardo X axis Drive.SchDoc Leonardo Y axis Drive.SchDoc Leonardo Z axis Drive.SchDoc Leonardo H-bridges.SchDoc

B B

U_Leonardo Power Supplies


Leonardo Power Supplies.SchDoc

C C

D D

Drawing Title:
Leonardo CNC Machine
Page Title:
Main Contents Page
Size Document Number:
B 1
Date: Sheet Rev
10/6/2006 1 of 10 A2

1 2 3 4 5 6
1 2 3 4 5 6

A A

+3.3V +3.3V +3.3V

1MB DATA FLASH MEMORY


R36 R37
U4 R38 PRIMARY MICRO 2.7K 2.7K
+3.3V +3.3V 10K U5
8 7
VDD nHOLD
17 29
RXD PA0/U0Rx PB0/PWM2 PWM_M2A
C19 3 18 30
nWP TXD PA1/U0Tx PB1/PWM3 PWM_M2B
6 19 33
SCK PA2/SSIClk PB2/I2CSCL I2C_SCL
0.1UF 1 20 34
nCE PA3/SSIFss PB3/I2CSDA I2C_SDA
2 21 44
SO PA4/SSIRx PB4/C0- M1_ISENSE
4 5 22 43
VSS SI PA5/SSITx PB5/C1- M2_ISENSE
42 M1_REF
PB6/C0+
41
PB7/TRST LIMIT_XYZ
SST25VF080
+3.3V SST25VF080 SWCLK 40 25
PC0/TCK/SWCLK PD0/PWM0 PWM_M1A
SWDIO 39 26
PC1/TMS/SWDIO PD1/PWM1 PWM_M1B
38 27
LIMIT_X PC2/TDI PD2/U1Rx POL_M1A
R54 R55 37 28
B LIMIT_Y PC3/TDO/SWO PD3/U1Tx POL_M1B B
10K 10K 14 45
LIMIT_Z PC4/PhA PD4/CCP0 POL_M2A
M2_REF 13 46
+3.3V J3 PC5/C1+/C0o PD5/CCP2 POL_M2B
M3_REF 12 47
1 2 SWDIO PC6/C2+/PhB PD6/Fault POL_M3A
11 48
3 4 SWCLK M3_ISENSE PC7/C2- PD7/IDX POL_M3B
5 6
35
7 8 PWM_M3A PE0/PWM4
36
9 10 RESETn PWM_M3B PE1/PWM5
4
SHUTDOWNn PE2/CCP4
3
SAMTEC-FTSH-110-01-F-D TOOL_CTRL PE3/CCP1
2
VSENSE PE4/CCP3
1
ISENSE PE5/CCP5
PRIMARY MCU SWD

R39 OSC0P 9
CLK_6MHZ OSC0
OMIT OSC1P 10
OSC1
Y3 5 6 LDO1
RESETn RST LDO
1 2
8 7 +3.3V
GND VDD
6MHZ 16 15
GND VDD
24 23
GND VDD
C20 C21 C80 31 32
GND VDD
C C
18PF 18PF 0.1UF C22 C23 C24 C25 C26 C27
LM3S615
0.1UF 0.1UF 0.1UF 0.1UF 0.1UF 1UF

+3.3V +3.3V +3.3V

R40 R41 R42


OMIT OMIT OMIT
M1_REF M2_REF M3_REF

R43 R44 R45


OMIT OMIT OMIT

D D

Drawing Title:
Leonardo CNC Machine
EXTERNAL CURRENT SENSE REFERENCES (omit)
Page Title:
Priminary MCU
Size Document Number:
B 2
Date: Sheet Rev
10/6/2006 2 of 10 A2

1 2 3 4 5 6
1 2 3 4 5 6

+3.3V

+3.3V R47 D19 +12V


10K CD0805-S0180 R46
A A
OMIT
R99 R100 R101
10K 10K 10K RESETn +3.3V
J8
+3.3V J4 SW1 R48
C28 1
1 2 TMS2 SW-B3S1000 1.0 LCD BACKLIGHT POWER
2
3 4 TCK2
1UF 3
5 6 TDO2
4
7 8 TDI2
9 10 Header 4

5, 6
Q14B
SI4936DY
SAMTEC-FTSH-110-01-F-D 4

R49

3
10K
USER INTERFACE MCU JTAG/SWD COMMON POWER ON RESET CIRCUIT

USER INTERFACE MICRO +3.3V


B U6 B

TOUCH_PEN 17 29 R50 +3.3V C29


PA0/U0Rx PB0/PWM2 BEEP_PWM 10K
TOUCH_PEN1 18 30
PA1/U0Tx PB1/PWM3
TOUCH_CLK 19 33 I2C_SCL J1
PA2/SSIClk PB2/I2CSCL I2C_SCL 0.1UF
TOUCH_CSn 20 34 I2C_SDA 1
PA3/SSIFss PB3/I2CSDA I2C_SDA R51
TOUCH_DOUT 21 44 LCD_A0 2
PA4/SSIRx PB4/C0- 10K
TOUCH_DIN 22 43 LCD_WRn 3
PA5/SSITx PB5/C1- CONTRAST ADJUST
42 LCD_E +3V LCD_A0 4
PB6/C0+
41 LCD_WRn 5
PB7/TRST
LCD_E 6
TCK2 40 25 LCD0 LCD0 7
PC0/TCK/SWCLK PD0/PWM0 R52
TMS2 39 26 LCD1 LCD1 8
PC1/TMS/SWDIO PD1/PWM1 4.7K
TDI2 38 27 LCD2 LCD2 9
PC2/TDI PD2/U1Rx
TDO2 37 28 LCD3 LCD3 10
PC3/TDO/SWO PD3/U1Tx
14 45 LCD4 LCD4 11
PC4/PhA PD4/CCP0
13 46 LCD5 LCD5 12 QVGA STN LCD PANEL
PC5/C1+/C0o PD5/CCP2
12 47 LCD6 LCD6 13
PC6/C2+/PhB PD6/Fault
11 48 LCD7 LCD7 14 MICROTIPS MTG-F32240NFWHSGW-05B
PC7/C2- PD7/IDX
+3.3V 15
35 RESETn 16
PE0/PWM4
36 LCD_Vee 17
PE1/PWM5
4 18
PE2/CCP4
3 LCD[0..7] TOUCH_CLK 19
C PE3/CCP1 C
2 TOUCH_CSn 20
PE4/CCP3
1 TOUCH_DIN 21
PE5/CCP5
TOUCH_DOUT 22
TOUCH_PEN 23
TOUCH_PEN1 24
R53 OSC0S 9 25
CLK_6MHZ OSC0
OMIT OSC1S 10 26
OSC1
Y2 RESETn 5 6 LDO2 HIROSE-HFH26T
RST LDO
1 2
8 7 +3.3V
GND VDD
6MHZ 16 15
GND VDD
24 23
GND VDD
C30 C31 C79 31 32
GND VDD
18PF 18PF 0.1UF C32 C33 C34 C35 C36 C37
LM3S316
0.1UF 0.1UF 0.1UF 0.1UF 0.1UF 1UF

D D

Drawing Title:
Leonardo CNC Machine
Page Title:
User Interface MCU and LCD Panel
Size Document Number:
B 3
Date: Sheet Rev
10/6/2006 3 of 10 A2

1 2 3 4 5 6
1 2 3 4 5 6

+3.3V

A A
EMERGENCY SHUTDOWN R14 R15 R16 R17
CIRCUIT OMIT OMIT OMIT 10K
CONTROL CIRCUIT CONNECTOR
R18
LIMIT_X
0 OHM +VIN
+12V
R102 R19
SHUTDOWNn LIMIT_Y
100K 0 OHM J7
LIMIT_X_IN 1
D20 R20 2
R103 LIMIT_Z
0 OHM LIMIT_Y_IN 3
ENABLE
CD0805-S0180 1K 4
R21 LIMIT_Z_IN 5
R9 LIMIT_XYZ
C4 C5 0 OHM 6
10K C6 C7 C8 C9 LIMIT_XYZ_IN 7
0.1UF 0.1UF +3.3V 8
0.01UF 0.01UF 0.01UF 0.01UF +3.3V 9
10
R8 11
LIMIT SWITCHES 1K 12
SD_SWITCH1 13
SD_SWITCH2 14
15
B 16 B
R11 ALIVE_OUT ALIVE_OUT 17
10 18
TOOL_OUT 19
7, 8

Q13A
FDS6930 20
2
2-1586041-0
1

NOTES:
1) Do not connect to LIMIT_XYZ_IN
"ALIVE" LAMP POWER CONTROL
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

R7
27 +12V
C C

1 + D1
SS26
2 -
TOOL_OUT
BUZZER CEM-1206S R12
BZ1 27
5, 6

7, 8
Q13B Q14A
FDS6930 SI4936DY
4 2
BEEP_PWM TOOL_CTRL
3

1
R10 R13
10K 10K

USER INTERFACE AUDIO TOOL CONTROL


D D

Drawing Title:
Leonardo CNC Machine
Page Title:
Switch, Tool Ctrl and Audio
Size Document Number:
B 4
Date: Sheet Rev
10/6/2006 4 of 10 A2

1 2 3 4 5 6
1 2 3 4 5 6

USB MINI B RECEPTACLE


J2
5V D- D+ ID G

A G1 G2 A

5
+3.3V

C38 C71
U7
R98 0.1UF 0.01UF
4.7K 4 1
VCCIO TXD
20 5
VCC RXD
16 3
USBDM RTSn
15 11
USBDP CTSn
2
DTRn
9
DSRn
8 10
NC DCDn
19
RESETn
24 6
NC RIn
B R97 27 23 CLK_6MHZ B
10K OSCI CBUS0 CLK_6MHZ
22
CBUS1
28 13
OSCO CBUS2
14
CBUS3

AGND

TEST
17 12

GND
GND
GND
3V3OUT CBUS4

C39 FT232RL

25
7
18
21
26
0.1UF

Y1
1 2

OMIT
C40 C41
OMIT OMIT USB PORT

P11
DB9_M
11

C C
1
6 U8
2
7 13 11
TOUT TIN
3
8 8 9 RXD
RIN ROUT RXD
4
9 +3.3V C42 C43 TXD
TXD
5 3 2
V+ C1+

1
2
3

1
2
3
C44 0.1UF 0.1UF
A Note about System clocks:
10

7 4
R56 R57 V- C1- The schematics allow for several clocking options,
C45 including clocking all devices from the on-chip
10K 10K 0.1UF R58 10 5
INV C2+ JP1 JP2 USB clock. Clock-out from the USB is only
10K 1X3HDR 1X3HDR active when a PC is connected, so the micros must
12 0.1UF
FON be clocked independently. The USB controllers
16 6 internal clock is adequate, so crystal Y1 is not
FOFF C2- SERIAL TYPE SELECT
1 installed.
READY
+3.3V
15 14
VCC GND
D D
C46 MAX3226E
0.1UF Drawing Title:
Leonardo CNC Machine
Page Title:
RS232 PORT USB and Serial Interfaces
Size Document Number:
B 5
Date: Sheet Rev
10/6/2006 5 of 10 A2

1 2 3 4 5 6
1 2 3 4 5 6

+12V +12V
C47 C48
D6 D7
2 1 R59 2 1 R60
0.1UF 10 0.1UF 10
CD0805-S0180 CD0805-S0180

ENABLE U9 C49 ENABLE U16 C50 M1GATEA1HI


ENABLE

8
A FAN7380 FAN7380 A
U11 1UF U12 1UF

VC

VB

VC

VB
1 1
3 4 2 7 R61 M1GATEA2HI 3 4 2 7 R62
HIN HI HIN HI
6 10 6 10
SN74LVC1G11DBVR SN74LVC1G11DBVR
6 M1A2 6 M1A1
VS VS
+3.3V
U13 U14
1 1
C76 3 4 1 5 R63 M1GATEA2LO 3 4 1 5 R64
0.1UF LIN LO LIN LO
6 6

COM

COM
10 10
SN74LVC1G11DBVR SN74LVC1G11DBVR M1GATEA1LO

4
U15A
1 2 POL_M1An
+3.3V
B B
SN74HC04DBLE
POL_M1A
POL_M1A
PWM_M1A
PWM_M1A
U15B
3 4 +12V +12V
R106 C51 C52
100K D8 D9
SN74HC04DBLE 2 1 R65 2 1 R66
0.1UF 10 0.1UF 10
CD0805-S0180 CD0805-S0180

UNUSED ENABLE U10 3 C53 ENABLE U17 C54

8
U15C FAN7380 FAN7380
U18 1UF U19 1UF
VC

VB

VC

VB
5 6 1 1
3 4 2 7 R67 M1GATEB2HI 3 4 2 7 R68 M1GATEB1HI
HIN HI HIN HI
6 10 6 10
SN74HC04DBLE
SN74LVC1G11DBVR SN74LVC1G11DBVR
C 6 M1B2 6 M1B1 C
VS VS
U15D
U20 U21
9 8 1 1
3 4 1 5 R69 M1GATEB2LO 3 4 1 5 R70 M1GATEB1LO
LIN LO LIN LO
6 6
COM

COM
SN74HC04DBLE 10 10
SN74LVC1G11DBVR SN74LVC1G11DBVR
4

4
U15E
11 10 POL_M1Bn
+3.3V
SN74HC04DBLE
POL_M1B
POL_M1B
PWM_M1B
PWM_M1B
U15F
D 13 12 D
R107
100K Drawing Title:
SN74HC04DBLE Leonardo CNC Machine
Page Title:
X-axis Mosfet Drivers
Size Document Number:
MOTOR 1 (X-AXIS) DRIVE CIRCUIT B 6
Date: Sheet Rev
10/6/2006 6 of 10 A2

1 2 3 4 5 6
1 2 3 4 5 6

+12V +12V
C55 C56
D10 D11
2 1 R71 2 1 R72
0.1UF 10 0.1UF 10
CD0805-S0180 CD0805-S0180

ENABLE U22 C57 ENABLE U29 C58 M2GATEA1HI


ENABLE

8
A FAN7380 FAN7380 A
U24 1UF U25 1UF

VC

VB

VC

VB
1 1
3 4 2 7 R73 M2GATEA2HI 3 4 2 7 R74
LIN HI LIN HI
6 10 6 10
SN74LVC1G11DBVR SN74LVC1G11DBVR
+3.3V 6 M2A2 6 M2A1
VS VS

U26 U27
C77 1 1
0.1UF 3 4 1 5 R75 M2GATEA2LO 3 4 1 5 R76
LIN LO LIN LO
6 6

COM

COM
10 10
SN74LVC1G11DBVR SN74LVC1G11DBVR M2GATEA1LO

4
U28A
1 2 POL_M2An
+3.3V
B B
SN74HC04DBLE
POL_M2A
POL_M2A
PWM_M2A
PWM_M2A
U28B
3 4 +12V +12V
R108 C59 C60
100K D12 D13
SN74HC04DBLE 2 1 R77 2 1 R78
0.1UF 10 0.1UF 10
CD0805-S0180 CD0805-S0180

UNUSED ENABLE U23 3 C61 ENABLE U30 C62

8
U28C FAN7380 FAN7380
U31 1UF U32 1UF
VC

VB

VC

VB
5 6 1 1
3 4 2 7 R79 M2GATEB2HI 3 4 2 7 R80 M2GATEB1HI
LIN HI LIN HI
6 10 6 10
SN74HC04DBLE
SN74LVC1G11DBVR SN74LVC1G11DBVR
C 6 M2B2 6 M2B1 C
VS VS
U28D
U33 U34
9 8 1 1
3 4 1 5 R81 M2GATEB2LO 3 4 1 5 R82 M2GATEB1LO
LIN LO LIN LO
6 6
COM

COM
SN74HC04DBLE 10 10
SN74LVC1G11DBVR SN74LVC1G11DBVR
4

4
U28E
11 10 POL_M2Bn
+3.3V
SN74HC04DBLE
POL_M2B
POL_M2B
PWM_M2B
PWM_M2B
U28F
D 13 12 D
R109
100K Drawing Title:
SN74HC04DBLE Leonardo CNC Machine
Page Title:
Y-axis Mosfet Drivers
Size Document Number:
B 7
MOTOR 2 (Y-AXIS) DRIVE CIRCUIT
Date: Sheet Rev
10/6/2006 7 of 10 A2

1 2 3 4 5 6
1 2 3 4 5 6

+12V +12V
C63 C64
D14 D15
2 1 R83 2 1 R84
0.1UF 10 0.1UF 10
CD0805-S0180 CD0805-S0180

A U35 C65 ENABLE U42 C66 M3GATEA1HI A


ENABLE

8
FAN7380 FAN7380
U37 1UF U38 1UF

VCC

VB

VCC

VB
1 1
3 4 2 7 R85 M3GATEA2HI 3 4 2 7 R86
HIN HI HIN HI
6 10 6 10
+3.3V SN74LVC1G11DBVR SN74LVC1G11DBVR
6 M3A2 6 M3A1
VS VS
C78
U39 U40
0.1UF 1 1
3 4 1 5 R87 M3GATEA2LO 3 4 1 5 R88
LIN LO LIN LO
6 6

COM

COM
10 10
SN74LVC1G11DBVR SN74LVC1G11DBVR M3GATEA1LO

4
U41A
1 2 POL_M3An
B +3.3V B

SN74HC04DBLE
POL_M3A
POL_M3A
PWM_M3A PWM_M3A
PWM_M3A
U41B
3 4 +12V +12V
R104 C67 C68
100K D16 D17
SN74HC04DBLE 2 1 R89 2 1 R90
0.1UF 10 0.1UF 10
CD0805-S0180 CD0805-S0180

UNUSED ENABLE U36 C69 ENABLE U43 C70


3

8
U41C FAN7380 FAN7380
U44 1UF U45 1UF
VCC

VB

VCC

VB
5 6 1 1
3 4 2 7 R91 M3GATEB2HI 3 4 2 7 R92 M3GATEB1HI
HIN HI HIN HI
6 10 6 10
SN74HC04DBLE
SN74LVC1G11DBVR SN74LVC1G11DBVR
C C
6 M3B2 6 M3B1
VS VS
U41D
U46 U47
9 8 1 1
3 4 1 5 R93 M3GATEB2LO 3 4 1 5 R94 M3GATEB1LO
LIN LO LIN LO
6 6
COM

COM
SN74HC04DBLE 10 10
SN74LVC1G11DBVR SN74LVC1G11DBVR
4

4
U41E
11 10 POL_M3Bn
+3.3V
SN74HC04DBLE
POL_M3B
POL_M3B
PWM_M3B
PWM_M3B
U41F
D D
13 12
R105 Drawing Title:
100K Leonardo CNC Machine
SN74HC04DBLE Page Title:
Z-axis Mosfet Drivers
Size Document Number:
B 8
MOTOR 3 (Z-AXIS) DRIVE CIRCUIT
Date: Sheet Rev
10/6/2006 8 of 10 A2

1 2 3 4 5 6
1 2 3 4 5 6

VMOTOR

7, 8

7, 8

7, 8

7, 8
Q1A Q2A Q3A Q4A
FDS6930 FDS6930 FDS6930 FDS6930
A M1GATEA1HI 2 M1GATEA2HI 2 M1GATEB1HI 2 M1GATEB2HI 2 A
X-AXIS MOTOR
1

1
M1A1
M1A1
M1A2
M1A2
M1B1
M1B1
M1B2
M1B2

VMOTOR
5, 6

5, 6

5, 6

5, 6
Q1B Q2B Q3B Q4B
FDS6930 FDS6930 FDS6930 FDS6930
M1GATEA1LO 4 M1GATEA2LO 4 M1GATEB1LO 4 M1GATEB2LO 4

7, 8

7, 8

7, 8

7, 8
Q5A Q6A Q7A Q8A
3

3
FDS6930 FDS6930 FDS6930 FDS6930
M2GATEA1HI 2 M2GATEA2HI 2 M2GATEB1HI 2 M2GATEB2HI 2
R1 M1_ISENSE
M1_ISENSE Y-AXIS MOTOR

1
10K
R2 C1
B 0.1 1W 0.01UF M2A1 B
M2A1
M2A2
M2A2
M2B1
M2B1
M2B2
M2B2

5, 6

5, 6

5, 6

5, 6
Q5B Q6B Q7B Q8B
FDS6930 FDS6930 FDS6930 FDS6930
M2GATEA1LO 4 M2GATEA2LO 4 M2GATEB1LO 4 M2GATEB2LO 4
VMOTOR

3
R3
7, 8

7, 8

7, 8
Q10A Q11A Q12A M2_ISENSE
7, 8

Q9A M2_ISENSE
FDS6930 FDS6930 FDS6930 10K
FDS6930 M3GATEA2HI 2 M3GATEB1HI 2 M3GATEB2HI 2
M3GATEA1HI 2 R4 C2
0.1 1W 0.01UF
Z-AXIS MOTOR
1

1
1

M3A1
M3A1
C M3A2 C
M3A2
M3B1
M3B1
M3B2
M3B2

MOTOR POWER CONNECTOR


5, 6

5, 6

5, 6

Q10B Q11B Q12B


5, 6

Q9B
FDS6930 FDS6930 FDS6930 J5
FDS6930 M3GATEA2LO 4 M3GATEB1LO 4 M3GATEB2LO 4
M3GATEA1LO 4 M1A1 1
M1A2 2
M1B1 3
3

3
3

M1B2 4
5
R5 M2A1 6
M3_ISENSE
M3_ISENSE M2A2 7
10K M2B1 8
R6 C3
0.1 1W M2B2 9
0.01UF
10
M3A1 11
M3A2 12
M3B1 13
M3B2 14
D 1-1586041-4 D

Drawing Title:
Leonardo CNC Machine
Page Title:
H-Bridge Power Stage
Size Document Number:
B 9
Date: Sheet Rev
10/6/2006 9 of 10 A2

1 2 3 4 5 6
1 2 3 4 5 6

24-36VDC POWER INPUT VMOTOR +12V +3.3V

A J6 U1 A
1 +VIN C10 R27 R28 R29
2 8 7 2.4K 1K 150
VIN VCC
3
4 0.1uF
R22 6 2
RON/SD BST
1586041-4 C11 169K C12
C72 D3 D4 D5
100uF 50V
0.1uF 0.01uF +12V
R23 L1 R24
3 1
RCL SW
105K 77uH 0 Ohm

EXPAD
4 5 D2
RTN FB SS26 R25
3.74K
LM25007 C13

9
T491B
10uF
SUPPLY RAIL INDICATORS
R26
1.0K
12V 0.4A SWITCHING REGULATOR
B B

+VIN F1 VMOTOR
R33
U2
+VIN C16 5A 0.01 1W
8 7
VIN VCC U3

8
0.1uF MAX4080
R30 C74 C75 R34
6 2

RS+

RS-
RON/SD BST 100uF 50V 100uF 50V 20K
C14 169K C15
C73 2
VCC
100uF 50V
0.1uF 0.01uF +3.3V
R31 L2 R96
3 1
RCL SW
105K 77uH 0 Ohm 5
OUT ISENSE
EXPAD

4 5 D18
RTN FB SS26 R32
360 3
NC
6
LM25007 C17 NC
C18 7
9

GND
T491B R35 NC
C C
10uF 1.0K
0.1uF

4
R95
1.0K
3.3V 0.4A SWITCHING REGULATOR

VSENSE

MOTOR CURRENT AND VOLTAGE MONITOR

D D

Drawing Title:
Leonardo CNC Machine
Page Title:
Power Supplies
Size Document Number:
B 10
Date: Sheet Rev
10/6/2006 10 of 10 A2

1 2 3 4 5 6

You might also like