ISRN UTH-INGUTB-EX-E-2019/008-SE Examensarbete 15 hp Juni 2019

Automation of Circuit Board Testing

Filip Palm Abstract Automation of Circuit Board Testing

Filip Palm

Teknisk- naturvetenskaplig fakultet UTH-enheten The testing of printed circuit boards (PCBs) is a common quality control process mandatory for any of the circuit board factories Besöksadress: to guarantee the quality and functionality of the PCBs. The manual Ångströmlaboratoriet Lägerhyddsvägen 1 operation of the testing process by an operator will be too Hus 4, Plan 0 difficult for a large volume of PCBs. Therefore, the automation of PCB testing becomes necessary. Postadress: Box 536 751 21 Uppsala The purpose of this project is to develop an automated unit for pressing a PCB down onto a test platform, which is a part of the Telefon: automated PCB testing system. The unit consists of two linear 018 – 471 30 03 actuators, two motor drivers, two micro switches, three buttons,

Telefax: and an Arduino UNO micro-controller board. The actuators driven by 018 – 471 30 00 the motor drivers move the PCB and press it with force needed. The micro switches were placed at the start and stop positions of the Hemsida: movement. The buttons were used to control the actuators' http://www.teknat.uu.se/student movements separately for the sake of of calibrating the unit. The Arduino was programmed to control the unit. It took in the values from the buttons and switches and drove the actuators accordingly. A mechnical construction of the unit was created. It is shown to be stable and able to allow the actuators to transfer the force evenly onto the PCB. The electrical part of the unit was tested first in order to verify the programming of the Arduino and make sure everything work as it should. The final system was tested to see that the specifications are met. The results showed that the unit worked with the fulfilment of the specifications. Future work would be aimed towards improving the unit created and continuing work on the rest of the automation system.

Handledare: Axel Isaksson Ämnesgranskare: Ping Wu Examinator: Tomas Nyberg ISRN UTH-INGUTB-EX-E-2019/008-SE Foreword

I would like to thank my supervisor Axel Isaksson for the help he gave me during the project. I would like to thank Syntonic Test Systems AB for providing the tools needed to complete the project. I would also like to thank Ping Wu for guiding me during the writing of the thesis.

3 Sammanfattning

Att testa kretskort är en viktig del i produktionslinan om förtetag vill garantera kvaliteten och funktionen av kretskorten. Testprocessen använder en opperatör, detta fungerar väl för mindre volymer av kretskort. Om volymen skulle skalas upp så används automation för att öka effektiviteten och tillåter opperatören göra andra uppgifter.

Meningen med det här projektet är att skapa ett automatiserat system som trycker ner ett kretskort på en testplatform. Det skulle kunna styras av en dator och man skulle kunna köra varje sida separat. Systemet innehöll två stycken linjär aktuatorer, två micro switchar, tre knappar, två motordrivare och en Ardui- no. Arduinon styrde hela systemet, den kopplades till motordrivarna, switcharna, knapparna och datorn. Switcharna styrde vid vilken höjd motorerna skulle stanna. Knapparna styrde varje sida separat, denna funktionen användes för att kalibrera systemet. Motordrivarna var kopplade till motorerna och gav effekten för att driva dem. En extern struktur var byggd av akrylplast, denna struktur gav stabilitet till systemet och gjorde att aktuatorerna tryckte jämnt på kretskortet.

Testerna som utfördes på systemet, gjordes för att verifiera funktionaliteten av systemet. När de elektriska delarna kopplades ihop testades programmet, så aktuatorerna rörde sig som dem skulle och att Arduinon reagerade på knapptryckningarna. När allt sattes ihop testades hastigheten av systemet och hur långt aktu- atorerna kunde trycka ner kretskortet.

Resultatet visade att systemet fungera som specificerat. Systemet var långsammare och hade något mindre kraft jämnfört med orginal systemet. Fortsätt arbete kommer bestå av att förbättra eller om konstrurera det nuvarande systemet och fortsätta på resten av automationssystemet.

4 Contents

1 Introduction 7 1.1 Background...... 7 1.2 Purpose and Goals...... 7 1.3 Tasks and Scopes...... 7 1.4 Outline...... 8

2 Methods and Theory 9 2.1 In-circuit test methods...... 9 2.1.1 Introduction...... 9 2.1.2 Bed of Nails...... 9 2.1.3 Flying probe test...... 10 2.2 Automation of PCB testing...... 11 2.2.1 Automated PCB testing system...... 11 2.2.2 Aspects of automatic control theory...... 12

