Printed Circuit Board Drilling Machine Using Recyclables - MDPI

0 downloads 0 Views 5MB Size Report
Oct 6, 2018 - processes of manual production, and much more robust than flexible ... One of the applications of CNC technology is in the field of drilling and the manufacture of ..... projects. These characteristics are similar to those incorporated in some ... unit for CNC machine tool using Arduino based embedded system.
electronics Article

Printed Circuit Board Drilling Machine Using Recyclables Carlos Robles-Algarín 1,2, * , William Echavez 1 and Aura Polo 1 1 2

*

Facultad de Ingeniería, Universidad del Magdalena, Santa Marta 470004, Colombia; [email protected] (W.E.); [email protected] (A.P.) Facultad de Ingeniería, Universidad Cooperativa de Colombia, Santa Marta 470003, Colombia Correspondence: [email protected]; Tel.: +57-5-4217940

Received: 14 September 2018; Accepted: 26 September 2018; Published: 6 October 2018

 

Abstract: The implementation of a printed circuit board (PCB) drilling machine using recyclable materials and computer-aided control is presented. A mechanical system using a DC motor for movement on the X and Y axes, and a transmission mechanism by belts, pulleys, and a worm screw was made. For the Z axis, a mechanism based on a worm screw, nuts, and a stepper motor was implemented. The main board has two microcontrollers communicating in a master-slave configuration via a serial protocol. A real-time operating system (OSA) was implemented to optimize the data flow to the computer using the USB protocol, for communication with the slave microcontroller, positioning the Cartesian axes, and control the motors. The slave is responsible for monitoring the status of the encoders and limit switches, as well as the information delivery to the master. A Matlab-based user interface was developed to determine the coordinates of the holes to be drilled by processing a jpg image. This also allows the user to control the DC motors using PWM signals via configurable parameters of PID controllers. The end result is a drilling machine which able to operate both manually and via a computer, for drilling PCBs of a maximum size of 24 × 40 cm. Keywords: drilling machine; microcontroller; cooperative multitasking real time operating system (OSA-RTOS); printed circuit board

1. Introduction Robotics is one of the areas of electronics that has a great influence on many of the processes with which people interact. The main purpose of this area is to build and apply intelligent systems for the execution of specific tasks, and for interaction with the real world [1]. In the field of industrial automation, robotics play a fundamental role due to technological advances that improve the efficiency of manufacturing processes. In terms of flexibility, the classification of industrial processes depends on the degree of automation and sophistication of the control systems, being less flexible than the processes of manual production, and much more robust than flexible manufacturing systems [2]. These systems are composed of machines and subsystems linked by a common transport mechanism and controller that provides the ability to perform various tasks without changing the system equipment [3]. One of the present levels in this type of system is Computer Numerical Control (CNC) technology [4]. This type of technology operation is based on the analysis of a Gerber file, which contains coordinates and instructions executed by a machine [5]. The main advantages of the implementation of CNC systems are their accuracy, reliability, and the reduction of human error. Among the disadvantages are the acquisition and maintenance costs [6–8]. Numerical control is used to automate machines and tools through the G-code programming language. This type of code allows the programmer to give orders to the controllers of each of the axes that make up a machine.

Electronics 2018, 7, 240; doi:10.3390/electronics7100240

www.mdpi.com/journal/electronics

Electronics 2018, 7, 240

2 of 13

One of the applications of CNC technology is in the field of drilling and the manufacture of printed circuit boards (PCBs) [9], which has been studied by numerous professionals in electronics, industry, and educational centers [10]. Specifically, research has focused on developing prototypes of reliable drills with a good cost-benefit ratio. In general, these machines have a control unit and a three-axis system (X, Y, Z) that are moved by servomotors or stepper motors. The X and Y axes are used to adjust the direction of movement of the machine, while the Z axis is responsible for controlling the movement of the drill. A PCB is a board designed to provide electrical connections between electronic components. The connections are made with thin copper traces located on the surface of the board, or in layers of copper that are interspersed with layers of insulating material. There are three types of printed circuit boards: (1) single layer, in which the copper layer is on only one side of the board; (2) two layers, in which there are two layers of copper on both sides of the board, and (3) multilayers, which consist of alternating layers of copper and insulating material. In general, multilayer boards are used to assemble complex circuits in which a large number of electronic components must be interconnected through many copper traces [11]. PCBs require a set of holes that are coated with copper, which are used as conductive paths for the electronic components. These holes can be made with chemicals or by using a drill. With the latter, cleaner and better quality holes are obtained. For this process, spiral bits are used whose diameters depend on the size of the hole to be made. A standard size is 1.27 mm, although some boards use diameters of 0.15 mm or less [11]. It is important to highlight that the use of CNC technology has allowed the industry to automate the PCB drilling process, thereby avoiding the problems that arise when this task is done manually. Drilling printed circuit boards manually can be a complicated task that needs high precision, especially when there are numerous components and the distance between holes is small. In the literature there is various research related to the implementation of CNC machines and low-cost using embedded systems [12–15]. In [16], the authors implemented a control system for micro-drilling PCBs. In addition, research has focused on designing prototypes for manufacturing PCBs using optimization methods for the drilling process [17–20]. The authors in [21] propose a methodology to optimize the manufacturing of parts with many drilled holes. This work is based on the construction of a prototype PCB drilling machine which applies some concepts and features of CNC technology. The prototype has a real-time operating system and a mechanical system allowing accurate movement using Cartesian coordinates. It also incorporates a computer program with an image-processing algorithm which is performed in Matlab. The main novelty of this paper is the use of recyclable materials to implement a fully functional, low-cost prototype. 2. Materials and Methods Figure 1 shows the block diagram of the system, which is composed of the graphical user interface, the control, monitoring and power stages, the motors, and the mechanical system that was implemented in each of the 3 axes of the prototype.

