Develop Angular Speed Detection System Using Infrared Sensor.

(1)

DEVELOP ANGULAR SPEED DETECTION SYSTEM USING INFRARED SENSOR

NORASUSHILA BINTI SALEH

This report is submitted in partial fulfillment of requirements for the award of Bachelor of Electronic Engineering (Industrial Electronics) With Honor

Faculty of Electronic and Computer Engineering Universiti Teknikal Malaysia Melaka


(2)

UNIVERSTI TEKNIKAL MALAYSIA MELAKA

FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER BORANG PENGESAHAN STATUS LAPORAN

PROJEK SARJANA MUDA II

Tajuk Projek : DEVELOP ANGULAR SPEED DETECTION SYSTEM USING INFRARED SENSOR

Sesi

Pengajian : 2008/2009

Saya NORASUSHILA BINTI SALEH mengaku membenarkan Laporan Projek Sarjana Muda ini disimpan di Perpustakaan dengan syarat-syarat kegunaan seperti berikut:

1. Laporan adalah hakmilik Universiti Teknikal Malaysia Melaka.

2. Perpustakaan dibenarkan membuat salinan untuk tujuan pengajian sahaja.

3. Perpustakaan dibenarkan membuat salinan laporan ini sebagai bahan pertukaran antara institusi pengajian tinggi.

4. Sila tandakan ( ) :

SULIT*

(Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia seperti yang termaktub di dalam AKTA RAHSIA RASMI 1972)

TERHAD* (Mengandungi maklumat terhad yang telah ditentukan oleh organisasi/badan di mana penyelidikan dijalankan)

TIDAK TERHAD

Disahkan oleh:

__________________________ ___________________________________

(TANDATANGAN PENULIS) (COP DAN TANDATANGAN PENYELIA)

Alamat Tetap:

2667-1, BT 8 ½, KG GHAFFAR BABA 76400 TANJUNG KLING

MELAKA


(3)

“I hereby declare that this report is the result of my own work accept for quotes as cited in the references.”

Signature : ...

Author : NORASUSHILA BINTI SALEH

Date : 28TH APRIL 2009


(4)

“I hereby declare that I have read this report and in my opinion this report is sufficient in term of the scope and quality for the award of Bachelor of Electronic

Engineering (Industrial Electronics) With Honours .”

Signature : ...

Supervisor’s Name : MR. FARID ARAFAT BIN AZIDIN

Date : ...


(5)

Dedicated to my beloved mother and father


(6)

ABSTRACT

The purpose of this project is to develop an angular speed detection system using a special Infra-Red sensor (IR) where it can detect black and white color and give a small differences voltage signal when the shaft motor was rotating. The black and white color will put at the shaft motor. When the shaft motor is rotated, the emitter IR sensor will emit infrared continuously and detect the color changes depends on setting or fixed time that will be programmed at microcontroller using PIC (Programmable Interface Controllers) complier software. This colors changing will generate a differences voltage. Usually, the microcontroller only recognizes digital input which is 0V and 5V. If the infrared reflected is less, the receiver would probably produce 2V or 3V and microcontroller is unable to deal with these analog values. So, the comparator (LM324) is used to solve this problem. By using the comparator LM324, the output voltage from IR receiver will compare to an input voltage through a variable resistor. This comparator able to compare for both input voltage and generate either 0V or 5V where it can connect to microcontroller. Lastly, the output voltage from microcontroller will display using LCD (Liquid Crystal

Display).


(7)

ABSTRAK

Projek ini bertujuan untuk membina sebuah system pengesan kelajuan dengan menggunakan alat khas pengesan infra-merah (IR) di mana membolehkan alat ini mengesan warna hitam dan putih, dan memberikan perubahan isyarat voltan yang kecil apabila batang atau takal motor berpusing. Warna hitam dan putih tersebut akan diletakkan pada takal motor dan disambungkan pada gandar motor. Apabila motor tersebut beroperasi, pemancar infra-merah akan memancarkan infra-merah secara berterusan dan akan mengesan perubahan warna pada gandar motor tersebut mengikut masa yang ditetapkan atau diprogramkan pada mikrokawalan menggunakan perisian atau pengaturcara komputer PIC (Programmable Interface

Controller). Perubahan warna ini akan menghasilkan perbezaan voltan.

