6
Prototype for the Mechanical Engraver of Aluminum Plates Assisted by Computer Apolonio Ata Pérez , Francisco Javier Amaro Sánchez Fac.de Cs. de la Computación, Fac. de Cs de la Electrónica Benemérita Universidad Autónoma de Puebla Puebla, Pue. Mex. Tel. (222) 2 2955 00 Ext 7216 e-mail [email protected] Abstract A coordinates table was constructed, it has three coupled motors to generate XYZ movements, each motor has its buffer or driver that receives two control signals, one of pulse and another of direction. It also has three limiting sensors, to determine the racing endpoints of the axis. (Fig. 2.1). The development of a prototype for a mechanical etcher of aluminium plates is presented. These systems are used in different industries to engrave, in pieces of diverse materials, serial numbers, letters, codes or other symbols. The prototype consists of a xyz coordinates table, controlled by a computer, its movements are generated with stepped motors, on the z axis a high velocity driller is mounted, it uses to engrave a little milling device. 2.1. Coordinates table. The desired drawing to be etched, is first edited using a program with a graphics editor and capable of generating output files with HPGL format, HPGL ( Hewlett Packard Graphics Language), the control program takes the file, interprets the commands and converts tem in control pulses for the motors that moves the milling of the engraver device, the one that moves and reproduces the edited drawing. It allows the movement of the working piece along X Y axis, it uses an artefact that transforms the circular motor movements into linear movements [2]. The table has an area of 25 cm. by 40 cm. and is made of aluminium; the screw is made of steel with a step of 20 fine wires by inch or a separation of 1.27mm between each fine wire. At the end of this project, a system capable of engraving drawings in aluminium plates of area 21 x 28 cm 2 was obtained, actually this prototype is used to etch commemorative plaques. The characteristics of the table are shown in the table 2.1 TABLE XYZ MOTOR SHAFT Y STEP DIRECTION MOTOR DRIVER Y BASE MOTOR Z MOTOR SHAFTZ ROUTER SENSOR LIMIT Y SENSOR LIMIT X SENSOR LIMIT Z STEP DIRECTION STEP DIRECTION MOTOR DRIVER X MOTOR DRIVER Z MOTOR SHAFT Y Keywords: HPGL files, mechanical etcher, xyz coordinates table. 1. Introduction A real problem, engraving commemorative plaques was the motivation of this work, traditionally this job has been done by photolithographic methods, with chemical products and its inherent pollution, that is why a mechanical etching process was chosen. A XYZ coordinates table controlled by a computer was designed and constructed, its programs were developed based on Bresenham algorithms. Algorithms that draws circles and lines in a discrete environment. This work, besides solving a real problem for what it was constructed, permits also to know and handle the basic concepts of a CAD-CAM [1] system. 2. Mechanical system Proceedings of the 14th International Conference on Electronics, Communications and Computers (CONIELECOMP’04) 0-7695-2074-X/04 $ 20.00 © 2004 IEEE

[IEEE 14th International Conference on Electronics, Communications and Computers, 2004. CONIELECOMP 2004. - Veracruz, Mexico (2004.02.18-2004.02.18)] 14th International Conference

  • Upload
    fja

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Page 1: [IEEE 14th International Conference on Electronics, Communications and Computers, 2004. CONIELECOMP 2004. - Veracruz, Mexico (2004.02.18-2004.02.18)] 14th International Conference

Prototype for the Mechanical Engraver of Aluminum Plates Assisted by

Computer

Apolonio Ata Pérez, Francisco Javier Amaro Sánchez Fac.de Cs. de la Computación, Fac. de Cs de la Electrónica

Benemérita Universidad Autónoma de Puebla Puebla, Pue. Mex.

Tel. (222) 2 2955 00 Ext 7216 e-mail [email protected]

Abstract A coordinates table was constructed, it has threecoupled motors to generate XYZ movements, each motorhas its buffer or driver that receives two control signals, one of pulse and another of direction. It also has threelimiting sensors, to determine the racing endpoints of theaxis. (Fig. 2.1).

The development of a prototype for a mechanical etcher of aluminium plates is presented. These systems are usedin different industries to engrave, in pieces of diverse materials, serial numbers, letters, codes or other symbols.The prototype consists of a xyz coordinates table,controlled by a computer, its movements are generatedwith stepped motors, on the z axis a high velocity drilleris mounted, it uses to engrave a little milling device.