Electronics 2018, 7, 240

3 of 13

Electronics 2018, 7, x FOR PEER REVIEW Electronics 2018, 7, x FOR PEER REVIEW

Graphic User Graphic User Interface Interface

3 of 13 3 of 13

Control Stage Control Stage PIC18F4550 PIC18F4550

Monitoring Stage Monitoring Stage PIC18F2550 PIC18F2550

Power Stage Power Stage

Motors Motors

Mechanical System Mechanical for X, Y andSystem Z Axes for X, Y and Z Axes

System Hardware System Hardware

Figure 1. 1. Block Block diagram diagram of of the the system. system. Figure Figure 1. Block diagram of the system.

2.1. Mechanical System 2.1. Mechanical System 2.1. Mechanical System For the design of the mechanical system, a metal platform extracted from a damaged copier was For the design of the mechanical system, a metal platform extracted from a damaged copier was the platform design ofwas the mechanical system, a metal platform extracted from a damaged copierfrom was used.For This adjusted with industrial aluminum profiles and materials removed used. This platform was adjusted with industrial aluminum profiles and materials removed from used. This adjusted with industrial aluminum profiles andfrom materials removed from printers andplatform recycledwas aluminum furniture. In order to avoid wear resulting transverse movement, printers and recycled aluminum furniture. In order to avoid wear resulting from transverse printers and recycled aluminum In of order toguides avoidwas wear resulting from transverse the mechanical system with movingfurniture. parts on a set linear designed. Next, is presented in movement, the mechanical system with moving parts on a set of linear guides was designed. Next, is movement, the mechanical moving parts on a set of linear guides was designed. Next, is detail the design process forsystem the X, with Y, Z axes. presented in detail the design process for the X, Y, Z axes. presented in detail the design process for the X, Y, Z axes. 2.1.1. Belt Drive System 2.1.1. Belt Drive System 2.1.1. Belt Drive System This element is composed of two pulleys coupled by means of a belt designed to transmit forces This element is composed of parallel two pulleys coupled by within means of a belt designed to transmit forces and This angular velocities between shafts that are distance. The forces are element is composed of two pulleys coupled by means ofa acertain belt designed to transmit forces and angular velocities between parallel shafts that are within a certain distance. The forces are transmitted the effect of friction exerted by that the belt the pulley. To distance. reduce the speed andare to and angular by velocities between parallel shafts are on within a certain The forces transmitted by the effect of friction exerted by the belt on the pulley. To reduce theEquation speed and to multiply theby force, fundamental of the speed belt (1).to transmitted the the effect of friction equation exerted by belt ontransmissions the pulley. Toapplies. reduceSee the speed and multiply the force, the fundamental equation of speed belt transmissions applies. See Equation (1). multiply the force, the fundamental equation of speed belt transmissions applies. See Equation (1). φ1ϕn1n==φϕ (1) 2 n2n (1) (1) ϕ11n11 = ϕ22n22 where Φ Φ1 is the diameter of the driving driving pulley, pulley, nn11 is is the the rotation rotation speed, speed, Φ Φ2 and and n n2 are the diameter diameter where the diameter diameter of of the the are the the where Φ11 isisthe driving pulley, n1 is the rotation speed, Φ22 and n22 are diameter and speed of the driven pulley. In this way, a transmission system for the axis Y was implemented and speed speed of of the the driven driven pulley. pulley. In In this this way, way, aa transmission transmission system system for for the the axis axis Y Y was was implemented implemented and (see Figure Figure2). 2).The Thespeed speed of the drive pulley is reduced by aoffactor ofand seven, and isthe force is (see of the drive pulley is reduced by a factor seven, the force multiplied (see Figure 2). The speed of the drive pulley is reduced by a factor of seven, and the force is multiplied by the same value. Forthe thesame X axis, the samewas mechanism was used, but with a reduction by the same value. For the X axis, mechanism used, but with a reduction factor of speed multiplied by the same value. For the X axis, the same mechanism was used, but with a reduction factor of speed of 3/5. of 3/5.of speed of 3/5. factor Pulley Pulley

Belt Belt

Pulley Pulley

Motor Motor

Figure 2. Transmission system for the Y axis. Figure Figure2.2.Transmission Transmission system system for for the the YY axis. axis.

Electronics 2018, FOR PEER REVIEW Electronics 2018,7,7,x 240 Electronics 2018, 7, x FOR PEER REVIEW

4 of 1313 4 of 4 of 13

The mechanism of belt drive operation is based on transmit power and speed to the driven The drive operation is on based on transmit power and to the driven The mechanism beltofdrive operation is based transmit power and to speed the driven shaft, shaft, which is amechanism wormof screw orbelt millimetric rod, where the distance or pitch isspeed defined by the spacing iscase a worm screwofor1 millimetric rod, where the or pitch by is defined by the is a which worm rod, See where the distance ordistance pitch is defined the spacing of spacing the ofwhich the shaft, teeth, in thisscrew isora millimetric value mm. Figure 3. of the teeth, in this case is a value of 1 mm. See Figure 3. teeth, in this case is a value of 1 mm. See Figure 3.

Pulle y Worm Pulle y wWorm Scre Axis Scre w Axis

Linear Linear Movement Movement

Load Be lt

Load Axis

Be lt Axis

Motor Motor

Rotational Rotational Movement Movement

Pulle y Pulle y

Figure 3. Belt drive system coupled to worm screw. Figure 3. Belt drive system coupled to worm screw. Figure 3. Belt drive system coupled to worm screw.

2.1.2. 2.1.2.Mechanical MechanicalSystem Systemfor forX,X,YYand andZZAxes Axes 2.1.2. Mechanical System for X, Y and Z Axes For Forthe theYYaxis, axis,a asystem systemwith witha aworm wormscrew screwwhich whichcarries carriesan analuminum aluminumplate platethrough throughsupport support For the Y axis, a system with a worm screw which carries an aluminum plate through support smooth occurs and smoothlongitudinal longitudinalguides guideswas wasdesigned. designed.Displacement Displacement occurswhen whenthe themotor motorrotates rotates andthe the smooth longitudinal guides was designed. Displacement occurs when the motor rotates and rotation is transmitted to the worm screw. The accuracy and smoothness of the linear movement rotation is transmitted to the worm screw. The accuracy and smoothness of the linear movement the rotation ison transmitted to of the worm screw. The accuracy and smoothness of the linear movement depend largely smooth linear guides, and the screw. Thus, aa depend largely onthe theprogress progress ofthe the smooth linear guides, andthat thatof ofthe thenut nutonon the screw. Thus, depend largely on the progress of the smooth linear guides, and that of the nut on the screw. Thus, a maximum maximumdisplacement displacementofof4040cm cmisisachieved achievedon onthe theYYaxis. axis.See SeeFigure Figure4.4. maximum displacement of 40 cm is achieved on the Y axis. See Figure 4. Be lt Drive Syste m Be lt Drive Syste m

Worm Scre w Worm Scre w

40 cm 40 cm

Mobile PlatformMobile Platform

Figure 4. Mechanical system of the Y axis. Figure 4. Mechanical system of the Y axis. Figure 4. Mechanical system of the Y axis.

The mechanism of the X axis is similar to the Y axis mechanism; the difference is in the two Therails mechanism of the X obtained axis is similar the Y and axisrecycled mechanism; difference is in the two guide used, which were from atoprinter officethe furniture. Thus, a maximum The mechanism of theobtained X axis isfrom similar to the Yand axis recycled mechanism; thefurniture. differenceThus, is in the guide rails used, which were a printer office a two displacement of 40 cm was obtained. (See Figure 5). With the vertical mechanism, the drill moves up guide rails used, which were obtained from a printer and recycled office furniture. Thus, a maximum displacement of 40 cm was obtained. (See Figure 5). With the vertical mechanism, the drill maximum displacement of 40 cm was obtained. (See Figure 5). With the vertical mechanism, the drill

Electronics 2018, 7, 240

5 of 13

Electronics2018, 2018,7,7,xxFOR FORPEER PEERREVIEW REVIEW Electronics

of 13 13 55 of

and down. Thedown. movement is executedisis without losing stability thanks to a thanks guide worm screw, moves up and and down. The movement movement executed without losing stability thanksand to aaa guide guide and and aa moves up The executed without losing stability to achieving a displacement of 6 cm. See Figure 6. wormscrew, screw,achieving achievingaadisplacement displacementof of66cm. cm.See SeeFigure Figure6.6. worm

Worm Worm Screww Scre

24cm cm 24

Fans Fans

Figure5.5.Mechanical Mechanicalsystem systemof ofthe theXXaxis. axis. Figure Steppe pperr Ste Motor Motor Drill Drill Motor Motor Worm Worm Screw w Scre cm 66cm

DC DC Motor Motor

Figure 6.Mechanical Mechanical system of the axis. Figure6.6. Mechanicalsystem systemof ofthe theZZ Zaxis. axis. Figure

2.2.System SystemHardware Hardware 2.2. System Hardware 2.2. Figure777shows shows in detailthe thethree threemain mainblocks: blocks:control, control,monitoring, monitoring,and andpower. power.These Thesestages stagesare are Figure showsin indetail detail the three main blocks: control, monitoring, and power. These stages are Figure controlled by the master microcontroller PIC18F4550. The master is responsible for initializing the controlled by by the the master master microcontroller microcontroller PIC18F4550. PIC18F4550. The The master master isis responsible responsible for for initializing initializing the the controlled prototype and receiving the coordinates of the user interface. The coordinates are sent to the motors prototype and receiving the coordinates of the user interface. The coordinates are sent to the motors prototype and receiving the coordinates of the user interface. The coordinates are sent to the motors and,according according to information from the encoders, the position is adjusted. and, accordingto toinformation informationfrom fromthe theencoders, encoders,the theposition positionis isadjusted. adjusted. and,

Electronics 2018, 7, 240 Electronics 2018, 7, x FOR PEER REVIEW

6 of 13 6 of 13

Figure Figure 7. 7. Block Block diagram diagram of of the the prototype. prototype.

2.2.1. Control Stage 2.2.1. Control Stage This stage is responsible for making overall control of the system, and consists of a set of blocks This stage is responsible for making overall control of the system, and consists of a set of blocks which are detailed below: which are detailed below: 1. 1.

Master device: device: aa PIC18F4550 PIC18F4550 was was used used as as aa master master control control device device with with the the following following functions: functions: Master

•• • •

• • • • • •

Receiving the data datasent sentbyby user interface viaUSB the protocol USB protocol in thebulk mode bulk Receiving the thethe user interface via the in the mode transfer. transfer. Transmission and reception of data to PIC18F2550 by the Universal Asynchronous Transmission and reception of data to PIC18F2550 by the Universal Asynchronous Receiver-Transmitter (UART) module. Receiver-Transmitter (UART) module. Adjust the PID control for positioning of the Cartesian axes. Adjust the PID control for positioning of the Cartesian axes. Configuration and generation of PWM signals for DC motors. Configuration and generation of PWM signals for DC motors. Initialization, verification and control of machine states. Initialization, verification and control of machine states.

Toaccomplish accomplishthis, this, a real operating system OSA was developed which the manages the To a real timetime operating system OSA was developed which manages execution execution times of thereby each task, thereby aachieving a type of parallel processing. times of each task, achieving type of parallel processing. See Figure See 8. Figure 8.

Electronics 2018, 7, 240

7 of 13

Electronics 2018, 7, x FOR PEER REVIEW

7 of 13

Figure 8. 8. Flowchart Flowchart of of real real time time operating operating system Figure system OSA. OSA.

The PID method; its its main main function is to to adjust The PID control control was was tuned tuned from from the the Ziegler-Nichols Ziegler-Nichols method; function is adjust the the position The error error position of of the the prototype, prototype, using using as as feedback feedback signal signal the the reading reading provided provided by by the the encoders. encoders. The calculation is is performed performed from from the the desired desired position position and and the the actual actual position position of of the the motor, motor, whereby whereby the the calculation variable variable actuator actuator is is modified modified based based on on Equation Equation (2). (2).

de(t) de (t) PID == KpKep(e(t) t ) ++ KiK i ∫e(e(t)dt t)dt ++KKdd PID dt dt Z

2. 2.

3.

4.

5.

6.

(2)

Display: an an LCD LCD extracted extracted from from aa Nokia Nokia 1100 1100 cell cell recycle recycle was Clock signals, signals, data, data, chip Display: was used. used. Clock chip select and and reset reset were were connected connected to to the the PortD PortD of of the the master master microcontroller, microcontroller, using select using aa resistive resistive voltage adjustment adjustment circuit circuit to to work work with with 3.3 3.3 V. V. voltage Communication with between the the control stagestage and PC operation modes Communication withPC: PC:communication communication between control andforPC for operation manualmanual and automatic-computerized was performed through the USB protocol. For this, it this, was modes and automatic-computerized was performed through the USB protocol. For necessary to configure the master PIC and the user interface developed in Matlab. it was necessary to configure the master PIC and the user interface developed in Matlab. Serial connection:forfor communication the monitoring the UART modules Serial connection: communication with with the monitoring stage, thestage, UART modules incorporated incorporated in the PIC18F4550 and PIC18F2550 microcontrollers wereAn used. An asynchronous in the PIC18F4550 and PIC18F2550 microcontrollers were used. asynchronous serial serial connection TxRx and Rxwas pinsimplemented. was implemented. connection usingusing the Txthe and pins Control Control of of DC DC motors motors for for axes axes X, X, Y, Y, and Drill: to control control the rotation and switching on and off of each DC motor, the master microcontroller PWM each DC motor, master microcontroller PWM module module through through the the pin RC0, RC1 and RC3 was was used. used. Stepper motor for the Z axis: to control the bipolar stepper permanent magnet motor, four pins of PortB to handle four reels were used. In addition, a fifth pin was used as an enabler.

Electronics 2018, 7, 240

6.

8 of 13

Stepper motor for the Z axis: to control the bipolar stepper permanent magnet motor, four pins of 8 of 13 PortB to handle four reels were used. In addition, a fifth pin was used as an enabler. Manual operation: operation: seven to PortA master PIC to operate manually the drilling Manual sevenbuttons buttonsconnected connected to PortA master PIC to operate manually the machine were used. Six buttons were used to adjust the coordinates X, Y, Z, while the drilling machine were used. Six buttons were used to adjust the coordinates X, Y, Z, remaining while the button is used as is stop. remaining button used as stop. Leds: a set of led indicatorswere wereincorporated incorporatedso sothat thatthe theuser user can can verify verify system system alarms, alarms, status status Leds: a set of led indicators USBport portconnection, connection,and andcorrect correctpolarization polarizationof ofthe themicrocontroller. microcontroller. USB

Electronics 2018, 7, x FOR PEER REVIEW

7. 7.

8. 8.

Figure Figure 99 shows shows the the schematic schematic diagram diagram of of the the control control stage, stage, in in which which the the established established connections connections can can be be observed. observed. LCD1 NOKIA100LCD

Figure 9. 9. Schematic Schematic diagram diagram of of the the control control stage. stage. Figure

2.2.2. Monitoring Stage 2.2.2. Monitoring Stage This stage is controlled by the PIC18F2550 [22], which is responsible for monitoring the signals This stage is controlled by the PIC18F2550 [22], which is responsible for monitoring the signals conditioned in the encoders, the state of limit switches for each axis, and displaying the information conditioned in the encoders, the state of limit switches for each axis, and displaying the information on a Nokia 1100 LCD. The information gathered by the sensors is sent to the master PIC through on a Nokia 1100 LCD. The information gathered by the sensors is sent to the master PIC through RS232 protocol. RS232 protocol. Limit switches are seven PC817 optical sensors, which internally consist of a led diode and a Limit switches are seven PC817 optical sensors, which internally consist of a led diode and a transistor. When the transistor does not receive a lit led diode, the collector-emitter junction generates transistor. When the transistor does not receive a lit led diode, the collector-emitter junction a logic 1; at the time that the collector-emitter junction receives light, it closes the circuit and generates generates a logic 1; at the time that the collector-emitter junction receives light, it closes the circuit a logical 0. and generates a logical 0. To perform the position control of the motors, CNY70 encoders measure the linear displacement To perform the position control of the motors, CNY70 encoders measure the linear of the machine. An LM324 operational amplifier was used for voltage comparisons for a coupling displacement of the machine. An LM324 operational amplifier was used for voltage comparisons for Figure 10 shows ofdiagram the monitoring stage. acircuit. coupling circuit. Figurethe 10 schematic shows the diagram schematic of the monitoring stage.

Electronics FOR PEER REVIEW Electronics 2018, 2018, 7, 7, x240 Electronics 2018, 7, x FOR PEER REVIEW

9 9ofof13 13 9 of 13

LCD1 NOKIA100LCD LCD1 NOKIA100LCD

Figure 10. Schematic diagram of the monitoring stage. Figure10. 10.Schematic Schematicdiagram diagramofofthe themonitoring monitoringstage. stage. Figure

2.2.3. 2.2.3. Power PowerStage Stage 2.2.3. Power Stage This composed of ofdrivers driversthat thatconvert convert logical level at voltages 18 V12and 12 V This is is composed thethe logical level of 5ofV 5atVvoltages of 18of V and V which This isneeded composed of drivers that convert the logical level ofcircuit 5 V athas voltages of switch 18 V and 12can V which are to handle DC motors and stepper motor. The an on/off that are needed to handle DC motors and stepper motor. The circuit has an on/off switch that can control which are needed to handle DC motors and The stepper motor. The circuit has an on/off that can control start of the system. prototype 3 bidirectional DCswitch motors theX the startthe and theand stopthe of stop the system. The prototype handleshandles 3 bidirectional DC motors for the for drill, control the start and the stop of the system. The prototype handles 3 bidirectional DC motors forL293 the drill, X and Y axes, and a stepper motor of sequential control using pulse frequency. L298 and and Y axes, and a stepper motor of sequential control using pulse frequency. L298 and L293 power drill, X and Y axes, and a stepper motor of sequential control using pulse frequency. L298 and L293 power werefor used for motors. 11 shows the schematic diagram of the power driversdrivers were used motors. Figure Figure 11 shows the schematic diagram of the power stage. stage. power drivers were used for motors. Figure 11 shows the schematic diagram of the power stage.

Figure 11. 11. Schematic Schematicdiagram diagramof ofthe the power power stage. stage. Figure Figure 11. Schematic diagram of the power stage.

2.3. Graphic User Interface 2.3. Graphic User Interface

Electronics 2018, 7, 240

10 of 13

Electronics 2018, 7, x Interface FOR PEER REVIEW 2.3. Graphic User

10 of 13

Matlab Matlabwas wasused usedto todevelop developaagraphical graphicalinterface interfacethat thatallows allowsthe theuser userto tooperate operatethe themachine machinein in the two operating modes: manual and automatic. The interface is initially responsible for the two operating modes: manual and automatic. The interface is initially responsible forimporting importing the in in jpgjpg or png format, converting it to grayscale, gettinggetting the lighting levels, and finally, theimage imageofofPCB PCB or png format, converting it to grayscale, the lighting levels, and converting it to a matrix of zeros and ones. finally, converting it to a matrix of zeros and ones. Subsequently, Subsequently,the theregionprops regionpropscommand commandisisused usedto toperform performmorphological morphological image image processing, processing, whereby the area, the centroid, and the list of image pixels is obtained. Finally, an algorithm whereby the area, the centroid, and the list of image pixels is obtained. Finally, an algorithmthat that identifies identifiesthe thecoordinates coordinatesof ofthe thedrilled drilledwas wasperformed. performed.In InFigure Figure12, 12,the theuser userinterface interfacefor forautomatic automatic operation operationmode modeisisdisplayed. displayed.

Figure Figure12. 12.Graphic Graphicuser userinterface interfacein inautomatic automaticmode. mode.

3. Results and Discussion 3. Results and Discussion When performing the integration of mechanical systems for each of the X, Y, and Z axes, the When performing the integration of mechanical systems for each of the X, Y, and Z axes, the implementation of the designed hardware and the completion of each programming microcontroller implementation of the designed hardware and the completion of each programming microcontroller routine are obtained as the final result of the prototype of the drilling machine. See Figure 13. routine are obtained as the final result of the prototype of the drilling machine. See Figure 13. The prototype can drill PCB with maximum dimensions of 24 × 40 cm, for a minimum distance of The prototype can drill PCB with maximum dimensions of 24 × 40 cm, for a minimum distance holes of 0.01 mm in the X axis and 0.001 mm in the Y axis. In manual and automatic operation modes, of holes of 0.01 mm in the X axis and 0.001 mm in the Y axis. In manual and automatic operation tests were performed on a total of 20 PCBs, for which successful results were achieved in 19 PCBs of modes, tests were performed on a total of 20 PCBs, for which successful results were achieved in 19 different sizes and designs. The problem occurred in the process of drilling the first PCB of 15 × 24 cm, PCBs of different sizes and designs. The problem occurred in the process of drilling the first PCB of due to a failure of the optical sensor installed on the Z axis. This generated an over-displacement that 15 × 24 cm, due to a failure of the optical sensor installed on the Z axis. This generated an affected the accuracy of the machine, which was solved by replacing the sensor. over-displacement that affected the accuracy of the machine, which was solved by replacing the The drilling results were as expected for a minimum drill size of 0.64 mm and a maximum size of sensor. 2.03 mm. For the tests, spiral bits with diameters of 0.5, 0.6, 0.7, 0.8 and 1 mm were used. To make the The drilling results were as expected for a minimum drill size of 0.64 mm and a maximum size holes, a bidirectional DC motor of 18 VDC, 12,000 rpm and 1 A was used. Figure 14 shows the results of 2.03 mm. For the tests, spiral bits with diameters of 0.5, 0.6, 0.7, 0.8 and 1 mm were used. To make obtained for two PCBs of approximately 20 × 20 cm. the holes, a bidirectional DC motor of 18 VDC, 12000 rpm and 1 A was used. Figure 14 shows the results obtained for two PCBs of approximately 20 × 20 cm.

Electronics 2018, 7, 240 Electronics 2018, 7, x FOR PEER REVIEW Electronics 2018, 7, x FOR PEER REVIEW

11 of 13 11 of 13 11 of 13

Figure 13. 13. PCB PCB drilling drilling machine. machine. Figure

Figure 14. 14. Results Results for for PCBs PCBs of of 20 20 × 20 cm. Figure 20 cm. cm. Figure 14. Results for PCBs of 20 ×× 20

During limits of of thethe sensors were set set at each of the During the the development developmentof ofthe thetests teststhe thedisplacements displacements limits sensors were at each each of During the development of the tests the displacements limits of the sensors were set at of ends of the Xthe and Yand axes, whichwhich respond to a distance of about 1about cm separation betweenbetween the drilling the ends of X Y axes, respond to a distance of 1 cm separation the the ends of the X and Y axes, which respond to a distance of about 1 cm separation between the head andhead the base thebase prototype. The sensor The on the Z axison avoided over-displacement problems that drilling and of the of the the prototype. prototype. sensor the Z Z axis axis avoided over-displacement over-displacement drilling head and the base of The sensor on the avoided can cause that mismatches or mismatches breakages oforthe screw-motor problems can cause cause breakages of the thecoupling. screw-motor coupling. coupling. problems that can mismatches or breakages of screw-motor Two PWM signals, each with aafrequency ofof1919KHz and a aresolution ofof 1010 bits, were generated in Two PWM signals, each with frequency KHz and resolution bits, were generated Two PWM signals, each with a frequency of 19 KHz and a resolution of 10 bits, were generated order to control thethe DCDC motors in the X and Y axes. With a duty cycle of of 0, maximum motor speed is in order order to control control motors in the the X and and Y axes. axes. With duty cycle 0, maximum maximum motor speed in to the DC motors in X Y With aa duty cycle of 0, motor speed achieved. To To stop thethe motors, a duty cyclecycle of 50% was used. With With a dutya cycle of 100%, motorsmotors rotate is achieved. stop motors, a duty of 50% was used. duty cycle of 100%, is achieved. To stop the motors, a duty cycle of 50% was used. With a duty cycle of 100%, motors at maximum speed, speed, but in the direction to the duty 0%. of 0%. rotate at maximum maximum but opposite in the the opposite opposite direction to the thecycle dutyofcycle cycle rotate at speed, but in direction to duty of 0%. With angular movement of the DC in a series of digital pulses With encoders, encoders,transforming transformingthe the angular movement of the the motors DC motors motors in aa series series of digital digital With encoders, transforming the angular movement of DC in of was achieved; these were used for different linear displacements. Table 1 shows the1relationship pulses was achieved; these were used for different linear displacements. Table shows the pulses was achieved; these were used for different linear displacements. Table 1 shows the between the number of pulses obtained with the displacement in X and Y axes. relationship between between the the number number of of pulses pulses obtained obtained with with the the displacement displacement in in X X and and Y Y axes. axes. relationship Table 1. Table 1. Pulse Pulse number number and and displacement. displacement. Table 1. Pulse number and displacement. Displacement(cm) (cm) X-Axis X-Axis Pulses Displacement Pulses Y-Axis Y-AxisPulses Pulses Displacement (cm) X-Axis Pulses Y-Axis Pulses 1 82 257 82 257 11 82 257 2 172 527 2 172 527 25 172 527 412 1329 5 412 1329 510 412 1329 811 2628 10 811 2628 962 3170 1012 811 2628 12 962 3170 16 1284 4143 12 962 3170 16 1284 4143 16 1284 4143 From the displacement data, the PID controller was designed based on the error signal that occurs Fromthe the displacement data, the PID and controller was position designedobtained based on on the the error signalofthat that between desired positiondata, of thethe motor the actual from signals the From the displacement PID controller was designed based the error signal occurs between the desired position of the motor and the actual position obtained from the signals of encoders. A half-step method was used to set the z-axis stepper motor. Thus, movements of high occurs between the desired position of the motor and the actual position obtained from the signals of the encoders. encoders. A half-step half-step method was used used to to set set theachieved. z-axis stepper stepper motor. motor. Thus, Thus, movements movements of of high high precision according to themethod design requirements were the A was the z-axis precision according to the design requirements were achieved. precision according to the design requirements were achieved.

Electronics 2018, 7, 240

12 of 13

An efficient control of the position of the drilling machine with excellent settling times was obtained, using a variable PWM control with adjustable parameters for proportional, integral, and derivative constants. The results obtained show that a functional prototype was implemented, which has as advantages its low cost, a user-friendly interface, and an ideal working area to implement PCBs in academic projects. These characteristics are similar to those incorporated in some 3 axis commercial mini CNC drilling machines. In this category, the CNC 2417, CNC 3018, and CNC 3040T machines stand out, which have working areas of 24 × 17 cm, 30 × 18 cm, and 27.5 × 38.5 cm respectively. These machines have as disadvantages their commercial costs of between 600 and 700 USD in Colombia. It is important to note that the prototype was developed for use in the academy by the students of the Magma Ingeniería research group of the Electronic Engineering program of Universidad del Magdalena. Therefore, the working area of the machine has limitations, i.e., its use on PCBs of industrial applications. Additionally, the implemented prototype has limitations in terms of working with complex geometries such as integrally.bladed rotors that are used in the turbomachinery area of the aeronautical sector [23]. In these applications, it is necessary to use machines with 5 axes, which have the advantage of precision and excellent machining times [24]. 4. Conclusions A new approach has been proposed for the implementation of a drilling machine for PCB using materials in large measure from photocopiers, cell phones, printers, and recycled furniture aluminum. The prototype has functional motors, sensors, and a graphical interface made in Matlab that allow the user to monitor all procedures efficiently. For the design of the mechanical structure, industrial profiles aluminum is mainly used for its resistance to bending and twisting. The system was designed with the moving parts on a set of linear guides in order to avoid unnecessary wear following from transverse movement. Finally, it was possible to optimize the execution time with the implementation of a RTOS that allowed us to execute each of the tasks of the master microcontroller in a cooperative multitasking manner, with the assignment of a planner which is responsible for allocating the processor of the task to be executed at each instant of time. Author Contributions: C.R.-A. conceived and supported the RTOS programming. W.E. designed the mechanical system and programmed the microcontrollers. A.P. performed the analysis of the data and wrote the paper. All authors reviewed the manuscript. Acknowledgments: This work was supported by the Vicerrectoría de Investigación of the Universidad del Magdalena. Conflicts of Interest: The authors declare no conflict of interest.

References 1. 2. 3. 4.

5.

Lai, C.Y.; Chavez, D.E.V.; Ding, S. Transformable parallel-serial manipulator for robotic machining. Int. J. Adv. Manuf. Technol. 2018, 97, 2987–2996. [CrossRef] Hsieh, F.S. Design of scalable agent-based reconfigurable manufacturing systems with Petri nets. Int. J. Comput. Integr. Manuf. 2018, 31, 748–759. [CrossRef] Alhama Blanco, P.J.; Abu-Dakka, F.J.; Abderrahim, M. Practical use of robot manipulators as intelligent manufacturing systems. Sensors 2018, 18, 2877. [CrossRef] [PubMed] Lu, Y.C.; Yeh, S.S. Using the segmented iterative learning control method to generate volumetric error-compensated part programs for three-axis CNC milling machine tools. J. Manuf. Mater. Process. 2018, 2, 53. [CrossRef] Moreno-Báez, A.; Miramontes-De León, G.; García-Domínguez, E.; Sifuentes-Gallardo, C. Processing Gerber files for manufacturing printed circuit boards. Procedia Eng. 2012, 35, 240–244. [CrossRef]

Electronics 2018, 7, 240

6.

7. 8. 9. 10. 11. 12.

13. 14. 15.

16.

17.

18. 19. 20. 21. 22. 23. 24.

13 of 13

Yemelyanov, N.V.; Yemelyanova, I.V.; Zubenko, V.L. Improving machining accuracy of cnc machines with innovative design methods. In Proceedings of the International Conference on Mechanical Engineering, Automation and Control Systems 2017, Tomsk, Russia, 4–6 December 2017. Yusof, Y.; Latif, K. New interpretation module for open architecture control based CNC systems. Procedia CIRP 2015, 26, 729–734. [CrossRef] Latif, K.; Yusof, Y.; Nassehi, A.; Alias Imran Latif, Q.B. Development of a feature-based open soft-CNC system. Int. J. Adv. Manuf. Technol. 2017, 89, 1013–1024. [CrossRef] Correa, J.E.; Toombs, N.; Ferreira, P.M. A modular-architecture controller for CNC systems based on open-source electronics. JMSY 2017, 44, 317–323. [CrossRef] Alonso, D.; Gil, J.; Martínez, F. Prototipo de máquina fresadora CNC para circuitos impresos. Revista Tekhnê 2015, 12, 23–28. Groover, M.P. Fundamentals of Modern Manufacturing, 6th ed.; John Wiley & Sons: Hoboken, NJ, USA, 2015; pp. 764–780. Desai, D.P.; Patel, D.M. Design of Control unit for CNC machine tool using Arduino based embedded system. In Proceedings of the 2015 International Conference on Smart Technologies and Management for Computing, Communication, Controls, Energy and Materials, Chennai, India, 6–8 May 2015; pp. 443–448. Basanta-Val, P.; García-Valls, M. A library for developing real-time and embedded applications in C. J. Syst. Archit. 2015, 61, 239–255. [CrossRef] Hou, M.; Faddis, T.N. Automatic tool path generation of a feature-based CAD/CAPP/CAM integrated system. Int. J. Comput. Integr. Manuf. 2006, 19, 350–358. [CrossRef] De Santiago-Perez, J.J.; Osornio-Rios, R.A.; Romero-Troncoso, R.J.; Cabal-Yepez, E.; Guevara-Gonzalez, R.G. Feedrate optimization by polynomial interpolation for CNC machines based on a reconfigurable FPGA controller. JSIR 2010, 69, 342–349. Bhandari, B.; Hong, Y.S.; Yoon, H.S.; Moon, J.S.; Pham, M.Q.; Lee, G.B.; Huang, Y.; Linke, B.S.; Dornfeld, D.A.; Ahn, S.H. Development of a micro-drilling burr-control chart for PCB drilling. Precis. Eng. 2014, 38, 221–229. [CrossRef] Tahir, Z.; Abu, N.A.; Sahib, S.; Herman, N.S. CNC PCB drilling machine using novel natural approach to Euclidean TSP. In Proceedings of the 2010 3rd International Conference on Computer Science and Information Technology, Chengdu, China, 9–11 July 2010; pp. 481–485. Huang, X.; Chen, Z.S.; Wang, C.Y.; Zheng, L.J.; Song, Y.X. Measurement of micro-drill breakage during PCB drilling. Mater. Sci. Forum 2016, 836, 592–599. [CrossRef] Yoon, H.S.; Moon, J.S.; Pham, M.Q.; Lee, G.B.; Ahn, S.H. Control of machining parameters for energy and cost savings in micro-scale drilling of PCBs. J. Clean. Prod. 2013, 54, 41–48. [CrossRef] Borkar, B.R.; Puri, Y.M.; Kuthe, A.M.; Deshpande, P.S. Automatic CNC Part Programming for through Hole Drilling. Procedia Mater. Sci. 2014, 5, 2513–2521. [CrossRef] Ioan, M.; Razvan, C. Drill hole sets manufacturing on CNC machines. Procedia Technol. 2015, 19, 135–140. [CrossRef] Polo, A.; Narvaez, P.; Robles Algarín, C. Implementation of a cost-effective didactic prototype for the acquisition of biomedical signals. Electronics 2018, 7, 77. [CrossRef] González, H.; Calleja, A.; Pereira, O.; Ortega, N.; López de Lacalle, L.N.; Barton, M. Super abrasive machining of integral rotary components using grinding flank tools. Metals 2018, 8, 24. [CrossRef] López De Lacalle, L.N.; Lamikiz, A.; Ocerin, O.; Díez, D.; Maidagan, E. The Denavit and Hartenberg approach applied to evaluate the consequences in the tool tip position of geometrical errors in five-axis milling centres. Int. J. Adv. Manuf. Technol. 2008, 37, 122–139. © 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

Suggest Documents