Kebiasaannya, mikrokawalan hanya mengenalpasti masukan digital 0V dan 5V. Jika pantulan cahaya infra-merah berkurangan, kemungkinan besar penerima infra-merah hanya memperoleh 2V atau 3V, dan ini menyebabkan mikrokawalan tidak berupaya untuk berkomunikasi dengan nilai anolog yang diterima. Sebagai penyelesaiannya, pembanding LM324 digunakan. Dengan menggunakan pembanding ini, voltan keluaran daripada penerima infra-merah akan dibezakan dengan voltan masukan melalui perintang boleh laras. Pembanding ini berkebolehan untuk membanding kedua-dua voltan masukan dan menghasilkan sama ada 0V atau 5V di mana membolehkan alat ini disambung pada mikrokawalan (microcontroller). Akhir sekali, voltan keluaran daripada mikrokawalan akan dipamerkan pada LCD (liquid

crystal display).


(8)

TABLE OF CONTENTS

CHAPTER TITLE PAGE

ABSTRACT v

ABSTRAK vi

TABLE OF CONTENTS vii

LIST OF TABLES ix

LIST OF FIGURES x

LIST OF ABBREVIATIONS xii

LIST OF APPENDICES xiii

I INTRODUCTION

1.1 Introduction 2

1.2 Objectives 5

1.3 Problem Statement 6

1.4 Scope of Work 7

1.5 Methodology 8

II BACKGROUND STUDY

2.1 Software

2.1.1 Proteus 10

2.1.2 PIC Pro Basic 11

2.1.3 WinPic 12

2.2 Hardware

2.2.1 DC motor speed 13

2.2.2 Infrared Sensor 14


(9)

2.2.3 PIC Microcontroller 16

2.2.4 Liquid Crystal Display (LCD) 17

2.2.5 Voltage Regulator 18

III METHODOLOGY

3.1 Project Methodology 21

3.1.1 Research the Information 24

3.1.2 Design and Construct 24

3.1.3 Testing 25

3.1.4 Troubleshooting 25

3.2 Block Diagram 26

3.3 Circuit Operation 27

IV RESULT AND DISCUSSION

4.1 Result 31

4.2 Discussion 38

V CONCLUSION AND RECOMMENDATION

5.1 Conclusion 39

5.2 Recommendation 40

REFERENCES


(10)

LIST OF TABLES

NO TITLE PAGE

2.1 Pin Configuration of JHD162A 18

2.2 The 78XX series of voltage regulators 19

4.1 Components Listed and Description 35


(11)

LIST OF FIGURES

NO TITLE PAGE

1.1 Toothed-rotor tachometer detection 3

1.2 Optical rotary encoder 4

1.3 Infrared sensor detection 5

2.1 ISIS 6 Professional User Interface 10

2.2 ARES PCB Layout User Interface 10

2.3 PIC Basic Pro User Interface 11

2.4 WinPic User Interface 12

2.5 Basic concept of Infrared sensor 14

2.6 QRD1114 Infrared Sensors 15

2.7 Pin diagram of PIC16F877A 16

2.8 Fixed Positive Linear Voltage regulator 18

2.9 LM317 three-terminal adjustable positive voltage regulator 20

3.1 The flow chart 23

3.2 Block diagram of angular speed system 26

3.3 Reflection concept of Infrared sensor 27

3.4 Schematic Diagram 28

3.5 Circuit Diagram in Proteus 29

3.6 Edit Component Dialog Box 29

3.7 PCB Layout 30

4.1 Simulation Circuit using Proteus 32

4.2 Device Prototype 33


(12)

4.3 Example Tachometer Devices 35

4.4 Tachometer Devices 36


(13)