3 Implementation 13 3.1 Hardware...... 13 3.1.1 The BON...... 13 3.1.2 Microcontroller...... 13 3.1.3 Motor Driver...... 14 3.1.4 Linear Actuators...... 16 3.1.5 Switches...... 19 3.2 Software...... 19 3.3 Implementation...... 19 3.3.1 Connecting the motors...... 19 3.3.2 Connecting the motor driver...... 20 3.3.3 Connecting the Switches...... 20 3.3.4 Programming...... 21 3.3.5 Mechanical Construction...... 22 3.3.6 The Complete System...... 22 3.4 Tests...... 23

4 Results and Discussion 25 4.1 Mechanical Results...... 25 4.2 Electrical System Results...... 25 4.3 Speed and Force Results...... 25 4.4 Discussion...... 25

5 Conclusions and Future work 27

5 Abbreviations

BON Bed of Nails

DC Direct Current

FPT Flying Probe Test

IC

ICT In-Circuit Test

IDE Integrated Development Environment

PCB

6 1 Introduction 1.1 Background When producing PCBs there is bound to be faults. These faults can be wrong component placement, short circuits and open circuits. To insure that the products the manufacturer sells work, tests will need to be done. The most used test is some form of in-circuit test (ICT). The PCBs will be tested using probes, that can measure voltage, current. These values will be compared to a known working PCB to make sure all components are right. In-circuit test techniques can also find faulty integrated circuits. Some in-circuit testers can give the possibility to test IC:s functionality [1,2].

Syntronic Test Systems AB provides testing solutions to customers, these solutions are manually operated. An example is shown in figure 1.1. The operator places a card in the tester, closes the cover, tests are performed and the card is taken out. This manual test system works well with a smaller number of cards. But if the number of cards is scaled up, this test system will become ineffective. In this case, an automated test system is an effective solution.

Figure 1.1: A tester provided by Syntronic.

Automating the testing of PCBs is done because when the number of cards tested becomes large it becomes unviable to continue with manual labour. Automation is the process of minimizing the amount of human workload during for example production. An automated process will require minimal or no human inter- vention, some examples of automation is the heating of a oven and cruise control on a car. Because of the rapid advancement of technology during the 1900’s, digital became smaller and more powerful. This made it possible to create automated solutions to replace monotone and repeating jobs. Many test systems are monotone processes and to automate it would free up the operator to do other tasks. The current solutions are expensive, this means an automated test system is not viable for everyone.

1.2 Purpose and Goals The purpose of this project was to design and create a part of a automation system for PCB testing, in particular, a system that can hold a PCB and press it down on a PCB test platform automatically.

The goal of the project is to create a system that can press a PCB down on the test platform. The designed system should be controlled by a . The system should have the possibility to be calibrated manually.

1.3 Tasks and Scopes The tasks are.

7 • Create a design. • Research and choose parts. • Build the electrical unit on breadboard. • Test the electrical unit

• Construct the final system. • Test the final system. The limitations on the project are that the transport of the PCB to and from the test platform should not be taken into account and only one PCB at a time.

1.4 Outline The report is split up in different chapters. In chapter 2 the different ICT testing methods and how testing are automated is addressed. In chapter 3 the mechanical and electrical components, software used, the construction of the system and the tests done is presented. In chapter 4 the results are shown and discussed. Finally in chapter 5 the conclusion and future work.

8 2 Methods and Theory 2.1 In-circuit test methods 2.1.1 Introduction In-circuit testing is a generic term mostly used in the electronic sector. The term encompasses forms of testing that uses the nodes on PCBs to verify function. The main types of ICT machines include standard ICT machine, flying probe tester, manufacturing defect analyzer and cableform tester. Manufacturing defect analyzers offer basic testing functionality, their coverage is included in the standard ICT machine. Cableform testers are used to test cables [1].

2.1.2 Bed of Nails A standard ICT machine is a bed of nails (BON) tester. A BON fixture have several fixed spring loaded probes. An image of a standard probe is shown on the left in figure 2.2. Depending on what type of contact point is tested, there are several types of tips to the probes. Some of the possible tips are shown on the right in figure 2.2.

Figure 2.2: The image shows a standard probe (left) and the choice of tips (right) [3].

The probes placement depends on the PCB tested, because the probes are fixed, the fixture needs to be made specifically for each PCB tested. Fixtures are grouped together depending on how the PCB makes contact with the probes. The main groups are manual, mechanical, vacuum and pneumatic. Manual is where the board is held in place on the probes by hand. Mechanical is where the PCB is clamped onto the probes using some form of lever or actuator, an example of a mechanical BON is shown in figure 2.3. Vacuum is where a pressure difference is created under the PCB compared to above it and this holds it in position. Pneumatic uses liquid at high pressure on one side to press it into position [4].

9 Figure 2.3: A mechanical BON test fixture.