2.1. Coordinates table.

The desired drawing to be etched, is first edited using aprogram with a graphics editor and capable of generating output files with HPGL format, HPGL (Hewlett Packard Graphics Language), the controlprogram takes the file, interprets the commands andconverts tem in control pulses for the motors that movesthe milling of the engraver device, the one that moves andreproduces the edited drawing.

It allows the movement of the working piece along X Y axis, it uses an artefact that transforms the circular motor movements into linear movements [2].

The table has an area of 25 cm. by 40 cm. and ismade of aluminium; the screw is made of steel with a stepof 20 fine wires by inch or a separation of 1.27mmbetween each fine wire.

At the end of this project, a system capable of engraving drawings in aluminium plates of area 21 x 28 cm2 was obtained, actually this prototype is used to etchcommemorative plaques.

The characteristics of the table are shown in the table 2.1

TABLE

XYZ

MOTOR

SHAFT

Y

STEP

DIRECTION

MOTOR

DRIVER

Y

BASE

MOTOR

Z

MOTOR

SHAFT Z

ROUTER

SENSOR LIMIT Y

SENSOR LIMIT X

SENSOR LIMIT Z

STEP

DIRECTION

STEP

DIRECTION

MOTOR

DRIVER

X

MOTOR

DRIVER

Z

MOTOR

SHAFT

Y

Keywords:

HPGL files, mechanical etcher, xyz coordinates table.

1. Introduction A real problem, engraving commemorative plaques was

the motivation of this work, traditionally this job has beendone by photolithographic methods, with chemicalproducts and its inherent pollution, that is why a mechanical etching process was chosen.A XYZ coordinates table controlled by a computer wasdesigned and constructed, its programs were developedbased on Bresenham algorithms. Algorithms that draws circles and lines in a discrete environment.This work, besides solving a real problem for what it was constructed, permits also to know and handle the basicconcepts of a CAD-CAM [1] system.

2. Mechanical system

Proceedings of the 14th International Conference on Electronics, Communications and Computers (CONIELECOMP’04) 0-7695-2074-X/04 $ 20.00 © 2004 IEEE

Page 2: [IEEE 14th International Conference on Electronics, Communications and Computers, 2004. CONIELECOMP 2004. - Veracruz, Mexico (2004.02.18-2004.02.18)] 14th International Conference

2.2. Step motor

The step motor is an electro mechanic device which turns input digital pulses, into angular movement, it isused to rotate an axle with exact increases , when theinput sequence is appropriate, it can reproduce exactmovements. The step motors have the characteristic of staying in a position, their rotors have not much inertiaand it does not generate accumulative position errors [1].

The motor used in the coordinate table for themovements x, y, z, are made by Microkinetics and theircharacteristics are given in table 2.2.

The step motor joint to a screw allow totransform a digital input code into linear shifting . The minimum shifting of the table in the axes x-y , when a screw is used with an advance of 20 fine wires per inchis : (25.41/(200*20)) =0.00635 mm. The minimumshifting of the drill in the axle z ,when a 12 fine wires perinch screw is used, it represents 25.4/(200*12)=0.01058mm

Characteristics of the coordinate table

Total shifting in X 200 mm.

Total shifting in Y 300 mm

Total shifting in Z 50 mm.

Step per turn in the screw X 1.27 mm

Step per turn in the screw Y 1.27 mm

Step per turn in the screw Z 2.116 mm

Fine wires per inch of the screw X 20

Fine wires per inch of the screw Y 20

Z Motor

Model 23M89

Torque (83oz/in) 0.581Nm

Current per fase 1.2 Amp

Voltage 6.0 volts

Pulses per turning 200

X,Y Motor

Model 23M110

Torque (112oz/in) 0.784Nm

Current per fase 4.2 Amp

Voltage 4.7 volts

Pulses per turning 200

2.3. Motor drives

The motor controller is the power electronic circuit, which controls the operation of the power electroniccircuit of the engines. They transform a digital input signof low input potency (5v, 20ma ), into a digital sign withthe necessary potency to energize the coil of the engines (4.2v , 4.7A per coil).

To operate the motor, controllers Microkinetics were used , two DM4050 5 amps each for engines X, Y and a

