Project Background 1 The Results For The Colour Detection Circuit 31

CONTENTS CHAPTER TITLE PAGE PROJECT TITLE i DECLARATION ii DEDICATION v ACKNOWLEDGEMENT vi ABSTRACT vii ABSTRAK viii TABLE OF CONTENTS ix LIST OF TABLES xii LIST OF FIGURES xiii LIST OF ABBREVIATIONS xv I INTRODUCTION 1

1.1 Project Background 1

1.2 Project Objectives 1 1.3 Problem Statements 2 1.4 Scope of work 2 1.5 The advantages of the project 2 1.6 Overview of the report 3 II LITERATURE REVIEW 4 2.1 Counter 4 2.2 BCD to 7 Segment Decoder 6 2.3 Variable Resistor 7 2.4 DC Motor 9 2.5 Voltage regulator 7805 12 2.6 PIC 16F877A microcontroller 13 2.7 7408 AND Gate 14 2.8 7404 NOT Gate 16 2.9 Comparator 16 2.10 Light Dependent Resistor LDR 18 III RESEARCH METHODOLOGY 19 3.1 Introduction 19 3.2 Hardware Design 22 3.2.1 The Flow of Processing Circuit 22 3.2.2 Voltage Regulator Circuit Design 24 3.2.3 Colour Detection And Conveyor Motor Circuit 25 3.2.4 PIC Microcontroller Circuit 27 3.2.5 Counter Circuit 28 3.3 Software Design 30 IV RESULTS AND DISCUSSIONS 31 4.1 Introduction 31

4.2 The Results For The Colour Detection Circuit 31

4.2.1 Experimental Results Of Output Voltage 31 For 4.7kΩ Resistor In Series Connection With LDR1 Sensor 4.2.2 Experimental Results Of Output Voltage 33 For 4.7kΩ Resistor In Series Connection With LDR2 Sensor 4.2.3 Experimental Results Of Output Voltage 34 For 4.7kΩ Resistor In Series Connection With LDR3 Sensor 4.2.4 Result Of Output Signal Of AND A Gate 35 7408 From LDR1 Sensor Of Colour Detection Circuit Is „LOW‟ Or Logic „0‟ 4.2.5 Result Of Output Signal Of AND A Gate 36 7408 From LDR1 Sensor Of Colour Detection Circuit Is „HIGH‟ Or Logic „1‟ 4.2.6 Results For Output Signal Of AND A Gate 38 7408 From Colour Detection Circuit By Using Digital Oscilloscope 4.3 The Results Of Counter Circuits 40 4.3.1 Results For Output Signal Of Counter Circuit 42 By Using Digital Oscilloscope 4.4 The Results Of DC Motor Response From PIC 44 Microcontroller Circuit 4.5 Discussions 46 V CONCLUSION AND RECOMMENDATION 49 5.1 Introduction 49 5.2 Conclusion 49 5.3 Recommendation 50 REFERENCES 51 LIST OF TABLES NO TITLE PAGE 2.1 Results at output of Decade Counter CD 4510 when 6 pulses is triggered 2.2 Comparison of method for switching the outputs from 7 the decoder 2.3 Comparison between DC motor and AC motor 12 2.4 Truth table of AND gate in 7408 IC 15 2.5 Truth table for NOT Gate 16 2.6 Voltage across inputs and output terminal of comparator 17 4.1 Maximum output voltage V max of GREEN colour toy balls 32 across series connection of 4.7kΩ resistor with LDR1 sensor 4.2 Maximum output voltage V max of BLUE colour toy balls 32 across series connection of 4.7kΩ resistor with LDR1 sensor 4.3 Maximum output voltage V max of RED colour toy balls 32 across series connection of 4.7kΩ resistor with LDR1 sensor 4.4 Maximum output voltage V max of BLUE colour toy balls 33 across series connection of 4.7kΩ resistor with LDR2 sensor 4.5 Maximum output voltage V max of RED colour toy balls 33 across series connection of 4.7kΩ resistor with LDR2 sensor 4.6 Maximum output voltage V max of RED colour toy balls 34 across series connection of 4.7kΩ resistor with LDR3 sensor LIST OF FIGURES NO TITLE PAGE 2.1 Decade Counter CD 4510 5 2.2 Arrangement of 7 Segment Display 7

2.3 Real image of a variable resistor