Which fixture used depends the amount of probes used and for example if they want the board placement fully automated. When automating the testing process, vacuum and pneumatic fixtures are not used. This is because the mounting is to complex to automate. The forces exerted on the board is a challenge for a fixture with many probes, the force comes from each of the spring loaded probe. Board flex can arise from placing many probes in the same place, modern probe placing software can optimize the placement minimizing the stress [5]. The force from each probe depends on the probe used. With the probe lineup used, the force could range from 57-455 grams at two thirds travel [3]. Which probe force used depends on factors such as the amount of probes, the thickness of the PCB tested and the type of PCB is tested.

The minimal flexibility of a BON test setup comes with some advantages. Some of them are consistency, speed, cost effective and basically no room for operator error. Consistency comes from the fixture being the same, and the placement is also the same, this also makes it easier for a operator to handle. The probes does not move and are always in contact with the board where measurements are done, this increases the speed. The cost of the test is the initial investment of a system, after that the more tests done increases the cost effectiveness [6].

2.1.3 Flying probe test Flying probe test (FPT) is a form of ICT that uses a robot arm with probes attached to do the measurements. The arm can have anywhere from 4-22 probes attached. There is also a possibility for one robot arm on each side of the PCB. The probes can be placed on a connection as small as 15um. The PCB is placed in a rail, this will hold the PCB in place. Sensors are used to calibrate the position of the PCBs, this is done to insure that the probes contact the right spots. The probes from a flying probe tester is shown in figure 2.4, the PCB and the rails holding the PCB is also shown.

Figure 2.4: The picture shows a flying probe tester and a PCB [8].

The probes are programmed to contact the component pins and perform the tests. FPTs will take longer

10 time than the BON tests, this is due to the travel time of the probes and having to connect to the same pin several times during testing [7]. Because of the higher flexibility FPT is better suited for the prototyping stage and with lower volume. An FPT setup can be programmed using CAD data, which is easier than programming a BON setup. Once the tester has been bought there is little cost in changing test PCB [6,8].

2.2 Automation of PCB testing 2.2.1 Automated PCB testing system The changes in manufacturing processes and the increased speed from design to end-product manufacturing, have led to companies using automation to increase the efficiency and productivity. Because PCB testing is a part of the manufacturing process, it is needed to provide test coverage in an automated way.

Figure 2.5: Block diagram of the automated PCB testing system.

The automated PCB test system is shown in figure 2.5. Beginning from the left there is the input, this is where the PCBs are placed into the system by an operator. With a fully automated system it is preferable to have it run during long periods of time without input from a operator. The PCBs are placed into the system in stacks with magazines. These magazines have sensors that measure the amount of PCBs left. When empty, it will be swapped with a full magazine of PCBs.

The next step in the system is the transport from the input to the test platform. This is where the system differs between using a BON or a FPT test platform. When using a BON test fixture the PCB will need to be lifted onto the test platform, this is done by some form of robotic arm. The arm will go from the magazine then to the platform. In its simplest form the arm will only require to go up, down, back and forward. When using a BON the system will only test one sort of PCB, this means griping tool for the robotic arm will be specially made for the PCB tested. When using a FPT setup the transport only needs to be some form of conveyor. The conveyor will lead to the rails that hold the PCB in place during testing, the rails will change position depending on which PCB is tested.

The next step is the test platform. A system with a BON will have the PCB placed onto the test platform, either the arm placing the PCB or a separate linear actuator will press the PCB down. The motion of the actuator is stopped by a sensor, which tells the control system that it is at the bottom. Using a FPT the PCB will come in on the rail, stop at a preset position and the tests will be done. Depending on which PCB is tested the FPT will change the test protocol according to the PCB.

11 The transport away from the test platform is done in the same way as the transport to the platform. The BON system will have some form of robotic arm that places the PCB in a pass or fail stack. While the FPT system will convey the PCB to either a pass or fail stack. After which an operator can remove the stacks after they become full.

Which system is used depends on the manufacturer, but the use of a FPT system has increased due to the better flexibility. The BON system works best for large amount of a single PCB. While the FPT system can easily change the type of PCB, this makes it optimal for low to medium volume with several different PCB designs [9].

2.2.2 Aspects of automatic control theory The robots used in the automation process are complex machines and can do several programmed func- tions. To move in a certain direction the robot usually has some form of DC motor, and some form of distance sensor. The DC motor gives the robot the movement and the sensor measures the distance moved. To get these parts to work together, and make the movement predictable, some form of control system is used.