LIST OF ABBREVIATIONS

AC Alternating Current DC Direct Current I/O Input/Output IR Infrared

LCD Liquid Crystal Display

PIC Programmable Intelligent Controller V Voltage

PSM Project Sarjana Muda


(14)

LIST OF APPENDICES

APPENDIX A: Datasheet of Reflective Object Sensor QRD 1113/114 APPENDIX B: Datasheet of HD44780U (LCD-II)

APPENDIX C: Datasheet of PIC16F87XA APPENDIX D: DC Motor Specifications APPENDIX E: Source Code


(15)

CHAPTER I

INTRODUCTION

This chapter is consists of introduction, objectives, scope of work, problem statement, and methodology of the project. The introduction for angular speed detection system using infrared sensor is constitute as synopsis for the project. The introduction is started with explanation about this project and the prospective about all the experiment that has been done. The objective is about target need to achieve at the end of the project. Next, the problem statement is discussed about the proper solution issue to resolve the problem. However, this part is not about the problem arising. The specification scope of work is covered the border or limitation in each project; and determine the suitable material that used. Lastly in methodology is only for illustration or image the work flow in this project. For the more details explanation about project methodology, it will cover up in Chapter III.


(16)

1.1 Introduction

The infared sensor are widely used in industries for scanning bar-code and detecting material. The research in measuring position recently become more important. The measurement of position for rotating and linearly translatings parts is a key requirement in automation. [1]. Before this, the tachometer is using to measure rotating part. A tachometer is a device to measure speed of rotating shaft in the angular speed which mean in revolutions per minute. The tachometers are widely used in industries to measure angular speed in generators and motor. There are lots of tachometer with different type of sensing technique but they have disadvantages. Among disadvantages are montaging the sensor required time and lack of precision in measurement. There are many types of technique to use to sense the speed of rotating shaft. For example: toothed-rotor tachometers and optical rotary encoder.

The toothed-rotor tachometers is used several ferromagnetic tooth on its rotor. Then, a permanent magnet with a coil wrapped around it, is placed in the motor stator. The changing of magnetic field strength will induce a voltage. For every rotor tooth one voltage pulse is produced. The input voltage pulse will be converted into frequency as an output signal. Figure 1.1 has shown toothed-rotor tachometer detection. This toothed-rotor tachometer has disadvantages because its fix to the rotor of the motor and reassemble the motor is required.


(17)

Figure 1.1 Toothed-rotor tachometer detection

The other type of tachometer that commonly used in industrial control application is optical rotary encoder. This instrument used a photo sensor and a disc which will be montage on the rotating shaft. The rotating disc has a narrow radial slit which allows light from LED go through the disc. Several photodiodes which are placed behind the slit will detected the light and produced modulated light beam in form of voltage pulses. This voltage signal will be amplified and generated into digital waveforms suitable for subsequent process. Figure 1.2 has shown optical rotary encoder.

The disc of the optical rotary encoder has to be assembled perpendicular to the rotating shaft of the motor. It must be tight up to the shaft to reduce disc shaking during rotating that can effect the detection of light beam. Furthermore, the disc has a weight and that can affect minor error to the result. At this point of view, the infrared tachometer sensor has advantage compared to the optical rotary encoder.


(18)

Figure 1.2 Optical Rotary Encoder

The infrared tachometer sensor needs only a reflector which have black and white stripe. This sensor is typical light source used as a sensor in hobby robot to sense unclear object. The basic principle of Infrared sensor is based on an emitter Infrared sensor and an receiver Infrared sensor where it’s usually attach side by side and point them to a reflective surface. This emitter Infrared sensor and a receiver Infrared sensor will put closer with the motor, so that, it will point to rotation of motor. From that, the receiver infrared sensor will detect the changes color at the motor’s fan blade.

