Connection of Base to Arm 1 Arm 2 Descriptions of the Gripper PIC Downloader Positions with mild vibrations Background

4.0 Design of the PCB board

25 4.1a Top Layer of the PCB board 26 4.1b Bottom Layer of the PCB board 26 4.2a Exact size of top layer PCB 27 4.2b Exact size of bottom layer PCB 27 4.3 PCB layout of the input connection 28

4.4 PCB layout of the output connection.

28 4.5 Secondary Controller Board 28 4.3a Exact size of Input Control Connection PCB 29 4.4a Exact size of Servo Output Connection PCB 29 4.5a Exact size of Secondary Controller PCB 30 4.6 Main Controller Board with Serial Connection 31 4.7 Input and Output Connection Board 31

4.8 Secondary Controller Board

32 4.9 Connections to primary PIC IO pins 33

4.10 Connections to secondary PIC IO pins

33 4.11 Output connections to Servo Motor 34

4.12 Input Connections from push button

34 4.13 Overall Robotic Arm Structure 35

4.14 Overall Robotic Arm Structure

35 4.15 The base of the structure 36

4.16 Connection of Base to Arm 1

36 4.17a Interior of the Base 37 4.17b Interior of the Base 37 4.18 Overall Arm Structure 38

4.19 Arm 2

38 4.20 Robotic Arm without Arm 2 39 4.21a Gripper Opened 40 4.21b Gripper Closed 40 4.22 Gripper with Rubber Mat 40

4.23 Descriptions of the Gripper

41 4.24 Control Box 41

4.25 PIC Downloader

42 4.26 PIC Downloader ready 43 5.0a Processor Clock Speed = 20MHz 45 5.0b the PWM created is in 200us cycle too small 45 5.1a Processor Clock Speed = 200KHz 46 5.1b the PWM created is in 20ms cycle desired 46 5.2a Created PWM in 20ms cycle 48 5.2b Created PWM in 200ms cycle 48 5.3 Unstable Arm Structure 49 5.4a First PWM generated to Servo Motor 1 51 5.4b Second PWM generated to Servo Motor 1 51 5.5a First PWM generated to Servo Motor 2 52 5.5a Second PWM generated to Servo Motor 2 52 5.6a First PWM generated to both Servo Motor 53 5.6b Second PWM generated to both Servo Motor 53 5.7a First PWM generated to Servo Motor 1 54 5.7b Second PWM generated to Servo Motor 1 54 5.8a PWM generated to both Servo in 200ms cycle 55 5.8b PWM generated to both Servo in 20ms cycle 55

5.9 Positions with mild vibrations

56 LIST OF APPENDIX APPENDIX A1 62 APPENDIX A2 64 APPENDIX A3-1 71 APPENDIX A3-2 78 APPENDIX B1 84 APPENDIX B2 85 APPENDIX B3-1 86 APPENDIX B3-2 87 LIST OF SYMBOLS TERMS AD ADC Analog to Digital Converter CPU Central Processing Unit CCW Counter Clock Wise CW Clock Wise CMOS Complementary Metal–Oxide–Semiconductor DA DAC Digital to Analog Converter EEPROM Electrically Erasable Programmable read-only memory IC Integrated Circuit IO Input and Output MCU Microcontroller Unit PC Personal Computer PCB Printed Circuit Board PIC Peripheral Interface Controller PSP Parallel Save Port PWM Pulse Width Modulation RAM Random Access Memory ROM Read-only Memory RISC Reduced Instruction Set Computer USART Universal Synchronous Asynchronous Receiver Transmitter CHAPTER 1 INTRODUCTION

1.1 Background

The microcontroller and the robotic application outlined in this project make extensive use of the PIC series of microcontroller from Microchip Technology Inc. In addition to its ability to run programs, the microcontroller has input and output lines pins that are used to control motor drive systems, read sensors, and communicate. A microcontroller is essentially an inexpensive single-chip computer. Single chip means the entire computer system lies within the confines of a silver of silicon encapsulated inside the plastic housing of an integrated circuit. The microcontroller has features similar to those of a standard personal computer. The microcontroller contains a CPU central processing unit, RAM random access memory, ROM read-only memory, IO inputoutput lines, serial and parallel ports, timers, and sometimes other built-in peripherals such as analog-to-digital AD and digital-to- analog DA converters. The key feature of the PIC is the microcontroller’s capability of uploading, storing, and running a program.

1.2 Problem Statement