A control system uses a control loop to regulate or direct a system. The uses could be the cruise control on a car or controlling an elevator to the right floor. For a automated control system a feedback controller is used. These system vary in complexity but has the same basic principle. The input into the system is the set point value, or the value the user wants the system to have, is constantly compared to the value of the system, also called the process value. The feedback control system will try to bring the process value to the set point value. An image of a simple feedback control system is shown in figure 2.6. The input is the set point value, the system will react to the input, the variable that is regulated will be measured by a sensor, the output of the sensor is subtracted from the input and the loop continues, until the sensor value is equal to the input.

Figure 2.6: A simple feedback control system

One of the simplest forms of an automated control system is the on-off control system. As the name suggests the system only switches between two states on and off. This is controlled by the sensor, when the system reaches the desired value the sensor activates and the system turns off. This type of control system is used in for example thermostats for heaters in houses [10]. This type of controller would allow a robot to go to a set length and then stop the movement. Because the controller only stops the process when the output reaches the value, the output could continue past the set point.

12 3 Implementation 3.1 Hardware 3.1.1 The BON The BON that was converted from a manual action to an automated action is shown in figure 3.7. The left image shows the PCB pressed down on the probes using the lever. The right image shows the tester in the open state, here the the needles that presses the PCB down can be seen. The acrylic plate with the black needles that presses the PCB down will be called the pressing plate later in the text. The

Figure 3.7: The BON used as the base of the project

To convert the tester, the pressing plate had to be removed and the lever disassembled. This was done by removing a number of screws.

3.1.2 Microcontroller To receive and transmit instructions a microcontroller was used. A microcontroller is a computer built on a single chip. Some of the things on the chip is the processor, ROM, RAM, and input output ports. A microcontroller can be programmed to respond to a certain situation which makes them suitable for a control system.

Figure 3.8: The microcontroller used.

The microcontroller used was a Aduino Uno is shown in figure 3.8. The Arduino is a microcontroller based on the ATmega328 chip. It has a clock speed of 16MHz, 32KB of flash memory, 2KB SRAM and 1KB EEPROM.

13 The Arduino is designed for creating control systems, with its 14 digital input/output pins, 6 analog input pins. This makes it easy to connect the external components. The microcontroller connects through a USB cable to a computer and is programmed using their own program.

3.1.3 Motor Driver The motor driver is there as a interface between the micro controller and motor. It takes the low power signals of the controller and activates and drives the right coils in the motor. The motor diver used in this project is built up by two h-bridges. A h-bridge is a driver circuit that can change the direction of current through a load. It uses four switches, the configuration of the switches is shown in figure 3.9.

Figure 3.9: H-bridge configuration[13].

The switches used in the motor driver for this project are transistors, but the serve the same purpose. De- pending on which switches are activated it changes the flow of current. Activating S1 and S4 will cause the current to flow from the left side to the right side of the load. Activating S3 and S2 will cause the current to flow from the right to the left, changing the direction [13]. In the place of the DC motor in figure 3.9 will be a coil in the stepper motor. The h-bridge configuration used is shown in figure 3.10. Q1 and Q2 are PMOS transistors and Q3 and Q4 are NMOS transistors. The switching is done by applying a voltage to IN 1 and GND to IN 2, to change direction of the current the voltage is applied to IN 2 and GND to IN 1 instead.

14 Figure 3.10: H-bridge configuration with transistors.

The transistor is a used for controlling and amplifying electrical signals. The function of a transistor is based on the electrons and holes between two different layers known as a p-n junction. A p-n junction is created by applying two different impurity elements to adjacent regions of a semiconductor, like silicon. This process is called doping. The material on one side is from group 15 of in the periodic table, the atoms in these materials have a free flowing electron acting as a charge carrier. The other material used is from group 13, these are missing an electron which creates holes in the structure. The electron rich layer is called the n-layer and the electron poor layer is the p-layer, hence it is called a p-n junction. When no voltage is applied the layer between the materials become a insulator, and no current passes through, shown in figure 3.11. When a voltage is applied the electrons will jump into the holes and continue through allowing current to pass, shown in figure 3.12[14].

Figure 3.11: The p-n junction with no applied voltage.[14]

Figure 3.12: The p-n junction with applied voltage.[14]

The transistor used in the motor driver is a metal-oxide-semiconductor field effect transistor or MOSFET

15 for short, this mean that the control of current is done through the control of the electric field on the gate, which is created by the voltage applied. The gate is insulated from the main semiconductor so no current will flow in from the gate, so the transistor is solely controlled by the voltage. Once activated the MOSFET transistor will create a channel for the current in the main semiconductor next to the gate, this will allow the current to flow from one side to the other [14, 15].

Figure 3.13: Illustration of a mos transistor.[15]