The motor shaft will be covered with the reflector and the infrared sensor is placed at the distance 0.5cm from the reflector. The output voltage pulses received from light detector is around 100uV – 10mV. One complete cycle of the voltage pulse mean one revolution of the rotating shaft. This one revolution needs to be counted until a minute to get the angular speed of rev/minute. Input voltage for the PIC microcontroller chip only 5V. The calculation for counting the rpm and display output at LCD would write using C Language. Then, it will compile the code to generate the HEX file and simulation in Source Boost Debugger Mode. A LCD display is used to shows the speed of the motor in value of rev/min. Figure 1.3 has shown Infrared sensor detection.


(19)

Figure 1.3 Infrared sensor detection

1.2 Objectives

The main objectives for this project is to fulfill the Final Year Project Requirement for finished the Bachelor of Electronic Engineering (Industrial Electronics) with honors. Through this project, all of the subjects in electronic field that have been study could be applied. On the other hand, this final project is compulsory to pass this course.

Furthermore, this project is to investigate the alternative concept of measurement device of angular speed through the Infrared sensor. Have many types of measurement device that used sensor as detection device such as detection for temperature, motion, speed and etc. But these project more on research for the application of infrared sensor in measurement device at industry.

Beside that, this project also to research all information about infrared sensor and all components includes of the characteristic and working principles that involves in this project. An infrared sensor is a device (usually with supporting circuitry) that can detect infrared light (which is below the optical spectrum) for use


(20)

to a purpose. Usually, this sensor has been used in robot application because its can detect the motion and temperature.

1.3 Problem Statement

The problem statement is about the problem that occurs from the same product that already exist and how to improvise the application. As usually this sensor has applies at robot in industry to detect the edge line, motion and temperature. This project has divided into two methods that are used; which is hardware and software.

For the hardware, the suitable infrared sensor is needed where it is can be detect the change between black and white surfaces. The signal from receiver infrared sensor (output signal) is around 2V – 3V for given the input for PIC microcontroller chip. Then, the PIC chip only receiver the input voltage is 5V. It is because this component is low voltage component type.

The PIC microcontroller has programming source code that used C language. The source code is using for counter the value from infrared sensor and display the output at LCD. This PIC microcontroller is used for reduce component in the circuit. 6


(21)

1.4 Scope of Work

The scope of work of this project is including the tools and material that used to achieve the objectives. This project is combination of hardware and programming source code. Input supply for the hardware is using adapter 10V to supply voltage at DC motor and PIC circuit. But, the PIC microcontroller only receives 5V as input. So, for the solution, voltage regulator 7805 is used to maintain 5V input supply at PIC microcontroller and LCD. At the shaft’s DC motor, white and black color surface would use as a motor’s blade.

Then, the IR sensors will attach side by side and point them to edge of motor’s fan blade. The input current that supply to IR sensor is around 100µA – 10mA. The rotation motor speed will measured around 100 – 1000 rev/m and ± 10% tolerance. For the programming source code, C language will use to write the code and compile it to HEX file. This source code will compile onto PIC microcontroller and this PIC will acts as a counter. The, the output will display in digital value using LCD.


(22)

1.5 Methodology

Start

PSM briefing

- Literature review (research the project title)

Analyze and understand the synopsis of project

-Submit the register form

Design the circuit and try to simulate

Find the necessary components

Design PCB layout and etching process - Using PROTEUS software

Soldering circuit

Testing circuit

Design model project Troubleshoot

Presentation the project and submit the report


(23)

CHAPTER II

BACKGROUND STUDY

This chapter is discuss about the study background that be related to this project. The overall explanation for literature review will produce framework that related between the theory and the concept through either figure or table. It will explain the application and working principles for each component and the related software that used in this project.


(24)

2.3 SOFTWARE 2.3.1 Proteus

Proteus VSM allows professional engineers to run interactive simulations of real designs, and to reap the rewards of this approach to circuit simulation. Proteus PCB design combines the ISIS schematic capture and ARES PBC layout programs to provide a powerful, integrated and easy to use suite of tools for professional PCB Design. All Proteus PCB design products include an integrated shape based auto-router and a basic SPICE simulation capability as standard. Figure 2.1 has shown the user interface of ISIS 6 Professional while figure 2.2 has shown the user interface of ARES PCB layout.