DR3535 3.5 amps for engine Z these controllers operatewith two signals: one for direction and one for pulse.

2.4. Communication with the PC.

To send control pulses to the controllers and thereception of the status of the elastic limiting interrupters, the PC parallel port was used [ 3], which is physically a connector with 25 terminals, where ten of them are used..

The control program generates and sends thenecessary digital pulses to the engine controllers togenerate the movement of the engines., communication isdone by the PC parallel port [4].

The signals in the parallel port and their purpose inthe controller are:Parallel Controller Connector

Terminal/ bit Signal

2 b0 Pulse motor X3 b1 Direction motor X 4 b2 Pulse motor Y5 b3 Direction motor Y6 b4 Pulse motor Z7 b5 Direction motor Z8 b6 Not used 9 b7 Not used 15 b3 Limit in X (ent)13 b4 Limit in Y (ent)12 b5 Limit in Z (ent)

To generate a movement in the engine is necessaryto send a pulse to its controller and to indicate therotation direction, with b0 bits to b6 bits the control byteis created and called: MOTXYZ = b7 b6 b5 b4 b3 b2

b1 b0, where:b7 is Not Used, b6 is Not Used,b5 is Dir motor Z b4 is Pulse motor Z b3 is Dir motor y b2 is Pulse motor y

.

Proceedings of the 14th International Conference on Electronics, Communications and Computers (CONIELECOMP’04) 0-7695-2074-X/04 $ 20.00 © 2004 IEEE

Page 3: [IEEE 14th International Conference on Electronics, Communications and Computers, 2004. CONIELECOMP 2004. - Veracruz, Mexico (2004.02.18-2004.02.18)] 14th International Conference

b1 is Dir motor X The basic idea about this algorithm is supported in theregister at each point, the error between the real and the ideal position .

b0 is Pulse motor X

When programming ,the control word is sent to theparallel port through the instruction in “C” code languageout port ( MOTXYZ, 0x378 );, where 378H is thedirection of the selected parallel port [5].

The error between the real and ideal position is because of mechanical limitations. Since the x-y coordinate tablehas not an infinity resolution, then, the current position ateach point of the line must be the closest approximationThe PC receives the limiting status of the XYZ table,

through the parallel port. To know the interrupter limitingstatus the port must be read by instruction limiting_xyz =

in port ( 0x379 ), where 379H is the direction of theselected port and “limiting_xyz” is the control word thatis read and it is translated into the following:

In each cycle turning made to draw, both variables called error-x and error-y increase with the changes in the coordinate magnitude of X Y respectively.

When the error gets the predetermined limit, a constant must be subtracted to the error and must be increased the counter of the coordinate. This process continues until the line is totally designed .

b0,b1,b2 Not used b3 Limit in X 2b4 Limit in Y Fig. 3.1 shows the estimated points with this algorithm

for a straight line beginning inb5 Limit in Zb6,b7 Not Used (1,2) and ending in (10,6).

So that , if it is desired to know if the limit has reached axle X, it must determinate the bit3 value .

0

1

2

3

4

5

6

0 2 4 6 8 10

3. Line drawingsThe x-y coordinates table moves by increase in x and

y, that step engines produce because they are connected to the axles. If these movements are used to design complicated figures, it is necessary to expound the way of moving the table to get simple figures at first, that is whylines and circles must be design at first in base to thediscreet movements in X and Y.

Starting from these algorithms, commandprogramming was possible by HPGL language.

The programming function to design lines startingfrom knowing the beginning and the end of the line, is afundamental routine in any discreet system X-Y. Eventhough it is really easy to design horizontal and verticallines, it is more difficult to create a function whichdesigns diagonal lines. For example, to design a line fromposition (0,0) to (80,120), it is necessary to determinatethe points of the straight line between these twocoordinates.

4. HPGL Commands

HPGL commands are a standard group with selectedinstructions which form a graphics language, and it iscurrently the most used system by grapher makers. Thislanguage was created by Hewlett-Packard. [8 ]

The first thing to do to design a function whichdraws lines is use the relation between the dimensionchange in X Y.

As it was mentioned the system works out with graphicfiles compound with HPGL commands. It was necessary to know the syntax of these commands, to make theprogramming in their decoders and generate the discreetmovements in directions X –Y which allows thereproduction of drawing on the X-Y table.