The motor drivers used were two Adafruit TB6612 DC/Stepper motor drivers shown in figure 3.14. The could either drive 2 DC motors, 2-4 solenoids or one stepper motor. The driver could drive motors from 4.5V-12V with a max current of 1.2A per channel. The output of the board is controlled by digital logic with a voltage range of 2.7V-5.5V [20]. The output pins later in the text will be called motor a and b, pin 1 and pin 2, pin 2 is the one next to the GND pins for both motor a and b.

Figure 3.14: An image of the TB6612 motor driver.

3.1.4 Linear Actuators The linear actuators are a form of direct current (DC) stepper motor. A DC motor is a electrical device that converts electrical energy into mechanical. It consists of two main parts, the rotor which transmits the mechanical energy through rotation and the stator which is the fixed part. For a simple DC motor the stator has a fixed magnetic field, this is either done through electromagnets or permanent magnets. Making the rotor rotate is done as in figure 3.15. A magnetic field is induced in the rotor with electromagnets or permanent magnets, this will make the rotor try to align with the magnetic field of the stator. This action will create torque in the rotation direction.[12]

16 Figure 3.15: Illustration of an DC motor [12].

Without changing the magnetic field the rotor would just align. To continue the rotation either the rotors magnetic field or the stators magnetic field need to switch polarity. A brushed DC motor switches the magnetic field on the rotor to continue the rotation. This is done through commutators, which are pads connected to a winding on the rotor. These commutators will be connected to the power source with brushes. An image of the commutators is shown in figure 3.16. When rotating the current will go through a different winding, this will make it so that the rotors magnetic field is stationary regardless of the rotation of the rotor. The magnetic field be constantly offset from the stators field and torque will be created during the rotation. The amount of coils is important, the more coils there are in the rotor the more even the torque output is.[12]

Figure 3.16: Commutators on a rotor [16].

A brushless DC motor as the name implies does not have any brushes. This means that the rotor has a constant magnetic field, the magnetic field is generated by permanent magnets. To create rotation the magnetic field in the stator rotates, so that the magnetic field from the rotor will try to align with a rotating field. The stator uses electromagnets to create the field. Which winding that is activated is controlled by sensors and driving circuits. The sensors measure where the rotor is and with this the right winding can be activated so that the rotation continues.[12]

A stepper motor is a form of brushless DC motor. The motor is controlled with a pulse train from for example a micro controller, every pulse moves the rotor a fixed angle. This is why it’s called a stepper motor, it divides a rotation into a set amount of steps. The rotor is a form of cog with small teeth, and the electromagnets in the stator have the same teeth. When one electromagnet activates then the rotor moves

17 one step, then the cogs are miss aligned with the next magnet. Once it activates the rotor moves, this is what makes the rotor move.[17]

There are two different types of stepper motor, bipolar and unipolar stepper motors. The differences between them is that a bipolar stepper motor does not have a central wire in the coils. The different configurations is shown in figure 3.17. The central wire of the unipolar coil is usually called the common wire, because they are connected together to the same potential.

Figure 3.17: Circuit diagram for the coils of a bipolar(left) and a unipolar(right) stepper motor[18].

To drive the unipolar stepper motor used in this project the activation of the coils needs to be done according to figure 3.18. The sequence has to match the diagram to get a good rotation, each color stands for one side of a coil. The sequence for a bipolar stepper motor is the same except the removal of the far left column.

Figure 3.18: Activation sequence for a unipolar coil stepper motor.[18]

Linear actuator is a device that creates motion in a straight line. The majority of linear actuators consists of a non-linear driver for example a DC motor and a lead screw. The lead screw gives the motor a constant ramp so that when the motor rotates it forces the screw forward [19]. An example of a linear lead screw actuator is shown in figure 3.19. The motor of the actuator is shown in figure 3.19 is connected to a nut around the lead screw so when the motor turns this will push the screw outwards.

The linear actuators used were two 42DBL10C2U linear actuators. They have a rated voltage of 12V and a maximum power of 10W. The maximum force exerted by the actuators is 100N and their stroke length is 61mm. An image of the motor is shown in figure 3.19. The motors where used to create the linear motion and force to press the PCB on to the needles.

18 Figure 3.19: An image of the 42DBL10C2U linear actuator.

3.1.5 Switches The micro switches used were Subminiature-Switch FS-T from Panasonic. The switch is shown in figure 3.20. The switches have a maximum current rating of 3A at 30V DC. In this project the switches were used to stop the motors when they have reached the specified height. Some simple push buttons where used as well.

Figure 3.20: An image of the micro switch used.

3.2 Software The software used to program the micro controller was Arduino’s own integrated development environment (IDE). The Arduino IDE is a open source software written in Java. Programs to control the micro controller are written in C/C++. The IDE comes with several user created libraries, none of these were used. The code is sequential meaning that it goes through the instructions from the top to the bottom, executing the instructions one by one.