Figure 2.1 ISIS 6 Professional User Interface

Figure 2.2 ARES PCB layouts User Interface


(1)

Figure 1.3 Infrared sensor detection

1.2 Objectives

The main objectives for this project is to fulfill the Final Year Project Requirement for finished the Bachelor of Electronic Engineering (Industrial Electronics) with honors. Through this project, all of the subjects in electronic field that have been study could be applied. On the other hand, this final project is compulsory to pass this course.

Furthermore, this project is to investigate the alternative concept of measurement device of angular speed through the Infrared sensor. Have many types of measurement device that used sensor as detection device such as detection for temperature, motion, speed and etc. But these project more on research for the application of infrared sensor in measurement device at industry.

Beside that, this project also to research all information about infrared sensor and all components includes of the characteristic and working principles that involves in this project. An infrared sensor is a device (usually with supporting circuitry) that can detect infrared light (which is below the optical spectrum) for use


(2)

to a purpose. Usually, this sensor has been used in robot application because its can detect the motion and temperature.

1.3 Problem Statement

The problem statement is about the problem that occurs from the same product that already exist and how to improvise the application. As usually this sensor has applies at robot in industry to detect the edge line, motion and temperature. This project has divided into two methods that are used; which is hardware and software.

For the hardware, the suitable infrared sensor is needed where it is can be detect the change between black and white surfaces. The signal from receiver infrared sensor (output signal) is around 2V – 3V for given the input for PIC microcontroller chip. Then, the PIC chip only receiver the input voltage is 5V. It is because this component is low voltage component type.

The PIC microcontroller has programming source code that used C language. The source code is using for counter the value from infrared sensor and display the output at LCD. This PIC microcontroller is used for reduce component in the circuit. 6


(3)

1.4 Scope of Work

The scope of work of this project is including the tools and material that used to achieve the objectives. This project is combination of hardware and programming source code. Input supply for the hardware is using adapter 10V to supply voltage at DC motor and PIC circuit. But, the PIC microcontroller only receives 5V as input. So, for the solution, voltage regulator 7805 is used to maintain 5V input supply at PIC microcontroller and LCD. At the shaft’s DC motor, white and black color surface would use as a motor’s blade.

Then, the IR sensors will attach side by side and point them to edge of motor’s fan blade. The input current that supply to IR sensor is around 100µA – 10mA. The rotation motor speed will measured around 100 – 1000 rev/m and ± 10% tolerance. For the programming source code, C language will use to write the code and compile it to HEX file. This source code will compile onto PIC microcontroller and this PIC will acts as a counter. The, the output will display in digital value using LCD.


(4)

1.5 Methodology

Start

PSM briefing

- Literature review (research the project title)

Analyze and understand the synopsis of project

-Submit the register form

Design the circuit and try to simulate

Find the necessary components

Design PCB layout and etching process - Using PROTEUS software

Soldering circuit

Testing circuit

Design model project Troubleshoot

Presentation the project and submit the report


(5)

CHAPTER II

BACKGROUND STUDY

This chapter is discuss about the study background that be related to this project. The overall explanation for literature review will produce framework that related between the theory and the concept through either figure or table. It will explain the application and working principles for each component and the related software that used in this project.


(6)

2.3 SOFTWARE 2.3.1 Proteus

Proteus VSM allows professional engineers to run interactive simulations of real designs, and to reap the rewards of this approach to circuit simulation. Proteus PCB design combines the ISIS schematic capture and ARES PBC layout programs to provide a powerful, integrated and easy to use suite of tools for professional PCB Design. All Proteus PCB design products include an integrated shape based auto-router and a basic SPICE simulation capability as standard. Figure 2.1 has shown the user interface of ISIS 6 Professional while figure 2.2 has shown the user interface of ARES PCB layout.

Figure 2.1 ISIS 6 Professional User Interface

Figure 2.2 ARES PCB layouts User Interface