cnc machine design report
DESCRIPTION
it makes easy to understand about basics of designing cnc machne system.TRANSCRIPT
CNC Machine Design Report
1
Project 24
Submitted By:
Team: F09-24-CNCMACHD
CNC Machine Design Report
Prepared for: Saluki Engineering Company
Team Members:
James Williams (PM) EE/CompE
Shawn Gossett EE
Eric Blankenship EE/CompE
Glenn E Spiller II CompE
Pat Brokaw ME
Brian Hagene ME
CNC Machine Design Report
2
Acknowledgements
Saluki Engineering Company’s Team 24 would like to thank these
individuals for their input and support in proposing and designing the project.
Dr. Frances Harackiewicz
Dr. William Osborne
Mrs. Kay Purcell
Dr. Alan Weston
Dr. Haibo Wang- Faculty Technical Advisor
Mr. Mark Hopkins- Technician/ Field Engineer for Allegro Micro-devices
Saluki Engineering Company’s Team 24 would also to thank these
individuals and their respective companies for their donations to accomplish the construction of the project.
Mr. Howard Everton- President of Norva Plastics
Barb Saathoff- Representative from Dytronix
CNC Machine Design Report
3
1. Table of Contents 2. Introduction ........................................................................................................................................ 13
2.1 Main Block Description ............................................................................................................... 13
2.2 Options Considered and Chosen Option ..................................................................................... 14
2.2.1 Mechanical Subsystem ........................................................................................................ 14
2.2.2 Main Controller Subsystem ................................................................................................. 15
2.3 Expected and Achieved Performance Data ................................................................................ 15
2.4 Limitations................................................................................................................................... 15
2.5 Summarization of Fault Analysis ................................................................................................. 16
3. Mechanical Subsystem........................................................................................................................ 17
3.1 Deflections .................................................................................................................................. 17
3.1.1 X-axis ................................................................................................................................... 17
3.1.2 Z-axis ................................................................................................................................... 18
3.1.3 Y-axis ................................................................................................................................... 19
3.2 Mechanical Drive System ............................................................................................................ 19
3.2.1 Ballscrew Lead Specification ............................................................................................... 19
3.2.2 Ballscrew Linear Force and Torque ..................................................................................... 19
3.2.3 Thrust Force ........................................................................................................................ 20
3.3 Table Top Support Calculations .................................................................................................. 20
3.4 Tool Heads .................................................................................................................................. 21
3.4.1 Spindle Mount ..................................................................................................................... 21
3.4.2 Solder Paste Dispenser........................................................................................................ 21
3.5 Machine Electronics .................................................................................................................... 22
3.5.1 Cable Carrier ....................................................................................................................... 23
3.5.2 Electrical Component Housing ............................................................................................ 23
3.5.3 Pendant Case ...................................................................................................................... 23
3.6 Equipment Lists ........................................................................................................................... 23
3.6.1 Design Tools ........................................................................................................................ 23
3.6.2 Machining and Assembly Tools ........................................................................................... 23
3.7 Components and Specifications .................................................................................................. 24
CNC Machine Design Report
4
3.7.1 Material Specifications ........................................................................................................ 24
3.8 Components ................................................................................................................................ 24
3.8.1 Z-axis ................................................................................................................................... 24
3.8.2 X-axis ................................................................................................................................... 26
3.8.3 Base ..................................................................................................................................... 27
3.8.4 Y-axis ................................................................................................................................... 28
3.8.5 Tool Heads........................................................................................................................... 29
3.8.6 Machine Electronics ............................................................................................................ 31
3.8.7 Additional Components ...................................................................................................... 31
3.9 Data Sources ............................................................................................................................... 32
3.9.1 Websites .............................................................................................................................. 32
3.10 Fault analysis ............................................................................................................................... 32
3.10.1 Fastener and Component Failures ...................................................................................... 32
3.10.2 Excessive Wear .................................................................................................................... 32
3.11 Health & Safety, Environmental, Life Cycle, and Societal Issues ................................................ 33
3.12 Engineering Drawings ................................................................................................................. 33
4. Electrical .............................................................................................................................................. 34
4.1 Motor Driver Board ..................................................................................................................... 34
4.1.1 Scope ................................................................................................................................... 34
4.1.2 Block Diagram ..................................................................................................................... 34
4.1.3 Technical Description .......................................................................................................... 36
4.1.4 .................................................................................................................................................... 41
4.1.5 Health and Safety ................................................................................................................ 44
4.1.6 Equipment Required ........................................................................................................... 45
4.1.7 Schedule Data for Driver Board .......................................................................................... 45
4.1.8 Test, Measurement and Fault Analysis ............................................................................... 45
4.1.9 .................................................................................................................................................... 46
4.1.10 Section Summary ................................................................................................................ 49
4.2 Main Controller Schematic ......................................................................................................... 50
4.2.1 Communication Controller.................................................................................................. 50
CNC Machine Design Report
5
4.2.2 CPLD Connections ............................................................................................................... 58
4.2.3 Timing for the CPLD ............................................................................................................ 59
4.2.4 Power supply ....................................................................................................................... 59
4.3 Pendant Subsystem ..................................................................................................................... 61
4.3.1 Introduction ........................................................................................................................ 61
4.3.2 Hardware Subset ................................................................................................................. 61
4.3.3 Schematic Design ................................................................................................................ 61
4.3.4 PCB and Physical Layout...................................................................................................... 62
4.3.5 Physical Display after Button Press ..................................................................................... 65
5. Firmware ............................................................................................................................................. 66
5.1 Communication Controller: ........................................................................................................ 66
5.1.1 Listening State: .................................................................................................................... 67
5.1.2 Preamble State: ................................................................................................................... 67
5.1.3 Receiving State: ................................................................................................................... 67
5.1.4 Group ID .............................................................................................................................. 68
5.1.5 Post-amble State: ................................................................................................................ 70
5.2 Motion Controller Micro-Processor Code ................................................................................... 71
5.2.1 Events .................................................................................................................................. 71
5.2.2 Initialization ......................................................................................................................... 71
5.2.3 Parameter Table .................................................................................................................. 72
5.2.4 Global Table ........................................................................................................................ 73
5.2.5 Commands .......................................................................................................................... 74
5.2.6 Motion Controllers data flow .............................................................................................. 76
5.2.7 Interrupts ............................................................................................................................ 78
5.2.8 Files in the Motion Controller Program .............................................................................. 79
5.2.9 Bresenham Algorithms ........................................................................................................ 81
5.3 Firmware Subset ......................................................................................................................... 83
5.3.1 Interrupts ............................................................................................................................ 83
5.3.2 Driver Subset ....................................................................................................................... 84
5.3.3 Display Driver ...................................................................................................................... 87
CNC Machine Design Report
6
5.3.4 Analog Driver ...................................................................................................................... 90
5.3.5 Serial Driver ......................................................................................................................... 91
5.3.6 Main Subset ........................................................................................................................ 92
5.3.7 Function Sub-block .............................................................................................................. 94
5.3.8 Jog Sub-block....................................................................................................................... 95
5.3.9 Cancel Sub-block ................................................................................................................. 96
5.3.10 Accept Sub-block ................................................................................................................. 97
5.3.11 Directory Block .................................................................................................................... 98
5.3.12 Graphics ............................................................................................................................ 100
5.3.13 Screens .............................................................................................................................. 101
5.3.14 Relation To Other Sub-Systems ........................................................................................ 109
6. Conclusions and Recommendations ................................................................................................. 110
6.1 Conclusions ............................................................................................................................... 110
6.2 Recommendations .................................................................................................................... 110
7. Cost/Manufacturability ..................................................................................................................... 111
Materials ............................................................................................................................................... 112
7.1 Mechanical Cost ........................................................................................................................ 113
7.2 Electrical Cost ............................................................................................................................ 120
8. APPENDIX A ....................................................................................................................................... 125
8.1 VGA Data Sheet ......................................................................................................................... 125
8.1.1 MoveTo() ........................................................................................................................... 126
8.1.2 EraseScreen ....................................................................................................................... 126
8.1.3 SetBackground() ................................................................................................................ 126
8.1.4 DrawLine() ......................................................................................................................... 126
8.1.5 SetFontSize() ..................................................................................................................... 127
8.1.6 DrawBox().......................................................................................................................... 127
8.1.7 OpaqueTransparent() ........................................................................................................ 127
8.1.8 PlaceText() ......................................................................................................................... 127
8.1.9 WriteString() ..................................................................................................................... 127
8.1.10 DisplayImage() .................................................................................................................. 128
CNC Machine Design Report
7
8.1.11 PaintArea() ........................................................................................................................ 128
8.1.12 DrawCircle() ...................................................................................................................... 128
8.1.13 SetColumn() ...................................................................................................................... 128
8.1.14 SetRow() ............................................................................................................................ 129
8.1.15 SetRowColumn() ............................................................................................................... 129
8.1.16 PlaceCharUnFor() .............................................................................................................. 129
8.2 3.1 Screens ................................................................................................................................ 129
9. APPENDIX B ....................................................................................................................................... 130
9.1 X-axis ......................................................................................................................................... 130
9.2 Y-axis ......................................................................................................................................... 131
9.3 Calculated Moments and Equivalent Force Couples on X Rails ................................................ 131
9.4 Trade off Study: 3 rods vs 4 rods, Rod Spacing ......................................................................... 133
9.4.1 3 Rod Configuration .......................................................................................................... 133
9.4.2 4 Rod Configuration .......................................................................................................... 135
9.5 Table Top Support Calculations ................................................................................................ 136
9.5.1 Table Support Calculations ............................................................................................... 136
9.6 Ballscrew Calculations ............................................................................................................... 137
9.6.1 Ballscrew Calculations ....................................................................................................... 137
9.7 Cable Carrier ............................................................................................................................. 138
9.7.1 Cable Carrier Selection ...................................................................................................... 138
9.8 Solder Paste Dispenser ............................................................................................................. 138
9.8.1 Equations .......................................................................................................................... 138
9.8.2 Solution: General Engineering Equation ........................................................................... 139
9.8.3 Flow Locations ................................................................................................................... 140
9.8.4 Solution: Force Approximation ......................................................................................... 140
9.9 Design Notebook: Pat Brokaw .................................................................................................. 140
9.9.1 Table of Contents .............................................................................................................. 140
9.10 Cost Data and Schedule Data .................................................................................................... 143
9.10.1 Prototype Cost .................................................................................................................. 143
9.11 Manufacturing Costs and Schedule .......................................................................................... 150
CNC Machine Design Report
8
9.11.1 Equipment Costs ............................................................................................................... 150
9.11.2 Material Costs ................................................................................................................... 153
9.11.3 Fasteners ........................................................................................................................... 160
9.11.4 Component Data Sheets ................................................................................................... 163
10. APPENDIX C ....................................................................................................................................... 166
10.1 Pendent Code Datasheet .......................................................................................................... 166
10.1.1 Graphics Header File: ........................................................................................................ 166
10.1.2 Graphics Source File: ......................................................................................................... 168
10.1.3 Screens Header File: .......................................................................................................... 172
10.1.4 Screens C Source file: ........................................................................................................ 174
10.1.5 Support Source File: .......................................................................................................... 183
11. APPENDIX C ....................................................................................................................................... 184
11.1.1 Test Data ........................................................................................................................... 184
11.1.2 Calculations Section .......................................................................................................... 191
11.1.3 List of Figures .................................................................................................................... 203
11.1.4 Simulations ........................................................................................................................ 206
CNC Machine Design Report
9
CNC Machine Design Report
10
Saluki Engineering Company
Senior Engineering Design
College of Engineering – Mailcode 6603
Carbondale IL 62901-6603
618-453-7837, -7031, -7025, -7642
Transmittal Letter
27 April 2010
Subject: CNC Machine Design Client: Engineering Innovations, Inc.
Project Number: F09-24-CNCMACHD
The CNC Machine that was requested by Engineering Innovations, Inc. has been designed,
tested, and built into a prototype by Team 24 of the Saluki Engineering Company. The
prototype can successfully perform different functions of manufacturing through one of three
different communication links that can interpret multiple file types. Attached, you will find the
design report to aid in understanding the creation of the machine. Also attached in a separate
packet, there is a user’s manual to help anyone understand how to assemble, connect, and
correctly operate the machine, and there is a technician’s manual to provide information to a
trained specialist to find and correct any problems that may occur during operation of the
machine. We request that you be very careful while operating the machine and completely
read the user’s manual before starting any job.
We would like to thank you for having interest in working with Saluki Engineering Company,
and if there are any further questions feel free to contact the project manager, James Williams,
at 618-937-8521.
Sincerely,
James Williams- Project Manager
Shawn Gossett- Secretary
Executive Summary
CNC Machine Design Report
11
The CNC Machine is a system that can be used not only by manufacturers
but also by small scale hobbyists. It has been designed with these features.
Microcontroller system to send and receive information
Driver system to run machine at desired specifications
Hand pendant system to access information and manipulate machine
Mechanical system to support weight of gantry while in motion or idle plus the weight of the attached tool heads, handle deflection, and prevent thermal expansion
This machine has these advantages over similar products.
Three forms of communication either through serial port, Ethernet, or USB jump drive
Controllable through a specially designed hand pendant
Multiple tool heads for different applications including milling, paste dispensing, and air brushing
Accepts multiple types of files
Able to move at high speeds
Longer working life compared to other relative machines
Costs much less than competitors
Easy to assemble, operate, and maintain
This document contains a report with all relevant material concerning the
design of the entire machine. The report will be broken down into these sections
Overall description of system
Sub-system design
Cost Estimate
CNC Machine Design Report
12
Implementation Schedule
Conclusion with discussion of design
Complete time for implementation of the machine will be approximately 13
weeks, and it would have a total cost of $1814.
CNC Machine Design Report
13
2. Introduction
2.1 Main Block Description
The CNC machine is a system that is able to accept numerical control inputs
to machine a part specified by the exact positioning of the inputs. The machine is
able to accept commands either through a directly connected personal computer
or a flash drive that is activated through the pendant subsystem. The personal
computer is allowed three direct forms of communication to the main controller
subsystem either through Ethernet, USB, or serial link. The main controller
subsystem is able to interpret and communicate the limits of any job, and it can
directly control movement of the attachable tool heads. With direct connection to
the main controller subsystem, the pendant subsystem is able to accept jobs
uploaded through a flash drive, access information incoming through one of the
three communication ports that are active, and can change specified rates of
speed and the direction of movement of the machine. The framework of the
system is set up by the mechanical subsystem which will allow for movement in
the x, y, z axes and specify spatial limitations of any acceptable job. The main
controller, pendant, and mechanical subsystems are able to interact through
power provided by the motor driver subsystem. The motor driver subsystem will
contain a power supply that can accept input power through an electrical outlet
plug-in, provide movement independently to the x, y, z axes, and can add an extra
board to power the acceleration axis. The overall block diagram of the machine is
pictured below.
CNC Machine Design Report
14
Personal
Computer Main
Controller
Board
Pendant
Motor
Power
Supply
Motor
Driver
Board
A Axis
Driver
Board
Table
Motor
1
Motor
2
Motor
3
Motor
4
Tool
head
Limits
Ethernet
USB
Serial
Flash Drive
Figure 1: Overall Block Diagram
2.2 Options Considered and Chosen Option
2.2.1 Mechanical Subsystem
In consideration of the mechanical subsystem, there were two different
aspects of the design that had to be considered before implementation of the
design. These two aspects are listed below.
CNC Machine Design Report
15
Materials of the structure
Railing of the table
The materials of the structure options were between aluminum and high
density polyethylene. The chosen option for the materials was the high density
polyethylene because of the decrease in total weight of the entire system, less
cost, and the dampening of vibrations caused by mechanical movement.
The railing of the table options were between versa railing and rod railing.
The chosen option for the railing was the rod railing because it had a high
decrease in costs compared to its counter-part.
2.2.2 Main Controller Subsystem
In consideration of the main controller subsystem, there is one aspect that
was considered before implementation of the design that is listed below.
Microprocessor
The microprocessor of the controller was between the PIC 24 and the
Atmel. The chosen option for the microprocessor was the PIC 24 because of
its less cost, its availability of development tools, its easier level of
programming for the instruction set, and its greater reliability.
2.3 Expected and Achieved Performance Data
The two main performance data statistics are for the machine’s
acceleration rate and velocity rate. The expected performance of both rates was
anticipated to be 4 inches per second. After designing and testing, the achieved
rates were within a small deviation for both rates expected values.
2.4 Limitations
The machine is limited by only two factors. These factors are types of
materials that can be cut and the total weight of the tool head. The cutting
CNC Machine Design Report
16
material is only allowed to light metals, wood, and circuit boards. The tool head
weight can not exceed 5 pounds.
2.5 Summarization of Fault Analysis
As of this date, the faults detected in the motor driver subsystem do not
affect overall system performance, and no other faults can be detected in the
system without further testing.
CNC Machine Design Report
17
3. Mechanical Subsystem The mechanical subsystem includes the CNC machine and all of its components. This consists of the
machine frame, the gantry for each axis, the work table, and the interchangeable tool heads. This
subsystem produces a machine that has three dimensions of reliable and precision motion and allows
milling, silk screening, and paste dispensing to be done to a part that has been fixed to the work table.
Each axis has been supported by precision guide rails and driven linearly by ballscrews. The ballscrews
provide axis motion by transferring torque from the three separate stepper motors. These motors are
powered by the Power Drive Electronics subsystem and controlled by the Main Controller subsystem.
3.1 Deflections The most significant purpose of the mechanical design was to provide three gantries that would
allow precision to be maintained in the tool head position. In order to obtain this, a maximum allowable
deflection of 0.001 inch was set for each guide rail. Each axis was designed to support its weight and
withstand the force incurred during milling while maintaining this deflection tolerance.
3.1.1 X-axis
3.1.1.1 Calculated Moments and Equivalent Force Couples on X Rails
This iterative design process began with the determination of the deflection in the x-axis. The x-axis
provides motion across the width of the table and must support both the weight of the vertical
axis(z-axis) and withstand the cutting force. Because the x-axis crosses the table, it required the use of
unsupported precision rail and was susceptible to the largest deflection. In order to find the deflection
of the x-axis rails, a tentative design for the z-axis was done and the weight of each component,
including a 10lb tool head, was multiplied by the distance from its center of gravity to the center of the
x-axis ballscrew. These were summed in appendix Table 1.4-1 to find a moment due to the weight of the
z-axis of approximately 100 lbs.in. Then, the maximum cutting force experienced by the tool head when
extended fully to the table was set at 5.5 lbs and multiplied by the vertical distance. This calculation,
shown in Table 1.4-2, produced a 75 lbs.in moment.
With the calculated moments, the resultant forces experienced by each rail was then determined.
Since the ballscrew is centered between the rails, the resultants produce force couples in the horizontal
and vertical directions that are equivalent to the moments of the cutting force and the z-axis weight,
respectively. Each resultant was found by dividing the moments by the spacing of the horizontal and
vertical spacing of the rails as shown in Table 1.5-1 and Table 1.5-3. Table 1.5-1 and Table 1.5-3 also
show that the effect of increasing the spacing between the rails was a decrease in the resultant force
experienced by each rail. The final spacing was set at 4 in as a compromise between reduced forces and
a compact x-axis design.
CNC Machine Design Report
18
3.1.1.2 Trade off Study: 3 rods vs 4 rods
The force resultant is reduced further with the use of three and four rails. Tables 1.5-2 and 1.5-4
show the rod orientation with three and four rail designs, respectively. From Table 1.5-1 showing the
configuration for three rails, the moment due to weight is balanced by a vertical force couple where
each force is F1 and the moment due to the cutting force is neutralized by a horizontal force couple with
each component as F2. Rod 1 experiences all of the vertical force, F1, while rods 2 and 3 only hold half
of this force component because both are aligned. The horizontal force component is split between rods
1 and 2 while rod 3 experiences the entire force. After determining the horizontal and vertical forces on
each rod, a resultant was found for each and is shown in Table 1.5-1. The top rear rail experienced a
26.70 lb force, while the top front and bottom rails were loaded with 15.63 lb and 22.53 lb forces
respectively. These resultants are presented more clearly in Table 1.5-2 in the cell corresponding to the
orientation of the rod. In addition, a free body diagram sketch can be referenced on page 31 of Pat
Brokaw’s design notebook.
When four rods are used, both components of the force couple are divided between two rods. This
reduces the resultant force on each rod even further to 15.63 lbs each. A comparison was done between
the configuration for three rods and four rods was done in order to determine if this additional
reduction in force justified adding a fourth rod. This first required a comparison of the minimum rod
diameter allowable for a three and four rod design.
3.1.1.3 Rod Diameter Selection
The rod diameter required to support a given weight was found using the deflection equation given
in Figure 1.1-1 (Budynas). This equation, applied twice, best represents the x-axis deflection problem
because the rod has fixed supports with two point forces applied at the bushing locations. Table 1.2-1
shows this calculation with the modulus of elasticity set at 29x106 psi, the maximum deflection set at
0.001 in, the length of the rail at 30 in, and the forces separated by the center to center distance of the
bushings of 1.3125 in. The force that results in a 0.001 in deflection was found for rod diameters of 0.75
in to 1.25 in.
It was determined that the 1 in rod only supported 19.4 lbs and the next available rod size of 30mm,
or 1.18 in, supported 37.8 lbs at a deflection of 0.001 in. With these numbers, it was found that with
three rods a one inch rod was insufficient to support the load and the 30mm rod diameter was required.
However, if four rods were used the 15.63 lb force on each rail could be supported by the 1 in diameter
rod. Then, the final comparison involved cost. The costs include the expense of the rails, the bushings,
and the additional machining required for the additional rod. It was determined from this analyze that a
3 rod configuration would be less expensive and ultimately the most desirable design.
3.1.2 Z-axis
In the process of evaluating the deflections in the x-axis, it was apparent that the horizontal distance
between the tool head’s center of gravity and the x-axis ballscrew was a significant factor in the
calculated moment. It was determined that reducing this distance would greatly reduce the moment
CNC Machine Design Report
19
due to weight. For this reason, the versa rails were selected as the linear guides for the vertical axis. The
height of rail system from the bottom of the rail to the top of the bearing block was 1.18 in and the total
including the standoffs was 1.6024 in. A cross-sectioned sketch of this axis can be found on page 36 of
Pat Brokaw’s design notebook. This reduced the moment and because the versa rails are capable of
dynamic loads of 2449 lbs, all deflection concerns in the z-axis were eliminated.
3.1.3 Y-axis
The deflections in the y-axis guide rails were also an area of concern. The rails are mounted beneath
the work table and the y-axis provides motion along the length of the table. The force that it must
support is solely due to the weight of the z-axis and x-axis gantries. This weight is near 100lbs and must
be supported on a 38 in long rail. Table 1.3-1 shows the force required to deflect a rod of this length
0.001 in and compares the forces for rod diameters from 0.75 in to 1.25 in. From the calculations in
Table 1.3-1, it was determined that this tolerance could not be held by a linear rail alone and a
supported guide rail system must be used for this application.
3.2 Mechanical Drive System
3.2.1 Ballscrew Lead Specification
Once the linear guides for each axis were designed to hold the desired deflection tolerance, the
mechanical drive system was examined. The mechanical drive utilizes ballscrews to convert the torque
from the drive motors into linear motion. Ballscrews use circulating ball bearings within the nut which
act to eliminate frictional losses and reduce wear in comparison to other linear motion alternatives,
namely ACME threaded power screws. A precision of 0.001 in was desired in the linear motion of the
tool head and a ballscrew with a lead of .200 in/rev was selected. As explained in the Power Drive
Electronics subsection, microstepping is used to turn the ballscrew in increments small enough to
achieve this precision.
3.2.2 Ballscrew Linear Force and Torque
Next, the forces transmitted linearly through the ballscrew were calculated in order to validate the
diameter selected and determine a method for mounting the ballscrew. Table 3.1-1 shows the
specifications of the ballscrew and some of the operating conditions considered. Two conditions were
considered when the machine was accelerating and when operating at a constant velocity. The force
exerted on the ballscrew is equivalent to the acceleration force and the force of friction that must be
overcome when moving along the gantry. When accelerating, the static coefficient of friction was used
and the force of acceleration is added to the frictional force. When moving at a constant velocity, only
the frictional force is present and the kinetic coefficient of friction was used.
Since the y-axis carries the greatest weight, it was used to determine the maximum forces on the
ballscrews. As shown in Table 3.1-1, the static friction force was 25 lbs and the force of acceleration was
3.88 lbs. This converts to a torque of 16.3 oz.in. When moving at a constant velocity, the ballscrew must
overcome a kinetic friction force of 18.75lbs by providing a torque of 10.6 oz.in. An acceleration of 15
CNC Machine Design Report
20
in/s2 was set for machine operation and the time to accelerate to various velocities was determined.
This was used in a separate equation provided by Roton, the ballscrew manufacturer, and it was
confirmed that the force remained constant at 3.89 lbs if the acceleration is kept at 15 in/s2.
3.2.3 Thrust Force
The linear force carried by the ballscrew is the thrust force that must be carried by the bearings and
the gantry sides. The ballscrew was supported by a roller bearing on one end and was fixed on the other
using a thrust bearing block assembly shown in Figure 3.3-1. A preliminary sketch of this assembly is a
shown on page 39 of Pat Brokaw’s design notebook and final engineering drawing of the thrust bearing
block is present as drawing number B-13. One thrust bearing was placed between the shaft step and the
thrust bearing block. Then another thrust bearing was pressed into the other side of the thrust bearing
block and a nut was tightened on the shaft threads to remove all free play in the bearings. This
effectively removed all linear play in the ballscrew when the thrust bearing block is mounted to the side
of the gantry. In addition, seals were placed on either end of the bearing block and a greases zerk was
threaded into the side to allow for routine lubricating of the thrust bearings.
Figure 3.2-1
With the ballscrew fixed with the thrust bearing block, all linear forces are then transferred to the
gantry sides. Each gantry side was fixed solidly, and it was determined that each axis would be able to
handle this thrust force. For example, each x-axis rod is mounted with a 3/8 in bolt threaded into the
end and the uprights are constructed of ¾ in high density polyethylene quite capable of withstanding
this thrust force. Additional finite element analysis for each gantry end is certainly desirable to confirm
this observation. However, the expertise was not available among the team’s mechanical engineers and
unfortunately time did not allow for the skills to be obtained and applied for this project. In future
considerations, this will certainly be an area of focus.
3.3 Table Top Support Calculations The design of the gantry guide rails and the ballscrew drive system provide precise motion of the
tool head. Additional calculations were then done to ensure that when a part is placed on the table it is
held accurately in position and that no deflections are experienced in the work table. The table top is
constructed of 0.5 in high density polyethylene provided by Norva Plastics. This offers ease of
CNC Machine Design Report
21
construction, superb appearance, and acts to dampen vibrations. However, the maximum allowable
weight of a part placed on the table without deflection is minimal. In order to allow milling to be done to
larger stock and to maintain tolerances when tooling inflicts downward forces, such as in drilling
applications, additional supports were needed under the table.
It was determined that three rectangular, steel supports would be distributed evenly beneath the
table. The calculation that justified this decision is shown in Table 2.1-1 and was done using the
deflection formula shown in Figure 1.1-1, which was used previously for the guide rail deflections.
However, in this case the second moment of area was changed appropriately for a rectangular beam. It
was determined that a rectangular rail with dimensions, 0.375 in by 1.00 in, provided an additional 6.1
lbs of support per rail if the part weight is approximated as two point forces separated by 1.3125 inches.
This allows for a piece of metal stock in excess of 18 lbs to be placed in the center of the table without a
deflection greater than 0.001 in.
3.4 Tool Heads With a precision machine and a well supported table designed, attention was turned to the
functionality of the machine. This includes the tool heads available for attachment to the z-axis. The
machine is intended to be multifunctional with applications ranging from milling, solder paste
dispensing, and silk screening. For this project, a spindle mount was designed and prototyped. In
addition, a solder paste dispensing tool attachment was designed for future prototyping and testing.
3.4.1 Spindle Mount
The weight of a 10lb spindle was accounted for in the design of the machine, allowing for
significant millwork to be done by this CNC. However, for the prototype a low cost, light duty spindle
was fitted to the z-axis. The components of this spindle mount are presented in the following drawings:
B-33, B-34, B-35.
3.4.2 Solder Paste Dispenser
Considerable design was done to create a method of dispensing solder paste from a syringe using
a small stepper motor, a reciprocating screw, and a plunger. These components are presented in
drawing numbers B-36, B-37, B-38, B-39, B-40, B-41, and B-42, and the assembly is shown in Figure
5.2-1. It was determined that the paste flowrate was related to the motor speed using Equation 5.3.1,
which would be used in the control algorithm for the paste dispenser. Also, the required torque was
found to be dependent on the fluid pressure as shown by equation 5.3.2.
CNC Machine Design Report
22
Figure 3.4-1
(5.3.1)
(5.3.2)
An attempt was made to model the paste flow as a newtonian fluid using the general
engineering equation, shown in Equation 5.3.3, with head losses along each length of the syringe, at
each diameter contraction, and at the needle exit. These calculations are shown in appendix Table 5.2-1
with the conditions at each point in the syringe shown in Table 5.3-1. Also, hand calculations and a
sketch of the paste syringe with the locations numbered are shown on page 48 of Pat Brokaw’s design
notebook. However, due to the minimal needle size and the low flowrate it appeared that some
modifications must be made to this equation. A simplified attempt was made using only the dynamic
pressure of the fluid and the head loss along the length of the needle, as shown in Equation 5.3.4. Still,
the resulting pressure appeared to exceed what was determined to be a reasonable by those familiar
with the use of a paste syringe. In a final attempt to spec the motor, forces applied to syringe plunger
were approximated and converted to the required torque in Table 5.4-1. From this, it was determined
that a small stepper motor would be sufficient to power the reciprocating screw and plunger and further
analysis would require prototyping and testing.
(5.3.3)
(5.3.4)
3.5 Machine Electronics Additional design considerations to accommodate the electronics required for the operation of the
CNC machine. This includes the wiring to the motors, the housing for the main controller and driver
boards, and the case for the pendant to be use by the operator to make machine inputs.
CNC Machine Design Report
23
3.5.1 Cable Carrier
Cable carriers were used to organize the wiring to the motors, spindle, and limit switches and
allow them to move with the machine throughout its travel. Appendix Table 4.1-1 provides a list of the
wires to be held in the wire carrier for each axis. The diameters of each wire were measured and cable
carriers of appropriate dimension were ordered from the McMaster Carr website.
3.5.2 Electrical Component Housing
A protective case was required to house the main controller board, the motor driver board, a
capacitor, a relay, and a transformer. Polycarbonate was selected for the case material to provide
protection while allowing the electronics to be attractively displayed. In this case, the main controller
board was placed on the bottom while the driver board was elevated directly above. A divider was then
placed inside the case to separate these boards from the capacitor, relay, and transformer. The purpose
of this divider was to protect the boards in the event of a catastrophic capacitor failure. Additional
accommodations were made to allow for connections to the motors and the spindle, as well as VGA, DB,
Ethernet, USB, DC power, and AC power inputs/outputs. The drawing of this housing has been
presented in the assembly drawing BB-5.
3.5.3 Pendant Case
The pendant will allow the machine operator to make positional and feed rate adjustments as
well as perform other input tasks as described in the pendant subsystem. A case was designed to house
the two separate boards containing functional and directional buttons and the OLED screen. The
drawing for this case has been labeled B-43. An attempt was made to machine this complex design from
high density polyethylene. However, it was determined that some dimensions needed to be changed to
improve the strength of the casing if this material was to be used. Further considerations were made to
utilize polycarbonate for this construction of this case to provide greater strength and allow the internal
boards to be displayed. For prototyping purposes, the pendant boards will be mounted to single piece of
polycarbonate and further machining will be done to finish this component.
3.6 Equipment Lists
3.6.1 Design Tools
AutoCad Inventor
Microsoft Excel
3.6.2 Machining and Assembly Tools
Mill
Lathe
Grinding Lathe
Horizontal and Vertical Bandsaws
Drill Press
Chop Saw
CNC Machine Design Report
24
Cordless Drill
Combination Wrenches
Allen Wrenches
Screw drivers, both Phillips and Flat head
Various endmills from 1/8-5/8
Fly cutter and various milling tool heads
Boring head
Calipers
Micrometers
Telescoping gauges
Depth gauges
Tap handle
Taps: #4-40, #6-32, #8-32, #10-24, 1/4-20, 3/8-16, 3/8-24, 1/8-27 NPT
Die: 5/16-18
Drill bits: #43, #36, #32, #29, #27, #25, #24, #18, #9, #7, F, H, Q, W, X, 5/16”, ½”,
3.7 Components and Specifications
3.7.1 Material Specifications
Material E (106psi) Sy (ksi) ρ (g/cm3) E/ρ Sy/ρ Hardness
Steel A36 29 36 7.85 3.69 4.6
Aluminum 6061-T6 10 37 2.71 3.69 13.7
HDPE 0.12 4.3 0.96 0.13 4.5 D60-70
Polycarbonate 0.32 9 1.2 0.27 7.5 M70-82
3.8 Components
3.8.1 Z-axis
The z-axis allows vertical motion of the tool head. The total travel of the vertical axis on this CNC
machine is 8.24 in. An assembly of the z-axis is shown Figure 8.2-1 and in the drawing BB-1. The
following components are included:
CNC Machine Design Report
25
Figure 3.8-1
Z-axis Ballscrew: A 5/8 in ballscrew was used and shaft steps were machined to allow for
thrust and ball bearing supports. The dimensions of the ballscrew are shown in drawing B-1
and the specifications, per Roton, are included in the Section 9 of the appendix.
Z-axis Thrust Bearing Block: The design of this component required minimizing its height in
order to reduce the overall height of the z-axis. This part drawing is B-2.
Z-axis Ballnut Flange: This part has internal threads for the ballnut and threaded holes for
mounting to the z-mount as shown in part drawing B-3.
Z-top: A recessed section allows for the z-axis motor, and the ball bearing supporting the
ballscrew was pressed into the z-top. Part dimensions are shown in drawing B-4.
Z-bottom: The bottom of z-axis allows for the mounting of the thrust bearing block and
clearance of the end of the ballscrew. Refer to drawing B-5 for dimensions.
Z-sides: These parts provide additional strength to the z-top and z-bottom which must
withstand the thrust force of the ballscrew. These parts are shown in drawing B-6.
Z-Back: The z-back acts as the base component in the z-axis. The z-top, z-bottom, z-sides,
and the versa rails all mount to this component. The z-back was also used to mount the z-
axis to the x-traveling block. This part was designed with grooves for aligning the versa rails
and an inset in the top to position the z-top. The dimensions of this component are shown
in drawing B-7.
Z-mount: This part connects the tool head, the versa blocks, and the ballscrew. Drawing B-8
shows the dimensions of this part.
Standoffs: These were included to account for height difference between the versa blocks
and the clearance required for the ballscrew and its supporting bearings. Clearance holes
CNC Machine Design Report
26
were machined for the versa block bolts and the threaded holes are used to mount the tool
head. These part is shown is shown in drawing B-9.
Versa rail: These precision rails were used to guide the vertical travel of the tool head and
were selected over other alternatives in order to reduce the height of the z-axis. The
dimensions are shown in drawing B-10 and the specifications, from Anaheim Automation,
are given in Section 9 of the appendix.
Versa block: These travel along the versa rail and use ball bearings to support a maximum
dynamic load of 2449 lbs. The specifications from Anaheim Automation are provided in
Section 9 of the appendix and the part drawing is B-11.
3.8.2 X-axis
The x-axis provides tool head motion across the work table with a maximum travel of 24.15 in. The
assembled x-axis, shown in Figure 8.2-2 and in drawing BB-2, includes the following components:
Figure 3.8-2
X-axis Ballscrew: A 5/8 in ballscrew as used to provide linear motion along the x-axis and the
dimensions of this part are given in drawing B-12.
X-axis Thrust Bearing Block: The part holds the thrust bearings required to carry the linear force
of the ballscrew. Dimensions are shown in drawing B-13.
X-axis Ballnut flange: This part connects the ballnut to the the x-traveling block and transmits
the motion of the ballscrew. This part is shown in drawing B-14.
X-Rods: These rails guide the precise linear motion of the x-axis while supporting the weight of
the z-axis and withstanding the force due to the cutting head. Dimensions are found in
drawing B-15 and Lintech Motion specifications are included in Section 9 of the appendix.
CNC Machine Design Report
27
X-Traveling Block: This part holds the ball bushings that slide along the x-rods. These bushings
have been pressed into the bored holes for an interference fit that will hold throughout the
operating temperature range. The x-traveling block also provides mounting holes for the z-axis
and all dimensions are shown in drawing B-16.
X-Bushings: The bushings allow the x-traveling to travel along the x-rods and carry the load
through ball bearings. The specifications of these bearings from Lintech Motion are provided in
Section 9 of the appendix.
X-Top: This part mounts across the top of the x-axis and provides some additional strength as
well as providing for the mounting of the x-axis cable carrier. The part dimensions are shown in
drawing B-17.
X-Back: This part covers the back of the x-rails, providing some strength but primarily protecting
the rails from debris. Drawing B-18 shows the dimensions of this component.
3.8.3 Base
This assembly provides the solid foundation for the CNC machine as well as support for the y-axis.
The assembly, shown in Figure 8.2-3 and in drawing BB-3, includes the following components:
Figure 3.8-3
Table Bottom: The table bottom is the base of the machine and has two 36 in, aluminum
extruded rectangular tubes mounted beneath it that provide a solid stand for the machine. The
bottom also has channels for the precise placement of the y-axis linear guide rails. This part is
shown in drawing B-19.
Table Ends: The table has two end components to which the y-axis ballscrew and the y-axis
drive motor mount. One end, the Table End-motor shown in drawing B-20, supports the
CNC Machine Design Report
28
ballscrew through a ball bearing and has a recess for the motor mount. The other, Table End
shown in drawing B-21, provides mounting holes for the z-axis thrust bearing block.
Table Sides: The table sides add strength to the table ends which experience the thrust force of
the ball screw while also protecting against debris from accumulating under the work table.
The dimensions of these parts are shown in drawing B-22.
Work Table: The work table, shown in drawing B-23, mounts across the table ends and
provides 1160.25 in2 of area on which to mount the part to be machined. In order to support
weight of the part, support rails were mounted beneath the work table to remove the
deflections.
3.8.4 Y-axis
The y-axis provides 31 in of travel along the length of the work table. This assembly is shown in
Figure 8.2.4 and drawing BB-4. The following components comprise the y-axis:
Figure 3.8-4
Y-axis Ballscrew: Linear motion is provided by a 5/8 in ballscrew and is dimensioned in
drawing B-24.
Y-axis Thrust Bearing Block: The thrust bearings that carry the linear force of the ballscrew
have been pressed into the thrust bearing block. This part is identical to the x-axis thrust
CNC Machine Design Report
29
bearing block, and the dimensions of this block as well as the bearing bores are shown in
drawing B-13.
Y-axis Ballnut Flange: This part connects to the y-cross component and transmits motion
from the ballscrew to the y-axis. It has been dimensioned in drawing B-25.
Y-Rails: Supported guide rails were selected for the y-axis due to the weight that had to be
supported and the length over which this load had to be supported. Dimensions of these
rails are shown in drawing B-26 and the specifications from Lintech Motion have been
included in Section 9 of the appendix.
Y-axis Bushing Blocks: Assembled bushing blocks were ordered from Lintech Motion for the
y-axis. These use ball bearings to carry the load and to provide precise motion. These have
been dimensioned in drawing B-27 and the specifications have been included in Section 9 of
the appendix.
Y-Lifts: These parts mount to the y-axis bushing blocks and contain mounting holes for the
vertical gantry sides. These were designed to offset the y-rails further under the table,
protecting them from debris which could damage the rail surface or the bushings. The y-lifts
also position the vertical gantry sides such that the center of gravity is centered on the
bushing blocks to prevent uneven wear. The dimensions of these parts are shown in
drawing B-28.
Y-Cross: The y-cross spans the width of the y-axis and connects the y-lifts and y-axis bushing
blocks which travel along each rail. The ballscrew flange connects to the center of the
y-cross, transmitting motion of the ballnut to the y gantry. The dimensions of this part are
shown in drawing B-29.
Y-axis Vertical Gantry Sides: The vertical gantry sides mount to the y-lifts at the bottom and
act as the ends of the x-axis at the top. The x-rods, x-axis ballscrew, x-back, and x-top all
mount between the vertical gantry sides at the top. One vertical gantry side, shown in
drawing B-30, has a mount for the x-axis drive motor and supports the ballscrew using a ball
bearing. While the other, shown in drawing B-31, allows for mounting of the x-axis thrust
bearing block.
Y-Gantry Insert: Inserts were made for the gantry to insure correct positioning of the x-rods
over time. A continued load can lead to creep in the HDPE gantry sides. In order to prevent
future misalignment, aluminum inserts, shown in drawing B-32, were machined with x-rod
positioning holes made to match those in the gantry sides.
3.8.5 Tool Heads
The exchangeable tool heads allow for a multifunctional CNC. The tool heads that have been
designed for this machine include a spindle and a solder paste dispenser.
3.8.5.1 Spindle
The spindle will allow the CNC to mill and engrave. The parts included in this tool head include:
CNC Machine Design Report
30
Spindle Plate: The spindle plate has holes for mounting to the z-axis as well as holes for
mounting the spindle. Dimensions of this plate are shown in drawing B-33.
Spindle Holder: The holder has been bored to the outer diameter of the spindle and
clearance holes have been machined for mounting to the spindle plate. The dimensions of
this part are shown in drawing B-34.
Spindle: The spindle used for this prototype has been dimensioned in drawing B-35.
3.8.5.2 Solder Paste Dispenser
The solder paste dispenser will dispense solder paste onto a printed circuit board using a syringe and
the plunger system shown in Figure 8.2-5. The individual components included in this tool head include:
Figure 3.8-5
Plate: This plate mounts to the z-axis while containing holes for the dispenser motor and the
syringe to mount. Also a groove to guide the plunger was designed into the plate. This is shown
in drawing B-36.
Motor Mount: This mounts the driving motor to the plate and is shown in drawing B-37.
Syringe Mount: This holds the syringe in position and mounts it to the plate. It is shown in
drawing B-38.
Syringe: The solder paste is sold in and dispensed from a standard size syringe from Amtech.
Screw: A reciprocating screw will extend the plunger into the syringe. This screw is shown in
drawing B-39 and will provide a 3 in stroke.
Paste Dispenser: This part has internal threads that will allow it to extend as the screw is rotated
and will be guided linearly by the groove in the plate. This part has been dimensioned in
drawing B-40.
Plunger: The plunger screws into the end of the paste dispenser and will contact the plunger
inside of the syringe. This part, which is shown in drawing number B-41, was designed to be
interchangeable in the event that a different sized syringe was used.
CNC Machine Design Report
31
Coupler: The couple, shown in drawing B-42, will connect the screw to the motor shaft.
3.8.6 Machine Electronics
Some mechanical components were necessary to account for the machine electronics. These items
include:
Pendant Case: The pendant allows the operator to make inputs to the machine. A case was
designed to house the circuit boards and screen for this component. The dimensions of the
pendant case are shown in drawing B-43.
Electrical Component Housing: A case was designed to house and protect the main controller
board, the motor driver board, a capacitor, a relay, and a transformer. Drawing BB-5 shows the
assembly of the component housing and Table are showing in the drawing BB-5.
Cable Carriers: Cable carriers were ordered from McMaster Carr to hold the wiring to the
motors, limit switches, and the spindle. Information about the sizes and lengths of these cable
carriers are given in appendix Table 4.1-1.
3.8.7 Additional Components
Some additional components that were either necessary for the assembly of the machine or
common for each of the three axes include:
Ball Bearings: Ball bearings were used to support one end of the ballscrews. Specifications for
these bearing are given in Section 9 of the appendix.
Thrust Bearings: Thrust bearings were used in the thrust bearing block assembles to account for
the linear force of the ballscrew and to remove linear play in the ballscrew position. The
specifications for these bearing are given in Section 9 of the appendix.
Bearing Seals: Seals were used to seal the thrust bearing blocks to allow them to be filled with
grease in order to lubricate the bearings. Specifications for these seal are given in Section 9 of
the appendix.
Seal Retainer: The seals that fit the ballscrew shaft diameter had an outside diameter that was
smaller than that of the thrust bearings. Seal retainers were machined with an outside diameter
of 0.875 in and an inside diameter of 0.625 in as shown in drawing B-44. The seals were pressed
into the seal retainers which were then pressed into the thrust bearing blocks.
Pulleys: Timing belt pulleys were used on both the ballscrew shafts and the motor shafts to
transfer the torque. Specifications for these pulleys are provided in Section 9 of the appendix.
Belts: Timing belts were used to transfer torque from the motors to the ballscrew. The lengths
and specifications for these belts are given in Section 9 of the appendix.
Motors: Stepper motors were used to power the ballscrews. A 166 oz.in motor was used for the
z-axis and a 276 oz.in motor was used for both the x-axis and z-axis. Additional specifications are
given in Section 9 of the appendix.
Fasteners, Set Screws, and Washers, Board Standoffs, and Grease Zerks: A complete list of
sizes and totals can be found in the appendix Table 7.2-1 and 7.2-3.
CNC Machine Design Report
32
3.9 Data Sources
3.9.1 Websites
Roton, http://www.roton.com
Lintech, http://www.lintechmotion.com
Anaheim Automation, http://www.anaheimautomation.com
VXB, http://www.vxb.com
MCMaster Carr, http://www.mcmaster.com
Online Metals, http://www.onlinemetals.com
Norva Plastics, http://www.norvaplastics.com
MSC Direct, http://www.mscdirect.com
Fastenal, http://www.fastenal.com
Machine Shop Discount Supply, http://www.msdiscount.com
Grainger, http://www.grainger.com
Amazon, http://www.amazon.com
Newegg, http://www.newegg.com
3.10 Fault analysis Fault analysis of this CNC machine concludes that failure will occur if the machine ceases to
operate, due to a failed fastener or component, or if the machine begins to operate out of tolerance due
to excessive wear.
3.10.1 Fastener and Component Failures
The ballscrew must transfer motion through the ballnut flange to each axis. The most likely
fastener failure will occur in the bolts that hold the ballnut flanges to the y-axis and the z-axis. Possible
component failure could occur in the ballnut flanges or to the gantry components that directly
experience the thrust force of the ballscrew. These gantry components include the table ends and the
top and bottom of the z-axis. These components may not fail completely. However, fatigue may
eventually allow excessive deflections that will cause the machine to operate out of tolerance.
Design modifications could be made to increase fastener or component size in order minimize the
risk of failure. In addition, reinforcement could be added to the gantry components to reduce the effect
of fatigue. Despite adding complexity to the design, the cost of these modifications would not be
significant as slightly larger aluminum stock or additional reinforcing components only reflect a minimal
increase in expense.
3.10.2 Excessive Wear
Excessive wear on crucial components will cause the machine to lose tolerances and the
usefulness of the CNC machine will become limited to low precision work. If wear is extreme, the
usefulness of the machine will be completely lost or the machine may become inoperable.
CNC Machine Design Report
33
Key components are found in the drive and the guidance systems. The drive system consists of
the ballscrew, the ballnut, and the supporting bearings. If wear is experienced by the bearings,
movement of the ballscrew will be allowed. If the ball bearings inside of the ballnut are worn, the
ballscrew will be unable to accurately transmit linear motion. Most likely the ballnut will experience
wear first, but soon after wear on the ballscrew itself will occur. The linear guide system consists of the
guide rails and the ball bushings for each axis. Wear may be experienced by the ball bearings inside each
bushing or to the shafts themselves. If any of these components wear excessively, the machine will be
unable to position the tool head with the desired precision.
Design modifications cannot provide a solution to these modes of failure. All of the drive and
guide system components have been selected for use within their stated specifications. Therefore, only
proper and routine lubrication can prevent this wear and extend the life of the machine. The bushings
and bearings are to be greased and the shafts are to be oiled as per the User’s Manual. If these actions
are taken, the risk of failure due to excessive wear will be minimal.
3.11 Health & Safety, Environmental, Life Cycle, and Societal Issues When operating the CNC machine, the ballscrews can emit significant noise. Continual exposure to
this environment can lead to hearing loss. Proper ear protection should be worn. Other components
that can cause injury include the tool heads, belts, and ballscrews. Contact with these rotating
components must be avoided.
Waste products from machine include lubrication grease and metal shavings from machining. These
by-products should be disposed of properly. If a component on the machine requires replacement,
whether the part is machined from HDPE, aluminum, or steel, these components should also be
disposed of in a manner that is not harmful the environment or other individuals.
3.12 Engineering Drawings All engineering drawings have been included in Section 10 of the appendix, with the exception of
the components that require reference to manufacturer data sheets. These are included in Section 9 of
the appendix.
CNC Machine Design Report
34
4. Electrical
4.1 Motor Driver Board
4.1.1 Scope
The following section provides a detailed technical description of the function of the Motor
Driver. Most component values were derived from the specifications of Data Sheets. Test,
measurement, and fault analysis is included and provides detailed accounts of all tests performed
with measurement and fault analysis of each circuit. Health and safety pertaining to the Motor
Driver is also including in this section. Equipment list, test data and simulations are also in
Appendix C. See Users Manual for complete list of specifications.
4.1.2 Block Diagram
The Motor Driver provides a Low Voltage Power Supply which generates four voltages levels 5,
+12, -12, and 24 Vdc. The 5Vdc Supply provides the power to the Optical Isolation and Micro-
stepping Sequencer. Step, Direction, Enable, Reset, MS1, and MS2 are all Optical Isolated
inputs from the Main Controller. The Step input signal steps the motor. The Direction input
changes the direction of the motor. The MS1 and MS2 inputs set the micro-stepping mode
which is either full, half, ¼ or 1/16 step mode. The Voltage Reference (Vref) determines the
maximum current through the motors and there are 3 independent Voltage References for each
axis. The Motor Power Supply provides the power to the motors. The Micro-stepping
Sequencer controls the Mosfet H-Bridge which drives the motors. The Motor Driver Board
provides three fuse blown LED Indicators and a 5V indicator which is lit during normal
operation. The Driver Board Ready, Vbb Ready, and Fault signal are outputs to the Main
Controller and provide status information of the Motor Driver Board.
CNC Machine Design Report
35
Vbb Ready
Optical
Isolation
Step
Direction
Enable
Reset
Micro stepping
Sequencer
MOSFET
H-Bridge
A+
A-
B-
B+
Block Diagram
Motor Driver Board
Logic Inputs
From Controller
PFD1, PFD2, SR
(jumper selectable Connections to Bipolar
Stepper Motors
X,Y,Z axis
Vm+
Vm-
Motor Power
Supply
MS1, MS2
12 V
Fuse
Blown
-12 V
Fuse
Blown
24 V
Fuse
Blown
5 V
GOOD
Driver Board
Ready
Driver Board
Fault
To
Controller
LED Indicators
Output Signals
Vref
X,Y,Z axis
+5 Vdc
+-12 Vdc
Low Voltage
Power Supply
System Monitoring and
Fault Identification
24 Vdc To Controller
CNC Machine Design Report
36
4.1.3 Technical Description
4.1.3.1 Input Optical Isolation
The drive board provides high speed optical couplers for each STEP and DIRECTION input
signal and provides low speed optical isolation for ENABLE, RESET, MS1, and MS2 input
signals. Each input signal comes from the controller.
Optical Isolation is required to isolate the driver board from the controller to avoid damaging it
from high frequency noise and voltage spikes occurring on the driver board.
This is the main interface between the Motor Drive Board and the Main Controller Board.
4.1.3.1.1 High speed optical couplers
The high speed optical couplers (U8, U9, U14, U15, U20 and U21) are required because of the
high frequency at which the motors will be stepped. The response of the Optical coupler is
crucial to the performance of the system.
R24, R25, R44, R45, R56 and R57 are input resistors each of the couplers and provide 2.3 mA
to drive them into saturation when the 3.3 V input signal from the microcontroller is sent.
Resistor values were based on specifications is in the data sheet and equations derived in
Appendix C.
See Micro-stepping Sequencer Schematic C-1
See Data Sheet for SFH6720T High Speed Opto-Coupler in Appendix C for a complete
functional description and specifications.
4.1.3.1.2 Optical Isolators
The Low speed Optical Isolator (U10) provides the same isolation function as the High Speed
optical couplers but do not require an excellent frequency response. These signals will only
enable or disable certain functions and are considered constant.
R16, R17, R18, and R19 are the input resistors of each input to the Optical Isolator and provide
2.2 mA to drive them into saturation when a 3.3 V input signal from the microcontroller is sent.
The output resistors R20, R21, R22, and R23 are pull-down resistors. The isolators are designed
to function as inverters to prevent the A3986 from being enabled at power up. This prevents any
unwanted movement of the CNC during this time.
Resistor values were based on specifications is in the data sheet and equations derived in
Appendix C.
See Micro-stepping Sequencer Schematic C-1
CNC Machine Design Report
37
See Data Sheet for SFH6720T High Speed Opto-Coupler in Appendix C for a complete
functional description and specifications.
4.1.3.2 Low Voltage Power Supply
The low voltage Power Supply provides four voltage levels, +5, +-12 and +24 Vdc. The +5 volts
is used to power all the circuitry on the board expect the operational amplifiers, which uses +-12
volts. The +24 volts is used to operate two solid state relays.
4.1.3.2.1 Input Power Conditioning
Consists of Terminal Block 1 (TB1), step down transformer (XR1), full bridge rectifier (BR2),
and filter capacitors (C17, C18, C19, and C20). TB1 provides AC main connections and can be
configured for 120/240 VAC. See Users Manual for 120/240 VAC terminal block
configurations. The Transformer provides the required step down voltage to the Full Bridge
Rectifier (BR2). The Rectifier and filter Capacitors provide the DC input voltage to the
regulators (VREG2, VREG4, and VREG3).
See Low Voltage Power Supply on Schematic C-2.
See Data Sheet for MB110S-TPMSCT-ND Bridge Rectifier in Appendix C for a complete
functional description and specifications
4.1.3.2.2 +-12Vdc Supply
The +-12 Vdc (VREG2, VREG4) is the regulated input to the +5Vdc regulator and provides the
supply voltage for the Voltage Reference Circuitry.
The output voltage of VREG2 and VREG4 are fixed by resistors (R12, R13 and R29, R30
respectively) .These supplies are designed to provide increased ripple rejection by connecting a
capacitor to the adjustment pin (pin-1) of VREG2 and VREG4. These bypass capacitors (C10
and C14) prevent ripple from being amplified as voltage on the output is increased.
The supply also has input and output short circuit protection. The diodes prevent current from
entering the regulator. When the input of the regulator is shorted the output capacitor (C6 and
C8) would normally discharge into the output of the regulator. This will not haven because
discharge current will be shunted to the input side of the regulator by diodes (D5 and D1)
respectfully. To prevent the bypass capacitors from also discharging into the regulator, diodes
(D2 and D6) are used provide a low resistance path back to the output side of the regulator.
Resistor values were based on specifications is in the data sheet and equations derived in
Appendix C.
See Low Voltage Power Supply on Schematic C-2.
CNC Machine Design Report
38
See Data Sheet for LM317 and LM377 3-Terminal Adjustable Regulator in Appendix C for a
complete functional description and specifications.
4.1.3.2.3 Slow Turn on Circuit
Each supply also has a slow turn on Circuit. The +12 Vdc slow turn on circuit consists of P-
channel mosfet (U32), capacitor (C75), resistor (R63) and diode (D8). The voltage at the gate
and source of U32 slowly rise until the capacitor is fully charged to 12 volts at which time the
gate voltages becomes more positive then source voltage an U32 gets turned off; effectively
removed from the system.
The -12 Vdc supply has the same slow turn on circuit as the +12Vdc supply and consists of N-
channel mosfet (U33), R64, C76, and D9.
See Low Voltage Power Supply on Schematic C-2.
4.1.3.2.4 5Vdc Supply
The 5Vdc supply (VREG1) powers the optical couplers, optical isolators, jumper selectable
functions, the A3986 Micro-stepping sequencer, and the Vbb Protection Circuit. The 5Vdc
supply has been designed to deliver up to 185 mA at 20 degrees Celsius. It provides temperature
protection shut down at temperatures greater than 150 degrees Celsius. C16 and C9 provide
stability to VREG1.
Selection of input voltage was based on equations from the data sheet and Matlab graphs in
Appendix C. C16 and C19 were selected from specifications from the data sheet in Appendix C.
The 5 volt supply has also been designed with short circuit protection (D7). The turn on time for
the 5Vdc supply is approximately 15 seconds, which is set by the slow turn on circuit for the +12
Vdc supply. The 5Vdc supply has an indicator light which illuminates when 5V is present.
See Low Voltage Power Supply on Schematic C-2.
See Data Sheet for TDA3664 Very Low Dropout Voltage Regulator in Appendix C for a
complete functional description and specifications.
CNC Machine Design Report
39
4.1.3.2.5 24 Vdc Supply
The 24 Vdc supply (VREG3) is used to power the chassis mounted solid state relay which turns
on AC power to the motor driver board and the motor power supply. Another relay is used to
apply AC power to the spindle head.
Note: The main controller operators these relays.
See Low Voltage Power Supply on Schematic C-2.
See Data Sheet for LM317 3-Terminal Adjustable Regulator in Appendix C for a complete
functional description and specifications.
4.1.3.3 Motor Power Supply
The motor supply provides the power to drive the motors on the CNC. The motor supply can
provide an unregulated output of 40 Vdc at full load. The supply consists of a toroidal
transformer, filter capacitors, and a bridge rectifier (BR1). The Transformer and filter capacitors
are chassis mounted. C74, C72, C87, C86 are located on the Motor Driver Board and provide
filtering of high frequency noise and reduce transient voltage spikes during normal operation.
Transient voltage suppressor (TVS1) is used to prevent transient voltage spikes over 55 V.
Voltage spikes in excess of 55 Volts may destroy the A3986 therefore a transient voltage
suppressor has been installed to prevent this from occurring. See Motor Power Supply
Simulation Data in Appendix C.
A toroidal Transformer was used in the design of the motor power supply for several reasons.
First, the size of the toroid is about half the size of standard power transformers. Since the
transformer will fit into a smaller space; this allows the enclosure to be smaller, which reduces
the material cost of the system. Second, the toroid produces very little transformer humming so
noise pollution produced from the system will be reduced. Also, toroid transformers produce
nearly no stray magnetic fields which reduce electromagnetic interference on other circuit
components in the electrical cabinet.
See Motor Power Supply on Schematic C-3
4.1.3.4 Micro-stepping Sequencer with External H-Bridge
The A3986 is the heart of the driver board. It is micro-stepping driver with a minimum number
of control inputs. It is capable of operating 2-phase bipolar stepper motors in full, half, quarter
and sixteenth step modes. The current in motor is controlled by a fixed off-time pulse width
CNC Machine Design Report
40
modulation control circuit. The current in the motor at each step is set by the value of an external
current sense resistor, a reference voltage, and the output of the DAC controlled by the translator.
The A3986 provides all the necessary circuits to ensure that the gate to source voltage of both
high side and low side mosfets are above 10 V, and that there is no cross conduction in the motor
windings. (1)
The use of pulse width modulation provides the cost-effective solution for designing high
efficiency motor driver. By utilizing PWM, the size of the motor supply is greatly reduced
because the current required from the supply will be a fraction of that in the motor windings.
Also, there no need to design a complex controller because motor stepping is controlled by two
inputs. (Step and Direction)
See Data Sheet for A3986 Dual Full-Bridge MOSFET Driver with Micro-stepping Translator in
Appendix C for a complete functional description and specifications.
4.1.3.4.1 Axis Control
The following describes the X-axis control. The A3986 (U1) provides all the circuitry to control
a 2-phase bipolar stepper motor using two external N-channel H-bridges. U2 and U3 makeup the
A-phase bridge while U6 and U7 makeup the B-phase bridge. The maximum current through
each phase of the motor is controlled by current sense resistors R9 and R11 respectively.
Capacitors C2, 3, 4, 5 provide the increased gate voltage needed to turn on the high side N-
channel mosfets. Capacitors C1, C31 and C32 provide stability during transient conditions
which exist when the motors are stepping. R1 through R8 are external gate resistors to the
mosfets and control the rate of change of the voltage and current in the motor terminals. R10 is
the oscillator timing resistor.
Capacitor values were selected from specifications in the A3986 data sheet. R10’s component
values were based off equations from the A3986 data sheet.
Note: Y and Z-axis control is identical to the X-axis control.
See Micro-stepping Sequencer Schematic C-1
See Data Sheet for A3986 Dual Full-Bridge MOSFET Driver with Micro-stepping Translator in
Appendix C for component value selections or formulas.
CNC Machine Design Report
41
4.1.4
4.1.4.1.1 H-bridge
The selection of the external H-bridge was crucial to the over performance of the system.
IRF7341PbF dual HEXFET power mosfets were used because of the low resistance from source
to drain when turned on (Rdson) and power dissipation of 0 watts. The maximum power
dissipated by the mosfets will only be .235 watts when using 4.7 amp motors. This also limits
heating of surrounding components increasing performance.
The by limiting the current to a maximum of 4.7 amps no heat sink will be required and the full
capabilities of the mosfets will be utilized increasing system performance. Also, utilizing dual
surface mount mosfets the space required to house them is greatly reduced compared to other
systems on the market.
See Micro-stepping Sequencer Schematic C-1
See Data Sheet for IRF7341PbF HEXFET Power MOSFET in Appendix C for a complete
functional description and specifications.
4.1.4.1.2 Current Sense Resistors
The feedback resistors were also choosing to reduce power dissipation and heating affects on
other system components. By selecting .043 ohm resistors surface mount packages could be
utilized, reducing the need for large high watt resistors. A maximum power dissipation of .202
watts is required compared to 2.35 watts when choosing a .5 ohm resistor.
Although selecting .043 ohm will reduce heat and component size the trace resistance becomes
an issue and will adversely affect the accuracy of the current feedback loop. By choosing this
option the PCB layout of the current sense resistors became critical to the performance of the
system and the solution is fully discussed in the PCB layout section.
See Micro-stepping Sequencer Schematic C-1
4.1.4.2 Voltage Reference Circuits
There are 3 independent voltage reference circuits that set the maximum and minimum current
through each motor. It consists of a voltage divider and an operational amplifier which provides
a stable reference between .688 and 1.6168 Vdc, which corresponds to a current adjustment of 2
to 4.7 A. The maximum current limit is set to protect the H-bridge mosfets from being destroyed
by improper adjustment.
CNC Machine Design Report
42
4.1.4.2.1 X-Axis voltage Reference Circuit
The voltage divider comprises of resistors (R31, R32), variable resistors (VR1, VR3), and C37.
R31 and R32 set the maximum and minimum voltages, respectively. VR1 and VR3 provide the
fine and coarse voltage adjustment respectively. C37 stabilizes the input to the operational
amplifier. Decoupling capacitors C38 through C40 provide additional high frequency noise
reduction. The amplifier U23 is design for unity gain feedback. The output of the amplifier has
a test point for easy adjustment of the voltage reference.
Note: The Y and Z-axis voltage reference circuits are identical to the X-axis.
Resistor values were based from equations derived in Appendix C.
See Voltage Reference Schematic C-4
See Data Sheet for OP27G Operational Amplifier in Appendix C for a complete functional
description and specifications.
4.1.4.3 System Monitoring
The motor driver provides four on board indicators and three outputs that provide information to
the controller on the status of the driver board.
4.1.4.3.1 Fuse Blown Indicators
Three fuse blown indicators will light up if there is a fuse blown on the +-12 Vdc, and 24 Vdc
regulators. This provides the user and maintenance personal a way to quickly diagnose there is
fuse blown to bring the system back up quickly, effectively reducing down time.
The +12 Vdc fuse blown indicator consists of P-channel mosfet (U30), resistor (R59), diode
(D10), and light emitting diode (LED2). The -12 Vdc fuse blown indicator consists of N-
channel mosfet (U30), R61, D12 and LED1. The 24Vdc fuse blown indicator consists of P-
channel mosfet (U31), R60, R62, D11, and LED3.
Resistor values were selected from equations derived in Appendix C. Simulations for all fuse
blown indicators were performed using Multisim and worked as designed. See Appendix C for
Simulation.
See Low Voltage Power Supply on Schematic C-2.
CNC Machine Design Report
43
4.1.4.3.1.1 5 Vdc Indicator
The driver also provides an indicator light that lets the user know that +5Volts dc is present and
that the driver board is functional.
The indicator consists of R74 and LED4.
See Low Voltage Power Supply on Schematic C-2.
4.1.4.3.1.2 Vbb Protection Circuit
The Vbb Protection Circuit provides protection in the event of an over current condition. The
circuit is designed to trip when an over current condition (>65 mA) occurs. The circuit was
implemented to take advantage of the under voltage protection inherent to the A3986 chip. By
cutting off Vbb to the chips they would automatically disable themselves preventing any damage
from occurring to the A3986 chips.
The circuit comprises of U38, U39, and R85, 73, 80 and C88. When an over current condition
exists the voltage drop across R80 is greater than 65 mV the gate voltage on the NPN mosfet
(U38) will drop to 0V turning off U38 until the over current condition is removed. The
decoupling capacitor C88 provides stability during transient conditions.
R80’s component value was selected from equations in the LT1910 data sheet.
See Data Sheet for LT1910 Protected High Side MOSFET Driver in Appendix C for a complete
functional description and specifications.
See Low Voltage Power Supply on Schematic C-2.
4.1.4.4 Driver Outputs to Controller
These circuits are designed to be used with any miscellaneous inputs to the controller board that
uses an optical isolator. They provide the current to drive an optical isolator in either the linear
or saturation region to allow the controller to monitor the voltage on the output of the isolator.
All component values for the Driver Outputs were selected from equations derived in Appendix
C.
4.1.4.4.1 Driver Ready Signal
The Driver Ready Signal is designed to let the controller know when the driver board circuitry is
powered up and ready to use. When the driver boards +12 Vdc is completely charged it provides
a nominal 533 uA to drive the input of an optical isolator in the linear region. The circuit
comprises of resistor (R72) and jack (J10).
CNC Machine Design Report
44
See Low Voltage Power Supply Schematic C-2.
4.1.4.4.2 Vbb Ready Signal
The Vbb Ready Signal is designed to let the controller know that the motor voltage is full
charged and ready to drive the motor. When the motor voltage is fully charged it provides a
nominal 533uA to drive the optical isolator in the linear region. The circuit comprises of R69,
R70, R71 and J9.
See Motor Power Supply Schematic C-3
4.1.4.4.3 Fault Signal
The Fault Signal is design to let the controller know that there is a fault in system. The circuit
comprises of AND gate (U40), R81, and J11. When a fault is detected the output of U40 will go
low (0V) and cutoff the optical isolator.
See Motor Power Supply Schematic C-3
4.1.4.5 PCB Layout
The PCB Layout was crucial in the implementation of the Motor Driver.
4.1.5 Health and Safety
Noise Pollution from the motors may cause a loss of hearing if exposed to for long periods of
time. Anyone who will be operating the equipment and is in close proximately to the motors
should wear hearing protection.
Supply Voltages of 45 Volts are present on the driver board. Use caution when performing
adjustments when power is applied. Never perform adjustments without the presence of a person
that can perform CPR. Also, when power is turned off voltages above 45 volts may still exist.
Allow time for filter capacitors to discharge or use a shorting probe to short the voltage to
ground. Installed on this equipment is a LED indicator across the filter capacitor mounted to the
chassis. This indicator lets maintenance personnel know there is voltage still present of the
capacitor.
Components used in production of the driver board may or may not contain hazardous material.
Disposal of all electronic material should be in accordance with the guidelines set by the EPA.
CNC Machine Design Report
45
For information regarding the disposal, handling and recycling of electronic equipment go to
http://www.epa.gov/osw/conserve/materials/ecycling/index.htm
4.1.6 Equipment Required
4.1.6.1 Test Equipment
1. 34401 Agilent multimeter or equivalent standards.
2. Tektronix O-scope
3. DC power supply from 0-30V
4. 33120 Agilent Function Generator or equivalent standard.
4.1.6.2 Soldering Equipment
4.1.7 Schedule Data for Driver Board
Time for Procurement:
1 week from the time of purpose
Time for Installation:
Reflow Oven:
4.1.8 Test, Measurement and Fault Analysis
4.1.8.1 Input Optical Isolation
All optical couplers and isolators are within specified tolerances.
See test data for optical couplers and isolators in Appendix C
4.1.8.2 Low Voltage Power Supply
See test data for the Low Voltage Power Supply in Appendix C
4.1.8.2.1 +-12Vdc Supply
During testing of the Driver board it was found that the 125mA fast blow fuse for the 12Vdc
supply was being blown because of the inrush current from the circuitry it drives. Procurement
of 125 mA slow blow fuses was not possible in the package required; therefore a slow turn on
circuit was designed to eliminate this issue.
The +-12 Vdc supplies are within specified tolerances.
CNC Machine Design Report
46
4.1.8.2.2 Slow turn on Circuit
After implementing the slow turn on feature no fuses are being blown. The time it takes the two
supplies to reach +-12 volts is on average of 20 seconds. Since, the +12 V slow turn-on circuit
provides the longest delay time it was used as a feedback signal to the controller called the driver
board ready signal.
During Testing of the slow turn on circuit it was found that the +12 Vdc delay is 25 seconds and
the -12 Vdc delay is 15 seconds. This delay offset could be changed by reducing the value of
R12 or C75. Since, the inrush current problem has been resolved no changes to system will be
made or needed.
4.1.8.2.3 5Vdc Supply
The turn on time for the +5Vdc supply is approximately 16 seconds, which is set by the slow
turn on circuit for the +12 Vdc supply.
4.1.8.2.4 24 Vdc Supply
When conducting the 24Vdc voltage ripple test the measurement was found out tolerance. This
is because the input ripple to VREG4 is higher than the tolerance limits on the regulator and
cannot filter the ripple out. This may have been caused by using old filter capacitors from the
previous circuit board and have been degraded from overheating during unsoldering the
components. The solution to this problem would be to replace the filter capacitors C17 and C18
and retest the ripple voltage. If this does not work then C17 and C18 would be increased to
reduce the input ripple voltage.
Since the 24 Vdc supply is only used to actuate relays, the ripple on it is of no consequence to
the system, and therefore no replacement or resizing of the capacitors are needed.
The voltage measurement test was within tolerance limits.
4.1.9
4.1.9.1.1.1 Motor Power Supply
All other measurements are within specified tolerances.
See test data for the Motor Power Supply in Appendix C
4.1.9.2 Micro-stepping Sequencer with External H-Bridge
During testing it was found that two PCB traces where connected to the wrong side of the H-
Bridge. This caused a catastrophic failure of the A3986 and destroyed most if not all the mosfets
for the H bridge. Also the 5Vdc line was shorted to ground caused by the failure of one A3986.
CNC Machine Design Report
47
Once the problem was found a corrected a functional test of the driver board was performed and
was successful. Procurement of new A3986 chips was not possible until after March 25 2010
from any supplier. Mark Hopkins a representative from allegro micro that was helping resolve
the issues with the A3986 suggested contacting Dytronics and get free samples. Procurement of
the new chips was possible and the situation was resolved. The PCB Layout was changed to
correct the issue and new PCB’s were ordered.
Mark Hopkins from allegro micro recommended installing 100nF capacitor across the source and
drain of the each mosfet of the H-bridge. The capacitors were not installed on the first PCB
revision 1.0.0. This recommendation was considered and implemented on the new PCB boards.
During testing the performance of the motors was horrible and heating of the mosfets occurred
due of the reactance of the capacitors. They were then removed from the PCB and response of
the motors was excellent and no heating occurred to the mosfets as designed. The Schematic and
PCB Layout were updated and no capacitors form source to drain will be shown.
4.1.9.3 Voltage Reference
All measurements are within specified tolerances.
See test data for the Voltage Reference in Appendix C
4.1.9.3.1 Fuse Blown and 5Vdc Indicators
4.1.9.3.1.1 Fuse Blown Indicators
During Testing of the 24 Vdc fuse blown circuit it was discovered that the wrong PNP mosfet
(U31) was used in the circuit. The drain to source voltage is over the rated voltage of the mosfet
being used and will be shorted out applying a constant current at all times to the LED until the
mosfet breaks down. This failure is of no consequence to the system. The PCB Layout has been
updated with the correct part for future procurement of new PCB’s. The 24 Vdc fuse blown
indicator may be used as an input power indicator light by bypassing U31 if desired.
The +-12Vdc fuse blown indicators work as designed.
See test data for the Fuse Blown Indicators in Appendix C
4.1.9.3.1.2 5Vdc Indicators
The 5 Vdc Indicator works as designed.
4.1.9.4 Driver Outputs to Controller
All driver output measurements are within specified tolerances.
See test data for the Driver Outputs in Appendix C
CNC Machine Design Report
48
4.1.9.5 Vbb Protection Circuit
During Testing the Protection Circuit the timing capacitor would not recharge above
approximately 2 V after power on or a fault condition. This should never have unless an over
current condition exists. This condition never existed after startup and the voltage timer circuit
should have charged to 3.5 V.
U39 was assumed good but was replaced by another chip and the same symptoms occurred.
The timing capacitor was then removed from the circuit and fixed the problem. The voltage on
the timer pin charged to 3.5 V during normal operation and 2 V when a vault condition existed.
The Vbb Protection circuit was fully functional and tested at that time.
After installing the board in the Electronic Cabinet another system test was performed. During
testing all system functions were normal expect the gate pin on the LT1910 chip was 0 V. The
only way that pin would be 0 volts is if the fault pin was low or the timer was below 3.3 V.
Neither of these condition existed and therefore chip must have failed. This chip may have
failed due to overheating during soldering and re-soldering. The chips functionality is degraded
and part of the circuit has been bypassed. Procurement of new LT1910 chips and more testing
will have to been done to find a solution to this problem. There is no adverse affects caused by
this failure to the system.
Although the Vbb protection circuit is degraded and will not open the Vbb line during an over
current condition the circuit will still determine if a fault condition exits. Therefore when the
fault is detected the microcontroller will be informed and can disable the motors and solid state
relay preventing any further damage that would otherwise occur.
4.1.9.6 Full System Fault Analysis
4.1.9.6.1 Overvoltage
After completing a full system test of the driver board the motor filter capacitor was shorted to
the 5 Vdc line (Vdd test pin) and multiple components on the board were destroyed. This was a
catastrophic fault that simulated a very high overvoltage situation which will never happen
during normal operation.
Several components on the board were destroyed including all three A3986 chips (U1, U4, and
U16) and the LT1910 chip (U38). The Vdd pin on each A3986 chip and the IN pin on the
LT1910 chip was shorted to ground. This short circuit condition on the 5 Vdc line caused the
+12Vdc fuse to blow and the +12Vdc fuse blown indicator to light as designed. No other
component failures occurred on the board.
There is no way to protect every component from an overvoltage situation like this. Since the
three A3986 chips were destroyed clamping the input on the Vdd pin so that the voltages will not
CNC Machine Design Report
49
excide 5 V may reduce the changes of it being destroyed by an overvoltage condition. More
testing and research would have to been done which may greatly out way the cost of just
replacing the three chips.
4.1.9.6.2 Short Circuit of the 5Vdc and +-12Vdc Supplies
A short condition on the 5Vdc, +-12 Vdc line was simulated by shorting each supply to ground.
No component failures occurred. The fuses blew and each indicator lights lit as designed.
4.1.9.6.3 Motor Voltage Supply Failure
The entire enclosure that houses the all components for the electronic system is made from poly
carbonate and is virtually indestructible. The motor supply components are also isolated from
the motor driver and main controller board by a thick piece of poly-carbonate. If the filter
capacitor were to explode it would be contained inside the motor supply housing and no other
components should be affected. If a short circuit condition exists on the motor voltage supply
line the fuse will be blown reducing the changes of this catastrophic failure.
4.1.9.7 Fault Summary
The design failures of the of the +24 Vdc fuse blown indicator have been corrected. The
degraded performance of the Vbb Protection Circuit will not be corrected until further
procurement of the LT1910 chips and more testing occurs.
There are no design failures or faults in the system that will degrade the system performance of
the Motor Driver.
There is no way to protect against ever possible failure that may occur during normal operation.
All possible ways to protect the Motor Driver that were thought of have been implemented
4.1.10 Section Summary
The Motor Driver is designed to drive 3-independent motors which control the movement of the
each axis of the CNC. The driver is designed to be a low cost, high performance product. The
A3986 Dual Full-Bridge MOSFET Driver provided the means to design and implement a low
cost motor driver that is cable of driving motors from 2 to 4.7 amps.
CNC Machine Design Report
50
4.2 Main Controller Schematic The main controller is designed to take the information for the CPU or any other external device to run
the driver board for the CNC. There are 3 micro-controller chips that were used in this design: the
pic24FJ256GB110 (Communication controller), pic24HJ256GP610 (Motion Controller), and the
ENC624J600 (Ethernet Controller). The communication controller gets information from different
sources: the Ethernet Controller, USB to go, RS232 (Serial port), and the USB to PC. The Motion
Controller then receives information from the communication controller and turns it into data that can
be understood by the Driver Board. In the Motion controller it has one external UART connection that is
hooked up to the Hand Pendent. The Motion Controller also has a handshake to the Communication
controller to flag it that it is ready for more data. The Main Controller also has a Memory bank system
that is controller by an FPGA. This FPGA takes the information coming from the trajectory and places it
into either bank A or Bank B. Bank A and B (IS61LV25616AL) are 256k x 16 high speed asynchronous
CMOS static ram with 3.3v supply. In Figure 1.1 shows the system diagram of how the CNC Main
Controller is connected.
COM
Main Controller
Ether
USB
SerialHandshake
PendantVGA
CPLD
BANK
A
BANK
B
Trajectory
Memory
X
Y
Z
USB to go
Figure 1.1 Main Controller Component connection flow
4.2.1 Communication Controller
The Communication controller is the main source for information coming to
the CNC. This microchip sorts out good and bad packets into the CNC and
determines where information goes. This controller is interrupt driven meaning it
CNC Machine Design Report
51
waits for information to come to a port and when that port is flagged the
interrupt goes high and all other ports are shut off. On the sheet 3 of the
schematic sheet will show the Communication Controller and the RS232 chip, USB
to PC, USB to go, and the VGA Connector. Also on the sheet 4 of the schematic
sheets show the Ethernet Controller and how it is interconnected.
Note: See schematic D- 3 Main Controller, Communications Processor for more
details.
4.2.1.1 RS232
The serial pin is connected to a MAX3232CDBR chip that is connected to
the RB8 and the RB9 pins on the communication controller. The MAX3232CDBR
chip operates with 3 volt to 5.5 volt VCC supply. This chip is a Multi-Channel RS-
232 Line Driver/Receiver. This device operates with two line drivers and two line
receivers. These input pins are TIN1, TIN2, RIN1, and RIN2. The TIN1 and TIN2
have external outputs going to the Communication controller. The TOUT1 and
TOUT2 are then looped over to the RIN1 and RIN2 pins. The ROUT1 pin goes to
RX1 pin which is port RB8 of the communication controller and the ROUT2 ping
goes to the CTS1 pin which is RB9 port on the communication controller. The
RS232 will bring information from a serial port that is either connected to the
computer or any other external device that has properly working CNC design
software.
Note: See schematic D - 1 Main Controller, Main Processor for more details.
4.2.1.2 Ethernet microchip
This microchip will allow us to have access using an Ethernet port. This
microchip is an already programmed to be able to bring in Ethernet packets and
transfer them through the data ports. On This chip there are 7 Data Ports 15
Address ports that will deal with the data. The Data comes in from the Ethernet
circuit jack (RJ 45) and transfers the information to an internal pin that will act as
a docking station for information coming to the Ethernet and information coming
CNC Machine Design Report
52
out of the Ethernet microcontroller. The Ethernet also has a pin that will select
the chip to be used. This pin is what will cause the interrupt to be flagged.
Note: See schematic D - 4 Main Controller, Ethernet Processor for more detail
4.2.1.3 USB to GO
The USB to go is implemented into the communication chip. The USB port is
connected to pines RG2 and RG3. The input is on RG2 and the output pin is on
RG3. This chip will control the information that is disconnected from the PC. This
Hand pendent will also receive information from this port to show the files that
are on the USB.
Note: See schematic D - 1 Main Controller, Main Processor for more details.
4.2.1.4 USB to PC
The USB to PC port is connected by a USB port to a FT245RL chip. This chip
is connected to the D- and the D+ from the USBDM and the USBDP. The D0- D7
output ports and the RXF, and TXE are connected to the Communications A Bus.
The RD and WR pins are connected to the CPDL connections USB_WR and
USB_RD. The Communications A Bus also connects to USB_CS on the CPLD
Note: See schematic D- 6 Main Controller, PC USB Interface for more details.
4.2.1.5 Serial Port
The serial port is only controlled by 2 pins the RF 13 and RF 12. The input
from the serial port will be the RF12 pin and the Output to the serial port will be
RF13. This is the main connection to the communication controller.
Note: See schematic D- 3 Main Controller, Communications Processor for more
details.
CNC Machine Design Report
53
4.2.1.6 VGA pin
The VGA connector is connected by a set of 5 pins. The first pin is the VDD
that gives the VGA port power. The second pin is the VGA receive pin. This pin
goes to the Communication controller as the third pin which is the VGA transmit
pin goes to the VGA to display the screen. The fourth pin is the ground pin and the
5th pin is an extra input pin.
Note: See schematic D - 3 Main Controller, Communications Processor for more
details.
4.2.1.7 Communication Data Flow
The information that comes from the 4 input ports are all passed over the
Data lines on the Communication controller. RE0 to RE7 are the home for the D0-
D7 I/O connectors. The address of the data is transferred by PMA0 – PMA15 pins.
The address pins are identified as ADDR_0 – ADDR_15. There are also 2 SPI ports.
One Port is the Handshake for the Motion Controller and the other port is direct
access to the Motion controller for the special functions (See Motion Controller
code SPI 2). The SPI1 pins RD8, RA15, RA14 is the direct connection to the Motion
Controller and the SPI2 pins RD12, RD3, RD2 are the handshake that will be
coming from the Motion Controller. This chip also has miscellaneous pins that do
other functions. These pins are:
CS_A (Chips select for the address) RD7
ALE_A () RD6
RD (Read) RD5
WR (Write)RD4
Bank_Switch( Switches memory banks)RD 13
Bank_Lock (Locks the memory Banks)RC14
Ethernet Interrupt Request RD0
USB Flag RF8
USB Transmit Enable RF2
USB Chip Select RF3
CNC Machine Design Report
54
Ethernet Chip Select RA1
USB Sensor RB3(Shows if the USB is functioning properly) RB3
MDIX RE8
On the schematic there are other capacitors and resistors that have been placed
on the board. These components were placed due to the chips data sheet
specified how to interconnect them.
Note: See schematic D - 3 Main Controller, Communication Processor for more
details.
4.2.1.8 Motion Controller
The Motion Controller controls the information that comes from the
Communication Controller. The Pic24HJ256GP610 is a 100 count chip that has 9
external terminal blocks that will control the miscellaneous I/O pins and Limit
selections. These terminal blocks are identified on the schematic as TB9 – TB1.
TB9, TB8, and TB2 are all miscellaneous output pins as TB7-TB4 are miscellaneous
inputs. TB 9, 8, 7, 6, 5, 4 are all connected to the Motion controller by Opto-
Isolators. TB2 is a high power output pin which is connected by an Opto-Coupler.
TB 3 and 1 are passed to the circuit having to do with the Limit switches. The
other pins running on the motion controller all deal with other aspects of the
CNC. On the motion controller there are 2 SPI ports one being Master and one
being Slave. There is one UART port that connects the Hand pendent to the Main
Controller.
Note: See schematic D - 1 Main Controller, Main Processor for more details.
4.2.1.9 Terminal Block connections
Note: See schematic D - 1 Main Controller, Main Processor for more details on all
terminal block connections.
CNC Machine Design Report
55
4.2.1.9.1 Terminal Block 1
These connections are used for the limits switches. Pins 1-6 connect the left
and right limits for X and Y and the top and bottom of the Z. These connections
are also connected to 3 and gates that connect to other and gates that connect to
another and gate that goes to the limit interrupt pin on the Motion Controller.
4.2.1.9.2 Terminal Block 2*
These connections are used for miscellaneous output pins 0-3. Pins 1-6 on
the terminal block connect to an Opto-Coupler that then connects to the output
ports on the motion controller.
4.2.1.9.3 Terminal Block 3
These connections are used for the back and forth limits. Pins 1-2 connect
these limits as pin 3 connects to ground and VDD. Pins 1-2 also connect to an AND
gate that connects to another and gate that is connected to the pins from
terminal block 1 that connect to the limit interrupts.
4.2.1.9.4 Terminal Block 4*
These connections are used for miscellaneous input pins 0-1 that will
connect certain functions from the motor driver board to the motion controller.
Pins 1-4 are connected to these input pins by an opto-isolator.
4.2.1.9.5 Terminal Block 5*
These connections are used for miscellaneous input pins 2-3 that will
connect certain functions from the motor driver board to the motion controller.
Pins 1-4 from the terminal block are connected to these input pins by an opto-
isolator.
4.2.1.9.6 Terminal Block 6*
These connections are used for miscellaneous input pins 4-5 that will
connect certain functions from the motor driver board to the motion controller.
CNC Machine Design Report
56
Pins 1-4 on the terminal block are connected to these input pins by an opto-
isolator.
4.2.1.9.7 Terminal Block 7*
These connections are used for miscellaneous input pins 6-7 that will
connect certain functions from the motor driver board to the motion controller.
Pins 1-4 on the terminal block are connected to these input pins by an opto-
isolator.
4.2.1.9.8 Terminal Block 8**
These connections are used for miscellaneous output pins 6-7 that will
connect certain functions from the motion controller to the motor driver board.
Pins 1-4 on the terminal block are connected to these input pins by an opto-
isolator.
4.2.1.9.9 Terminal Block 9**
These connections are used for miscellaneous output pins 4-5 that will
connect certain functions from the motion controller to the motor driver board.
Pins 1-4 on the terminal block are connected to these input pins by an opto-
isolator.
4.2.1.10 Pendent Serial Connection
The hand pendent is connected to the motion controller by a
serial interface. These serial interface connections is then connected to
a MAX3232CDBR chip as discussed in section 1.1. The T1IN connection
on the MAX3232 is the pendents transmit port as R1OUT is the
pendents receive port. The pendent reset pin is connected to the CTS
pin on the serial interface. When this bit is set low it is forced to
*Consult the Motor Driver board section for more information of these
miscellaneous input pins
**Consult the Motion Controller code section for more information of these
miscellaneous output pins
CNC Machine Design Report
57
ground. When this pin is set high the pendent’s connection will reset.
Also the DTR pin on the serial interface will be connected to the
pendent connected pin on the motion controller. When the pendent
losses connection this will be set low and it will shut off. For other
connection information please consult the schematic.
Note: See schematic D-1 Main Controller, Main Processor for more details.
4.2.1.11 Motion Controller pin connections
The motion controller has numerous connections to external connectors.
RA0-RA7 connects the limit pins from TB1 and TB3. The limit interrupt connector
from TB1 and TB3 is connected to INT2 pin. The pendent’s connection pins on the
motion controller are pins RA9, RF3, RF2, and RF1. The miscellaneous input pins
are all connected on the RB8 – RB14 pins and the miscellaneous output pins are
connected on the RD0-RD7 pins. These pins connect all the terminal blocks to the
motion controller. The serial ports (SPI1 and SPI2), which control the handshake
and the direct connection from the communication controller, are all connected
by the motion controllers specified SPI ports. The CPLD connections D7_B – D0_B
are connected to the RD15-RD8 ports. There are other miscellaneous connections
from other parts of the CNC connection. These connections are:
DATA_AVIL ( Interrupt that flags the
communication controller that
information is ready)-INT1
E-STOP( Emergency stop interrupt) -
INT3
Z-DIR( Z direction)-RB0
Z-STEP(Z Step) -RB1
Y-DIR(Y Direction) –RB2
Y-STEP(Y Step) - RB3
X-DIR(X Direction) - RB4
X-STEP( X Step) -RB5
OENABLE(Output Enable) -RG15
ORESET(Resets the Allegros)-RG14
OM1 (Output signal 1 for micro-
stepping)-RG13
OM2(Output signal 2 for micro-
stepping)-RG12
CS_B(Chip Select B Bus CPLD)-RE3
ALE_B(Address Latch Enable B Bus
CPLD)-RE2
RD_B(Read Enable B Bus CPLD)-RE1
WR_B( Write Enable B Bus CPLD)-
RE0
CNC Machine Design Report
58
Note: See schematic D - 1 Main Controller, Main Processor for more details.
4.2.2 CPLD Connections
The CPLD’s main function is to take data from the communications
controller and add it to a memory bank while simultaneously taking data from the
other memory bank and moving it to the motion controller. The CPLD has Bus A
and Bus B that. Bus A coming and going from the communication controller and
Bus B coming and going to the main controller. Pins TDI, TMS, TCK, TDO, Vccint,
and Vccio are programmable ports for the CPLD. This will be used for firmware
update to the CPLD. Pins CS_A, ALE_A, RD, WR, CS_B, ALE_B, RD_B, and WR_B are
all input pins that will handle the Chip Select (CS) the Address Latch Enable (ALE)
the Read (RD) and the Write (WR). The other pins are the D0-D7 and D0_B, D7_B.
These pins are I/O pins that bring data from the Bus A. For Bus B the control
connections from the CPLD to the Memory Bank A and B are as followed:
Memory Bank A
CS_M1 – CE(Chip Enable)
OE_M1 – OE(Output Enable)
UB_M1 – UB(Upper bits)
LB_M1 - LB(Lower Bits)
WR_M1 – WR(Write Enable)
Memory Bank B
CS_M2 – CS(Chip Enable)
OE_M2 – OE(Output Enable)
UB_M2 – UB(Upper Bit)
LB_M2 – LB(Lower Bit)
WR_M2 – WR(Write)
The data pins in the CPLD and bank A are I/O pins. Data pins D0_M1 - D15_M1 all
connect to bank A on pins I/O0 – I/O15. For bank B the data pins D0-M2 –
D15_M2 are connected to the I/O0 – I/O15 pins on bank B. The address pins on
the CPLD A0_M1 – A15_M1 connect to A0 – A15 on bank A and A0_M2 – A15_M2
is connecter to A0 – A15 on bank B.
Note: See schematic D - 2 Main Controller, Main Processor for more details.
CNC Machine Design Report
59
4.2.3 Timing for the CPLD
The CPLD timing is very important for the Main Controller board. The timing
calculations are determined by take . Taking this function
gives the calculation used to determine the timing needed for the CPLD. When
chip select goes low the Read and Write can be toggled if it is high it will not be
implemented. Figure 1.2 shows the timing diagram for the FPGA. These
parameters have to be followed to have proper data catching on the FPGA.
CS
ALE
RD
WR
BANK_SWITCH
INVALID DATA INVALID
T0 T1 T2 T3
25 ns 25 ns 25 ns
DATA
Figure 1.2 Timing Diagram
4.2.4 Power supply
The power supply for the main controller is a 7 volt DC power source. This power
source goes through 2 Voltage regulators VREG1 and VREG2. VREG1 is connected
to 3 fuses and 3 LED’s. These fuses and LED’s show will give verification to the
CNC Machine Design Report
60
owner of the board that there is a fault in the system. If LED 2 is on the Main
controller (MAIN_3V3) has a blown fuse. This procedure is the same for LED3,
LED5 and LED4. The Main controller the Ethernet and the USB all take 3.3 volts.
Note: See schematic D - 5 Main Controller, Power Supply for more details.
CNC Machine Design Report
61
4.3 Pendant Subsystem
4.3.1 Introduction
The pendant subsystem is the subsystem that works between the inner
subsystems and outside users. It is composed of the hardware and firmware
subsets. The hardware subset is based upon the schematic layout and inner
processes that occur when a user presses a button on the pendant. It also shows
the complete layout that is seen by the user. The firmware subset is broken up
into the driver block and the main block. The driver block is chosen either
between interrupt or non-interrupt based implementation. After an
implementation is chosen, the state diagram for movement of commands from
key presses is created to illustrate and build coding for transfer of information on
different screens. The main block will show how each message is dispatched
through the system and how graphics functions are created to build the functions
for the screens which the user will use to navigate the machine and gather
information through the microcontroller sub system.
4.3.2 Hardware Subset
This subset will contain brief descriptions for the architecture of the
schematic, PCB layout, and physical reactions to the microcontroller when
buttons are pressed.
4.3.3 Schematic Design
In order to allow the user access to the outside parameters of the CNC and
control movement of the machine, a hand pendant must be designed in order to
give this function accessibility. In order to see the main board view and top board
view of the pendant, turn to the given schematics of E1 and E2 in the appendix of
the report.
The benefit of this particularly designed hand pendant is to allow the user
the ability to access certain internal functions of a job through buttons, change
speed through an exterior feed pot, and visual display of certain items through an
LCD screen which will all receive this information with communication with the
main controller board.
CNC Machine Design Report
62
The configuration shows how the pendant will receive information through
its cable link from the PIC 24 microcontroller. The DB9 and Max32 chips will work
together to receive and transmit information received through the
microcontroller board. The inputs RBO and RB1 will act as the high and low
connections signals. They will send this information to the pendant
microcontroller through inputs RB2 and RB3. Later, the information will be
relayed from the outputs RB5 through RB8 and RB10 to a group of four buttons
which the user is able to access the information from. The voltage regulator will
receive a 5 volt input and produce a regulated 3.3 volts for the microcontroller to
use. The clock chip will provide an oscillation for the microcontroller to allow a
steady, constant flow of information. The MCPIDE chip will attach to the
microcontroller through its MCLR pin to reset the operations of the
microcontroller. The AN0 pin of the microcontroller will attach to the
potentiometer to allow feed/speed rate changes of the machine through the
pendant’s exterior feed pot. Output RB11 will attach to an LED which when lit will
show the pendant microcontroller is operating and ready to receive information.
Outputs RB12 through RB14 of the pendant microcontroller will be connected to
the LCD screen for the screen’s ability to received information, send information,
or reset if needed. Output RB10 of the pendant microcontroller will also move to
the top board schematic to give connection to the other four buttons of the
pendant. Each button is connected to the microcontroller with a resistor to
prevent any button to short out another button. Capacitors are used between
inputs and outputs of certain chips to shunt high frequency noise and to prevent
switching problems from occurring within the chips. Other capacitors between
VDD and ground are used to prevent energy losses when switching occurs and
prevent ripple in voltage outputs [1].
4.3.4 PCB and Physical Layout
Based upon the design of the previously discussed schematic, the PCB
layout must be constructed to fit within the structure parameters of the pendant
CNC Machine Design Report
63
box and prevent electrical problems from occurring. In order to see the PCB
layout of the pendant, turn to the given diagram provided in the report appendix.
In order for the pendant board to fit inside the pendant box, the size of the
pendant board must be designed in order to meet these specifications. The size of
the pendant will be based upon the size of an adult human hand to fit the
pendant while the user is able to press buttons with their other hand while still
holding the pendant. The top four set of buttons which will control the function,
cancel, enter, and axis switch tasks will be set up to fit below the LCD screen and
feed pot dial inside the upper section of the box. Therefore, the upper section
must have a larger width to contain the set of switches that are spaced apart on a
horizontal line. To meet this criterion, the upper section will have a width of 5
inches and a length of around 2.5 inches. The lower section will contain the
directional buttons to allow movement of the machine on different axes
depending upon the designation given by the axis switch button. They will be
spaced in square containment area with the all the buttons separated from each
other an equal distance pointing in the direction of movement that each button
will provide on the table top. To meet this criterion, the lower section will be set
up to have a width 3 inches and a length of 3.5 inches. The figure below will
illustrate how the pendant will look once completed.
CNC Machine Design Report
64
LED Screen
Function Cancel Enter Axis Switch
Up Y/Z
Axis
Le
ft X
Axis
Rig
ht X
Axis
Down Y/Z
Axis
Feed Pot
Dial
Figure 6: Pendant Structure
The PCB Layout of the pendant is built with the bottom layer containing all
the chips, link cable connector, and the LCD screen and the top layer containing
the switches. The red layer corresponds as the bottom copper layer and the green
layer corresponds as the top layer. The bottom layer shows many of the chips
bound into the same small area. This is due to the length of traces that must be
kept at certain length and direction to prevent internal electrical issues. The
traces must move at a 45 degree angle to prevent current losses from occurring
CNC Machine Design Report
65
when moving from pin to pin. The longer the traces cause a greater possibility
that internal inductance will grow into a large range and affect output current.
Also, shorter traces will provide another method of noise reduction and prevent
resistance drops along traces to read the optimum outputs.
4.3.5 Physical Display after Button Press
After any button is pressed, the pendant and microcontroller begin sending
and receiving messages between each other. The pendant has either the choice of
requesting information from the microcontroller through any of its
communication pathways and direct it to a particular screen created in the
firmware. Otherwise, the pendant can use its LCD screen to present current
information from the table top and navigate the tool head to any part on the
table top. A block diagram of the button press is displayed below.
Which
Process
Button
Press
Display Request
Info
Figure 7: Button Press Process
CNC Machine Design Report
66
5. Firmware
5.1 Communication Controller:
The communication controller’s task is to receive our information from
four different ports: serial, Ethernet, USB to go, and USB to PC. We also had one
output port (VGA) that would receive visual information as to where the CNC was
positioned and, what state it was in. . The information that goes through the
Controller board is called a Packet. The packet contains the Preamble, the packet
size, the Datagram(s), and the Post-amble.
|------Preamble-----|------Packet Size------|-------Datagram------|------Postamble-----|
15 bytes 512034 bytes 3+N bytes 15 bytes
S0
S1
S2
S3
Our code design was made into 4 main states: listening, preamble,
receiving, and post-amble. The listening state waits for an interrupt to flag that
information is being received. The preamble state determines if the information
S0 – Listening State
S1 –Preamble State
S2 – Receiving State
S3 – Post-amble State
CNC Machine Design Report
67
being received from the PC is credible information that will be used for the CNC.
The third phase, receiving state, will determine the destination of the information
packet. The fourth and final stage which is the post-amble state will validate the
information’s credibility from the PC. The Post and Preamble states are
interconnected with each other. This way the information is checked twice to
make sure it is correct.
5.1.1 Listening State:
The listening state sits and waits for information to be given to CNC from
the PC. This state is driven by interrupts on the communication controller. Each
input port when it receives information tells the communication controller that
there is data ready to be transmitted. Once the communication controller is told
that is has data ready it triggers an interrupt flag for that port and all other ports
are shut off till the packet is finished being processed. Once it has finished
processing, the interrupts are all reset and more data can be accepted.
5.1.2 Preamble State:
The Preamble’s main duty is to search for the appropriate sequence to
show the information is valid. The Preamble sequence comes directly before the
receive state and looks for a 15 byte sequence with three phases with each phase
having 5 bytes. The first phase of the preamble searches for the Hex value
FF(0xFF), The next phase is looks for 00(0x00) and the final phase searches for AA.
Figure 1 shows the preamble sequence in the order it will be read.
FF FF FF FF FF 00 00 00 00 00 AA AA AA AA AA
4.1.1 Preamble sequence
5.1.3 Receiving State:
The Receiving state transfers our Datagram through our Controller board.
The Data gram consists of 3+N bytes. The first byte in the Datagram is the
Command Id which is then followed by the Datagram size witch is 2 bytes long.
CNC Machine Design Report
68
The Nth bytes are the Data. In figure 4.2 shows the structure of the Data Gram
that will be passed to the Motion Controller.
CMD SIZE DATA
4.1.2 Data Gram
The Controllers states consists of 7 internal states: Command ID, Com Controller,
Main Controller, Trajectory Memory, Process Com Command, Transfer Via SPI1,
Store Into Memory, Post-amble (Phase 4). The Command State determines what
path the data will go. There are three main paths: Communication Controller,
Main Controller, and the Trajectory Memory. To determine what path to take it
uses the command ID. Figure 4.1.4 shows the state diagram for the
communication controller.
Command ID
The Command ID has 129 groups. Groups 0-20 is designated for the
Communication Controller, 21-40 are for the Main Controller, and 41-128 is
designated for the Trajectory Memory. Figure 4.1.3 shows the group ID table for
the Data Packet.
Destinations ID Group
Com Controller 0 - 20
Main Controller 21 - 40
Trajectory Memory 41 - 128
Figure 4.1.3
5.1.4 Group ID
If the group ID is between 0-20 the next state that it goes to is the
Communication Controller. At this state if the byte counter is less than the
Datagram size then it will loop until it is equal. Once this state is satisfied it then
passes the datagram to the fourth state which is the Process Communication
CNC Machine Design Report
69
Command. Once it reaches this state if the byte count is not equal to the actual
size of the data then it will be go back to the Command ID state and restart. If this
state is satisfied then it will go to the Post-amble state.
If the group ID is in the range of 21-40 the next state that it goes to is the
Main Controller. Once it reaches this state, it will pass to the state that will
transfer the information via the Serial Port Interface 1 (SPI1). Once the data
reaches this state the next state is the Post-amble. The only requirement needed
for the data to pass to this state is that the byte count has to equal the data size.
If the group ID is between 41-128 the next state that is goes to is the
Trajectory Memory. This state is designed for all types of data that deal with the
plotting data of the CNC. This state is the only state that stores information in the
memory. The reason for it being added to the memory is so two data
transmissions can happen at the same time. At this state if the data count is less
than the data size it loops till this requirement is satisfied. Once the count is equal
to data size it moves the data to the Memory. In this state there are two options.
The first option is if the Data Count is less then the Data Size is goes directly to the
Command ID state. This is in place to show there might have been some Data loss
and it needs to resend the information. If the byte count is equal to the byte size
then it goes to the post-amble state.
CNC Machine Design Report
70
S0
S1
S2
S3
CMDID <21
CMDID <41
CMID <MAX ID
S4
Invalid
Count < Size
Packet Count < Packet Size
S5
S6
Count < Size
Transfer
Complete
Transfer
Complete
S7
Exit
Count = Size
Count = Size
Count = Size
Notify Main
Controller ready
data
Figure 4.1.4
5.1.5 Post-amble State:
The Post-amble state is the same as the preamble state. The only difference
is the sequences. For the Post-amble the sequences are 55x5, 00x5, and FFx5. The
Post-amble must be true before the communication controller will pass on the
data to the Main Controller. If not satisfied then the data is thrown out and the
computer has to resubmit the packet. Figure 4.1.5 shows of the preamble in the
last phase of the communication controller.
55 55 55 55 55 00 00 00 00 00 FF FF FF FF FF
Figure 4.1.5
S0 = Command ID
S1 = Com Controller
S2 = Main Controller
S3 =Trajectory Memory
S4 = Process Com Command
S5 = Transfer Via SPI1
S6 = Store Into Memory
S7 Post-amble
CNC Machine Design Report
71
5.2 Motion Controller Micro-Processor Code
The motion micro-processor is the controller that powers the driver board.
The purpose of this controller is to control the X, Y, Z axis, the acceleration, and
velocity. The code for this controller is designed to use the Bresenham Line, and
Circle algorithm to move the CNC to its desired position.
5.2.1 Events
There are 5 main events that will be done with the main controller: Data
Available, E Stop, Limit Interrupt, UART interrupt, SPI interrupt. The data available
interrupt will let the main controller know that data is ready to be interpreted to
code to run the driver board. The E Stop interrupt event will stop the CNC
machine for safety reasons under OSHA guidelines. The limit interrupt will stop
the machine at its limits. These limits will be either the static end points of the
CNC base or the soft limits which can be assigned by the user. The UART interrupt
will be used for the pendent.
5.2.2 Initialization
The first step was to initialize the Motion controller. The CNC required
initialization of three timers: two 32-bit and a 16bit timer. The timers are used for
the acceleration and velocity (32-bit) and the 16 bit timer is an extra timer if
needed. The CNC also required initialization of two SPI ports. One port is the
Master port and the other one is the Slave. The slave port is where the
information will come in on from the Communication controller. The Master port
is the handshake from the Motion controller to the Communication controller.
This handshake is used so the Communication controller will know when to send
more data and that the Motion controller received the data. Also a UART pin is
initialized to bring in information from the hand pendent that will do small jobs
on the CNC without the PC’s help. There were seven miscellaneous pins on the
Motion controller that can be programmed to do other jobs or use other forms of
cutting (milling, solder paste dispenser). These pins are initialized to take in an
analog signal and change it to digital, which is called Analog to digital conversion.
CNC Machine Design Report
72
The last thing that we had to initialize on the Motion Controller was the ports.
Ports A – D had to be initialized to act as an input or an output.
5.2.3 Parameter Table
There are three types of Parameters that need to be implemented into the
code to allow total functionality of the CNC: soft limit, work off set, and home
position. All these Parameters are 16 bytes long. The soft limit parameter is used
to set limits inside of the CNC. The soft limits are usually within the parameters of
the home position. Figure 4.2.1 shows an example of a soft limit compared to the
full size of a CNC base. The next parameter is the work off set. This parameter
deals with placing the distance from a position other than the center. The work
offset could be used when the drawing job needs to be offset to a different
position other than the global zero. Figure 4.2.2 shows an example of the work
offset of the base of a CNC machine. The last parameter that is needed is the
Home Position. This position can specified at start and this position can be called
when there is a tool change or the CNC is coming out of a job. This position can be
set by the user. Figure 4.2.3 shows an example of where this position could be on
a CNC.
SOFT LIMITS
Center
(Global Zero)
Drawing
Position
Wor
k O
ffset
Home Position
Figure -4.2.1 Figure – 4.2.2 Figure –4.2. 3
CNC Machine Design Report
73
In the parameter table there are 3 movement speeds: Jog rate, Rapid Rate, Feed
Rate. There are also 2 modes the micro-stepping mode and the move mode. The
Jog rate is used when there is a cutting job being done. When the CNC is cutting it
uses the jog rate. This normally has the Z axis in a set position unless it is doing a
3D drawing. The Rapid Rate is used when there is no cutting job but the CNC
needs to move from one position to the other. The feed rate is the speed of the
spindle head. When the spindle head needs to gain more speed for a certain task
the feed rate, which is set by the user, will be adjusted accordingly. The two
modes in the Parameter table deal with the movement of the motors or the
movement of the CNC. The micro-stepping mode will determine how much power
will be powered to the stepper motors controlled by the driver board. The move
mode will determine where the CNC spindle head will move to.
5.2.4 Global Table
The global table is what will hold the global variables for the CNC. This table
includes: feed override, current position, and the command velocity. The feed
override variable will be used to change the feed rate (Section 4.2.3) of the CNC.
This variable will be used for the E-Stop function and any other function that
needs to stop the feed rate of the CNC or change the rate while a job is in
progress. The current position variable will be widely used in the CNC code. This
variable will be used to calculate the Bresenham circle and line algorithms
(Section 4.2.9), setting up the home position, machine position and the current
position which is known as the TPosition in our code. The command velocity is a
variable that will set the velocity of the stepper motors. This variable also will be
used in calculating the acceleration table of the CNC. This table and variable will
be calculated by hand and set up into a table array.
CNC Machine Design Report
74
5.2.5 Commands
The Main Controller code’s main purpose is to tell the driver board what
commands is needed to job at hand. These commands that will control the driver
board are implemented on the motion controller. These commands are:
GoHome
SetHome
SetWorkOffset
SetFeed
SetAccel
SetMCode
SetSoftLimits
StartJob
EndJob
SetJog
Traverse
o Linear
o Rapid
There are other feature commands that will be implemented at a later time but
time constraints did not allow for them to be added. These commands are:
Circle
Ellipse
These will make it easier for the CNC to make more precise arches. The line
algorithm will do a circle, but the time will be quicker once the Bresenham circle
algorithm is implemented.
5.2.5.1 GoHome
The GoHome command takes the current home position variable and
places it in the MachinePosition variable. This function will be called when the
user wants to place the CNC in the current home position for either tool changes
or when a job ends
CNC Machine Design Report
75
5.2.5.2 SetHome
SetHome command takes the current position that the CNC is at or the
position that given by the user. Setting the home position will be used at the
beginning of the job. This position will also be used if the CNC is using the
Traverse command when it is put in the absolute mode.
5.2.5.3 SetWorkOffset
SetWorkOffset sets the work offset that I mention before in the CNC. There
are two different offsets for the X, Y, Z, and A positions in the CNC. This code gives
you the ability to select which offset you want to use.
5.2.5.4 SetFeed
This function sets the feed rate for the CNC. As mentioned before the feed
rate sets how fast the CNC moves.
5.2.5.5 SetAccel
The SetAccel rate sets the acceleration of the CNC for the stepper motors.
The acceleration of the CNC will be calculated dynamically in a table array and it
will be used to determine the velocity of the CNC. The acceleration will be set
within an Array variable AccelRate[1000].
5.2.5.6 SetMCodes
The SetMCodes command will be used to set the miscellaneous ports to do
different functions. Port M4 is the spindle head port. When the user prompts the
controller board that it wants the spindle head on, this port is then given the
value of 1 and it is turned on. The other ports 5-7 are used for miscellaneous ports
and ports 0-3 are used as high voltage ports.
CNC Machine Design Report
76
5.2.5.7 SetSoftLimits
SetSoftLimits function sets the parameters of the X, Y, and Z limits of the
CNC. These limits are use full for having some type of project that doesn’t need
the CNC’s max range. Setting these limits will let the user create a project without
offsetting there routing design on the computer.
5.2.5.8 StartJob
This commands main function is to start the spindle head or any other
device needed for the CNC before any other command is called.
5.2.5.9 2EndJob
This commands main function is to stop the spindle head of any other
device needed for the CNC at the end of the job.
5.2.5.10 SetJog
This command will set the Jog rate for the CNC Machine. This
variable will be set by the user and can be changed at any time during a
job.
5.2.5.11 Traverse
The Traverse command is the main command in the motion controller. This
command’s main function it to implement a line on the CNC. There were two
types of Traverse modes: Linear and Rapid. Linear traverse is when the CNC is in a
routing job. This mode has a very slow acceleration rate so it can cut the material
that the job is calling for. The Rapid traverse mode is for moving the spindle head
to a particular position that it will continue the schematic again. The acceleration
of these two modes will be called from the acceleration table.
5.2.6 Motion Controllers data flow
The motion controller’s data flows very similar to the communication
controller. The motion controller brings in a Data Gram packet. In this Data Gram
there are 3 parts: The command ID, the data size, and the data itself. Figure 4.2.4
shows the structure of a typical Data Gram packet. The command ID packet is the
ID that will call the set of commands that is mentioned in section 4.2.5. Each
CNC Machine Design Report
77
command is given an ID. Figure 2.2.5 shows a list of all the command ID’s in used
in the code.
Command ID Data Size DATA
Figure 4.2.4
The next part of the data gram is the data size. The data size gives us the
appropriate size of the data packet. This number will be used to as a stopping
point for the counter inside the motion controller. Once the data size equals the
counter of the job the CNC believes the job is over and it then starts searching for
more information that has came from the message query. Figure 4.2.6 shows the
flow of the data gram from the message query. The information is on a FIFO (First
In First Out) procedure. This allows for no skipping of data information. This is the
main reason that the functions that call for positions or any other safety function
comes from the SPI port.
Commands ID
SPI:GoHome 1SetHome 2SetWorkOffset1 3SetWorkOffset2 4SetFeed 5SetAccel 6SetMCode 7SetSoftLimit1 8SetSoftLimit2 9
Memory:StartJob 1EndJob 2SetJog 3Linear Traverse 4Rapid Traverse 5
Figure 4.2.5
CNC Machine Design Report
78
1
2
3
_
_
_
Message Query
MOTION CONTROLLER
X Y Z
SPI Port
Figure 4.2.6
5.2.6.1 Message Query
The Message query holds the information to be given to the Motion
Controller. The only information that will be placed on the message query will be
any type of trajectory data. The message query code takes the message from the
Communication controller and dispatches it to the message query. Here is where
the data is placed into a FIFO design where once one message is done the next
message in line came directly before that message.
5.2.7 Interrupts
The Motion Controllers specific ports are interrupt driven. The interrupts
are in a range of 7-0, 7 being the top priority interrupt and 0 being the lowest. If
the CNC’s interrupt not set the interrupt is automatically set as a 4. The interrupts
for the CNC are as followed:
Velocity Timer : 7
Acceleration Timer: 6
Limit Switch: 7
E-Stop: 6
SPI Port 1: 4
SPI Port 2 : 4
CNC Machine Design Report
79
UART : 5
Analog to Digital : 3
5.2.8 Files in the Motion Controller Program
C Files:
UART
Timer2
Timer3
Timer4
SPI1
SPI2
Messages
MaiInitialization
Main
Limits
Handle
EStop
Dispatch
DataAvail
AnalogToDigital
H Files:
UART
Timer2
Timer3
Timer4
SPI1
SPI2
Messages
MaiInitialization
Main
Limits
Handle
EStop
Dispatch
DataAvail
AnalogToDigital
5.2.8.1 UART
The UART file has the initialization functions for the UART and also has the
enable function that will enable the UART. The sequence to enable the UART is to
enable the UART1 pin. Next you need to enable the transmitting bit. Next you
need to Enable the transmit interrupt and then the receive interrupt.
5.2.8.2 Timer 4
This file is used to initialize the Timer 4. This Timer is used if another timer
is needed for the CNC. This timer can be used at a later time depending on the
firmware updates.
CNC Machine Design Report
80
5.2.8.3 Timer 3
Timer 3 is the acceleration timer. This timer is used to determine the
acceleration that will be used for the CNC. It also will determine when the
acceleration of the CNC will plain out to its max speed.
5.2.8.4 Timer 2
Timer 2 is the velocity timer. This timer calculates the time of max velocity.
This timer as Timer 3 also will determine the max velocity.
5.2.8.5 SPI1
SPI 1 is the slave port. This port will transmit the handshake to the
Communication Controller. This port will be enabled by flagging the enable the
RF13 port.
5.2.8.6 SPI2
SPI 2 is the master port. This port will receive the information from the
Communication Controller. This port can be enabled by flagging the enable bit for
port RF12.
5.2.8.7 Messages
The Message file specifies the structure of the data messages that get
transmitted to the Motion Controller. The message structure has a Message ID,
the LPARAM (Parameter 1), and the WPARAM (Parameter 2). It would then
increment the message to place the message into a message packet. Then it will
dispatch the message to the message query.
CNC Machine Design Report
81
5.2.8.8 MainIntialization
The Main Initialization file has all the commands and all the parameters
inside them. It has every position and movement rate, as well as all the Command
pointers for the Handle file.
5.2.8.9 Main
The main files only function is to take the message and place it into the
message query by using the functions GetMessage() and AddToQue().
5.2.8.10 Limits
This file sets all the limits on the Motion Controller Ports.
5.2.8.11 Handle
The Handle file gives each command it’s ID. These ID’s then go to a case file
and are selected by the command ID from the message.
5.2.8.12 EStop
The EStop file is the Emergency stop command. This is command is called
on the SPI port. Once this command is called it is immediately executed.
5.2.8.13 Dispatch
This file dispatches the functions HandleSPIRecieve() and also the
Handle_Data_Avail(). These functions will be called depending on which
command is in the appropriate function from the Handle file.
5.2.8.14 DataAvail
This file controls the external interrupt that tells the motion controller that
the communication controller has information ready to be processed.
5.2.8.15 AnalogToDigital
The Analog To Digital file initializes the miscellaneous ports on the CNC.
This file will hold the functions of the M codes that are used for different abilities
that can be called for the CNC
5.2.9 Bresenham Algorithms
The Bresenham Algorithm is made up of two different types. The line and c
circle Algorithm are made up in the linear and rapid traverse functions. The
CNC Machine Design Report
82
Bresenham line algorithm uses ΔX and ΔY to step to the final position of X and Y.
Since our cutting will be 1/16 of an inch this algorithm will work perfectly. There
will be no visible cuts in the material that looks like we stepped from one axis to
the other. Figure 4.2.7 shows the Bresenham line algorithm diagram that was
used to calculate the line and Figure 4.2.8 shows the equation that was used to
step to each position.
(X,Y)
ΔY
ΔX
The current positions for each Axis is its own variable postion.
X = CurrentPosition.X
Y = CurrentPosition.Y
X) CurrentPosition = ΔX + MachineOffset + CurrentPosition
Y) CurrentPosition = ΔY + MachineOffset +CurrentPosition
Figure 4.2.7 Figure 4.2.8
CNC Machine Design Report
83
5.3 Firmware Subset
When a physical button is pressed, there must be a way for the pendant to
correctly receive information from the microcontroller sub-system. In order to
receive a request from the pendant, an interrupt system must be set up to give
priority for driver processes. After priority is set, it must be sent through the
driver sub-block to generate the events relevant to the message. Afterwards, the
message moves to the main sub-block to move messages to the queue and
dispatch to the appropriate handler. Finally, generalized functions must be
created in the firmware to write graphics to the LED to create the different
screens.
5.3.1 Interrupts
In order for the internal queue of the memory to operate with the ability to
have certain functions have priority over other functions, the message queue
system must be set up where the drivers are interrupt based. Each driver is given
a specific priority based upon which operation must be worked into and out of
the message queue first. The interrupt system will give first priority to scan key
driver, second priority to the analog driver, and equal priority between the display
and serial drivers which will all link into the message queue. The block diagram
below shows how the interrupt system will be based.
CNC Machine Design Report
84
Message
Queue
Serial Drivers Display DriverScan Key
Driver/ TimerAnalog Driver
Hardware
Abstraction Layer
Figure 8: Interrupt Block Diagram
5.3.2 Driver Subset
As stated above, the drivers are separated into priority passing their
information into the queue based upon which driver sent the information. Each
driver will be broken down into more generalized descriptions starting with
highest priority.
5.3.2.1 Key Scan Driver
In order to accept a key scan press, a finite state machine must be created to
accept button presses as starting states which must be validated and released
before any information can move from the drivers. The state machine is set up
below with legend below.
CNC Machine Design Report
85
State So State S1
State S2State S3
S0=Ks_Detect Button Press
S1=Ks_Verify Press
S2=Ks_Detect Release
S3=Ks_Verify_Release
Legend
Figure 9: State Machine for Key Press Interrupt
Within the microcontroller of the pendant, there are two timers that
may activate after a key is pressed depending upon the current state. One timer is
used for detection of the initial key press and scanning row and columns of the
keypad that will last approximately 1 millisecond. The second timer is activated is
used for the debounce of the keypad or verifying the key press which will last for
approximately 30 milliseconds. When going through debouncing, if they key press
is correct, the message will continue and move to the main application from
CNC Machine Design Report
86
whatever driver released it, but if they key press was in error, the state machine
will return to the detection state.
Starting from state 0, when a key is pressed, the state machine will move to
state 1 where the first timer will activate. The machine moves will check for
correctness of the key press in state 1 and if confirmed will move to state 2, but if
not confirmed, it will turn off the second timer if it is running and go back to state
0. After validation, the machine will move to state 2 where the first timer will
deactivate and the second timer will activate which will move the machine to
state 3. Once the key is released, the second timer is deactivated and the first
timer will reactivate and send the machine back to state 0 to respond to another
key press.
The key scan driver will return to state 0 in all cases where either an error
was made or process was completed. As an entire process starting from
initialization, the block diagram of the key scan is presented below.
CNC Machine Design Report
87
Initialization
Timer Interrupt
Toggle=0Set Row High/ Set Flag
Toggle
Next Row
High
Toggle=1
Return
Read Key
Press
Debounce
Read Key
press
Previous=
Current Clear
Toggle
Place in Message
Queue
Yes No
Yes
No
Figure 10: Key Scan Driver
5.3.3 Display Driver
This driver is built for the purpose of creating display functions that
can be repeatedly used for the different screens. This is done by creating
functions with the LCD screens internal datasheet. With the use of hex and C
code, the function library can be created to hold all the functions that can be
used. To build this driver, there is a choice between creating it as an interrupt or
non-interrupt based system. Although the non-interrupt system is simpler to code
and implement, it causes performance problems with the driver sub-system and
contains no loop transition for transmission which can lead to stalled applications.
Pictured below is the display driver if it were in non-interrupt form.
CNC Machine Design Report
88
Transmit Queue
Get Byte/
Set Busy
Flag
Send
Acknowledge
Tx Empty
Complete/
Clear busy
flag
No
Yes
No
Yes
Figure 11: Display Driver Non-Interrupt
In this setup of the display driver, the routine checks to see if data is inside
the transmit queue. If data is waiting, the busy flag is set to prevent any other
operation from occurring or other information from being released. The machine
must acknowledge the byte being sent before it can move, and it checks to see if
the transmit queue is empty. If it is not empty, the routine continues again. If it is
empty, the busy flag is reset to allow other operations to occur.
Pictured below is the setup for the interrupt version of the display driver.
CNC Machine Design Report
89
Data into
Transmit
Queue
Build
Command
Structure
Busy
Enable Tx
Interrupt
Initial First
Byte
Transfer
Return
TX
Interrupt
Flag
Get Byte
from
transmit
queue
Last
character
Disable Tx
interrupt
flag/ Clear
busy
Return
Service
Routine
Yes
No
Yes
No
Service
Routine
Figure 12: Display Driver Interrupt
In this setup, the data is moved into the transmit queue. A built command
structure must be created to move the information out of the queue and into the
message loop. If the driver is busy, no data can be moved until the busy flag is
released. After data is completely filled into the transmit queue, the interrupt
process begins and sets the interrupt flag on. The first character is moved quickly
to the message loop, and the routine checks for another character and moves it
to the message loop until the queue is empty which disables the interrupt process
and clears the busy flag again. Afterwards, the routine will return to its original
status.
CNC Machine Design Report
90
5.3.4 Analog Driver
This driver is a connection to the feed pot discussed in the hardware
subset. Any change in the feed pot dial will be stored as an analog value which
must be sent through the driver to the message loop to be converted into digital
information and be used by machine to change the speed/feeds of the machine
while in motion. The block diagram for the analog driver is pictured below.
Initialize
Analog
Drive
Get Value
Current
Value=Previous
Value
Put in
Message
Queue
Return
Yes
No
Figure 13: Analog Driver Diagram
The diagram shows that after initialization it will check the value the
feed pot is currently displaying and comparing it to the value it last checked it as.
If the previous value is not the same as the current value, the value will be placed
into the message queue to be sent to the microcontroller to change the
speed/feed rate. If the values are the same, the routine will return to
initialization.
CNC Machine Design Report
91
5.3.5 Serial Driver
This driver is the main connection between the serial port that runs directly
to the microcontroller sub-system and the pendant sub-system. This driver has
access to the Tx transmit queue and Rx receive queue. When information is
received through the transfer queue from the microcontroller sub-system, it is
processed byte by byte until it is completely moved in the message loop. Also, if
information needs to be stored from the receive queue, it must move each byte
of the message until it has been completely processed. The block diagram for the
serial driver is displayed below.
Main Initialize
Tx Queue/ Tx ISRRead Queue/
Rx ISR
Get byte from
Tx buffer
Store received
byte
Check Tx
queue emptyReturn
Disable
Interrupt/
Clear Busy
Return
End of
transmissionReturn
Send Message/
Clear
Acknowledge
Return
No
Yes
No
Yes
Figure 14: Serial Driver
As shown in the diagram depending upon which queue branch was
taken, each byte of information is stored or read, and if more information is
detected, the loop will repeat. Otherwise, the busy signal is cleared to allow other
operations to occur and will return to main.
CNC Machine Design Report
92
5.3.6 Main Subset
The subset contains all blocks for correct dispatching of the message after
exiting the message queue.
5.3.6.1 Message Loop
After exiting the message queue, the command information is sent to the
message loop where it will either be dispatched or go back into the message loop
after being dispatched. Each dispatched message has to be delegated to the
appropriate handling method. The four main types of dispatched messages are
either serial events, display transmission finished, analog value changed, and key
pressed. Serial events can either be transmission completed or a request to
receive data. The message transmission path is shown in the figure below.
Message
Loop
Dispatch
Message
From Message
Que
AL
Application
Layer
Figure 15: Main Subset
The message loop is either set to 0 or 1 input. Based upon interrupt
priority, the message loop will grab the message from the message queue that
has the highest priority. Afterwards, it will call the dispatch message command. It
will then return to the message loop. The message will be set to 0 if there is a
CNC Machine Design Report
93
message or be a 1 if there is no message in the loop. Finally, it will decrement the
message counter. The message loop block diagram is pictured below.
Get from queue
Decrement Counter
Return
Figure 16: Message Loop
5.3.6.2 Dispatch Message
The dispatch message block is set up by a menu index that determines the
current state of the machine. After any of the buttons are pressed, a different set
of operations are performed to send the correct information and determine the
action wanted by the user. After information has moved through this block and
graphics commands are written to make screen displays, it can be shown any
multiple screens for reading or altering. The main block with major sub-blocks for
the dispatch block are shown below.
Handle Key Press Menu
Function Jog Cancel Accept
Figure 17: Dispatch Menu Main Block
CNC Machine Design Report
94
The menu for the key press can either be set at 0 through 4. Index 0 stands
for the machine in no motion in idle state. Index 1 stands for the machine moving
into function set of sub-screens. Index 2 stands for the machine in motion in jog
state. Index 3 stands for the machine opening a file from an outside jump drive.
Index 4 stands for the machine being locked and unable to accept any new
commands.
5.3.7 Function Sub-block
This sub-block allows the user to enter the main set of function
screens that will be discussed in greater detail later. Pictured below is the block
diagram for the function sub-block.
CNC Machine Design Report
95
Function
Display
Function
Menu
Key
Index=0
Return
Figure 18: Function Sub-Block
5.3.8 Jog Sub-block
In this sub-block, the index is checked to see its immediate placement to
allow a different command to be utilized depending on the state. If index is 0, the
routine will return to the main loop. If index is 1, next function menu will be
displayed. If index is 2, a jog command can be sent. If index is 3, the directory to
the jump drive will be displayed. If index is 4, the display is locked and no
operation can changed until it returns to the main loop. Finally, if the index is
outside the range, it has entered an unknown state and must immediately return
to the main loop. The block diagram for the jog sub-block is displayed below.
CNC Machine Design Report
96
Figure 19: Jog Sub-Block
5.3.9 Cancel Sub-block
In this sub-block, after the key index is set to 0, the current coordinate set
will be displayed if on the main screen or it will return you to the main screen if in
a lower screen. The block diagram for the cancel sub-block is displayed below.
Jog
Key=0 Return
Key=1Display
Next MenuReturn
Key=2Send Jog
CommandReturn
Key=3Display
DirectoryReturn
Key=4
Display
Unknown
State
Return
Display
Locked
YesNo
Yes
Yes
Yes
Yes
Yes
No
No
No
No
CNC Machine Design Report
97
Figure 20: Cancel Sub-Block
5.3.10 Accept Sub-block
In this sub-block, after function sub-block is initiated, it provides movement
to the lower set of screens and executes files loaded from the jump file which will
return to the default screen. Pictured below is the block diagram for the accept
sub-block.
Cancel
Set Key=0
Display
Coordinate
Return
CNC Machine Design Report
98
Figure 21: Accept Sub-Block
5.3.11 Directory Block
This block is a sub-block under the jog block. After it has been selected
through the flowchart, it opens up the directory to the outside thumb drive. After
opening the drive, it gives access to the folders within the directory and the files
within each folder. Pictured below is the block diagram for the directory block.
Accept
Go To
Selected
Screen
Execute
File
Return To
Default
Screen
Main
Screen
CNC Machine Design Report
99
Thumb Drive Initialize
Button Press
Accept
Left
Right
Up
Down
Function
FileLoad File/
Run Job
Change
Directory
Update
DisplayExit
Get
Request
Next File
Refresh
DisplayExit
Get
Previous
File
Refresh
DisplayExit
Go To
Main
Go to
Main Sub
Screen
Yes
No
No
No
No
No
Yes
No
Yes
Yes
Yes
No
CNC Machine Design Report
100
Figure 22: Directory Block Diagram
5.3.12 Graphics
In order for the function blocks to communicate directly to the screens and
display the corresponding information, firmware graphic functions must be
written to give the writer access to information from the microcontroller sub-
system and correctly move it to the pendant screens. Listed below is a table with
the created functions and a brief description for each one [2].
Name Description
MoveTo()
Moves x and y pixels on LCD screen to
new position
DrawLine()
Draws a line on a screen in a specified
position
DrawBox()
Draws a box on a screen in a specified
position
DrawChar()
Returns a character from a specified
position
DrawCircle()
Draws a circle on a screen in a
particular position
DrawTriangle()
Draws a triangle on a screen in a
particular position
RowColumnPos()
Moves a character to specified x and y
array positions
CNC Machine Design Report
101
SetOpaqueTransparent()
Used in conjunction with DrawBox()
command to set background to
opaque or transparent
SetBackgroundColor()
Set background color to a set of
written, predefined colors for the LCD
SetPenSize()
Sets pen size for the drawing
DrawSemiCircle()
Draws a semi-circle on a screen in a
particular position
WriteString()
Writes a string of characters starting at
placement stated by RowColumnPos()
command
ClearScreen() Clears screen of all previous images
and information
DrawIcon() Draws an uploaded icon to a particular
position on the screen
Table 1: Graphics Functions
5.3.13 Screens
This section will describe each screen displayed on the LCD of the pendant
with its related use and how it receives information from different sources [2].
5.3.13.1 Main Screen
This is the default screen for the LCD. After startup, the pendant will display
the current x, y, and z coordinates of the pendant with the current acceleration
directly below sent through the microcontroller sub-system. On the top right,
there will be an odometer displaying changes made to the speed through the feed
pot potentiometer. At the bottom left, there are five circles that are either red or
green to tell the user when the limit of a switch is on or off based upon
CNC Machine Design Report
102
preferences given by microcontroller sub-system. Finally, the bottom left will
display a text box that will read run, jog, or idle depending upon the current state
of the machine.
X:
Y:
Z:
A:
JOG
-50 50
Figure 23: Main Screen
5.3.13.2 Main Sub-Screen
This is the first screen that will appear once the function key is pressed
allowing the user to move into the lower sub-screens.
Subscreens
- Offsets
- Parameters
- Soft Limits
Figure 24: Main Sub-Screen
5.3.13.3 Offsets Screen Menu
This sub-screen will be broken up into four different screens that the user
can access and alter.
CNC Machine Design Report
103
Offsets
- Home Position
- Park Position
-Work Offset 1
-Work Offset 2
Figure 25: Offsets Screen Menu
5.3.13.4 Home Position/ Park Position/ Work Offset 1/ Work Offset 2 Screens
These screens will all display different information depending upon what
the user previously set up each screen’s values as or what the job the machine is
performing may set them as. These screens will have a title at the top displaying
the current screen. On the left side, there will be a title to show the set values for
the x, y, and z positions and the acceleration rate. On the right side, there will be
a title to show the current values for the x, y, and z positions and the acceleration
rate that are currently being processed on the machine while in motion. At the
bottom, there are accept and cancel boxes that can be used with their
corresponding buttons to accept the set position as the current position or cancel
and return to main screen.
CNC Machine Design Report
104
TitleSet
PositionCurrent
Pos
X:
Y:
Z:
A:
Accept Cancel
Figure 26: Offset Screen
5.3.13.5 Parameters Screen Menu
This sub-screen will give the user access to the machine parameters, TCP/IP
configuration, and communications port screens.
Parameters
- Machine Parameters
- TCPIP Configuration
- Com Port
Figure 27: Parameters Screen Menu
CNC Machine Design Report
105
5.3.13.6 Machine Parameters Screen
This screen will display all the parameters that the machine is limited to
working at. These parameters are specified through the outside connection’s
requirements, jump drive requirements, or the default rates the machine can
move it based upon the drive sub-system’s limitations for stepping.
Machine Parameters
Max Speed:
Acceleration:
Rapid Max:
Rapid Min:
Deceleration:
Jog Speed:
Max Jog Speed:
Max Feed:
Min Feed:
Jog Increment:
Figure 28: Machine Parameters Screen
5.3.13.7 TCP/IP Configuration Screen
This screen will only show information when the machine is operating
through its Ethernet connection. These variables will show the addressing from
different protocol layers that are hardwired into the connection bus depending
upon where the outside connection is being made. The information is relayed
from the microcontroller sub-system.
CNC Machine Design Report
106
TCP/IP Configuration
Ip Address
xxx.xxx.xxx.xxx
Subnet Mask
xxx.xxx.xxx.xxx
Default Gateway
xxx.xxx.xxx.xxx
xxx.xxx.xxx.xxx
Primary DNS
Secondary DNS
xxx.xxx.xxx.xxx
Figure 29: TCP/IP Configuration Screen
5.3.13.8 Communications Port Screen
This screen will only display information when the machine is operating
under the serial connection. These variables displayed will show the rate at which
the bytes are being moved into the machine, the bytes that distinguish the end of
the transmission, the bytes representing how the flow of information is being
controlled, the bit to show if the information has a certain type of parity, the bits
to show the on character and off character if the flow control is moving in this
pattern. All this information is sent to the pendant through the microcontroller
sub-system.
CNC Machine Design Report
107
Com Port
Communications
Baud Rate
Stop Bits:
Flow Control:
Xon Char:
Xoff Char:
Parity:
Figure 30: Communications Port Screen
5.3.13.9 Soft Limits Screen Menu
This sub-screen will allow the user to move to the upper and lower soft
limits screens.
Soft Limits
-Upper Limits
-Lower Limits
Figure 31: Soft Limits Screen Menu
CNC Machine Design Report
108
5.3.13.10 Upper Soft Limits/ Lower Soft Limits Screen
These screens have the same setup as the offsets’ screens. The title is
centered showing which limits are being displayed. The left side displays the set
values for the x, y, and z positions and the acceleration rate, and the right side
displays the current values for the x, y, and z positions and the acceleration rate.
The bottom shows the accept and cancel boxes to change the set values to
current values or go back to the main screen. This information is provided by the
job the machine is performing or can be specified by machine limitations given by
driver and microcontroller sub-system constraints.
Upper Limits/Lower LimitsSet
PositionCurrent
Pos
X:
Y:
Z:
A:
Accept Cancel
Figure 32: Upper Soft Limits/Lower Soft Limits Screen
5.3.13.11 Thumb Drive Screen
This screen will display the entire directory for the uploaded jump drive file.
The top of the screen displays the name of the jump drive. Below, the directory
CNC Machine Design Report
109
names with an icon are shown for all folders. If a folder is chosen, the directory
names with an icon are shown for all files.
Root:
Folder Name
File Name
Figure 33: Thumb Drive Screen
5.3.14 Relation To Other Sub-Systems
Mechanical Sub-System: Connection to outside structure through a serial port
connector; able to control movement of mechanical gantry through set of buttons
that can be switched to control either y or z axes and x axis simultaneously
Microcontroller Sub-System: Receives information that can be displayed by
screens and can send information back to system to change current information
to set information on the table.
Driver Sub-System: Receives power for operation from this system
CNC Machine Design Report
110
6. Conclusions and Recommendations
6.1 Conclusions
The CNC machine is a system that accepts numerical input and performs
machining on a part or product based upon the provided tool head’s function. It
has an estimated life expectancy of at least 15 years. It has negative impact on the
environment through either noise pollution and may cause adverse affects on an
individual’s health if the electrical components contain any poisonous elements. It
can be manufactured quickly if all schematics, firmware, and software are
provided and cost being of small concern. This system can replace many products
that perform only one particular function and can only accept certain types of
input files. Its cost is lower than many similar machines currently on the market,
and it is adaptable to be useful for both manufacturers and hobbyists. The
machine is broken down into these four subsystems.
Mechanical
Motor Driver
Main Controller
Pendant
6.2 Recommendations
This system is able to add more features, improve current features, and
develop new facets. Some possible improvements and additional testing to the
current system are listed below.
Combine ENC and PIC24F processors by using newly invented PIC32
processor
Add more interface screens to pendant
Expand miscellaneous input/output space from main controller to motor
driver
CNC Machine Design Report
111
Implement Bresenham circle algorithm and ellipse function into FPGA for
the main controller subsystem
Design independent power supply for each subsystem
Provide additional axes for movement
Reduction in size of motor driver PCB board
Use more miscellaneous outputs on motor driver board to control voltage
reference circuitry to set maximum current through motors
Provide protection circuit in series of motor driver’s bridges to maintain
micro-stepping sequencing
Create extra tool head attachments
Perform FEA finite element and stress analysis testing on gantry
components
Calculate bearing deterioration, bushing wearing, and ball screw wearing
7. Cost/Manufacturability
In order to make this product marketable, a range of costs must be found
that can show the machine can reproduced at a lower cost compared to the
amount given by the original prototype. After creating a working prototype, prices
have been calculated for the major costs for the system. They are displayed in the
table with a price given at a large quantity that is given to the buyer after a
certain time has passed.
Part Cost Quantity Waiting Time
Motor Driver PCB Board $25 5 4 weeks
Pendant PCB Board $13 10 4 weeks
Main Controller PCB Board $13 10 4 weeks
Plastics $ 384 each 50 N/A
Parts Pendant $ 50 each 50 N/A
Parts Driver $ 120 each 50 N/A
Parts Main Controller $ 100 each 50 N/A
CNC Machine Design Report
112
Cabinet $40 1 N/A
Assembly Electrical Reflow $ 25 each 3 N/A
Total $770
Table 2: Manufacturability Costs
List of Equipment and Materials with Prices
Equipment Location Soldering Iron Borrowed from James Williams
Reflow Iron Borrowed from James Williams
Mill Loaned from University
Table Saw Loaned from Norva Plastics
Materials Price (each in $) 1 BAV16W-FDICT-ND Diode .18
9 CC0805 0.1uF Capacitor .05
3 CC0805 1uF Capacitor .04
3 CC0805 4.7uF Capacitor .08
1 CTX736CT-ND Chip 7.35
1 DB9/RS232 Chip .50
1 HEADST10 Dual Row Header .10
3 Single Row Headers .05
1 MAX3232CDBR_SOIC chip 2.45
1 MCP1825T-3302E Voltage Regulator 1.04
10 Mounting Holes Free
1 PIC24HJ32GP302/SOIC28 Microcontroller 4.82
CNC Machine Design Report
113
1 RC0805 1M Resistor .07
2RC0805 47K Resistor .07
5 RC0805 1K Resistor .07
1 RC0805 4.7K Resistor .07
2 RC0805 100K Resistor .07
1 RC0805 240 Resistor .07
1 RC0805 470 Resistor .07
1 RC1210 100 Resistor .26
1 SMD_LED0805 LED .40
8 SW415-ND Switches .60
1 VRT24W Variable Resistor 1.55
PCB Board 33.00
1 OLED Display 79.00
Frame Free
The boards will come completely assembled after purchase, but time
required to machine and align complete system will take 1 day. The electrical
control box will take .5 days to complete, and system testing will take 1 to 2 days
to complete.
7.1 Mechanical Cost
CNC Machine Design Report
114
Component Part #
Quantity Cost Total Cost Source Date Priced
Common Parts (X, Y, & Z)
Ballscrews 108" $10.09/ft $ 90.81 Roton 1/24/2010
Ballnuts 3 $ 23.55 $ 70.65 Roton 1/24/2010
Thrust bearing blocks
3 $ 11.75 $ 11.75 Stock from Online Metals, machined in house
Ballnut flanges
3 $ 3.38 $ 3.38 Stock from Online Metals, machined in house
Thrust Bearings
6 $14.95/2 $ 44.85 VXB
Grease Zerks: 1/8-27 PTF
3 $2.90/10 $ 2.90 McMaster Carr
Ball Bearings
3 $ 5.55 $ 16.65 McMaster Carr 3/29/2010
Bearing seals
6 $ 2.31 $ 13.86 MSC Direct
Seal retainer
3 $1.25/3 $ 1.25 Stock from ME shop, machined in house
Belts 3 $ 3.49 $ 10.47 McMaster Carr
Pulleys 6 $ 3.17 $ 19.02 MSC Direct 3/23/2010
Motors X&Y 2 $ 39.00 $ 78.00 Anaheim Automation
Motors Z 1 $ 29.00 $ 29.00 Anaheim Automation
Wiring 20ft 3 $ 13.00 $ 39.00 Anaheim Automation
Cable Carriers
Cable Carrier (X & Y)
2 $ 41.19 $ 82.38 McMaster Carr 3/29/2010
CNC Machine Design Report
115
Mounting Brackets (X&Y)
2 $ 8.58 $ 17.16 McMaster Carr 3/29/2010
Cable Carrier (Z)
1 $ 10.66 $ 10.66 McMaster Carr 3/29/2010
Mounting Brackets (Z)
1 $ 6.96 $ 6.96 McMaster Carr 3/29/2010
Z axis
z-top 1 Quoted Machined by Norva Platics
z-side 2 Quoted Machined by Norva Platics
z-bottom 1 Quoted Machined by Norva Platics
z-back 1 Quoted Machined by Norva Platics
z-mount 1 $ 18.23 $ 3.04 Stock from Online Metals, machined in house
standoff 2 $ 9.85 $ 9.85 Stock from McMaster Carr, machined in house
3/29/2010
versa rail 2 $ 40.30 $ 80.60 Anaheim Automation 1/27/2010
versa guide block
2 $ 33.80 $ 67.60 Anaheim Automation 1/27/2010
Spindle Plate
1 $ 10.94 $ 10.94 Stock from McMaster Carr, machined in house
3/29/2010
Spindle 1 $ 22.00 $ 22.00 James Williams
spindle holder
1 Quoted Machined by Norva Platics
X axis
x-traveling block
1 $ 105.00 $ 105.00 Stock from Norva Platics, machined in house
xback 1 Quoted Machined by Norva Platics
CNC Machine Design Report
116
xtop 1 Quoted Machined by Norva Platics
x-rods 3 $ 39.35 $ 118.05 Lintech
x-bushings 6 $39.95/4 $ 59.93 VXB
Table
Table sides 2 Quoted Machined by Norva Platics
Table Bottom
1 Quoted Machined by Norva Platics
Table end -Motor
1 Quoted Machined by Norva Platics
Table End 1 Quoted Machined by Norva Platics
Table Top 1 Quoted Machined by Norva Platics
Table supports
3 $ 8.69 $ 26.07 Stock from Online Metals
4/7/2010
Table stand rails
2 $ 10.62 $ 21.24 Stock from Online Metals
4/7/2010
Y axis
sides 1 Quoted Machined by Norva Platics
side w/o motor
1 Quoted Machined by Norva Platics
y-cross 1 $ 18.23 $ 15.19 Stock from Online Metals, machined in house
y support rail
1 $ 179.00 $ 179.00 VXB 1/28/2010
y-axis bushing block
2 $ 39.95 $ 79.90 VXB 1/28/2010
y-lifts 2 $ 57.33 $ 57.33 Stock from Online Metals, machined in house
Machine Electronics
CNC Machine Design Report
117
Electronics Case
Top 1 Quoted Machined by Norva Platics
Bottom 1 Quoted Machined by Norva Platics
Sides 2 Quoted Machined by Norva Platics
Front 1 Quoted Machined by Norva Platics
Back 1 Quoted Machined by Norva Platics
Divider 1 Quoted Machined by Norva Platics
Pendant Case
Case 1 Quoted Machined by Norva Platics
Back Plate
1 Quoted Machined by Norva Platics
Fasteners
M5x20 8 $5.34/25 $ 1.71 McMaster Carr 4/7/2010
M6x25mm
8 $7.91/25 $ 2.53 McMaster Carr 4/7/2010
4-40x0.25
24
6-32x0.25
17
8-32x0.375
2
8-32x0.5
12
8-32x1 68
10-24x0.75
12 $7.94/100 $ 0.95 McMaster Carr
10-24x1
148 $16.15/100 $ 23.90 Fastenal 4/2/2010
CNC Machine Design Report
118
1/4-20x1
77 $9.45/50 $ 14.55 McMaster Carr
3/8-16x1.5
10 $ 9.79 $ 9.79 Lowes
3/8-24x1
4 $8.27/25 $ 1.32 McMaster Carr 4/7/2010
8-32x0.25 (self tapping)
4
5/16-16 Nut
3
board standoffs
6-32x0.3125 7
6-32x0.3125 10
4-40x0.25 4
set screws
8-32x0.25 3
8-32x0.3125 1
Washers
Split Lock washers
#10 32 $2.13/100 $ 0.68 McMaster Carr
1/4 56 $5.64/100 $ 3.16 McMaster Carr
3/8 16 $4.00/25 $ 2.56 Lowes
M5 8
M6 8
CNC Machine Design Report
119
Ext. Tooth Lock washers
#10 110 $2.54/100 $ 2.79 Fastenal 4/16/2010
Flat washers
3/8 8
.438x.203x.032
24
.500x.265x.032
36
Fastener Totals
Unlisted $ 30.00 $ 30.00
Paste Dispenser
motor mount
1 Quoted Machined by Norva Platics
plate 1 $25.34/3 $ 8.45 Stock from Online Metals, machined in house
plunger 1 Quoted Machined by Norva Platics
syringe 1 User Selected Amtech
paste dispenser
1 Quoted Machined by Norva Platics
coupler 1 Quoted Machined by Norva Platics
screw 1 Quoted Machined by Norva Platics
Quote: Plastics and Machining
30 Quoted $900 Norva Plastics
Cost $ 2,406.89 Mechanical Subsystem
Table 3: Mechanical Costs
CNC Machine Design Report
120
7.2 Electrical Cost
Part Number Part Description Quantity Unit Price Total Cost
Y236653 Toroidal Transformer 250VA, 30V+30V 1 53.48 $ 53.48
193316 CAP ELECTROLYTIC 220uF 50V 10 0.0125 $ 0.13
1940272 POWER SUPPLY 12V @4.16A 1 26.95 $ 26.95
25604 HOOD, D-SUB METALIZED, 25 PIN 1 0.445 $ 0.45
1712616 PANEL MOUNT FUSEHOLDER 1 3.475 $ 3.48
16652 AC RECEPTACLE, MALE, 15A@250v 1 0.545 $ 0.55
494039 CONN,CPC AMPH 4 0.46875 $ 1.88
495162 CONN,CPC AMPH 4 0.28125 $ 1.13
495082 CONN,CPC AMPH 4 0.34875 $ 1.40
230050 CONN, MOLEX 1 0.225 $ 0.23
230041 CONN,MOLEX 1 0.195 $ 0.20
186992 SOLID-STATE RELAY 1 15.95 $ 15.95
175214 SOLID-STATE RELAY 1 6.95 $ 6.95
1953604 PLUG,DC,PWR,FEM 2.1 TO 2.5 1 1.49 $ 1.49
1953591 PLUG,DC,PWR,FEM 2.5 TO 2.1 1 1.49 $ 1.49
77586 STAND-OFF 5 0.029 $ 0.15
139222 STAND-OFF 5 0.045 $ 0.23
166546 STAND-OFF 2 0.1875 $ 0.38
133542 STAND-OFF 25 0.0078 $ 0.20
230958 USB 2.0 TYPE B CONNECTOR 1 0.475 $ 0.48
921651 USB TYPE A CONNECTOR 5 0.19 $ 0.95
2076252 TACTITLE SWITCH SURFACE MOUNT 10 0.0125 $ 0.13
2076682 DB9 FEMALE SHORT CONNECTOR 2 0.1625 $ 0.33
526504 TYPE III SNAP-IN CRIMP SOCKET 12 0.01875 $ 0.23
526563 TYPE III SNAP-IN CRIMP PLUG 12 0.01875 $ 0.23
IRF7341PBFCT-ND HEXFET 4.7A@25C,55V VDSS, 0.050 Ron 15 0.046 $ 0.69
768-1011-1-ND IC USB TO PARALLEL FIFO 28 SSOP FTDI 2 1.125 $ 2.25
751-1366-1 HIGH SPEED OPTO-COUPLER 15 0.070833 $ 1.06
160-1365-5-ND OPTO-ISOLATOR 8 0.06375 $ 0.51
PIC24FJ256GB110-I/PF-ND USB HOST MICRO CONTROLLER 1 4.43 $ 4.43
ENC624J600-I/PT-ND ETHERNET 10/100 CONTROLLER 1 2.47 $ 2.47
PIC24HJ256GP610-I/PF-ND PIC24 MICRO CONTROLLER 1 4.76 $ 4.76
PIC24HJ32GP302-I/SO-ND PIC24 MICRO CONTROLLER 1 2.41 $ 2.41
296-13094-1-ND RS-232 TRANSCIEVER 3 0.25 $ 0.75
620-1166-1-ND IC DRIVER MICROSTEPPING 38-TSSOP 3 1.656667 $ 4.97
GBJ2001-FDI-ND BRIDGE RECTIFIER, 100VRB 20A 1 1.76 $ 1.76
507-1442-ND CONN, MAGJACK 10/100B-TX 1 1.56 $ 1.56
706-1035-ND IC SRAM 4MBIT 10NS 44-TSOP 2 1.715 $ 3.43
CNC Machine Design Report
121
576-1137-ND LDO REGULATOR 5.0V 1.25A 4 0.27875 $ 1.12
MCP1826S-3302E/DB-ND LDO REGULATOR 3.3V SOT223-3 7 0.082857 $ 0.58
MFU08051.25CT-ND FUSE 1.25A FAST BLOW 5 0.0407 $ 0.20
568-3309-1-ND VOLTAGE REG 5V 100MA SOT-223 1 0.855 $ 0.86
122-1376-ND IC CPLD 3.2K 144MCELL 100-TQFP 1 6.5 $ 6.50
P10.0CCT-ND 10.0 OHM 1/8W 1% 0805 5 0.0091 $ 0.05
P100AACT-ND 100 OHM 1/2W 5% 1210 5 0.0378 $ 0.19
P100ACT-ND 100 OHM 1/8W 5% 0805 5 0.0077 $ 0.04
P100KACT-ND 100K 1/8W 5% 0805 5 0.0077 $ 0.04
RMCF1/1010KJRCT-ND 10K 1/8W 5% 0805 50 0.000088 $ 0.00
P12KACT-ND 12K 1/8W 5% 0805 25 0.000828 $ 0.02
RHM180ARCT-ND 180 1/8W 5% 0805 5 0.0034 $ 0.02
RHM270ACT-ND 270 1/8W 5% 0805 10 0.004 $ 0.04
P2.0KACT-ND 2.0K 1/8W 5% 0805 5 0.0077 $ 0.04
P4.7KACT-ND 4.7K 1/8W 5% 0805 5 0.0077 $ 0.04
P470ACT-ND 470 1/8W 5% 0805 5 0.0077 $ 0.04
541-47KACT-ND 47K 1/8W 5% 0805 10 0.00385 $ 0.04
P49.9CCT-ND 49.9 1/8W 1% 0805 5 0.0091 $ 0.05
P49.9KCCT-ND 49.9K 1/8W 1% 0805 10 0.00455 $ 0.05
P1.0MACT-ND 1M 1/8W 5% 0805 5 0.0077 $ 0.04
P12.7KCCT-ND 12.7K 1/8W 1% 0805 5 0.0091 $ 0.05
T93YA-100-ND 100 OHM POT, 21 TURN 3 0.283333 $ 0.85
T93YA-2.0K-ND 2.0K OHM POT , 21 TURN 3 0.283333 $ 0.85
P12.4KCCT-ND 12.4K 1/8W 1% 0805 5 0.0091 $ 0.05
490-1683-1-ND 0.1uF 16V CERAMIC CAP 0805 250 5.55E-05 $ 0.01
490-1746-1-ND 10uF 6.3V CERAMIC CAP 0805 10 0.0082 $ 0.08
PCC270CGCT-ND 27pF 50V CERAMIC 0805 5 0.0151 $ 0.08
490-1638-1-ND 6.8nF 50V 5% CERAMIC 0805 5 0.0283 $ 0.14
399-1136-1-ND 1nF 50V CERAMIC 0805 10 0.0036 $ 0.04
445-3463-1-ND 1.0uF 50V 0805 CERAMIC 5 0.0099 $ 0.05
445-5206-1-ND 1.0uF 100V 0805 5 0.066 $ 0.33
511-1443-1-ND 4.7uF 6.3V TANT 0805 5 0.066 $ 0.33
490-1729-1-ND 0.33uF 25V CERAMIC 0805 15 0.007267 $ 0.11
709-1172-1-ND 22pF 50V CERAMIC 0805 5 0.0044 $ 0.02
535-9640-1-ND CRYSTAL 25.000MHZ 18pF 1 0.64 $ 0.64
XC1526CT-ND CRYSTAL 8.000 MHZ 20pF 1 0.585 $ 0.59
CTX736CT-ND OSC CLOCK 10.000 MHZ 1 3.675 $ 3.68
L62701CT-ND LED RED 5 0.0267 $ 0.13
SC237-ND CONN, POWERJACK MINI R/A PCMT 2.5MM 1 0.72 $ 0.72
296-5108-1-ND QUAD 2-INPUT AND GATE 14-SOIC 2 0.125 $ 0.25
CNC Machine Design Report
122
160-1423-1-ND LED GREEN 5 0.0105 $ 0.05
277-1273-ND TERM BLOCK 2.54MM 2POS 1 0.545 $ 0.55
277-1274-ND TERM BLOCK 2.54MM 3POS 1 0.825 $ 0.83
A98335-ND TERM BLOCK 2.54MM 4POS 14 0.041786 $ 0.59
A98337-ND TERM BLOCK 2.54MM 6POS 5 0.1755 $ 0.88
LM1084IS-5.0-ND POSITIVE VOLTAGE REG 5V 5A 1 1.665 $ 1.67
160-1427-1-ND LED SUPER RED 0805 5 0.0126 $ 0.06
609-3464-ND LIST 0.100 5 0.02 $ 0.10
609-3469-ND LIST 0.100 5 0.048 $ 0.24
609-3248-ND LIST 0.100 5 0.06 $ 0.30
609-3256-ND LIST 0.100 3 0.071667 $ 0.22
3M9450-ND HEADER 5 POS 5 0.0204 $ 0.10
MHC10E-ND HEADER 10 POS 5 0.188 $ 0.94
576-1137-ND LDO REG 1.25A 5.0V TO263 3 0.371667 $ 1.12
399-4630-1-ND 4.7uF 25V TANT 7 0.034286 $ 0.24
495-2269-1-ND 1.0uF 25V TANT 20 0.003375 $ 0.07
BAV16W-FDICT-ND DIODE SWITCH 75V SOD123 35 0.008543 $ 0.30
399-1161-1-ND 15nF 50V CERAMIC 0805 10 0.0023 $ 0.02
PCC2452CT-ND 0.1uF 50V CERAMIC 0805 5 0.0103 $ 0.05
F1450CT-ND FUSE 0.125 125V FAST BLOW 1206 10 0.0371 $ 0.37
LM337IMPCT-ND NEGATIVE VOLTAGE REGULATOR 5 0.42 $ 2.10
296-12602-1-ND ADJUSTABLE POSITIVE REGULATOR LM317 5 0.176 $ 0.88
MB110S-TPMSCT-ND DIODE BRIDGE 1A 100V 5 0.112 $ 0.56
MT2119-ND TRANSFORMER DUAL 14VAC 0.40A 1 4.125 $ 4.13
P1.15KCCT-ND 1.15K 1/8W 1% 0805 15 0.003033 $ 0.05
541-0.0ACT-ND 0.0 OHM 1/8W 5% 0805 25 0.000828 $ 0.02
RHM20.0KCRCT-ND 20.0K 1/8W 1% 0805 15 0.001267 $ 0.02
RMCF1/1010KJRCT-ND 10K 1/8W 5% 0805 10 0.00105 $ 0.01
RHM1.00KCRCT-ND 1.00K 1/8W 1% 0805 10 0.0019 $ 0.02
RR12P4.32KDCT-ND 4.32K 1/10W 0.5% 0805 5 0.0148 $ 0.07
P240DACT-ND 240 1/8W 0.1% 0805 5 0.0204 $ 0.10
RHM2.05KCRCT-ND 2.05K 1/8W 1% 0805 25 0.000536 $ 0.01
PRL1632.043FCT-ND 0.043 OHM 1W 1% 1206 12 0.038417 $ 0.46
S9172-ND HEADER 20POS 5 0.037 $ 0.19
609-3464-ND LIST 0.100 10 0.01 $ 0.10
A98359-ND TERM BLOCK 5.08 2POS 3 0.141667 $ 0.43
495-1565-1-ND 10uF 25V TANT 3 0.115 $ 0.35
399-1168-1-ND 0.1uF 25V CERAMIC 0805 25 0.0009 $ 0.02
445-5102-1-ND 15nF 25V CERAMIC 0603 15 0.0013 $ 0.02
490-3895-1-ND 1uF 25V CERAMIC 0603 5 0.0068 $ 0.03
CNC Machine Design Report
123
587-2400-1-ND 1.0uF 50V CERAMIC 0603 5 0.0165 $ 0.08
445-1314-1-ND 0.1uF 50V CERAMIC 0603 30 0.000917 $ 0.03
490-1731-1-ND 1.0uF 25V CERAMIC 0805 5 0.0081 $ 0.04
497-1314-1-ND IC GATE AND DUAL 2-INPUT SOT23-8 1 0.29 $ 0.29
160-1422-1-ND LED RED 0805 5 0.0105 $ 0.05
DMP2160UWDICT-ND MOSFET P-CH 20V 1.5A SOT-323 15 0.022 $ 0.33
2N7002W-FDICT-ND MOSFET N-CH 60V 115mA SOT 323 2 0.155 $ 0.31
OP27GSZ-ND IC OPAMP GP 8MHZ PREC 8SOIC 3 0.458333 $ 1.37
RMCF1/100RCT-ND 0.0 OHM 1/8W 0805 50 0.000088 $ 0.00
P4.99KCCT-ND 4.99K 1/8W 1% 0805 5 0.0091 $ 0.05
RR12P4.02KDCT-ND 4.02K 1/10W 0.5% 0805 5 0.0148 $ 0.07
P3.0MACT-ND 3M 1/8W 5% 0805 5 0.0077 $ 0.04
P46.4KCCT-ND 46.6K 1/8W 1% 0805 5 0.0091 $ 0.05
P26.1KCCT-ND 26.1K 1/8W 1% 0805 5 0.0091 $ 0.05
P2.00KCCT-ND 2.00K 1/8W 1% 0805 5 0.0091 $ 0.05
P1.00KCCT-ND 1.00K 1/8W 1% 0805 10 0.00455 $ 0.05
P1.0DDKR-ND 1.0 OHM 1/8W 1% 0805 5 0.091 $ 0.46
MCT0603-10K-MDCT-ND 10K 0.15W 0.5% 0603 5 0.0178 $ 0.09
311-3.57MCRCT-ND 3.57M 1/8W 1% 0805 5 0.0074 $ 0.04
P1.50KCCT-ND 1.50K 1/8W 1% 0805 5 0.0091 $ 0.05
RHM22.1KCCT-ND 22.1K 1/8W 1% 0805 5 0.0041 $ 0.02
LT1910IS8#PBF-ND IC MOSFET DRIVER HI-SIDE 8-SOIC 1 2.25 $ 2.25
455-1903-ND CONN HOUSING 2POS 2.5MM 15 0.001967 $ 0.03
455-2050-1-ND CONN CONTACT XA 26-22AWG TIN 25 0.00048 $ 0.01
296-13097-1-ND IC DRVR/RCVR MULTCH RS232 16SSOP 5 0.49 $ 2.45
296-13261-1-ND IC DUAL INVERTER GATE SOT-23-6 1 0.33 $ 0.33
40-2-5-ND SOLDER-WICK LEAD-FREE 5' 0.06" 1 4.08 $ 4.08
C2103L-100-ND HOOK-UP WIRE BLUE STRANDED 18AWG 1 24 $ 24.00
Uoled160g1 Serial OLED Graphics Display 1 79 $ 79.00
863-74FST3257DR2G QUAD 2:1 MULT 1 0.39 $ 0.39
31M9297 22000uF 63V ELECTROLYTIC CAPACITOR 3 3.863333 $ 11.59
IRF7341PBF HEXFET 55V 4.7A 25 0.00922 $ 0.23
Shipping
ADVANCED CIRCUITS $ 25.28
ADVANCED CIRCUITS $ 25.35
ADVANCED CIRCUITS $ 25.28
ADVANCED CIRCUITS $ 25.35
AMAZON $ 8.62
MOUSER $ 7.68
CNC Machine Design Report
124
DIGIKEY $ 8.37
DIGIKEY $ 11.60
DIGIKEY $ 17.10
DIGIKEY $ 13.28
DIGIKEY $ 7.81
JAMECO $ 20.50
JAMECO $ 6.90
JAMECO $ 6.90
MOTION DRIVER BOARD 1 44.246 $ 44.25
MOTION DRIVER BOARD MODIFIED 1 56.97 $ 56.97
MAIN CONTROLLER BOARD 1 33 $ 33.00
PENDENT CONTROLLER BOARD 1 33 $ 33.00
Poster Board $ 8.00
Poster Paper $ 26.00
$ 53.48
Total Cost $ 779.76
Table 4: Electrical and Miscellaneous Costs
8. Implementation Schedule If one wanted to recreate the CNC Machine prototype built during this project a detailed implementation schedule should be followed. If the build were to be undertaken starting June 1, 2010, within the first week retrieve all the items found in table 3-1: prototype item/cost breakdown. Start the actual build the following week, January 7, 2010. The construction is relatively simple and can be easily completed in a week with a small team. Once all parts are gathered the build can be done within a 4 hour period with a three man team. Having three sets of arms helps greatly in the complete assembly/adjustment process. One guy can hold a part, with another stabilizing the other side of the CNC, while the other person connects parts or makes an adjustment. The prototype should be fully functional within hours of completion.
Step # Step Description Hours
1 Place parts on boards 4
2 Table Assembly 20
3 Gantry Assembly 15
4 Tapping and Drilling 13
5 Electric Box Assembly 8
CNC Machine Design Report
125
6 Assemble Systems 4
7 Testing 5
Total Hours 69
9. APPENDIX A
9.1 VGA Data Sheet
The VGA port code is designed just like the pendent LCD Screen. The
commands code is placed in a buffer to be called. The buffer the VGA uses is the
VGABuffer[255] and a VGACount. This buffer will hold the command ID and the
sequence it needs to perform the function. The VGA chip has a pixel range from 0-
639 on the X axis and 0-479 on the Y axis. It also has a range of 0-79 columns and
0-39 rows. The code pixel placement is split up into 8bits, the MSB (Most
Significant Bit) and the LSB (Least Significant Bit).These bits will determine the X
and Y on the VGA screen. The VGA has 16 functions that were used to implement
the actions of the CNC. These functions are:
MoveTo()
EraseScreen()
SetBackground()
DrawLine()
SetFontSize()
DrawBox()
OpaqueTransparent()
PlaceText()
WriteString()
DisplayImage()
PaintArea()
DrawCircle()
SetColumn()
SetRow()
SetRowColumn()
PlaceCharUnFor()
CNC Machine Design Report
126
A select number of theses functions are staticly implemented in the VGA chip.
These functions will use the VGABuffer[ ] and the VGACount to get total
functionality. Each line of implementation will go into its own array slot. The
Command ID will go in the VGABuffer[0] slot and the other lines of code will
follow behind in order as the data sheet requires.
9.1.1 MoveTo()
The MoveTo command takes the X and Y axis specified by the developer
and places the next point to the specified pixel point. The code takes the MSB and
the LSB of the Y and X axis and it gives the desired location.
9.1.2 EraseScreen
The EraseScreen function is a internal command on the VGA chip. This
function uses the VGABuffer. The command value for this function is 45hex. This
function will erase the screen and another function can be called to the VGA.
9.1.3 SetBackground()
This function will set the background color for the VGA screen. The
command value for the background is 42Hex. The next position atVGABuffer[1] is
the color of the background. The count of this function is then placed at 2.
9.1.4 DrawLine()
This function will draw a line on the screen from the current pixel position
to the next position. The functions command ID is 4Hex. In the array positions 1-4
the current positions of the CNC are placed here and for the positions 5-8 the
next positions are placed here all in pixel positions. At VGABuffer[9] the color of
the line is placed here. The count of this function is 10. Also at the end of these
functions the CurrentPosition is placed as the next X and Y positions.
CNC Machine Design Report
127
9.1.5 SetFontSize()
This function sets the font size. The command ID of this functions is 46Hex.
In the VGABuffer[1] the Font size is added. The VGACount is equal to 2
9.1.6 DrawBox()
In this functions it doesn’t use the buffer or the counter. This functions draws a
box that will be used for the X,Y,Z,A, limit switches, and the state box. This
function is created by taking the current position and moving one position at a
time till it loops back. So the sequence that it takes is Current X and Current Y,
Current X to Y, X to Y, X to Current Y, and then back to Current X and Current Y.
9.1.7 OpaqueTransparent()
This function will be implamented when the firmware for the VGA allows
the user to open up documents from the USB to go on the VGA. This function can
make the text be Opaque or Transparent depending on the position the selector
is on. The Command ID for this is 4FHex. The next position in the buffer is the
mode that is wanted. If it is 01 it will be Opaque and if it is 01 it will be
transparent. The Counter for this will be 2.
9.1.8 PlaceText()
This function will place a text on the screen at the Row and Column position
desired by the screen developer. The command ID for this function is 54Hex. The
next position is where the character that is being written is placed. The next 2
positions is where you place the Column first and the Row second. The final
position in this array VGABuffer[4] is going to be the font color. The Counter of
this function will be 5.
9.1.9 WriteString()
This function writes a string on the VGA. The command ID for this function
is 73Hex. The next position of the array will be how it will be aligned on the VGA.
The next 2 positions will be first The Column and then the Row. The next position
CNC Machine Design Report
128
will be the font color and then the characters that are being written on the screen
will be in the next position. The final position which is VGABuffer[6] is the
terminate command. This ends the string when strings are finished being wrote.
The counter on this function is 7.
9.1.10 DisplayImage()
This function will place an image on the screen. This function will be
implemented when the user functionality is working. This functions command ID
is 49Hex. The next 4 positions will be the X and Y pixel positions. The next 4
positions after that is first the width(MSB, LSB) and the height(MSB, LSB). The
final position will be the File that is going to be passed to the VGA. The count of
this will be 10.
9.1.11 PaintArea()
This function’s main task is to paint the area of a specific place.
The command ID of this function is 70Hex. The next 8 positions are the
current X and current Y positions and then the new X and Y positions all
in pixel format. The Final array position is the Color of the area.
9.1.12 DrawCircle()
This function takes the radius and the current position of the CNC and
makes a circle from that point. The command ID for this function is 43Hex. The
next 4 positions on the array are the current positions of X and Y. The next
position will be the radius. The radius in this function is measured in pixels. The
last position on the array is the graphic color. The buffer count in this function is 7
9.1.13 SetColumn()
This function’s main task is to set the current column position to a new
column that has been specified by the developer.
CNC Machine Design Report
129
9.1.14 SetRow()
This function’s main task is to set the current row position to a new position
that is specified by the developer.
9.1.15 SetRowColumn()
This function’s main task is to set the current column and row at the same
time. This function allows it to be easier and quicker to set the row and column
without having to call 2 separate functions.
9.1.16 PlaceCharUnFor()
This function places a char in an unformatted state. Instead of it being
placed in a row and column it is placed by the X and Y pixel position. The
command ID for this function is 74Hex. The next array position is the Character
that is being entered. The next 4 positions are the X and Y positions. The next 2
array positions are the width and height. If these positions equal 01hex then the
sizes are normal, if they are 02hex then the sizes have doubled. If the hex number
increases to another number the VGA takes that number and multiplies it with
the normal character size. (Ex 10Hex = 3*normal)
9.2 3.1 Screens
There is only one screen that is implemented in this first version of the CNC.
This screen is the Main routing screen. This screen has the X,Y,Z,A, limit switches,
and the current state. Figure 3.1 shows what the VGA’s current screen will look
like.
X:
Y:
Z:
A:
CNC Machine Design Report
130
Figure 3.1
The X, Y, Z, and A positions are made using write string and the boxes are used
using the Draw Box function. Inside of these boxes is the WriteToString function
that was implemented into the hand pendent. This will change the integer value
for X, Y, Z, and A into a string of characters. The box with the 5 circles in them is
the limit switches. These will turn red or green depending if it is on or off. The
final 2 boxes on the right side are the current state and the offset display. The top
box will show the offset of the CNC and the bottom box will tell if the machine is
in Jog, Idle, or Rapid state. The bottom opening will be a dialog box that will show
which commands were being called to the CNC.
10. APPENDIX B
10.1 X-axis
Table 10-1
Diam I F1 F2
Force
(per bearing) F(per rod)
0.75 0.0155 -0.00031 -0.000020 3.1 6.1
E 29000000 0.80 0.0201 -0.00024 -0.000016 4.0 7.9
y(deflection) -0.001 0.85 0.0256 -0.00019 -0.000012 5.1 10.1
x 15 0.90 0.0322 -0.00015 -0.000010 6.4 12.7
a1 13.6875 0.95 0.0400 -0.00012 -0.000008 7.9 15.8
b1 16.3125 1.00 0.0491 -0.00010 -0.000006 9.7 19.4
a2 16.3125 1.05 0.0597 -0.00008 -0.000005 11.8 23.6
b2 13.6875 1.10 0.0719 -0.00007 -0.000004 14.2 28.4
L 30 1.15 0.0859 -0.00006 -0.000004 17.0 33.9
1.18 0.0955 -0.00005 -0.000003 18.9 37.8
Forces Separation 1.3125 1.20 0.1018 -0.00005 -0.000003 20.1 40.2
1.25 0.1198 -0.00004 -0.000003 23.7 47.4
CNC Machine Design Report
131
10.2 Y-axis Table 10-2
Diam I F1 F2
Force
(per bearing) F (per rod)
E 29000000 0.75 0.0155 -0.00063 -0.000033 1.5 3.0
y(deflection) -0.001 0.80 0.0201 -0.00048 -0.000025 2.0 3.9
x 19 0.85 0.0256 -0.00038 -0.000020 2.5 5.0
a1 17.6875 0.90 0.0322 -0.00030 -0.000016 3.1 6.3
b1 20.3125 0.95 0.0400 -0.00024 -0.000013 3.9 7.8
a2 20.3125 1.00 0.0491 -0.00020 -0.000010 4.8 9.6
b2 17.6875 1.05 0.0597 -0.00016 -0.000009 5.8 11.7
L 38 1.10 0.0719 -0.00014 -0.000007 7.0 14.0
1.15 0.0859 -0.00011 -0.000006 8.4 16.8
Forces Separation 1.3125 1.20 0.1018 -0.00010 -0.000005 9.9 19.9
1.25 0.1198 -0.00008 -0.000004 11.7 23.4
It was determined that a supported rail was needed.
10.3 Calculated Moments and Equivalent Force Couples on X Rails Table 10-3
Part quantity
Position from
Center of
Ballscrew
Horizontal
Spacing
between
the rails (in)
Weight/
Reaction Force
(lb)
Moment (lb-
in)
Volume
(in3)
Density
(lb/in3) Material
Force in y
on top
rails
zback 1 3.3627 4 1.068 3.590 31.403 0.034 HDPE 24.566
zbottom 1 4.5502 0.125 0.570 3.687 0.034 HDPE
zsides 2 4.5502 0.871 7.926 12.808 0.034 HDPE 21.954
zversa mount rails 3 3.7052 1.941 21.572 2.327 0.278 Steel
ztravel block 1 5.6127 0.598 3.359 17.602 0.034 HDPE
Tool Head 1 7.1877 10.000 71.877
z top front 1 4.5502 0.125 0.570 3.687 0.034 HDPE
SUM 98.641
zmotor & ztop rear 1 -0.357 1.771 -0.632 7.969 0.034 HDPE
ztop middle 1 2.393 0.106 0.254 3.125 0.034 HDPE
counterweight -3.482 3.000 -10.446
CNC Machine Design Report
132
Table 10-4
Total vertical
gantry distance
Distance:
top rail-
tool head
Vertical
Spacing
between the
rails
Tool head
cutting
force
Moment of
tool head Force in x
Force in x
per rail
17.009 15.584 4.00 5.5 74.711 18.678 9.339
3.75 75.398 20.106 10.053
4.00 74.711 18.678 9.339
4.25 74.023 17.417 8.709
4.50 73.336 16.297 8.148
4.75 72.648 15.294 7.647
7.00 66.461 9.494 4.747
Table 10-5
Rail
front top
front bottom
back top
if 4 rails
20.534
20.796
13.070
no counterbalance
Forces per rail
11.652
16.775
19.935
11.652
w/ counterbalance
13.070
CNC Machine Design Report
133
10.4 Trade off Study: 3 rods vs 4 rods, Rod Spacing
10.4.1 3 Rod Configuration Table 10-6
Trial 1 Trial 2 Trial 3 Trial 4
Moment due to Weight 100 100 100 100
Separation of 1&2 (x) 3.464 4 5 4
F1 28.87 25 20 25
Moment due to Cutting 75 75 75 75
Separation of 2&3 (y) 2.009 2.5 3 4
F2 37.33 30 25 18.75
Rod 1
F1 28.87 25.00 20.00 25.00
F2/2 18.67 15.00 12.50 9.38
Resultant 1 34.38 29.15 23.58 26.70
Rod 2
F1/2 14.43 12.50 10.00 12.50
F2/2 18.67 15.00 12.50 9.38
Resultant 2 23.60 19.53 16.01 15.63
Rod 3
F1/2 14.43 12.50 10.00 12.50
F2 37.33 30.00 25.00 18.75
Resultant 3 40.03 32.50 26.93 22.53
CNC Machine Design Report
134
Table 10-7
1 2
3
rod orientation
34.38 23.60 29.15 19.53 23.58 16.01 26.70 15.63
40.03 32.50 26.93 22.53
Resultants, Trial 1 Resultants, Trial 2 Resultants, Trial 3 Resultants, Trial 4
y y y y
x
y
x x x x
CNC Machine Design Report
135
10.4.2 4 Rod Configuration Table 10-8
Trial 1 Trial 2 Trial 3 Trial 4
Moment due to Weight 100 100 100 100
Separation of 1&2,3&4 (x) 3.464 4 5 4
F1 28.87 25 20 25
Moment due to Cutting 75 75 75 75
Separation of 2&3, 1&4 (y) 2.009 2.5 3 4
F2 37.33 30 25 18.8
Rod 1
F1/2 14.43 12.50 10.00 12.50
F2/2 18.67 15.00 12.50 9.38
Resultant 1 23.60 19.53 16.01 15.63
Rod 2
F1/2 14.43 12.50 10.00 12.50
F2/2 18.67 15.00 12.50 9.38
Resultant 2 23.60 19.53 16.01 15.63
Rod 3
F1/2 14.43 12.50 10.00 12.50
F2/2 18.67 15.00 12.50 9.38
Resultant 3 23.60 19.53 16.01 15.63
Rod 4
F1/2 14.43 12.50 10.00 12.50
F2/2 18.67 15.00 12.50 9.38
Resultant 4 23.60 19.53 16.01 15.63
CNC Machine Design Report
136
Table 10-9
1 2
4 3
rod orientation
23.60 23.60 19.53 19.53 16.01 16.01 15.63 15.63
23.60 23.60 19.53 19.53 16.01 16.01 15.63 15.63
Resultants, Trial 1 Resultants, Trial 2 Resultants, Trial 3 Resultants, Trial 4
x
x
y y y
y
x
y
x x
10.5 Table Top Support Calculations
10.5.1 Table Support Calculations Table 10-10
E 29000000 Base Height 2 Point Forces F(per rail)
y(deflection) -0.001 0.25 0.500 0.3 0.5
x 19 0.25 0.625 0.5 1.0
a1 17.6875 0.25 0.750 0.9 1.7
b1 20.3125 0.25 0.875 1.4 2.7
a2 20.3125 0.25 1.000 2.0 4.1
b2 17.6875 0.25 1.125 2.9 5.8
L 38 0.25 1.250 4.0 8.0
Forces Separation 1.3125 0.375 0.500 0.4 0.8
0.375 0.625 0.7 1.5
0.375 0.750 1.3 2.6
0.375 0.875 2.0 4.1
0.375 1.000 3.1 6.1
0.375 1.125 4.3 8.7
0.375 1.250 6.0 11.9
0.500 0.500 0.5 1.0
0.500 0.625 1.0 2.0
0.500 0.750 1.7 3.4
0.500 0.875 2.7 5.5
0.500 1.000 4.1 8.1
0.500 1.125 5.8 11.6
0.500 1.250 8.0 15.9
CNC Machine Design Report
137
10.6 Ballscrew Calculations
10.6.1 Ballscrew Calculations Table 10-11
lead (in/rev) 0.2
major diameter 0.625
minor diameter 0.48
pitch diameter 0.5525
rpm 1200
velocity (in/min) 240
velocity (in/s) 4 6 8 10 12 14
acceleration (in/s2) 15 15 15 15 15 15
lead angle 0.115
Y-axis
weight 100
mass 0.259
Force to Accelerate (lb) 3.89 3.89 3.89 3.89 3.89 3.89
change in linear speed(ft/min) 20 30 40 50 60 70
time to accelerate 0.27 0.40 0.53 0.67 0.80 0.93
Acc Force to torque (oz.in) 2.199 2.199 2.199 2.199 2.199 2.199
Torque-Forward Drive (in.lb) 3.54
torque-Forward drive (oz.in) 56.59
Acceleration Torque
WK2=(1/8)WD
212.5
Static friction force 25
Coefficient of friciton 0.25
Mass*Acc 3.88
Force (lb) 28.9
Torque (oz.in) 16.3
Kinetic friction force 18.75
Coefficient of friciton 0.1875
Mass*Acc 0
Force (lb) 18.75
Torque (oz.in) 10.6
Acceleration
Constant velocity
only applicable if the weight is being lifted.
CNC Machine Design Report
138
10.7 Cable Carrier
10.7.1 Cable Carrier Selection Table 10-12
# Wire OD Height, A Width, B in ft
Z 3 spindle 0.23 0.41 0.63 8.24 1.8524 2.91 9.63 0.8
paste dispensor 0.22 5.51
limit, paste 0.13
air brush Cost 17.6
sum 0.58
X 5 spindle 0.23 0.41 1.18 24.15 3.775 5.93 17.59 1.5
paste dispensor 0.22 5.51
limit, paste 0.13
air brush Cost 42.2
z-motor 0.22
limit, z 0.13
sum 0.93
Y 7 spindle 0.23 0.41 1.18 31 5 7.85 21.01 1.8
paste dispensor 0.22 5.51
limit, paste 0.13
air brush Cost 49.8
z-motor 0.22
limit, z 0.13
x-motor 0.22
limit, x 0.13
sum 1.15
Width per foot Brackets
0.63 10.66 6.96
0.79 11.43 7.89
1.18 13.73 8.58
Loop Length
(desired, min)
Costs
Cost Total
109.57
Cable carriers
TotalWires Interior A&B
Axis Travel
Available
Height
10.8 Solder Paste Dispenser
10.8.1 Equations
(5.1.1)
CNC Machine Design Report
139
(5.1.2)
(5.1.3)
(5.1.4)
10.8.2 Solution: General Engineering Equation Table 10-13
CNC Machine Design Report
140
10.8.3 Flow Locations Table 10-14
h1 3 2.9996 h3 0
L1 2.5 2.4996 L2 0.25 L3 0.5
v1 0.0004 v2 0.023 v3 1.918
d1 0.618 d2 0.082 d3 0.009 27, 0.009
A1 0.3000 A2 0.0053 A3 6.36E-05
Re1 1.3E-05 Re2 9.48742E-05 Re3 8.6E-04
L1/d1 4.04 L2/d2 3.05 L3/d3 55.56
f1 5 f2 5 f3 5
hf1 4.3E-09 hf2 1.1E-05 hf3 1.323
K1-2 0.49 K2-3 0.49 K3-O 1
d1/d2 7.537 d2/d1 9.111 d2/d1
h1-2 1.0E-10 h2-3 3.4E-07 h3-O 0.005
Point 1 Point 2 Point 3
Select
Dispensing
Needle
10.8.4 Solution: Force Approximation Table 10-15
Approximated Force Torque [oz.in]
6.05 3.208
5 2.7
10 5.3
15 8.0
20 10.6
10.9 Design Notebook: Pat Brokaw
10.9.1 Table of Contents
1. Reference websites
2. Deflection calculation solved for deflection
3. 1st team meeting notes
4. Mechanical literature review sections
5. 2nd team meeting notes
6. 3rd team meeting notes
7. Deflections: solved for force
8. Team meeting notes
9. Management meeting notes
10. Team meeting notes
11. Literature review notes: Drive mechanism
CNC Machine Design Report
141
12. Literature review notes continued with references used
13. Team meeting notes
14. Team meeting notes
15. Mechanical subsystem proposal notes
16. Team meeting notes
17. Initial mechanical specifications
18. Initial electrical specifications
19. Microcontroller block diagram
20. Team meeting notes
21. Discussion notes: z-axis
22. Team meeting notes
23. List of forces and List of mechanical parts
24. Table end sketches, Calculations for table top support
25. Sketches: table bottom, y-cross, y-lift mounts
26. Notes on screw sizes
27. Dimensions for y-lifts, table top spacing, y-axis ballnut flange
28. Dimensions x-axis top and bottom
29. Blank
30. Blank
31. Moments and Forces on each x-axis rod
32. Deflection equation used to calculate rod deflections
33. Acceleration and force on x-axis, paste dispenser sketch
34. Paste dispenser sketches, paste dispenser motor dimensions, volume dispensed calculation
35. Z-axis sketch for small versa rails (unused), Volumetric thermal expansion calculation
36. Z-axis dimensions
37. Z-back dimensions, z-bottom dimensions
38. Z-top dimensions
39. Thrust bearing block dimensions, acceleration force(Roton equation)
40. Pendant case dimension
41. Pendant case sketch (unfinished)
42. Pendant case sketch with dimensions for board mounts
43. Z-mount dimensions
44. Dimensions: tool head mount plate, z-axis mounting
45. Cable carrier dimensions
46. Spindle mounting block
47. Equations for ballscrew calculations
48. Paste dispenser pressure calculations
49. Paste dispenser angular velocity and torque calculations
50. Transformer test voltages
51. Rectifier Heat Sink
CNC Machine Design Report
142
52. Lecture notes for design report, April 6,
CNC Machine Design Report
143
10.10 Cost Data and Schedule Data
10.10.1 Prototype Cost Table 10-16
Component Part # Quantity Cost Total Cost Source Date
Z axis
z ballscrew 24" $10.09/ft $ 20.18 Roton 1/24/2010
Ballnut 1 $ 23.55 $ 23.55 Roton 1/24/2010
thrust bearing
block z1 $ 11.75 $ 11.75
Stock from Online Metals,
machined in house
ball nut flange z 1 $ 3.38 $ 3.38 Stock from Online Metals,
machined in house
ztop 1 Donated Machined by Norva Platics
zside 2 Donated Machined by Norva Platics
zbottom 1 Donated Machined by Norva Platics
zback 1 Donated Machined by Norva Platics
zmount 1 $ 18.23 $ 18.23 Stock from Online Metals,
machined in house
standoff 2 $ 9.85 $ 9.85 Stock from McMaster Carr,
machined in house3/29/2010
versa rail 2 $ 40.30 $ 80.60 Anaheim Automation 1/27/2010
versa guide block 2 $ 33.80 $ 67.60 Anaheim Automation 1/27/2010
Spindle Plate 1 $ 10.94 $ 10.94 Stock from McMaster Carr,
machined in house3/29/2010
Spindle 1 On hand James Williams
spindle holder 1 Donated Stock from Norva Platics,
machined in house
X axis
thrust bearing
block1
Stock from Online Metals,
machined in house
x-traveling block 1 $ 105.00 $ 105.00 Stock from Norva Platics,
machined in house
xback 1 Donated Machined by Norva Platics
Common stock listed
previously
CNC Machine Design Report
144
CNC Machine Design Report
145
xballscrew 36" $10.09/ft $ 30.27 Roton 1/24/2010
Ballnut 1 $ 23.55 $ 23.55 Roton 1/24/2010
xrods 3 $ 39.35 $ 118.05 Lintech
xtop 1 Donated Machined by Norva Platics
ball nut flange xStock from Online Metals,
machined in house
Bushings 6 $39.95/4 $ 79.90 VXB
Table
Table sides 2 Donated Machined by Norva Platics
Table Bottom 1 Donated Machined by Norva Platics
Table end -Motor 1 Donated Machined by Norva Platics
Table End 1 Donated Machined by Norva Platics
Table Top 1 Donated Machined by Norva Platics
Table supports 3 $ 8.69 $ 26.07 Stock from Online Metals 4/7/2010
Table stand rails 2 $ 10.62 $ 21.24 Stock from Online Metals 4/7/2010
Y axis
sides 1 Donate Machined by Norva Platics
side w/o motor 1 Donate Machined by Norva Platics
Ball flange y 1Stock from Online Metals,
machined in house
y-cross 1Stock from Online Metals,
machined in house
y support rail 1 $ 179.00 $ 179.00 VXB 1/28/2010
yballscrew 48" $10.09/ft $ 40.36 Roton 1/24/2010
Common stock listed
previously
Common stock listed
previously
Common stock listed
previously
CNC Machine Design Report
146
Ballnut 1 $ 23.55 $ 23.55 Roton 1/24/2010
y-axis bushing
block2 $ 39.95 $ 79.90 VXB 1/28/2010
y-lifts 2 $ 57.33 $ 57.33 Stock from Online Metals,
machined in house
Common Parts
(X, Y, & Z)
Thrust Bearings 6 $14.95/2 $ 44.85 VXB
Ball Bearings 3 $ 5.55 $ 16.65 McMaster Carr 3/29/2010
Bearing seals 6 $ 2.31 $ 13.86 MSC Direct
Seal retainer 3 Donated Stock from ME shop,
machined in house
Belts 3 $ 3.49 $ 10.47 McMaster Carr
Pulleys 6 $ 3.17 $ 19.02 MSC Direct 3/23/2010
Motors X&Y 2 $ 39.00 $ 78.00 Anaheim Automation
Motors Z 1 $ 29.00 $ 29.00 Anaheim Automation
Wiring 20 ft 3 $ 13.00 $ 39.00 Anaheim Automation
Machine
Electronics
Cable Carriers
Cable Carrier
(X & Y)2 $ 41.19 $ 82.38 McMaster Carr 3/29/2010
Mounting
Brackets (X&Y)2 $ 8.58 $ 17.16 McMaster Carr 3/29/2010
Cable Carrier
(Z)1 $ 10.66 $ 10.66 McMaster Carr 3/29/2010
Mounting
Brackets (Z)1 $ 6.96 $ 6.96 McMaster Carr 3/29/2010
Electronics Case
Top 1 Donated Machined by Norva Platics
CNC Machine Design Report
147
Bottom 1 Donated Machined by Norva Platics
Sides 2 Donated Machined by Norva Platics
Front 1 Donated Machined by Norva Platics
Back 1 Donated Machined by Norva Platics
Divider 1 Donated Machined by Norva Platics
Pendant Case
Case 1
Back Plate 1
Fasteners
M5x20 8 $5.34/25 $ 5.34 McMaster Carr 4/7/2010
M6x25mm 8 $7.91/25 $ 7.91 McMaster Carr 4/7/2010
4-40x0.25 24 On Hand James Williams
6-32x0.25 17 On Hand James Williams
8-32x0.375 2 Lowes
8-32x0.5 12 Lowes
8-32x1 68 Lowes
10-24x0.75 12 $7.94/100 $ 7.94 McMaster Carr
10-24x1 148 $16.15/100 $ 32.30 Fastenal 4/2/2010
1/4-20x1 77 $9.45/50 $ 18.90 McMaster Carr
3/8-16x1.5 10 $ 9.79 $ 9.79 Lowes
3/8-24x1 4 $8.27/25 $ 8.27 McMaster Carr 4/7/2010
CNC Machine Design Report
148
8-32x0.25
(self tapping)4 Lowes
5/16-16 Nut 3 Donated ME Shop
board standoffs
6-32x0.3125 7On Hand James Williams
6-32x0.3125 10On Hand James Williams
4-40x0.25 4On Hand James Williams
set screws
8-32x0.25 3Donated ME Shop
8-32x0.3125 1Donated ME Shop
grease zerk
1/8-27 PTF 3$2.90/10 $ 2.90 McMaster Carr
Tools, etc.
1/8" carbide
tipped drill bit 110.53$ $ 10.53 McMaster Carr
#12-5/16
extractor 12.39$ $ 2.39 McMaster Carr
15/16-16 tap 161.17$ $ 61.17 McMaster Carr
3/8-16 tap 116.02$ $ 16.02 McMaster Carr
Layout fluid 16.21$ $ 6.21 MSC Direct
Unused Aluminum 1 5.07$ 5.07$ Stock from Online Metals,
machined in house
Washers
Split Lock washers
#10 32 $2.13/100 $ 2.13 McMaster Carr
1/4 56 $5.64/100 $ 5.64 McMaster Carr
CNC Machine Design Report
149
3/8 16 $4.00/25 $ 4.00 Lowes
M5 8 Lowes
M6 8 Lowes
Ext. Tooth Lock
washers
#10 110 $2.54/100 $ 5.08 Fastenal 4/16/2010
Flat washers
3/8 8 Lowes
.438x.203x.032 24
.500x.265x.032 36
Paste Dispenser
motor mount 1 Donated ME Shop
plate 1 $ 25.34 $ 25.34 Stock from Online Metals,
machined in house
plunger 1 Donated ME Shop
syringe 1 On hand James Williams, Amtech
paste dispenser 1 Donated ME Shop
coupler 1 Donated ME Shop
screw 1 Donated ME Shop
Shipping Totals
Norva Plastics $ 11.84 $ 11.84
Online Metals $ 36.87 $ 36.87
Anaheim
Automation $ - $ -
Lintech $ - $ -
CNC Machine Design Report
150
VXB 2 $ 6.75 $ 13.50
Roton $ 21.02 $ 21.02
MSC 2 $ 10.98 $ 21.96
McMaster $ 14.50 $ 14.50
Cost $ 1,754.93 Mechanical Subsystem
10.11 Manufacturing Costs and Schedule
10.11.1 Equipment Costs
CNC Machine Design Report
151
Table 10-17
Equipment Cost Source Date Link
Design Tools
AutoCad Inventor 1,463.29$ Amazon 4/25/2010 http://www.amazon.com
Microsoft Office: Excel 409.95$ Newegg 4/25/2010 http://www.newegg.com
Machining and Assembly
Tools
Mill 5,995.00$ Penn Tool
Company4/25/2010 http://www.penntoolco.com
Lathe & Grinding Lathe 3,495.00$ Penn Tool
Company4/25/2010 http://www.penntoolco.com
Horizontal Bandsaw 1,149.00$ Grainger 4/25/2010 http://www.grainger.com
Vertical Bandsaw 2,075.00$ Grainger 4/25/2010 http://www.grainger.com
Drill Press 639.00$ Grainger 4/25/2010 http://www.grainger.com
Chop Saw 279.17$ Fastenal 4/25/2010 http://www.fastenal.com
Cordless Drill 185.28$ Fastenal 4/25/2010 http://www.fastenal.com
Combination Wrenches 50.54$ Fastenal 4/25/2010 http://www.fastenal.com
Allen Wrenches 13.29$ Fastenal 4/25/2010 http://www.fastenal.com
Screw drivers, both Phillips
and Flat head51.24$ Fastenal 4/25/2010 http://www.fastenal.com
CNC Machine Design Report
152
Various endmills from 1/8-5/8 50.00$ Fastenal 4/25/2010 http://www.fastenal.com
Fly cutter and various milling
tool heads5.70$
Machine Shop
Discount Supply4/25/2010 http://www.msdiscount.com
Boring head 421.30$ Machine Shop
Discount Supply4/25/2010 http://www.msdiscount.com
Calipers 53.27$ Fastenal 4/25/2010 http://www.fastenal.com
Micrometers
0"-1" 16.40$ Fastenal 4/25/2010 http://www.fastenal.com
1"-2" 23.93$ Fastenal 4/25/2010 http://www.fastenal.com
Telescoping gauges 250.99$ Fastenal 4/25/2010 http://www.fastenal.com
Depth gauges 145.55$ McMaster Carr 4/25/2010 http://www.mcmaster.com
Tap and Die Set 106.98$ Fastenal 4/25/2010 http://www.fastenal.com
Tap handles
Taps: #4-40, #6-32, #8-32,
#10-24, 1/4-20, 3/8-16,
3/8-24, 1/8-27NPT; Die:
5/16-18 Drill bits:#43, #36, #32, #29,
#27, #25, #24, #18, #9, #7, F,
H, Q, W, X, 5/16”, ½”
#1-#60 Drill Set 89.99$ Fastenal 4/25/2010 http://www.fastenal.com
A-Z Drill Set 119.99$ Fastenal 4/25/2010 http://www.fastenal.com
Total Equipment Cost 17,090$
CNC Machine Design Report
153
10.11.2 Material Costs Table 10-18
CNC Machine Design Report
154
Component Part # Quantity Cost Total Cost SourceDate
Priced
Common Parts
(X, Y, & Z)
Ballscrews 108" $10.09/ft $ 90.81 Roton 1/24/2010
Ballnuts 3 $ 23.55 $ 70.65 Roton 1/24/2010
Thrust bearing
blocks3 $ 11.75 $ 11.75
Stock from Online Metals,
machined in house
Ballnut flanges 3 $ 3.38 $ 3.38 Stock from Online Metals,
machined in house
Thrust Bearings 6 $14.95/2 $ 44.85 VXB
Grease Zerks: 1/8-
27 PTF3 $2.90/10 $ 2.90 McMaster Carr
Ball Bearings 3 $ 5.55 $ 16.65 McMaster Carr 3/29/2010
Bearing seals 6 $ 2.31 $ 13.86 MSC Direct
Seal retainer 3 $1.25/3 $ 1.25 Stock from ME shop,
machined in house
Belts 3 $ 3.49 $ 10.47 McMaster Carr
Pulleys 6 $ 3.17 $ 19.02 MSC Direct 3/23/2010
Motors X&Y 2 $ 39.00 $ 78.00 Anaheim Automation
Motors Z 1 $ 29.00 $ 29.00 Anaheim Automation
Wiring 20 ft 3 $ 13.00 $ 39.00 Anaheim Automation
Cable Carriers
Cable Carrier
(X & Y)2 $ 41.19 $ 82.38 McMaster Carr 3/29/2010
Mounting
Brackets (X&Y)2 $ 8.58 $ 17.16 McMaster Carr 3/29/2010
Cable Carrier
(Z)1 $ 10.66 $ 10.66 McMaster Carr 3/29/2010
CNC Machine Design Report
155
Mounting
Brackets (Z)1 $ 6.96 $ 6.96 McMaster Carr 3/29/2010
Z axis
z-top 1 Quoted Machined by Norva Platics
z-side 2 Quoted Machined by Norva Platics
z-bottom 1 Quoted Machined by Norva Platics
z-back 1 Quoted Machined by Norva Platics
z-mount 1 $ 18.23 $ 3.04 Stock from Online Metals,
machined in house
standoff 2 $ 9.85 $ 9.85 Stock from McMaster Carr,
machined in house3/29/2010
versa rail 2 $ 40.30 $ 80.60 Anaheim Automation 1/27/2010
versa guide block 2 $ 33.80 $ 67.60 Anaheim Automation 1/27/2010
Spindle Plate 1 $ 10.94 $ 10.94 Stock from McMaster Carr,
machined in house3/29/2010
Spindle 1 $ 22.00 $ 22.00 James Williams
spindle holder 1 Quoted Machined by Norva Platics
X axis
x-traveling block 1 $ 105.00 $ 105.00 Stock from Norva Platics,
machined in house
xback 1 Quoted Machined by Norva Platics
xtop 1 Quoted Machined by Norva Platics
x-rods 3 $ 39.35 $ 118.05 Lintech
x-bushings 6 $39.95/4 $ 59.93 VXB
Table
Table sides 2 Quoted Machined by Norva Platics
Table Bottom 1 Quoted Machined by Norva Platics
CNC Machine Design Report
156
Table end -Motor 1 Quoted Machined by Norva Platics
Table End 1 Quoted Machined by Norva Platics
Table Top 1 Quoted Machined by Norva Platics
Table supports 3 $ 8.69 $ 26.07 Stock from Online Metals 4/7/2010
Table stand rails 2 $ 10.62 $ 21.24 Stock from Online Metals 4/7/2010
Y axis
sides 1 Quoted Machined by Norva Platics
side w/o motor 1 Quoted Machined by Norva Platics
y-cross 1 $ 18.23 $ 15.19 Stock from Online Metals,
machined in house
y support rail 1 $ 179.00 $ 179.00 VXB 1/28/2010
y-axis bushing
block2 $ 39.95 $ 79.90 VXB 1/28/2010
y-lifts 2 $ 57.33 $ 57.33 Stock from Online Metals,
machined in house
Machine
Electronics
Electronics Case
Top 1 Quoted Machined by Norva Platics
Bottom 1 Quoted Machined by Norva Platics
Sides 2 Quoted Machined by Norva Platics
Front 1 Quoted Machined by Norva Platics
Back 1 Quoted Machined by Norva Platics
Divider 1 Quoted Machined by Norva Platics
Pendant Case
Case 1 Quoted Machined by Norva Platics
CNC Machine Design Report
157
Back Plate 1 Quoted Machined by Norva Platics
Fasteners
M5x20 8 $5.34/25 $ 1.71 McMaster Carr 4/7/2010
M6x25mm 8 $7.91/25 $ 2.53 McMaster Carr 4/7/2010
4-40x0.25 24
6-32x0.25 17
8-32x0.375 2
8-32x0.5 12
8-32x1 68
10-24x0.75 12 $7.94/100 $ 0.95 McMaster Carr
10-24x1 148 $16.15/100 $ 23.90 Fastenal 4/2/2010
1/4-20x1 77 $9.45/50 $ 14.55 McMaster Carr
3/8-16x1.5 10 $ 9.79 $ 9.79 Lowes
3/8-24x1 4 $8.27/25 $ 1.32 McMaster Carr 4/7/2010
8-32x0.25
(self tapping)4
5/16-16 Nut 3
board standoffs
6-32x0.3125 7
6-32x0.3125 10
4-40x0.25 4
set screws
8-32x0.25 3
8-32x0.3125 1
CNC Machine Design Report
158
Washers
Split Lock washers
#10 32 $2.13/100 $ 0.68 McMaster Carr
1/4 56 $5.64/100 $ 3.16 McMaster Carr
3/8 16 $4.00/25 $ 2.56 Lowes
M5 8
M6 8
Ext. Tooth Lock
washers
#10 110 $2.54/100 $ 2.79 Fastenal 4/16/2010
Flat washers
3/8 8
.438x.203x.032 24
.500x.265x.032 36
Fastener Totals Unlisted $ 30.00 $ 30.00
Paste Dispenser
motor mount 1 Quoted Machined by Norva Platics
plate 1 $25.34/3 $ 8.45 Stock from Online Metals,
machined in house
plunger 1 Quoted Machined by Norva Platics
syringe 1 User Selected Amtech
paste dispenser 1 Quoted Machined by Norva Platics
coupler 1 Quoted Machined by Norva Platics
screw 1 Quoted Machined by Norva Platics
Quote: Plastics
and Machining30 Quoted $900 Norva Plastics
Cost $ 2,406.89 Mechanical Subsystem
CNC Machine Design Report
159
10.11.2.1 Recommended Vendors
Vendors recommended by the CNC machine design team include:
Roton, http://www.roton.com
o Ballscrews and Ballnuts
Lintech, http://www.lintechmotion.com
o X axis linear guide rods
Anaheim Automation, http://www.anaheimautomation.com
o Y-axis versa rails and blocks.
VXB, http://www.vxb.com
o Thrust bearings, x-rod bushings, y-axis supported rail and bushing blocks
MCMaster Carr, http://www.mcmaster.com
o Ball bearings, belts,
Online Metals, http://www.onlinemetals.com
o Metal stock
Norva Plastics, http://www.norvaplastics.com
o Plastics and machining of plastic components
MSC Direct, http://www.mscdirect.com
o Pulleys, bearing seals
Fastenal, http://www.fastenal.com
o Fasteners
CNC Machine Design Report
160
10.11.3 Fasteners Table 10-19
CNC Machine Design Report
161
Part Location/comment Fastener Size Quantity
Bolts Split Lock ET Lock Flat
table top 10-24x1 18 18
table supports 1/4-20x1 21
table ends 10-24x1 22 22
table sides bottom 10-24x1 26 26
ends 10-24x1 16 16
y-rails 10-24x1 28
y-sides, uprights connects lifts 1/4-20x1 24 24 24
x-rods 3/8-16x1.5 6 6 6
Holds aluminum
y-lifts bearing blocks M6x25mm 8 8
connects y-cross 1/4-20x1 12 12
x-back end 10-24x1 8 8
x-top 10-24x1 20 20
z-sides 8-32x1 16
z-top 8-32x1 4
z-bottom 8-32x1 4
X-Z mounts z-axis 3/8-16x1.5 4 4
versa rails 10-24x1 10 20
versa block M5x20mm 8 8
z-mount 3/8-24x1 4 4
spindle mount 3/8-16x3 2 2 2
thrust bearing block 1/4-20x1 12 12 12
ballnut flange 1/4-20x1 8 8
motor mounting 10-24x0.75 12 12 24
Electronics housing driver board mount 8-32x1 7
divider 8-32x1 5
top 8-32x1 8
bottom 8-32x1 24
sides 8-32x0.5 12
relay 8-32x0.375 2
motor connectors 4-40x0.25 16
db-25 outputs 4-40x0.25 4
AC-input 8-32x0.25 (self-tapping) 2
Fuse 8-32x0.25 (self-tapping) 2
driver standoffs 6-32x0.25 7
controller standoffs 6-32x0.25 10
vga standoffs 4-40x0.25 4
board standoffs driver 6-32x0.3125 7
main controller 6-32x0.3125 10
vga 4-40x0.25 4
set screws ballnuts 8-32x0.25 3
z-axis thrust bblock 8-32x0.3125 1
grease zerk bearing blocks 1/8-27 PTF 3
Washers
CNC Machine Design Report
162
Table 10-20
Totals
Fasteners M5x20 8
M6x25mm 8
4-40x0.25 24
6-32x0.25 17
8-32x0.375 2
8-32x0.5 12
8-32x1 68
10-24x0.75 12
10-24x1 148
1/4-20x1 77
3/8-16x1.5 10
3/8-24x1 4
3/8-16x3 2
8-32x0.25 (self-tapping) 4
396
Split Lock washers #10 32
1/4 56
3/8 16
M5 8
M6 8
Ext. Tooth Lock washers #10 110
Flat washers 3/8 8
.438x.203x.032 24
.500x.265x.032 36
CNC Machine Design Report
163
10.11.4 Component Data Sheets
Ballscrews
Versa rails
Versa blocks
X-rods
X-rod bushings
Y-Supported Rail
Y-Bushing Blocks
Ball Bearings
Thrust Bearings
Bearing Seals
Motors
Pulleys
Belts
Axis
Pulley
Diameter Max Min Middle Max Min Middle Order Price Source
Z 1.890 5.08 4.08 4.58 16.09 14.10 15.10
X 1.890 8.00 7.03 7.52 21.94 19.99 20.97
Y 1.890 4.50 3.50 4.00 14.94 12.94 13.94
-$ Total
Spacing Belt Length
CNC Machine Design Report
164
10.11.4.1 Engineering Drawings
10.11.4.2 Z-axis
10.11.4.3 X-axis
10.11.4.4 Base
10.11.4.5 Y-axis
10.11.4.6 Tool Heads
10.11.4.7 Spindle
10.11.4.8 Paste Dispenser
10.11.4.9 Machine Electronics
10.11.4.10 Pendant Case
10.11.4.11 Electronic Component Housing
CNC Machine Design Report
165
Part Name Part Number
1 Top
2 Bottom
3 Front
4 Back
5 Left Side
6 Right Side
7 Partition
8 Driver Board Panel
Electronic Component Housing Assembly, BB-5
CNC Machine Design Report
166
11. APPENDIX C
11.1 Pendent Code Datasheet
11.1.1 Graphics Header File:
All graphics within the Graphics.c file uses an LCDBuffer[ ] array that has a
size of 255. Also it has a LCDCount that counts the number of positions used
within the LCDBuffer. Inside the main structure there three sets of internal
structures:
CurrentPos (Current Position)
PositionArray (Position in Rows and Columns)
Properties (Color, Font, etc)
In Current Position we have two declarations X and Y. These declared variables
have a data type int which will be used for pixel position on the LCD Screen. The
range of the Y position will be 72 pixels and the X position will be 120 Pixels. The
Position Array structure has two declarations Row and Column. Also declared as
int data types, will be used in positioning with Rows and Columns. Unlike the
current position we have a range of 9 Rows and 15 Columns.
In the Properties structure we have the six declared variables that have a data
type of int:
Color
FontSize
BackColor (background color)
CurrentScreen
Pen (Pen size)
The Color variable is used to set the color for any of the draw functions.
BackColor is used to set the background color inside the Graphics.c file. All Colors
CNC Machine Design Report
167
are defined outside of the structure inside the Graphics.h file. These colors are
white, black, red, green, blue, yellow, teal, fuchsia, purple, gray, and orange.
These colors are called by using theses specified names:
clWhite = White
clBlack = Black
clRed = Red
clGreen = Green
clBlue = Blue
clYellow = Yellow
clTeal = Teal
clFuchsia = Fuchsia
clPurple = Purple
clGray = Gray
clOrange = Orange
FontSize is used to specify the character font sizes. There are 3 different font sizes
that can be used but it changes the Row and Column sizes.
FONT_SIZE_5X7
FONT_SIZE_8X8
FONT_SIZE_8X12
For the 5X7 the Rows will be 15 and the Columns will be 20, for the 8X8 the Rows
will be 15 and the Columns will be 15, and finally for the 8X12 which we will use
for our pendent we will have 9 Rows and 15 Columns. The current screen variable
will be useful to set up a command that will set what screen that we need to be
on at a specific time. The pen variable is used to set the pen size of the draw
functions. When the pen is set to be solid it will have a circle that is filled in. If the
pen is set to be wire it will just outline the shape and it won’t be filled in. We have
two defined pen sizes that can be used in our program:
SOLID
CNC Machine Design Report
168
WIRE
Some more defined variables that will be used in our program are:
OPAQUE
TRANSPARENT
These are used to allow when we are choosing a window or command we can
make it OPAQUE so it looks like we are playing out selector over that selection
and it would become TRANSPARENT if we were not selected over the file box.
11.1.2 Graphics Source File:
In our Graphics.c file we have every function that will be shown on the
pendent LCD screen. Here are the list of commands in this file:
MoveTo()
WriteString()
DrawLine()
DrawBox()
DrawChar()
DrawCircle()
DrawTriangle()
RowColumnPos()
SetOpaqueTransparent()
SetBackgroundColor()
SetPenSize()
DrawSemiCircle()
ClearImage()
11.1.2.1 DrawIcon()
CNC Machine Design Report
169
The first command is the MoveTo function. The MoveTo function takes the x and
y pixels and moves them to the next position. It then saves the position that you
move to as the current position.
EX: MoveTo(16,8); – 16 pixels in the X direction and 8 in the Y direction
The WriteString command is used to write a string of chars. It takes the string that
you write and puts it into an array and prints it onto the screen.
EX: WriteString(“Hello World”); - Prints Hello World on the LCD Screen
The DrawLine command as it specifies draws a line from the starting position to a
specified position.
EX: DrawLine(56, 20); – Draws a line from the current position to the pixel
position X = 56 and Y=20.
(X2,Y2)
(X1,Y1)
The DrawBox command draws a box using the current position as one corner and
then the users gives a position on the opposite corner.
EX:DrawBox(56,20); - In this figure X1 and Y1 are the current positions and
X2 = 56, Y2 = 20.
(X1,Y1)
(X2,Y2)
CNC Machine Design Report
170
The DrawChar command returns a char but returns it one at a time in. It takes the
current row and column that you are in prints the char.
EX:DrawChar(A); - Writes a char “A” to the current position array and prints
it on the LCD Screen.
Draw Circle takes the Radius and the current positions and makes a complete loop
to create a circle. The radius of this command is in pixels
EX: DrawCircle(16); - Draws a Circle with a radius of 16 pixels
(Radius)
DrawTriangle takes 2 positions on the screen and the current pixel positions and
plots out a Triangle on the screen.
EX: DrawTriangle(36,12,45,18); - X1 and Y1 are the current positions and
X2,Y2,X3,Y3 are all calculated. In this example 36=X2, 12=Y2, 45=X3, 18=Y3.
(X1,Y1)
(X2,Y2) (X3,Y3)
CNC Machine Design Report
171
RowColumnPos is similar to MoveTo but this command uses array positions and
not pixel positions. This command is used for any type of character format.
EX: RowColumnPos(4,5) – This sets the current position at Row 4 and
Column 5
SetOpaqueTransparent is used or the DrawBox command. This command will be
used to implement a file or window selected. It will be Opaque when selected and
Transparent when de-selected.
EX: SetOpaqueTransparent(OPAQUE)- this command will set the Box in the
function to be Opaque.
ExampleOpaque
ExampleTransparent
SetBackgroundColor will set the background color to any of the Colors that were
defined on the Graphics.h file.
EX: SetBackgroundColor(clBlue);- sets background color to Blue
SetPenSize sets the pen size of the drawing. This is used to either fill or not fill a
graphic
EX:SetPenSize(SOLID or WIRE); - sets a graphic to be filled or not filled
CNC Machine Design Report
172
Wire
Solid
DrawSemiCircle creates a SemiCircle on the LCD Screen. This command was
created to draw a Semi-Circle for the Jog Screen. You need to give the radius of
the semi-circle to have it drawn.
Ex: DrawSemiCircle(12); - Draws a Semi-Circle with the radius of 12 pixels
(Radius)
ClearScreen clears the screen of any currently displayed information. This
command is used to clear the screen when the jump file screen is being uploaded
from the main sub screen.
DrawIcon is used after an icon is uploaded into the processor after initialization to
illustrate either a folder or file for the jump file screen to display the drive’s
directory
Ex: DrawIcon(Folder); -Draws the folder icon before the folder name
**
11.1.3 Screens Header File:
This header file is used for all external declared variables for the Screens.c
source code. There are 5 external variable that are declared: X, Y, Z, A, Buffer[6].
The X Variable is used for the X axis on the CNC, the Y is used for the Y axis of the
CNC, the Z is used for the Z axis of the CNC, and the A is used for the acceleration
of the CNC itself. The Buffer[6] array will be used to transfer a int to a string .
CNC Machine Design Report
173
Structures:
These are structures built within the screen header file to be used as a
new type such as integer, string, or character for the purpose of collecting
particular information from the microcontroller and sending it to the
pendant.
TPosition
Structure built with the ability to hold the information from all four
axes (X, Y, Z, A). It gives the user the ability to access any axis’
dimension after it stops on the table.
TIP
Structure gives the user the ability to access addressing information
incoming from the Ethernet connection and break down into smaller
amounts of information.
TMachineParameters
Structure gives the user the ability to collect information based upon
the user’s particular job it is currently running such as jog rates, feed
rates, speed rates, and acceleration/deceleration.
TTCPIPConfiguration
Structures uses the TIP structure discussed above to set up the
incoming information received through Ethernet into the form
xxx.xxx.xxx.xxx where the TIP structure breaks it down into four
pieces of information to be displayed in the correct form.
CNC Machine Design Report
174
11.1.4 Screens C Source file:
This souce file is the Main source file that will talk to the Pendent.C code.
This file will have the main drawing files and functionality files. The commands in
this file are:
DrawMainScreen()
DrawMainSubScreen()
DrawOffsetSubScreen()
DrawParametersSubScreen()
DrawSoftLimitsSubScreen()
DrawOffsetScreen()
DrawMachineParameters ()
DrawSoftLimits()
DrawTCPIPConfiguration()
DrawComPort()
DrawFileScreen()
DrawFileScreen()
The DrawMainScreen command will draw our main pendent screen. At the top
left of the screen will display the X, Y, and Z coordinates on the CNC and the
Acceleration speed which is denoted as A on the screen. At the bottom left of
the screen is a 5 limit switch section that is set using circles. When a circle is
red that limit is turned off and when it is green it is turned on. At the top right
there will be a Jog switch dial that can be changed by the user, and at the
bottom right of the screen is the display screen that will tell if the CNC is
Running(RUN), Jogging(JOG), or Idle(IDLE).
CNC Machine Design Report
175
X:
Y:
Z:
A:
JOG
-50 50
The DrawMainSubScreen command is the transition screen from the main
screen to all the lower sub-screens. The title will state “Subscreens” followed
below by a drawn line and the five different sets of sub-screens which are
offsets, parameters, soft limits, and thumb drive.
Subscreens
- Offsets
- Parameters
- Soft Limits
- Thumb Drive
CNC Machine Design Report
176
The DrawOffsetsSubScreen command can be chosen from the main sub-
screens menu. It gives the user the ability to choose between the offsets
between the different offsets of home position, park position, work offset 1,
and work offset 2 with the title of “Offsets”.
Offsets
- Home Position
- Park Position
-Work Offset 1
-Work Offset 2
The DrawParametersSubScreen command is chosen from the main sub-screen
menu list. Once chosen, it will give the user access to the machine parameters
screen, TCPIP configuration screen, and the com port screen.
Parameters
- Machine Parameters
- TCPIP Configuration
- Com Port
CNC Machine Design Report
177
The DrawSoftLimitsSubScreen command can also be chosen from the main sub-
screen menu. This screen allows the user to choose between the upper of lower
soft limits with the title of “Soft Limits”.
Soft Limits
-Upper Limits
-Lower Limits
The DrawOffsetScreen command will draw one of four offset chosen by the
user. All screens have the same design except the title will change depending
upon which offset screen is chosen which could be home position, park
position, work offset 1, or work offset 2. The left side of the screen is titled by
the words “Set Position” which are the positions that the machine is currently
using for the offset which was chosen. Underneath the title, the four axes are
shown with the corresponding positions next to them. On the right side of the
screen, there is a title that says “Current Pos” which allows the user to change
the offset on the set position to the current position on which the machine has
just stopped on. Underneath the title, there is the variables that correspond to
CNC Machine Design Report
178
each axes’ position on the machine. Below the left side axes, there is an accept
button to allow the user to switch the set to the current positions, and below
the right side axes, there is a cancel to stop the action just taken by the user.
TitleSet
PositionCurrent
Pos
X:
Y:
Z:
A:
Accept Cancel
The DrawMachineParameters command will draw the machine parameters
based upon the values the job allows the machine to work at. The screen will
carry the title “Parameter Screen 1”. Below the title, every machine
parameter will be displayed with its corresponding value next to it.
CNC Machine Design Report
179
Machine Parameters
Max Speed:
Acceleration:
Rapid Max:
Rapid Min:
Deceleration:
Jog Speed:
Max Jog Speed:
Max Feed:
Min Feed:
Jog Increment:
The DrawSoftLimits command will draw either the upper or lower limits of the
machine’s current job depending upon which the user chooses. The screen’s
title will state which limits the user wants to use. On the left side of the screen,
the secondary title will be “Set Position”, and on the right side of the screen,
the secondary title will be “Current Pos”. Below the left title, there will be
labels for each axis’ dimension followed by its set value. Below the right title,
there will just be the values corresponding to the machine’s current position
on the table. Below the left values, there will be an accept button to change
the set position to the current position, and below the right values, there will
be a cancel button to stop the action just taken.
CNC Machine Design Report
180
Upper Limits/Lower LimitsSet
PositionCurrent
Pos
X:
Y:
Z:
A:
Accept Cancel
The DrawTCPIPConfiguration command will draw and display the information
coming into the machine from the Ethernet connection when used. It will
display the title “TCP/IP Configuration”. It will have a labels under it stating the
title of the information being uploaded from the outside connection with each
label’s information below it displayed in the form xxx.xxx.xxx.xxx.
CNC Machine Design Report
181
TCP/IP Configuration
Ip Address
xxx.xxx.xxx.xxx
Subnet Mask
xxx.xxx.xxx.xxx
Default Gateway
xxx.xxx.xxx.xxx
xxx.xxx.xxx.xxx
Primary DNS
Secondary DNS
xxx.xxx.xxx.xxx
The DrawComPort command will draw and display information incoming to
the machine from its serial ports. At the top, it will display the title “Com Port”
and underneath say “Communications”. Below the title will be the first label
for baud rate and its information right underneath the title. The next title will
be for the stop bits, and after the title, there will either be the words one stop
bit, one and a half stop bits, or two stop bits depending upon what information
the pendant receives. Below this title, there will be a title for the port’s flow
control followed by either the words none, hardware, or Xon/Xoff depending
upon what form of information flow the machine receives. The next title will
show parity within the incoming information. It can detect if the information
has no parity, odd parity, or even parity. The final two titles will be display
information if the flow control is using the Xon/Xoff format. The first title will
be for Xon character and the second title will be for the Xoff character.
CNC Machine Design Report
182
Com Port
Communications
Baud Rate
Stop Bits:
Flow Control:
Xon Char:
Xoff Char:
Parity:
The DrawFileScreen command will display the file directories from the
uploaded jump drive. It will have the root title of the jump drive at the top of
the screen. Below the title, there will be the folder icon followed by its name.
Below this, there will be the file icon followed by a list of each file name
displayed after and continuing below. If the page isn’t big enough to fit all files,
the remaining files can be found below the file screen by using the up and
down buttons.
CNC Machine Design Report
183
Root:
Folder Name
File Name
11.1.5 Support Source File:
This file is used to support the functions inside the CNC. These functions are
public to all source files.
IntToString()
The IntToString command will change a Integer to a String. This command is
being used to change the position for the X, Y, Z, and A into a string to be
printed on the LCD Screen. This command is what uses the Buffer[6] array
from the Screens.h. The function of this command takes each integer that is
given from the CNC and divides it first by 1000 until it can’t be divided
anymore and it is incremented into an integer character. It does this
process all the way down to 1. For example, if we had 21.02 as the number
it divides first by 1000. It can divide it 2 times so it increments the character
to 2 and places it in the first array block. It then divides it by 100 and the
number can be divided only once so it increments the 2nd array block to 1.
The third block becomes a “.” so it splits the numbers into its appropriate
value. The next number is 0 so the dividing by 10 is skipped so it places a 0
in the fourth array block. Finally the last number is 2 so it is divided by 1.
CNC Machine Design Report
184
The character array block is incremented to 2 so the string then becomes
“21.02”.
2 1 . 0 2 2 1 . 0 2
Integer String
**Image taken from Windows XP Database
12. APPENDIX C
12.1.1 Test Data
12.1.1.1 Low Voltage Power Supply
12.1.1.1.1 Voltage Measurement
12.1.1.1.1.1 Input Voltage Measurement
Test Nominal (VDC) Actual (VDC) Tolerance (VDC)
24 Vdc Input 40 41.90 <50 +12 Vdc Input 20 19.96 <25 -12 Vdc Input -20 -22.00 >-25
12.1.1.1.1.2 Output Voltage Measurement
Test Nominal (VDC) Actual (VDC) Tolerance (VDC)
24 Vdc 24 24.00 5% (22.8 to 25.2) +12 Vdc 12 11.96 5% (11.4 to 12.6 -12 Vdc -12 -11.99 5% (-12.6 to -11.4) 5 Vdc 5 5.03 5% (4.75 to 5.25)
12.1.1.1.2 Voltage Ripple Measurement
12.1.1.1.2.1 Input Ripple Measurement
Test Nominal Actual (V pk-pk) Tolerance (V pk-pk)
24 Vdc Input - 2.5 <= 1
CNC Machine Design Report
185
+12 Vdc Input - .75 <= 1 -12 Vdc Input - .80 <= 1
12.1.1.1.2.2 Output Ripple Measurement
Test Nominal Actual (mV pk-pk) Tolerance (mV pk-pk)
24 Vdc - 2V < 600 +12 Vdc - 150 < 300 -12 Vdc - 150 < 300 5 Vdc - 110 < 150
12.1.1.1.3 Slow Turn On
Test Nominal (Seconds) Actual (Seconds) Tolerance
+12Vdc 15 25 N/A -12Vdc 15 15 N/A 5Vdc 15 16 N/A
12.1.1.2 Optical Isolation Measurements
12.1.1.2.1 Response Time Measurements
12.1.1.2.1.1 Optical Isolator Response Time
Test Frequency(kHz) Rise Time Nominal
Fall Time Nominal
Actual(us) Rise | Fall
Tolerance (us)
ENABLE (J1-13) 1 - - 80|60 < 100 GND (J1-14) | < 100
| < 100
CNC Machine Design Report
186
RESET (J1-15 ) 1 - - 80|60 < 100 GND (J1-16) | <100
| <100 MS1 (J1-17 ) 1 - - 80|60 < 100 GND (J1-18) | <100
| <100 MS2 (J1-19 ) 1 - - 80|60 < 100 GND (J1-20) | <100
CNC Machine Design Report
187
12.1.1.2.1.2 Optical Couplers Response Time
Test Frequency(kHz) Rise Time (ns) Nominal
Fall Time (ns) Nominal
Actual (ns) Rise | Fall
Tolerance (ns)
X-DIR(J1-3 ) 1 - - 23|5 < 100 GND (J1-4) 10 - - 33|5 < 100
100 - - 28|10 < 100 1MHz - - 30|10 < 100 X-STEP (J1-1) 1 - - 23|5 <100
GND (J1-2) 10 - - 33|5 <100 100 - - 28|10 < 100
1MHz - - 30|10 <100 Y-DIR (J1-7 ) 1 - - 23|5 <100
GND (J1-8) 10 - - 33|5 < 100 100 - - 28|10 <100 1MHz - - 30|10 <100
Y-STEP(J1-5 ) 1 - - 23|5 < 100 GND (J1-6) 10 - - 33|5 < 100
100 - - 28|10 < 100 1MHz - - 30|10 < 100 Z-DIR (J1-11) 1 - - 23|5 <100 GND (J1-12) 10 - - 33|5 <100
100 - - 28|10 < 100 1MHz - - 30|10 <100
Z-STEP (J1-9 ) 1 - - 23|5 <100 GND (J1-10) 10 - - 33|5 < 100
100 - - 28|10 <100 1MHz - - 03|10 <100
CNC Machine Design Report
188
12.1.1.2.2 Frequency Response Measurements
12.1.1.2.2.1 Optical Isolator Frequency Response
Test Pins
Frequency(kHz) High(VDC) Nominal
Low(VDC) Nominal
Actual(VDC) High | Low
Tolerance (VDC) High | Low
ENABLE (J1-13)
1 5 0 5|.010 >= 0.7 | <= 0.3
GND (J1-14) | >= 0.7 | <= 0.3 | >= 0.7 | <= 0.3
RESET (J1-15 ) 1 5 0 5|.010 >= 0.7 | <= 0.3 GND (J1-16) | >= 0.7 | <= 0.3
| >= 0.7 | <= 0.3 MS1 (J1-17 ) 1 5 0 5|.010 >= 0.7 | <= 0.3 GND (J1-18) | >= 0.7 | <= 0.3
| >= 0.7 | <= 0.3 MS2 (J1-19 ) 1 5 0 5|.010 >= 0.7 | <= 0.3 GND (J1-20) | >= 0.7 | <= 0.3
| >= 0.7 | <= 0.3
CNC Machine Design Report
189
12.1.1.2.2.2 Optical Coupler Frequency Response
Test Pin Frequency(kHz) High(VDC) Nominal
Low(VDC) Nominal
Actual High | Low
Tolerance (VDC)
High | Low
X-DIR(J1-3 ) 1 4 0 3.80|-.30 >= 0.7 | <= 0.3 GND (J1-4) 10 4 0 3.80|-.30 >= 0.7 | <= 0.3
100 4 0 3.75|-.25 >= 0.7 | <= 0.3 1MHz 4 0 3.63|-.25 >= 0.7 | <= 0.3 X-STEP (J1-1) 1 4 0 3.80|-.30 >= 0.7 | <= 0.3
GND (J1-2) 10 4 0 3.80|-.30 >= 0.7 | <= 0.3 100 4 0 3.75|-.25 >= 0.7 | <= 0.3
1MHz 4 0 3.63|-.25 >= 0.7 | <= 0.3 Y-DIR (J1-7 ) 1 4 0 3.80|-.30 >= 0.7 | <= 0.3
GND (J1-8) 10 4 0 3.80|-.30 >= 0.7 | <= 0.3 100 4 0 3.75|-.25 >= 0.7 | <= 0.3 1MHz 4 0 3.63|-.25 >= 0.7 | <= 0.3
Y-STEP(J1-5 ) 1 4 0 3.80|-.30 >= 0.7 | <= 0.3 GND (J1-6) 10 4 0 3.80|-.30 >= 0.7 | <= 0.3
100 4 0 3.75|-.25 >= 0.7 | <= 0.3 1MHz 4 0 3.63|-.25 >= 0.7 | <= 0.3 Z-DIR (J1-11) 1 4 0 3.80|-.30 >= 0.7 | <= 0.3 GND (J1-12) 10 4 0 3.80|-.30 >= 0.7 | <= 0.3
100 4 0 3.75|-.25 >= 0.7 | <= 0.3 1MHz 4 0 3.63|-.25 >= 0.7 | <= 0.3
Z-STEP (J1-9 ) 1 4 0 3.80|-.30 >= 0.7 | <= 0.3 GND (J1-10) 10 4 0 3.80|-.30 >= 0.7 | <= 0.3
100 4 0 3.75|-.25 >= 0.7 | <= 0.3 1MHz 4 0 3.63|-.25 >= 0.7 | <= 0.3
CNC Machine Design Report
190
12.1.1.3 Motor Power Supply
12.1.1.3.1 Voltage Measurement
12.1.1.3.1.1 Output Voltage Measurement
Test Nominal (VDC)
Actual (VDC)
Tolerance (VDC)
Vm (No Load) 45 45.9 12 < Vbb < 48 Vm(Full Load) 40 40.0 12 < Vbb < 48
Vm (Transient Voltage Spikes) - 52 < 55
12.1.1.3.1.2 Voltage Ripple Measurement
Test Nominal Actual(V) Tolerance (V pk-pk)
Vm (No load) - .250 <= 1
12.1.1.4 Voltage Reference
12.1.1.4.1 Voltage Measurement
Test Nominal (VDC) Adjustable
Actual (VDC)
Tolerance (VDC)
X-Vref .6880 to 1.6168 .6970 to 1.6210 .6192 to 1.7785 Y-Vref “ .6975 to 1.6180 “ Z-Vef “ .6960 to 1.6205 “
12.1.1.5 Driver Outputs to Controller
Test Nominal (IDC) Steady State
Actual (IDC) Steady State
Tolerance (IDC) Steady State
Driver Board Ready 533uA 540uA (525 to 652) uA Vbb Good Signal 533uA 552uA “
Fault Signal No Fault | Fault 2.2mA | 0
2.2mA/0 N/A
12.1.1.6 Fuse Blown Indicators
Test Fuse Blown Indicators
Nominal Actual
+12 Vdc PASS PASS -12Vdc PASS PASS 24Vdc PASS FAIL
CNC Machine Design Report
191
12.1.2 Calculations Section
12.1.2.1 Voltage Regulator (5 Vdc supply)
Calculations and Graphs for determination of input supply using Matlab are shown below. The
determination of the VREG1 was determined by the supply requirements.
Supply Current Requirement of VREG1
1. Driver = 10mA*3 Chips
2. Opo-Coupler=5mA*6 Chips
3. Opo-Isolator=4mA
4. Vbb Protection=1mA
Total Current = 65mA
_________________________________________________________________________
% Volatage Regulator 5Vdc
% Determination of the the input supply to the 5Vdc Regulator
Rthja=100
Vp=6:1:22;
Vreg=5
Tamb=20;
Ireg=(150-Tamb)./(Rthja.*(Vp-Vreg));
figure(1)
plot(Vp,1000*Ireg)
title('Maximum Output Current at Different Input Voltages to VREG1');
xlabel('Input Voltage To VREG1 (V)');
ylabel('Ouput Current (mA)');
CNC Machine Design Report
192
% Volatage Regulator 5Vdc
% Maximum output of Regulator
Rthja=100
Vp=12
Vreg=5
Tamb=0:1:175;
Ireg=(150-Tamb)./(Rthja*(Vp-Vreg));
figure(2)
plot(Tamb,1000*Ireg)
title('Maximum Output Current of VREG1 with Volatge Input set at 12V');
xlabel('Temperature (Celsius)');
CNC Machine Design Report
193
ylabel('Ouput Current (mA)');
axis([0 175 0 250]);
CNC Machine Design Report
194
12.1.2.2 Voltage Regulators (+-12, 24 Vdc Supplies)
4.32kR2 24VdcVout For
2.05kR2 12VdcVout For
2.05kR2 12VdcVout For
uA50I,V25.1V,240RLet
)3(
adjI
1R
refV
refV
outV
2R)2(
)2(2
R*adj
I
2R
1R
1ref
Vout
V
2R*
adjI
2R
1R
*ref
Vref
Vout
V
)1(2
R*)adj
Iref
I(1
Rref
Iout
V
adjref1
CNC Machine Design Report
195
12.1.2.3 Voltage Reference Circuit
Calculates the value of and for a given , sense resistor ,
supply voltage and minimum voltage .
S(max)tripDMAXDD
CD
DM
MIIND
C
D
R8*IVVVR*I xWhere
)2(R1x
VRR
)1(
1x
VV
RR
Calculates the value of SETV when values of and are selected.
CNC Machine Design Report
196
)5()Rc
X,0Rf
(XSET
V)Rc
X,1Rf
(XSET
VSET
ΔV
(4))m
RRc
X*Rc
)((ohm/turn
RfX*
Rf(ohm/turn)R
DV
SETV
RfX*
Rf(ohm/turn)R
DV
RfRR
DV
TR
DV
TIwhere
(3))m
RC
(RT
ISET
V
RcX*
Rc(ohm/turn)
CR
RfX*
Rf(ohm/turn)
RfR
RfRR
TR
CR
mR
DRRLet
*See Voltage Reference Circuit
12.1.2.3.1
Calculations for Voltage Reference Circuit for Rd and Rm using Matlab.
Vd=12; %supply voltage
Itmax=4.7; % Maximum Trip Current
Rs=.0430 ; % Sense Resistor plus trace resistance
Rc=2*10^3; % Coarse Adj resitsor
display(' When Vmin=.688')
Vmin=.688;
x=Vd-(Itmax.*(Rs*8));
Rd= Rc./(((Vd-Vmin)./x)-1)
CNC Machine Design Report
197
Rm= (Rd.*(((Vd)./x)-1))-Rc
Itmin=Vmin./(Rs*8)
Vmax=Itmax.*(Rs*8)
Itmax=Vmax./(Rs*8)
When Vmin=.688
Rd = 2.2358e+004
Rm = 1.4815e+003
Itmin = 2
Vmax = 1.6168
Itmax = 4.7000
12.1.2.4 Optical Isolator
)2(
)1(
If
VfVinRd
Rc
VoutVccIc
kΩ.Rd
mAIfV,VfV,.VinLet
1501
2133
kRc
mAIcVVoutVVccLet
10
5.,0,5
CNC Machine Design Report
198
12.1.2.5 Optical Coupler
)1(If
VfVinRd
kΩ1Rd
mA3.2IfV,1VfV,3.3VinLet
12.1.2.6 Vbb Protection Circuit
)1(
tripI
tripV
Rs
ΩRRs
mAImVV triptrip
180
65,65
12.1.2.7 Input Filter Capacitor
)1(**2
rippleVf
loadI
FC
12.1.2.7.1 Low Voltage Power Supply
uFF
C
Vripple
VHzfmAload
ILet
416
1,120,100
CNC Machine Design Report
199
12.1.2.7.2 Motor Voltage Power Supply
mFF
C
Vripple
VHzfAload
ILet
35
1,120,4.8
12.1.2.8 Fuse Blown Indicator
)2(
)1(
2 RIP
I
VVR LEDUREG
12.1.2.8.1 +-12Vdc Fuse Indicator
resistorperWmWP
kΩRRR
mAIV,VV,VVLet LEDUREGMOSFETS
8/1100
0.46159
56.122,0
12.1.2.8.2 24Vdc Fuse Indicator
resistorperWmWP
kRRR
kR
mAIV,VV,VVLet LEDUREGMOSFETS
8/195
7.462602
40.9
5.46.144,0
12.1.2.9 Driver Outputs
Tests were conducted to determine a more accurate value of data required. The test setup is shown in
figure ___.
CNC Machine Design Report
200
)2(If
VfVinRd
)1(Rc
VoutVccIc
Vin was adjusted until a value of approximately 1 Volt was seen on the output (Vout).
kRd
kRc
15.1
10
Data used to calculate the Driver Output signals: Board Ready Signal and Vbb Ready Signal.
652uA 533uA to are IFor limits Tolerance :Note
5.685kΩRc
3.3V is Board Controlleron isolators optical Supply toPower
394uA. providemust Isolator Opticalon Current Output :Note
uA394Ic
uA533IfI
V047.1VfV,060.1V,V66.1V
SET
SET
OUTIN
12.1.2.9.1 Driver Board Ready Signal
uA547I 20k set to wasR72
20.5kΩR72I
Vf12R72
SET
SET
12.1.2.10
12.1.2.11
CNC Machine Design Report
201
12.1.2.12
12.1.2.12.1 Vbb Ready Signal
M15I
Vx70R
k178.26I
VfVx71R
k816.46I
VxVbb69R
)2(71R
Vf
71R
1
70R
1
69R
171R
Vf
69R
Vbb
R71
VfVxI
(1) 0R71
VfVx
R70
Vx
R69
VxVbb
uA1I 534uA,I 533uA,I 1.047V,Vf 40V,Vbb 15V,VxLet
70R
71R
69R
SET
R71R69SET
CNC Machine Design Report
202
uA542IV0975.15Vx
70R
1
70R
1
69R
171R
Vf
69R
Vbb
Vx (1)
3.57MR70 26.1kΩ6R71 46.4k,R69
:conditonscircuit and valuesComponent Circuit Final
3.57MR70 :set Componets
M5714.370R
uA2.4I
uA8.538I
uA6.534I
26.1kΩR71 46.4k,R69 :set Componets
SET
70R
69R
SET
12.1.2.12.2 Fault Signal
k2k9765.1mA2
047.1581R)2(
CNC Machine Design Report
203
12.1.3 List of Figures
12.1.3.1 Figure 34 Voltage Reference Simplified Circuit Diagram
Vd
Rd
Rf
Rc
Rm
Vset
Vref
Vref = Vset
CNC Machine Design Report
204
12.1.3.2 Figure 35 Optical Isolator Circuit Diagram
Vin Vf
Vcc
RdRcIc
If Vout
CNC Machine Design Report
205
12.1.3.3 Figure 36 Voltage Regulator Simplified Circuit Diagram
R1
R2
VoutVin
Vref
Iadj
Iref
LM317, LM377
CNC Machine Design Report
206
12.1.4 Simulations
Figure 37 Motor Voltage Simulation
CNC Machine Design Report
207
Figure 38 Simulation # 1: Motor Voltage Ripple at Normal Load (3.3 A)
CNC Machine Design Report
208
Figure 39 Simulation # 2: Motor Voltage Ripple at Full Load (8 A)
CNC Machine Design Report
209
Figure 40 Fuse Blown Test for 12Vdc and -12Vdc
CNC Machine Design Report
210
Figure 41 Fuse Blown Test for 24Vdc
CNC Machine Design Report
211
Figure 42 Low Voltage Power Supply Transient Analysis
CNC Machine Design Report
212
Figure 43 Low Voltage Power Supply Input Filter Capacitors Voltage Ripple
CNC Machine Design Report
213
Figure 44 Low Voltage Power Supply Ripple Rejection: +5Vdc (yellow), 12Vdc (green), -12Vdc (blue)
CNC Machine Design Report
214
13. References
[1] dsPic30F3013 Data Sheet
http://ww1.microchip.com/downloads/en/DeviceDoc/70139C.pdf
[2] Goldelox-SGC Command Set: Software Interface Specification
http://www.4dsystems.com.au/downloads/Semiconductors/GOLDELOX-
SGC/Docs/GOLDELOX-SGC-COMMANDS-SIS-rev2.pdf