3.3 Implementation 3.3.1 Connecting the motors The coil connections on the motors were color coded. One of the coils had the colors yellow, red and orange. While the other coil had the colors black, brown and green. The different colors meant a different connection to the motor driver. Each coil had a separate h-bridge so connecting the correct wire is important. The linear actuator connections are shown in table 3.1. A schematic view of the connection of the motors to the driver can be seen in the appendix.

19 Table 3.1: Connections for the linear actuators

Linear Actuator Wires Motor Diver Yellow Motor A pin 1 Orange Motor A pin 2 Red Vm (+12V) Black Motor B pin 2 Brown Motor B pin 1 Green Vm (+12V)

3.3.2 Connecting the motor driver The connections of the motor driver are shown in table 3.2. The two different output pins on the Arduino is used because this is needed to drive the drivers separately. It does not matter which output pin is used for which input. This is because the outputs are controlled with software and can easily be switched. The other motor driver inputs are Vcc which sets the logic level, GND is the ground and the Vm is the operating voltage of the linear actuator. PWMA and PWMB is set to 5V because this will make the output voltage of the driver 12V. Setting STBY to GND would disable the driver so it is set to 5V. A schematic view of the complete driver circuit is shown in the appendix.

Table 3.2: Connections for the motor driver

Motor Driver Inputs Arduino outputs AIN 1 DO 6 / DO 9 AIN 2 DO 7 / DO 8 BIN 1 DO 4 / DO11 BIN 2 DO 5 / DO 10 Vcc +5V PWMA / PWMB +5V STBY +5V Vm +12V GND GND

3.3.3 Connecting the Switches The switches were connected in such a way that when the switch was pressed a voltage was applied to a . Between the switch and the resistor a connection was made to a analog input on the Arduino, so when the voltage was applied the Arduino could measure and react to it. The schematic of the finished connection is shown in figure 3.21. What type of switch, the action it had in the system and what input on the Arduino it was connected are shown in table 3.3.

20 Figure 3.21: Illustration of the switch connections.

Table 3.3: Connections for the switches

Arduino Input Type of switch (Action) AI 1 Button (Left motor drive) AI 2 Micro Switch (Top stop) AI 3 Micro Switch (Bottom stop) AI 4 Button (Right motor drive) AI 5 Button (Manual/automatic drive)

3.3.4 Programming To make the system respond to external factors, such as reaching a stop switch or being told which way to move. Two types of inputs were used the serial port and the analog inputs. The serial port was used to control the movement of the motors and a emergency stop. The movement was controlled using letters sent from the computer connected to the Arduino. The different commands are down, up and stop. The analog inputs were read with the analogRead command the value was then converted to voltage, these values corresponded to a switch or button press.

For the rotation of the motors the sequence in table 3.4 was programmed using a counter and the digitalWrite command. There where four if-cases each with a different row in the table. The program counted up or down every loop to change the if-case, if it counted up or down changed the rotation. When the counter reaches the final case depending on if it’s rotating up or down the counter will be set to beginning case. If one of the micro switches was activated the counting stopped and all outputs were set to low. This stopped the movement of the motors. When changing direction the sequence has to start from the beginning, this was done by a if-case that when the direction changed it set the counter to zero.

Table 3.4: The program’s activation sequence for each of the outputs.

DO6 / DO9 DO7 / DO8 DO4 / DO11 DO5 / DO10 High Low High Low High Low Low High Low High Low High Low High High Low

21 An if-case was used to switch between automatic and manual drive. The automatic drive case contained the activation sequence in table 3.4. When in the manual drive case either DO4-DO7 or DO8-DO11 sequence was used, another if-case was used to switch between which output group was used.

3.3.5 Mechanical Construction The main construction material was a 1cm thick piece of acrylic. The acrylic was divided into three pieces. Two of the pieces would become the base, where the actuators would be anchored and create stability for the moving action. One of the pieces would become the top plate which is the mount for the actuators and the pressing plate.

The top plate with attached pressing plate is shown in figure 3.22. First four holes where drilled, these matched the mounting holes for the pressing plate where it was attached to the lever. The next step was to drill the holes for the actuators these where placed on the center line of the plate. Two holes for each actuator was drilled to screw the actuator in place. The four holes in the corners are there for stability rods glued into the base plates.

Figure 3.22: Top plate with attached pressing plate.

The construction of the base plates consisted of drilling three holes, two for the stability rods and one for the anchoring of the actuators. The base plate on one side is shown in figure 3.23. Two base plates were created one for each side, their construction was the same.

Figure 3.23: One of the base plates

3.3.6 The Complete System All the electrical subsystems where combined to a complete system and soldered to a experimental board.

22 Figure 3.24: The finished experimental board.

