mmp_alperkoyuncu

Embed Size (px)

Citation preview

  • 7/31/2019 mmp_alperkoyuncu

    1/36

    Alper KOYUNCU 661782

    Mohit S. RAO 689607

    Sandeep RAJAPRASAD 689452

    Electrical Engineering and Information Technology, Hochschule Rosenheim

    Numerical Control for

    Milling MachineDocumentation for the Master Project

  • 7/31/2019 mmp_alperkoyuncu

    2/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 2

    Table of Contents

    1. Introduction.......................................................................................................................... 5

    1.1. Initial Challenge and Proposed Solutions ................................................................................ 5

    1.2. CNC Millers - Team Members.................................................................................................. 6

    2. Numerical Control (NC) ......................................................................................................... 7

    2.1. Hardware ................................................................................................................................. 9

    2.2. Machine Controller ................................................................................................................ 10

    2.3. Parallel Port Interface ............................................................................................................ 11

    2.3.1. Emergency Stop Circuit ................................................................................................. 11

    2.3.2. Limit Detection Circuit ................................................................................................... 11

    2.3.3. Data Transmission from Controller to Motor Driver ..................................................... 12

    2.3.4. Data Transmission from Sensor to Controller ............................................................... 13

    2.4. Motor Driver .......................................................................................................................... 14

    3. Switch Cabinet .................................................................................................................... 17

    3.1. Power Line ............................................................................................................................. 17

    3.2. Wiring .................................................................................................................................... 19

    4. Applied Test ........................................................................................................................ 20

    4.1. Testing the PC output signals with an Oscilloscope (HAMEG) .............................................. 20

    4.1.1. Parallel Port Connection Layout ................................................................................. 20

    4.1.2. Procedure ...................................................................................................................... 21

    4.1.3. Problems to be aware of ............................................................................................... 21

    4.1.4. Result ............................................................................................................................. 22

    4.2. Testing the Interface with a Function Generator .................................................................. 23

    4.2.1. Test Circuit ..................................................................................................................... 23

    4.2.2. Procedure ...................................................................................................................... 24

    4.2.3. Problems Encountered .................................................................................................. 24

    4.2.4. Result ............................................................................................................................. 25

    4.3. Testing the Milling Machine .................................................................................................. 25

    4.3.1. Procedure ...................................................................................................................... 25

    4.3.2. Result ............................................................................................................................. 25

  • 7/31/2019 mmp_alperkoyuncu

    3/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 3

    5. Software ............................................................................................................................. 26

    5.1. Q-CAD .................................................................................................................................... 26

    5.2. DXF to G-Code Conversion .................................................................................................... 28

    5.3. EMC 2 Software Configuration ........................................................................................... 29

    6. Conclusion .......................................................................................................................... 34

    Bibliography ............................................................................................................................... 35

    Attachement .............................................................................................................................. 36

    List of FiguresFigure 2.1: Simplified data flow in geometrical data processing unit ..................................................... 7

    Figure 2.2: Speed progression when using two-step acceleration ......................................................... 8

    Figure 2.3: Simplified hardware diagram for one axis ............................................................................ 9

    Figure 2.4: E-Stop Logic Circuit .............................................................................................................. 11

    Figure 2.5: Limit detection circuit for X axis .......................................................................................... 12

    Figure 2.6: Limit detection and buffer circuit for X axis ........................................................................ 13

    Figure 2.7: Reference switch for X axis ................................................................................................. 13

    Figure 2.8: 2-Phase motor drivers ......................................................................................................... 14

    Figure 2.9: 2-Phase motor drivers function switch configuration........................................................ 14

    Figure 2.10: 1-Pulse Input Mode ........................................................................................................... 15

    Figure 2.11: 5-Phase motor driverss ..................................................................................................... 16

    Figure 3.1: Power Line Circuit ............................................................................................................... 18

    Figure 3.2: Entire Block Diagram of the Milling Machine ..................................................................... 19

    Figure 4.1: Simplified connection diagram ............................................................................................ 20

    Figure 4.2: Parallel Port ......................................................................................................................... 21

    Figure 4.3: Parallel Port Pin Layout ....................................................................................................... 21

    Figure 4.4: Driver Signal Specification ................................................................................................ 22

    Figure 4.5: Interface Test Diagram ........................................................................................................ 23

    Figure 4.6: Pin Details of the Interface .................................................................................................. 24

    Figure 5.1: Q-Cad User Interface ........................................................................................................... 26

    Figure 5.2: Q-Cad Tool Box .................................................................................................................... 27Figure 5.3: Q-Cad Drawing a Circle ........................................................................................................ 27

    Figure 5.4: Q-Cad saving a .dxf file ..................................................................................................... 28

    Figure 5.5: Dxf to G-Code Converter ..................................................................................................... 28

    Figure 5.6: Dxf to G-Code Saving G-Codes ............................................................................................ 29

    Figure 5.7: EMC2 Configuration Wizard ................................................................................................ 30

    Figure 5.8: EMC2 Creating new configuration file ................................................................................ 30

    Figure 5.9: EMC2 Modifying an old configuration file ........................................................................... 31

    Figure 5.10: EMC2 Basic Machine Information ..................................................................................... 31

    Figure 5.11: EMC2 Parallel Port Setup .................................................................................................. 32

    Figure 5.12: EMC2 X Axis Configuration ................................................................................................ 33

  • 7/31/2019 mmp_alperkoyuncu

    4/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 4

    List of Abbreviation

    The following abbreviations are used inside this documentation, and are consistent in their meaning

    Abbreviation Meaning

    EMC Enhanced Machine ControllerPC Computer (Controller)

    NC Numerical Control

    CNC Computed Numerical Control

    Lim Limit

    Dir Direction

    PLS Pulse

  • 7/31/2019 mmp_alperkoyuncu

    5/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 5

    1. IntroductionThe project objective is:

    a.

    To get the CNC milling machine into a proper operational condition.

    b. To be able to make front Panels containing various shapes using the machine.

    c. To be able to produce some engraved writing on the Front Panels.

    1.1. Initial Challenge and Proposed Solutions

    The initial challenge was to find a way in which the machine can be controlled. As a result, thefollowing results were proposed.

    One better way of automation of machine tools that are operated by programmed commands is

    Numerical Control.

    Three different solutions were proposed in relation to the numeric Control.

    First Proposal: EMC / Linux CNC machining software.

    The idea behind this proposal was to control the machine with EMC (Enhanced Machine Controller)

    software. This kind of control is already in use in most of the milling machines around the world.

    EMC is software that has a graphical user interface to help visualize and understand the operation

    better, an interpreter for "G-code" and a real-time motion planning system with look-ahead.

    Second Proposal: Stepper Motor Controller with G Code Processor.

    MC433 is 4-Axis unipolar Stepper Motor controller with PWM current regulation on each channel. PC

    parallel port interface with on board G Code processor option. The following are the features of the

    Stepper Motor Control.

    4-Axis X, Y, Z and A PC Parallel Port Interface (RS-232).

    On Board G Code Processor.

    Software controlled step mode selection.

    Noise reduction snubber on each input.

    Limit switch detection on each axis - routed to Parallel Port.

  • 7/31/2019 mmp_alperkoyuncu

    6/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 6

    Third Proposal: G code interpretation is done by microcontrollers.

    According to programmed source and G codes, motor drivers are triggered. Microcontrollers are

    programmed for motion control as a G code processor. Limited source of microcontroller

    programming and only basic G code can be interpreted.

    Finally, we opted for the first proposal: EMC / Linux CNC machining software since it was more

    feasible with regards to time, money and can be easily implementation.

    It has many advantages; EMC is free software and provides a graphical user interface and an

    interpreter for G-code. Easy installation and operates on low-level machine electronics such as

    sensors and motor drives.

    1.2. CNC Miller - Team MembersOne of the objectives of the project was to make the students work in a well-coordinated manner in

    a multi-cultural team. The team usually consists of a project organizer or a chairman, a project guide

    and 3 to 4 students. This team consists of Alper Koyuncu from Turkey, Sandeep Rajaprasad from

    India and Mohit.S.Rao from India.

  • 7/31/2019 mmp_alperkoyuncu

    7/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 7

    2. Numerical Control (NC)Numerical control refers to a machine tool which operates in an automatic cycle as per instructions

    transmitted to it in a coded form. Coded instructions are expressed not only through numerals, but

    also through letters, punctuation marks and other symbols. The term 'numerical control' has come to

    be so closely associated with control through symbols that is now universally accepted and applied in

    the latter sense. [1] Nowadays, G-Codes are the most common numerical control programming

    language. They are the codes that position the tool and do the actual work. [2]

    Numerical control machines are used in manufacturing tasks, such as milling, turning, punching and

    drilling. Both NC and CNC (computerized NC) are used to describe this category. [3]

    A standard numerical control can be portioned in the three functional units [4]:

    1. Human Machine Interface (HMI) sometimes known as Man Machine Interface

    (MAN): This unit is responsible for communication between the human operator and

    the NC.

    2. NC-data processing and administration: Here, information is extracted from the input

    NC-data and provided for further processing.

    3.

    Geometrical data processing: The purpose of this unit is to control the motion of the

    machine axis.

    As essential part for generation and execution of axis motion the geometrical data processing can be

    understood more in the following flow chart.

    Figure 2.1: Simplified data flow in geometrical data processing unit

    The target value creation is responsible for the calculation of points along the specified course by

    interpolation according to the chosen figure type (line, circle, spline etc.).

  • 7/31/2019 mmp_alperkoyuncu

    8/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 8

    The target value correction has several tasks:

    Limitation of the acceleration to avoid deviations from the target course.

    Detection of the moment (TB) when slow down should start (see figure 2.2).

    Compensation of the rest of the path at the end of a NC data set after slowing down.

    The speed along the programmed course (feed rate) is constant and provided by the user. The

    maximum acceleration that each axis can handle is known from the machine specific data. Therefore

    it is possible to calculate a speed profile as shown in figure 2 for each NC data-set [5].

    Figure 2.2: Speed progression when using two-step acceleration

    Extensions are needed to avoid falsification of the programmed course when axis speed changes

    drastically. This is done very often by looking in advance to several NC data sets in order to react idsudden changes in axis speed will appear.

  • 7/31/2019 mmp_alperkoyuncu

    9/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 9

    2.1. HardwareThe hardware of the developed CNC Milling Machine is shown on the figure 2.3.

    Figure 2.3: Simplified hardware diagram for one axis

    Controller: The Enhanced Machine Controllersoftware is executed from a computer which is

    running on a Linux operating system Ubuntu Hardy Heron.

    Interface: Communication between controller and drivers, sensors is done by Parallel Port

    Interface.

    Motor: Milling Machine has two different type of stepping motors.

    Both X and Y axes have 2-phase stepping motor.

    From: Oriental Motor CO. LTD.

    Model: VEXTA ASM66AK

    Z axis has 5-phase stepping motor.

    From: Oriental Motor CO. LTD.

    Model: VEXTA PK564AUE

  • 7/31/2019 mmp_alperkoyuncu

    10/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 10

    Driver: System has two type of motor drivers. Alpha step is for 2-phase motors. Nano step is

    for 5-phase motor.

    X and Y axis's drivers:

    From: Oriental Motor CO. LTD.

    Model: VEXTA alpha step ASC Series driver

    Z axis's driver:

    From: Oriental Motor CO. LTD.

    Model: VEXTA Nano step driver

    Sensor: Inductive proximity switches are used as Limit and Reference sensors.

    From: Contrinex AG

    Model: DW-AD-401-04

    2.2. Machine Controller

    The Enhanced Machine Controller software (EMC2) is installed to the PC which is running Linux as its

    operating system. Simply EMC2 is controlling the stepping motor drivers by sending signals

    simultaneously through parallel port. These signals (pulses) make the stepping drivers move thestepping motors (axes).

    Additionally EMC2 software provides:

    a graphical user interface (for machine operator)

    an interpreter for G-Codes (RS-274 machine tool programming language)

    operation of low-level machine electronics such as sensors

    The control can operate through PWM signals without feedback loop closed by the EMC2 software at

    the computer. Therefore an open loop control is done by using stepping motors.

  • 7/31/2019 mmp_alperkoyuncu

    11/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 11

    2.3. Parallel Port Interface

    A Parallel Port Interface was developed after considering the hardware (motor drivers, limit switches

    etc.) and software (EMC2) requirements.

    Functionalities of this interface:

    Emergency Stop circuit

    Limit detection circuit

    Transmission of the data from controller to motor drivers

    Transmission of the data from sensors to controller

    2.3.1. Emergency Stop Circuit

    In the case of an Emergency, where the milling machine has to be stopped immediately, two ways of

    implementing it were proposed.

    Interface is receiving two E-Stop signals; one from EMC2 software and another one from the E-Stop

    button which is in the front panel. In figure 2.4, it can be clearly seen that PC-1 and E-stop signals are

    triggering the desired stop signal.

    Figure 2.4: E-Stop Logic Circuit

    2.3.2. Limit Detection Circuit

    It is always better to prevent a dangerous situation. Therefore limit detection circuit is important for

    the milling machine safety.In this case, we heave 3 motors which have a chance of running beyond

    control. The motor motion had to be blocked from one direction only when it reaches the end limit.

    For example- if the motor is moving towards the left, if it reaches the end limit in the left, it should

    not be able to move any more towards the left direction, at the same time, it should be able to move

    towards the right hand direction too. To realize this idea following logic circuit is implemented to

    parallel port interface.

  • 7/31/2019 mmp_alperkoyuncu

    12/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 12

    Figure 2.5: Limit detection circuit for X axis

    2.3.3. Data Transmission from Controller to Motor Driver

    Parallel port interface is used in synchronization to with I/O to hardware. So generated pulse signals

    are buffered before being transmitted to motor drivers. Also to avoid any undesired situations all

    computer outputs are connected to a pull down resistor. The purpose of these resistors is to force anoutput to go to a defined state.

    Controller (PC) sends two types of signal to each axis. One of these signals is the direction of the

    motion and the other one is the step information of this motion. Controller is accelerating and

    decelerating the motor by changing the frequency of step signals. All these values are defined in the

    configuration file of the EMC2 software. (Please see Chapter 5.3 EMC2 Software Configuration).

    In figure 2.6, limit detection and buffer circuit for X axis can be seen. Here;

    Computer-parallel port pin number 2 (PC2) is configured as X axis step signal.

    Computer-parallel port pin number 3 (PC3) is configured as X axis direction signal.

  • 7/31/2019 mmp_alperkoyuncu

    13/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 13

    Figure 2.6: Limit detection and buffer circuit for X axis

    2.3.4. Data Transmission from Sensor to Controller

    In the system, some of the inductive proximity switches are used as limit and reference switches.

    Limit switches and their purposes are explained in previous chapters. But their reference purpose will

    be explained here.

    Before a milling operation, controller needs to be calibrated. During the calibration EMC2 moves the

    axis and is waiting for an input. This input signal is generated by the reference switch which is

    mounted in the axis. As soon as EMC2 receives an input signal, it stops the motor and calibrates itself

    according to this position.

    All switch connections are designed for Normally Open (NO) switches. For that purpose following

    connection diagram is made.

    Figure 2.7: Reference switch for X axis

  • 7/31/2019 mmp_alperkoyuncu

    14/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 14

    2.4. Motor Driver

    X and Y axis motor drivers:

    Figure 2.8: 2-Phase motor drivers

    Only functionality setup (Function Switch) is adjusted to the following configuration. Other

    configurations remain as Factory Settings. For more information please look at the datasheets.

    Resolution: 1000 x 1 = 1000 Pulses per one rotation of the motor shaft (0.36/step)

    Pulse Input Mode: 1-pulse input mode

    Figure 2.9: 2-Phase motor drivers function switch configuration

  • 7/31/2019 mmp_alperkoyuncu

    15/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 15

    1-pulse input system uses Pulse (PLS) and Rotation Direction (DIR) signals. Forward rotation is

    accomplished when DIR signals are sent in photocoupler ON state, and the backward rotation in the

    vice-versa manner.

    Figure 2.10: 1- Pulse Input Mode

  • 7/31/2019 mmp_alperkoyuncu

    16/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 16

    Z axis motor drivers:

    Figure 2.11: 5-Phase motor drivers

    Motor is adjusted to following values. All other settings remain as its Factory Settings.

    Resolution: 125 = 500000 Pulses per one rotation of the motor shaft (0.0072/step)

    Pulse Input Mode: 1-pulse input mode

    For more information please look at the datasheet.

  • 7/31/2019 mmp_alperkoyuncu

    17/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 17

    3. Switch CabinetSwitch cabinet is the electrical heart of the milling machine. It includes all electrical components and

    connections. Due to the new requirements, all these connections have been renewed accordingly.

    Also an extra 15V power supply is mounted to the rail of the switch cabinet.

    3.1. Power LinePower connections of all components can be seen in figure 3.1.

    Main power is connected serially to fuse, main switch, controller, 24V and 15V power

    supplies. 24V line is connected serial to E-stop, Start and Stop buttons. In this line a self-locking

    mechanism is applied by using a Normally Open contact of a Contactor. This Normally Open

    contact is connected parallel to the start button.

    24V power supply is connected to drivers after a Normally Open contact of the contactor.

    That means as soon as contactor is charged, NO contact will be closed and drivers will get

    power.

    15V power supply is connected to interface after a Normally Open contact of the contactor. It

    is similar procedure as drivers.

    Main line is connected to the spindle controller after a Normally Open contact of the

    contactor. It is the similar procedure as drivers.

  • 7/31/2019 mmp_alperkoyuncu

    18/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 18

    Figure 3.1: Power line circuit

  • 7/31/2019 mmp_alperkoyuncu

    19/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 19

    3.2. WiringBlock diagram gives an overview of the entire system. It consists of computer, PCB, Power supply of

    230V, 24V,15V,Spindale,Spindale controller, drivers and motors for X , Y , Z axis, limit, reference and

    calibration switches.

    Figure 3.2: Entire Block Diagram of the Milling Machine

    The block diagram of the entire CNC milling machine is done on Eagle 5.6.0. Information about all

    cables can be found in the attachment.

  • 7/31/2019 mmp_alperkoyuncu

    20/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 20

    4. Applied TestFollowing tests have been processed in order to connect the Parallel Port to PCB and the PCB to

    machines hardware while ensuring there are no wrong connections and wrong signals.

    Figure 4.1: Simplified connection diagram

    Testing to be done:

    Testing the PC signals with an Oscilloscope.

    Testing the Interface with function generator.

    Testing the Machine functionality with PC and Interface.

    4.1. Testing the PC output signals with an Oscilloscope (HAMEG)

    4.1.1. Parallel Port - Connection Layout

    PC Output pins:

    1- Estop

    2- X Step.

    3- X Direction.

    4- Y Step.

    5- Y Direction.

    6- Z Step.

    7- Z Direction.8- Amplifier Enable.

    14- Spindle ON.

    16- Spindle PWM.

    17- Spindle Brake.

    PC Input pins:

    10 - X-Ref + Limit switch

    11- Y-Ref + Limit switch

    12- Calibration Switch.

  • 7/31/2019 mmp_alperkoyuncu

    21/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 21

    Figure 4.2: Parallel Port Figure 4.3: Parallel Port Pin Layout

    4.1.2. Procedure

    To test the computer signals, we connect the data pins mentioned above with reference to ground.

    A Parallel port pin for testing purposes has to be taken. The pins required for Testing has to

    selected, connected to the oscilloscope.

    The pins to be used can be seen from the above Pin details.

    (For example: if we are testing for X axis the Step signal and Direction signal, from the

    Parallel Port has to be checked. So choose the pins 2 and 3 with reference to any of the ground pins

    (18 to 25)).

    The signals are to be analyzed and adjusted according to the requirements on the

    oscilloscope.

    To generate the signals:

    Select the EMC Step Configuration Application (also see Chapter 5.3 EMC 2 - Software

    Configuration.)

    Name your configuration and use the measurement in millimeters.

    Set the values of each of the variables to the values as shown above.

    Set the pin configuration as shown in the above diagram. After setting the X axis configuration, we have to Test it.

    Repeat similarly for Y and Z axis.

    4.1.3. Problems to be aware of

    i. As specified in the Manual of the drivers, please try to use the step configuration in

    accordance with the required values. There are some possibilities where the above

    values might not match the driver requirements, if not followed meticulously.

  • 7/31/2019 mmp_alperkoyuncu

    22/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 22

    ii. Oscilloscope to be connected to the right pin and to ensure that it is connected to the

    ground properly.

    4.1.4. Result

    Signal Specifications for motor driver:

    Figure 4.4: Driver - Signal Specifications

    Minimum Values (according to manual): Actual Signal (according to PC):

    Channel 1: Channel 1:

    Step size: 5s. Step size: 3ms.

    Signal Amplitude: 3.3v. Signal Amplitude: 3.34v

    Channel 2: Channel 2:

    Signal Amplitude: 3.2v. Signal Amplitude: 3.2v.

    Step time: 5000ns.

    Step Space: 10000ns.

    Direction hold: 1000.

    Direction Setup: 2000ns.

  • 7/31/2019 mmp_alperkoyuncu

    23/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 23

    4.2. Testing the Interface with a Function Generator4.2.1. Test Circuit

    Diagram:

    Figure 4.5: Interface Test Diagram

    Connections:

    a. Each Limit Switch will have 3 cables.

    Brown: + UB.

    Blue: A(signal).

    Black: 0 V.

    b. Each driver connection will have 3 cables:

    Yellow: Step signal.

    Brown: Direction signal.

    White: Ground.

  • 7/31/2019 mmp_alperkoyuncu

    24/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 24

    Pin details of the Interface connectors:

    Figure 4.6: Pin Details of the Interface

    4.2.2. Procedure

    i. The limit switches are to be connected to the PCB connector pins as shown above.

    (Example: In X Lim1 connect the pins 1, 2, 3 of the PCB connector to the Limit switch in the

    following order: Brown, Black and Blue).

    ii. Function Generator is to be connected to the PCB (PC-2 for X Step, PC-3 for X DIR and

    Ground).

    iii. The limit switches are to be checked if they are working by checking the LED s on the PCB.

    iv. If the motor drivers are connected to X Step and X direction, try using the Step input signal

    and the direction from the function generator to move the motor.

    v. Move the motor over the Limit switch using the signals and check if the Motor stops once it

    comes in proximity with the limit switch.

    4.2.3. Problems Encountered

    i. Make sure that logic IC s are not touched or bent by hand while installing.

    ii. Make sure to give the right polarity to the voltage regulator.

    iii. Using a multi meter, ensure to check the connections between the IC s and the buffers

    before connecting them to the power supply.

  • 7/31/2019 mmp_alperkoyuncu

    25/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 25

    4.2.4. Result

    System is working as it should. That means machine stops itself safely on the limits.

    4.3. Testing the Milling Machine4.3.1.Procedure

    i. Connect the PC to the PCB.

    ii. Connect the Limit switches and to the PCB.

    iii. Run the EMC2 Software and configure it. (Please see chapter 5.3 EMC 2 - Software

    Configuration.)

    4.3.2. Result

    Milling machine works properly. Specified configurations and connections will be used in the

    new system. New system is designed for 1 Pulse Input Mode. Therefore it's important to

    configure the driver before making this test.

    Caution: Before changing the status between 1 Pulse Input Mode and 2 Pulse Input Mode,

    turn off the power of the driver. For detailed information please look at the Driver's

    Datasheet.

  • 7/31/2019 mmp_alperkoyuncu

    26/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 26

    5. SoftwareIn order to draw a shape we desire, we should be making use of the 3 main software described

    below. The ways of operating of the software is described separately in each of the sub titles.

    5.1Q-CAD

    5.2DXF to G-Code Conversion

    5.3EMC2 - Software Configuration

    5.1. Q-CADThe machine in the laboratory has Q-Cad installed in it, to design our shapes. Alternatively we could

    use AutoCAD or any other software that gives the output file in the form of (*.dxf).

    Q-Cad is a Computer aided software package for design and drafting of various shapes and

    dimensions.

    I. When the Q-CAD has been opened, the screen appears like this.

    Figure 5.1: Q-Cad User Interface

    II. On the Left hand side of the screen, the tools are located. The desired tools can be used for

    the desired shapes.

  • 7/31/2019 mmp_alperkoyuncu

    27/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 27

    As an example, we could choose to draw a circle. For this purpose, the circle tool has to be

    chosen. The circle tool is located along with all the other tools, on the left hand part of the

    screen.

    Figure 5.2: Q-Cad Tool Box

    III. Draw the shapes within the limits of the Choose a circle design and click on the work space

    (Black screen). Below shown is an example

    Figure 5.3: Q-Cad Drawing a Circle

  • 7/31/2019 mmp_alperkoyuncu

    28/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 28

    IV. Save it as a .dxf file.

    Figure 5.4: Q-Cad saving a .dxf file

    5.2. DXF to G-Code ConversionTo run a drawing on EMC-2, we need the drawing to be in G-Code format. EMC-2 can understand

    only the G-Code format.

    First open the Dxf to G-code Converter software, and import the file.

    Figure 5.5: Dxf to G-Code Converter

  • 7/31/2019 mmp_alperkoyuncu

    29/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 29

    I. Make sure the parameters in the left hand side of the screen are in accordance with the

    requirement. Based on our tool size and tolerance level, we can adjust these parameters.

    (For example- if we need the Z-axis depth to be deeper, we could specify it here.)

    II. This file has to be saved in the form of G-codes (extension- .ngc).

    Figure 5.6: Dxf to G-Code Saving G-Codes

    5.3. EMC 2 Software ConfigurationIn addition to be able to transfer our drawings to the machine as input signals, the EMC 2 is the

    software that helps us configure the hardware components to the software. The software also helps

    us visualize the output of the machine in real-time simulation. The software is available open source.

    In order to run a pre-defined drawing on the EMC-2 software for the first time, the hard ware

    components have to be configured first.

    The documentation below explains: How to configure the hardware components that are there on

    the machine to the software.

    How to configure the hardware components that are there on the machine to the software:

    The EMC2 Stepper Mill configuration contains a series of steps that enables us to configure our

    hardware components based on our requirements.

    i. On installing the EMC 2 software, on the menu in the top part of the screen, EMC has to be

    selected and the option EMC2 Stepper Mill configuration has to be selected.

  • 7/31/2019 mmp_alperkoyuncu

    30/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 30

    Figure 5.7: EMC2 Configuration Wizard

    ii. If we are creating a new configuration file, we click on the same- Create a new configuration

    file, else we click on the option- Modify a configuration already saved.

    Figure 5.8: EMC2 Creating new configuration file

    iii. If creating a new configuration, this step can be ignored. If modifying a previously saved

    configuration on the EMC computer, select the test.step configuration file.

  • 7/31/2019 mmp_alperkoyuncu

    31/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 31

    Figure 5.9: EMC2 Modifying an old configuration file

    iv. On the next screen, the various parameters have to be adjusted to the shown values.

    The machine name can be given to a suitable name, and the measurement units can be

    chosen to a suitable unit. (Note: Please make sure to use the same values as shown below.)

    Figure 5.10: EMC2 Basic Machine Information

  • 7/31/2019 mmp_alperkoyuncu

    32/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 32

    v. This is the screen where we select the output and input signals to be given to the machine

    through the parallel port. The values of the various pins of the Parallel Port have to be

    selected from the drop down menu options. In this case, according to our PCB design, we

    invert the signals like E-Stop out, Z-Direction Home X and home Y. We also use the pins 10

    and 11 as input signals that we get from our limit switches. They have been configured as

    both reference and Limit switches for both X and Y directions.

    Figure 5.11: EMC2 Parallel Port Setup

    vi. We can select and configure each of the axes separately. We have to be sure to specify the

    proper values in the columns Home Location and Table Travel. We can continue doing

    the same for the Y and Z axes too.

  • 7/31/2019 mmp_alperkoyuncu

    33/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 33

    Figure 5.12: EMC2 X Axis Configuration

    vii. We could always select the button Test this axis to make sure our configuration works in

    the exact manner as expected.

  • 7/31/2019 mmp_alperkoyuncu

    34/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 34

    6. ConclusionNow that we have a working machine and is configured in accordance to our requirements and

    availability, the authors wish to talk about the scope for further development in this machine.

    Front Panel and its tools:

    There is a front panel installed for the purpose of easy operation and supplementary control

    options.

    The front panel contains switches for connections to vacuum table control, air blower, tool

    changer and Z axis UP/Down (manual control).

    A new Vacuum table has to be installed, so that the dust from the work piece can be

    collected and disposed in a safe manner.

    Spindle control with a feedback loop system:

    As of now, the machine will be able to run even without realizing that the Spindle has not

    been turned on. The reason being that, there is no feedback loop and the control of the

    Spindle is to be done manually.

    The scope for development would be, to have a feedback control loop that controls the

    speed and torque of the spindle based on the material and its thickness.

    Furthermore, a wireless desktop monitoring and control system could be designed andinstalled where; the machine can be controlled from anywhere away from the machine in

    the room wirelessly.

    However, during the course of this project, all the three members of our project have gained

    immense amount of experiences and knowledge and are thankful to the Professor Mayr and the

    project guide Mr. Kipfelsbergerfor providing such opportunity and such a platform to work on.

  • 7/31/2019 mmp_alperkoyuncu

    35/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Alper Koyuncu, Mohit S. Rao, Sandeep Rajaprasad 35

    Bibliography

    [1] N.K. Mehta, "Machine Tool Design and Numerical Control", Tata McGraw-Hill, 2006

    [2] Wikipedia Editor (2010, May) Wikipedia - G-code. [Online].

    Http://en.wikipedia.org/wiki/G-code

    [3] Wikipedia Editor (2010, May) Numerical Control. [Online].

    Http://en.wikipedia.org/wiki/Numerical_control

    [4] B. Walker: "Configurable function block geometry processing for numerical control",

    Dissertation Universitt Stuttgart, 1987

    [5] D. Binder: "Interpolation in numerical control systems", Dissertation Universitt Stuttgart,

    1979

  • 7/31/2019 mmp_alperkoyuncu

    36/36

    Numerical Control for Milling Machine EEIT, Hochschule Rosenheim

    Attachment

    [1] Parallel Port Interface for Motor Driver

    [2] Parallel Port Interface for Spindle Control

    [3] Wiring Diagram

    [4] Front Panel - Drawing