For example, if it is considered a straight line which starts from (0,0) to(5,10); the change in X is 5 and in Y is10. The connection in this case is ½, and it is used todeterminate the change in coordinates X Y along theline. Coordinate X increases in half times than coordinateY. Even though this method is mathematically easy tounderstand, by the moment of working, round off troublesituations are presented. That is why a better method todraw lines or circles is to use the algorithm of Bresenham.[6]

The instruction group of language HPGL is formedby approximately 60 different drawing commands. The commands consist in mnemonics with two capital orsmall letters followed by parameters and a symbol of ending. The parameters have to be separated by a comma,a space or a + or a -sign . A command ends with semicolon, by the line feed code, or by the followingmnemonic.

Although it is conceptually based in relationsbetween distances X and Y, it is not required anydivision or calculus in floating point. Instead , therelation between the value change in X Y is handledthrough series of addition and subtraction.

The syntax of the command is presented as follows:Command syntax

XX(sepop)parameter1(sep)parameter2 (sepop) end

Proceedings of the 14th International Conference on Electronics, Communications and Computers (CONIELECOMP’04) 0-7695-2074-X/04 $ 20.00 © 2004 IEEE

Page 4: [IEEE 14th International Conference on Electronics, Communications and Computers, 2004. CONIELECOMP 2004. - Veracruz, Mexico (2004.02.18-2004.02.18)] 14th International Conference

where :XX Is the mnemonic of the command. (sepop) It is an optional separator, which can

be a comma or a space (sep) It is a separator, which can be a

comma or a space Parameters They are the command parameters End It is usually a period or a comma

Example:

PA1000 1000; (sep = space) PA1000.5,-100.5; (sep = comma) PA 32767,-32768 (LF); (sep = LF: line feed)

To end a file or group of HPGL commands, the ending character label is used. This character for omission is the code ETX (text ending ASCII, equivalent to decimal 3, control C or CHR$(3)).

Although HPGL language consists of approximately 60 commands, in practice graphic editors which use a small subgroup of commands, using the basic commands to generate the functions of the complex commands. That is why decoding and execution of commands : AA, AR, CI, EW, RR, PU, PU, PD, EA, ER, RA, PA, OA was programmed

5. Control program

Main functions of the program are: to receive as input an file of HPGL commands, to interpret HPGL commands, to verify the syntax, to execute commands; to operate manually the table , to generate a pre-drawing on the screen, and to send control pulses to the step engines and in this way engrave the drawing. Every action was programmed in modules such as : Simulator or Preview :

It allows to visualize the movements on X-Y table in a real or simulated form, When simulating the movement of the tool it shows a drawing preview and allows to verify its shape and size before it is imprinted. Engraving module :

It carries out a drawing engraving or labelling in an automatic or manual form Manual Movement:

The drill movements are controlled in a manual form through the keyboard Movement step by step :

It engraves a drawing and executes a command at a time. Constant Movement:

It engraves a drawing in a constant way.

HPGL commands Execution.

The commands execution is made by the following sub- modules a.-Gets a key .

It reads a key from the keyboard b.-Reads a Chain

It reads a command chain c.- It is character, number or letter

It determines the type of read character. d- It is a command

It determines if the character chain is a command e.- Analysis syntax routine

It determines if there are any syntax errors f.-Identifies

HPGL Commands

It determines the HPGL command. g.-Executes a command

It executes ideal sub-routineh.-Executes a chain

It executes a command chain. i.-Step motor work

It sends control pulses to the step motor, according with HPGL command to be executed.

A pseudocode module to work with an HPGL archive is described as follows :

Step 1,Start banner: Delay =0, design on screen without generate

delays Step by step =0 banner that indicates to execute instruction byinstruction

Step 2, Presents the selection menu: 1 Mov. Step by step. 2 Constant Mov. 3 Preview . 4 Exit

step 3, if it is selected : 1 Establish delay banners =1 and step by step

=1, go to step 4 2 Establish delay banners =1 and

Step by step =0, go to step 4 3 Establish delay banners =0 and

Step by step =0, go to step 4 4 goes to step 12

Step 4,It is required and opens the archive Step 5, Start position p(0,0,0) Step 6, Get an archive character

Step 7, If character is “end of archive “ Goes to step 12, if not it continues

Step 8, Is the character equal to “;” or “LF” ? No, it creates an HPGL command and it is