Figure 3.25: The complete construction.

In image 3.24 is the finished experimental board shown. The connectors to the left of the motor drivers are colored to match the wires on the linear actuators that were connected. In figure 3.25 the whole construction is shown. The two linear actuators are highlighted, they are fastened to the top plate and the base plates. The stop switches are placed so that one stops the system at the bottom and one stops the system when it is at the top.

3.4 Tests The tests done on the system were to verify functionality before the final construction. This was done by connecting the system on a breadboard, an image of the test setup can be seen in figure 3.26.

23 Figure 3.26: The test setup

This was done to test components and begin programming the Arduino to rotate the motors. The simplicity of connecting to the breadboard meant that wires could easily be switched, this made it simple to test which coil wire from the motors connected where. The test done were rotation of both motor simultaneously, that they stop when a micro switch is activated, react to commands from the computer and manual and automatic drive. When constructing the final system everything was still connected to a breadboard. It wasn’t until all functionality was verified that the electrical subsystems was soldered to a experimental board. The soldered board was tested using the same tests as before. When the system was working the final construction was done. After final construction the tests done, except function, were speed and force. The speed was measured by hand with a stopwatch on a phone. The time measured was the travel time of the top plate between the switches and it was compared to a manual trial with the original setup. The time measured using the operator was not the fastest possible time, it was what i considered was the standard operating time. The force was tested by letting the motor try to push the PCB the entire stroke length of the probes.

24 4 Results and Discussion 4.1 Mechanical Results The mechanical structure worked well. It could handle the forces of pressing the PCB onto the probes and the pressing plate was held evenly. The margin on the drilled holes was a bit too large, this lead to some unwanted movement when pushed.

4.2 Electrical System Results The system had the movement required. It could go down make full contact and go up far enough to remove the PCB. The automatic drive worked. The actuators could be driven separately. The system was stable and did not stop unintentionally.

4.3 Speed and Force Results The time results as seen in table 4.5 shows that the designed automated system takes approximately six seconds longer to close and open.

Table 4.5: The time difference between using an operator and the automated system.

Operator Automated Down Up Down Up 1.5s 1.4s 7.5s 7.5s

The force needed to push the PCB all the way down was to large for the actuators, there was approximately 1-2mm left when the actuators could not go further. To push the probes 66% down the force needed was 122N the actuators could put out a maximum of 200N. When using the manual setup the operator could push the PCB all the way down.

4.4 Discussion The system worked as intended but as stated in the result the margins of the construction was to large. This led to the top plate being able to be angled. The actuators kept the top plate level during operation but the movement could change the position of the top plate over time.

The speed of the actuator was a big downside to the system. The linear actuators used was at max speed, they could do 300 steps per second, which meant that there had to be a delay of 3ms between each step. The use of a stepper motor is not ideal because it’s step per second limitation. Due to the position of the top plate only moves between two heights linear pneumatic actuators could be used instead. These have a much higher speed but they require a source of compressed air to function. Otherwise a different type of linear actuator using a normal DC motor could be used. Changing the actuator will require a significant design change to the construction of the mechanical structure. The manual operator speed in the results is not the fastest possible speed. The reason the fastest possible manual speed wasn’t used is that I wanted the nor- mal operating speeds to be compared, the speed shown in table 4.5 is the approximate normal working speed.

The force needed for full compression of the probes was to great for the actuators. This is not a problem because the probes will connect before full compression. If full compression is wanted the actuators would need to be changed. If the actuators are changed it could both improve the speed and the force. The force required was calculated with the data sheet of the probes, there was only a value for 2/3 travel and not full compression. The force value written in the results was the 2/3 travel.

25 The automation system was based on a BON. This was done because Syntronic had an old BON that could be converted, this simplified the construction and minimized the cost. Trying to automate an FPT system was not possible due to them not having a FPT system.

The electrical parts worked as intended. When the connections were soldered to the experimental board the stability increased a lot. With the connections done on a breadboard a touch to the cables could disconnect several connections. The disconnected cables could not easily be spotted so all the connections had to be redone. With everything soldered the board could be handled without risk of disconnection.

The program used to control the Arduino worked as intended, but could be improved. All instructions to control the output ports could be put into an array, this would simplify the code and the sequence would count the index of the array. The way i activated the outputs was one after the other, so i activated output 4 then 5 and so on. This made it so that there was a slight delay between the first activation and the last. It had no affect on function, but it could be done so that all ports activate at the same time.

The difficulties encountered during the process of creating the system had mostly to do with the programming of the Arduino. The actuators required some special attention to the activation sequence. It was important that the sequence started from zero when the actuators changed direction, stopped and started. When sending commands to the Arduino the serial monitor sent a couple of blank lines after the command. This implies that when the Arduino reads the serial port, it will read the command then a blank line. The actuators would move one step then stop, a variable was created to save the command until a new command was issued.

26 5 Conclusions and Future work

The system that was constructed could press the PCB down on the probes until contact the micro switches where activated. With commands from the computer the actuators were driven upwards or downwards. The actuator could be driven separately, this was controlled by three buttons. The project was completed within the ten week time frame.

If I did the project again i would change the actuators, to increase the speed and force. Implement a distance measurement on each side, so if one actuator is not moving for some reason the system can react and stop. Construct the structural parts with focus on minimizing the amount of unwanted movement. Make the Arduino code more compact and more clear to understand. All the current components used on the experimental board could be placed on a self created PCB. For future work the continuation of the automated system could be constructed. To make it a completely automated system, there would need to be some form of transportation to and from the test platform. This could be done in the form of a robotic arm. Some storage for the PCBs that are tested and about to be tested, so that the system could run a longer time without operator. If more flexibility is wanted then looking into a FPT based system would be required.

27 Appendix

Figure 5.27: Driver circuit

28 Figure 5.28: Schematic view of the switch connections.

29 References

[1] Electronics notes, "ICT, In Circuit Test Tutorial."   Online . Available:https://www.electronics-notes.com/articles/test-methods/automatic-automated-test- ate/ict-in-circuit-test-what-is-primer.php   Accessed Mar. 26, 2019 [2] Saline Lectronics, "In-Circuit Testing (ICT)."   Online Available:https://www.lectronics.net/in-circuit-testing-ict/   Accessed: Mar. 26,2019 [3] Contact Products Group, POGO Contact Catalog.   Online Available: https://www.testprobes.nl/romex/documents/ECT/ECTContactProductsCatalog8_rom.pdf   Accessed May. 23, 2019 [4] K.Brindley (1991),Automatic Test Equipment. Great Britain: Billings & Sons of Worcester     E-book Available: Google E-book. Accessed Mar. 26, 2019 [5] S.Bennur, "Evaluate fixture strategies for ICT."   Online Available: https://www.edn.com/   Accessed Mar. 29, 2019 [6] Matric, ICT Testing: Cost, Advantages & Drawbacks.   Online https://blog.matric.com/ict-testing-cost-advantages-drawbacks   Accessed Mar. 26, 2019 [7] P.Bennett and K.Dehkordi, "Production Testing Using Flying Probe Systems."   Online Available: http://www.us-tech.com/   Accessed Apr. 25, 2019 [8] Matric, ICT Testing Vs Flying Probe Testing.   Online Available:https://blog.matric.com/ict-testing-vs-flying-probe-testing   Accessed Mar. 25, 2019 [9] W.Gueli, "Completely Automated PCB Test"   Online Available: http://smt.iconnect007.com/index.php/article/43299/completely-automated-pcb- test/43302/?skin=smt   Accessed May. 15, 2019 [10] "Control System"   Online Available: https://en.wikipedia.org/wiki/Control_system   Accessed June. 24, 2019 [11] "PID Controller"   Online Available: https://en.wikipedia.org/wiki/PID_controller   Accessed June. 24, 2019 [12] S.H.Kim (2017),Electric Motor Control : DC, AC, and BLDC Motors. Elsevier Science & Technology   E-book Available: Uppsala University Library.   Accessed Apr. 03, 2019 [13] Ø.Nydal Dahl, "What is an H-Bridge?."   Online Available: https://www.build-electronic-circuits.com/h-bridge/   Accessed Apr. 04, 2019

30 [14] M.Riordan "Transistor",in Encyclopedia Britannica Online.   Online Document Available: Encyclopedia Britannica Online   Accessed Apr. 12, 2019

[15] Electronics Tutorials, "The MOSFET."   Online Available: https://www.electronicstutorials.ws/transistor/tran_6.html   Accessed Apr. 12, 2019

[16] Electricaleasy, "Basic Construction And Working Of A DC Generator."   Online Available: https://www.electricaleasy.com/2012/12/basic-construction-and-working-of-dc.html   Accessed Apr. 03, 2019

[17] Elprocus, "Stepper Motor – Types, Advantages & Applications."   Online Available: https://www.elprocus.com/stepper-motor-types-advantages-applications/   Accessed Apr. 03, 2019

[18] Portescap, "Datasheet for the 42dbl-l digital linear actuator."   Online Document   Accessed Apr. 10, 2019

[19] Anaheim Automation, "Linear Actuator Guide."   Online Available: https://www.anaheimautomation.com/   Accessed Apr. 04, 2019

[20] L.Ada (2016).Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board     Online Document Accessed Apr. 04, 2019

31