saved in “linecom”, And goes to step 6.

Yes , command ends Step 9, Execute the store command in

“linecom” Step 10, If step by step is 1 then wait for a key to be pushed, if it is not then continue Step 11, go to step 6 Step 12, close archive

Step 13, go to position (0,0) with drill up. Step 14, Fin

Proceedings of the 14th International Conference on Electronics, Communications and Computers (CONIELECOMP’04) 0-7695-2074-X/04 $ 20.00 © 2004 IEEE

Page 5: [IEEE 14th International Conference on Electronics, Communications and Computers, 2004. CONIELECOMP 2004. - Veracruz, Mexico (2004.02.18-2004.02.18)] 14th International Conference

The result of the proof is shown in figure 6.3, theengraving has the same dimensions as the originaldrawing, finished is satisfactory and it depends on thecutter tool status. Engraving time was approximately 3 hours, this time is mainly because of the type tool used, which does not accept higher speed and optimummovement

6. Proofs6.1 Simulator (Preview)

The simulator allows to review drawing dimensionsand aspects before send it to engrave. To prove thesimulator 3 graphic editors were used: Autocad, HarvardGraphics, and Corel Draw. The figure 6.1a shows a drawing made in Autocad which is saved as HPGL command archive. (file .plt). The figure 6.1b shows theproof of the simulation module (preview) which uses thegenerated archive by Autocad, the drawing is similar indimension and aspect to the previous drawing. .

7. Conclusions

The system works in a very good way and using thecorrect tool, it can engrave on plates of different types ofmaterials.

An advantage of having made and programmed thesystem is, that it can be modified easily and it can beadapted to realize another type of tasks, for example, withsome adjustments, it can be used as an automatic drill orfor mechanical engrave of printed circuits.

In the following proof an image was digitalized and vectored with the support of the CorelTRACE tool, afterthat the file was saved in format PLT, the result of thesimulation is shown in figure 6.2, the drawing is similar tothe digital image in aspect and dimensions. In simulation,movements of the tool appear when it cuts (in white)andwhen it does not (in green)

6.2 Engrave

For engraving proof an 18 thickness aluminium platewas used and a 1mm spherical cutter tool.

Proceedings of the 14th International Conference on Electronics, Communications and Computers (CONIELECOMP’04) 0-7695-2074-X/04 $ 20.00 © 2004 IEEE

Page 6: [IEEE 14th International Conference on Electronics, Communications and Computers, 2004. CONIELECOMP 2004. - Veracruz, Mexico (2004.02.18-2004.02.18)] 14th International Conference

A disadvantage of the system is that it does not have optimum movements and it takes more time than necessary.

When working with a system of chemical engrave, it is required to use a negative, corrosive chemical products, a special place to work and store them, work with caducity dates, temperatures and precise process times. The main disadvantage is: high pollution that they produce, mechanical engrave generates low pollution and it does not have the problems that chemical engrave has. Economically, mechanical engrave is better for jobs from 1 to 20 pieces. About engraving time it depends on engrave depth, it can take 20 minutes for a superficial engraving to 3 hours for 1 mm. depth. The time for a superficial photo engrave having ready the negative is from 20 to 30 minutes approximately.

In the future it is sought to program modules to improve tool’s movements, searching to reduce engraving time, and calculating tool’s movements in linear meters to predict erosion.

8. References

[1] P.John Mckerrow, Introductión to Robotics, Addison-Wesley

[2] Arthur Gerdman , Diseño de Mecanismos Pearson 3ª edición

[3] Lewis C. Eggebrecht Interfacing To TheIBM PC(Howard W Sams and Co. Inc.)

[4] Douglas V. Hall Microprocessor and Interfacing, programing and Hardware, Mc Graw Hill

[5] Deitel y Deitel, Como Programar en C++, Prentice Hall, 1999

[6] Herbert Schildt, Lenguaje c, programación avanzada( Mc graw hill. 1988)

[7] Ben Ezzell, Programación de Gráficos en Turbo C++,Addison Wesley 1990

[8].- HP 7475A Graphics Plotter Interfacing and programing manual of Hewlett Packard

Proceedings of the 14th International Conference on Electronics, Communications and Computers (CONIELECOMP’04) 0-7695-2074-X/04 $ 20.00 © 2004 IEEE