Studying The Conventional System And Remote Control Computer Science Essay

Published:

My sponsor for this project is Car Point. It is a business entity which deals in new and reconditioned cars located in North East of Pakistan. Owner of Car point is Mr. Akhter Gul. He is providing valuable services to their customer's whilst also combining his employees as a leading group in Car Purchasing and Selling. Providing best customer services is the aim of the business entity.

Car Point has currently about 25 employees working for the satisfaction of customer's. There are two managers working under the supervision of Owner. One of them is an IT Manager and the other one is Sales and Marketing Manager. IT staff tends to be more conventional in the daily use of their computer to show the customers a car in the showroom. They are using Microsoft office to manage all the office work. Moreover they are facing problem when a customer wants to send or receive data from their PDA's. So the client approached me to design a system in such a way that all these things can be done by doing a single click on the remote control. I was very much interested in this project because of the opportunity to work on realistic problems that an entity faces which i have never gone through in my course work.

1.2 Conventional System and Remote Control:

Lady using a tablet
Lady using a tablet

Professional

Essay Writers

Lady Using Tablet

Get your grade
or your money back

using our Essay Writing Service!

Essay Writing Service

Conventional Computer System deals with keyboard and mouse to operate PC and doing different tasks on the computer such as showing cars on Microsoft PowerPoint and dealing with all records and documents by using Microsoft office. Meanwhile, if a customer wants to exchange data from his/her PDA's to the business computers then there is no such mechanism that is available to transfer data from a business computer or from customer PDA.

In today's world no one can achieve his goals without using modern technology. In current conventional system of CarPoint, user finds it difficult when doing tasks on PC, such as showing cars on Microsoft PowerPoint so a remote control can be used that can easily be handles by the user instead of keyboard and mouse. Thus a user (client) finds it easy to operate the PC from a distance by the use of Remote Control. Handicaps involved in the use of Keyboard and Mouse are solved which limits the user to the vicinity of the computer.

In Remote Control operation, when any key of the remote control is pressed, a signal will be generated and receiver on the other hand will receive it. Receiver will decode the signal and will forward it to Microcontroller. Microcontroller will perform the job of decoding received signal and then according to specific protocol it will convert the received signal into bit stream. PC will receive these bit patterns via RS-232 link and after running the software it will simulate the keyboard shortcut keys. Functions of the PC can easily be incorporated by the use of remote control depending on the keys of the remote control.

1.3 Research and Practical Objectives of the Project:

The project aim is to provide best Remote Control solution to replace the conventional system of the business entity. The research objective is defined as "Researching the problems of the conventional system used by the PC and how these problems can be handled by using remote control, researching the methodologies and importance of Remote Control, researching which components be used in the project and why they are being used". Where as the practical objective of the project is "Designing multiple applications handling device through Infrared and its uses in the business entity".

1.4 Aims and Objectives:

The main objective of the project is to critically analyze the working of Remote Control and the trends which are used in modern world. Some of the main objectives of the project are as follows:

To review current system of the system by adopting new computing interface.

To explore the areas where product can be used.

To design data transfer mechanism from mobile phones (PDA's) and from computer to mobile phones using interface.

To provide an interface for monitoring CCTV through remote control.

Lady using a tablet
Lady using a tablet

Comprehensive

Writing Services

Lady Using Tablet

Plagiarism-free
Always on Time

Marked to Standard

Order Now

To improve the productivity of the business by adopting new interface.

1.5 Components:

Here are the components which will be used in the project:

Infrared Module.

8051 Microcontroller (AT89S52).

Max 232 Line Driver.

Remote Control.

Personal Computer.

1.6 Applications of Wireless Interface:

1.6.1 Remote Mouse:

Mouse pointer can easily be navigated to any location on the screen using the device. So there is no need of wireless mouse in conjunction with this device.

1.6.2 PC Hardware Control:

API's is used in so the hardware can also be controlled by the use of device. It includes restarting or shutting down of the computer, turning off the monitor, ejecting or closing the optical drives.

1.6.3 Comprehensive Operation on Major Media Players:

Players like Jet Audio, Windows Media Player and DVD can also be managed and operated by the use of device from distance.

1.6.4 Control of the Microsoft Power Point:

The major problem which client is facing is the running of slides which shows different cars and parts of it which a client is operating via Keyboard or Mouse and facing problems when doing presentation so by using Remote Device Microsoft Power Point slides can easily be handles from distance and handicaps involved in keyboard and mouse are solved.

1.6.5Transferring Data from PDA's:

By using Wireless Interface transferring of data from PDA's or from computer can easily be done. Client can send or receive data to his PC by using Wireless Interface.

1.7 Structure of Dissertation:

My dissertation is divided into six chapters. Chapter 1 introduces the project. It gives information about the client, conventional system and the wireless interface, objectives, components, applications and structure of the dissertation. Chapter 2 is the research chapter which includes: researching what infrared is, sources if infrared, infrared in electronics, IR transmitter and receiver. Chapter 3 contains: researching why 8051 microcontroller is used, features of 8051 microcontroller used in a project, protocols used in decoding of signal, what is the role of MAX 232 line driver in the wireless interface. Chapter 4 is about what API is, why it is used and how it works. Chapter 5 is about how to use the final product followed by conclusion and recommendation. Chapter 6 includes how Visual Basic Programming is incorporated to use API functions, all the coding of the software is done in Visual Basic Programming language.

1.8 Summary:

Keeping in view the present conventional system, the API approach will be used. Such an approach would produce synergetic effect. This project will give me broad understanding of the processes of developing high quality software systems. It will also help me to analyse and evaluate the problems and draw the theoretical and technical knowledge to develop and implement plans. This project will help me to get more awareness of current research in the management of software projects, their applications to the problems.

Chapter 2: Literature Review

2.1 Introduction:

A small portion of light is seen with our eyes of what is called the Electromagnetic Spectrum. This spectrum is of importance as X-Rays are used in hospitals, for communication purposes radio waves are used and some portions of Microwaves are used for cooking purposes.

Electromagnetic spectrum is categorized according to the wavelength of radiations. Radiations are of short and longer wavelengths. Short wavelengths are of high energy and can be dangerous. These radiations include UV, Gamma and X-Rays. While longer wavelength radiations contains less energy but are less harmful. They typically include radio waves, infrared waves and microwaves. Figure below shows the optical part of electromagnetic spectrum (Kwok-tin, 2003).

Figure 2.1: Rainbow Spectrum (Kwok-tin, 2003)

Infrared is an energy radiation with a frequency below eye sensitivity, so it cannot be seen. As like sound frequency cannot be seen but it can be listened as it doesn't visible in Electromagnetic Spectrum. Infrared radiations contain less energy but are less harmful when exposed to human's body.

Figure 2.2: Light Spectrum (Kwok-tin, 2003).

2.1.1 Sources of Infrared:

A source of infrared radiations is required to produce infrared images. The final image will be more accurate when the infrared source is strong. Lasers, Tungsten, Sunlight, Tungsten Halogen Lamps are the most used sources of light but the most usable and controllable sources for infrared is electronic flash (Williams, 2002).

2.2 Infrared in Electronics:

Lady using a tablet
Lady using a tablet

This Essay is

a Student's Work

Lady Using Tablet

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Examples of our work

Infrared doesn't experience electromagnetic intervention that is why it used for communications and control purposes. The problem occurs when other light emission which partially contains infrared interfere in this communication. The best example is Sun, which emits lots of radiations. Infrared gets popular in the market by the use of TV/VCR remote controls which are easily available in the market and are of very less price. Infrared handles the ON/OFF operation of the device and this whole scenario is tackled or operated by means of "Red" light. This light defines different meanings, in some devices it just an On/Off operation but in some cases it totally focuses on the radiation. Infrared can be generated by different hands even rubbing of the hands together can produce heat and then it can be transformed into infrared.

It's very important at the receiver end to know which one is the real data and which one is the "fake" signal. To permit a good communication by using Infrared fake signals should be avoided. Them the question arises how to know about the real signal or fake signal. There should be a specific "key" that can tell the receiver about fake or real data. Let's having an example of stars, a human eye can see hundred and thousand of stars by the wink of an eye but airplane flashing strobe light cannot be seen as it vanishes and appears after some time. So this strobe light is the key which can make the difference between the stars and the airplane. On these bases IR Remote Control operates on specific frequency. IR receiver accepts all those frequencies falling in that specific range and attenuates all those which are of no use or may cause problem for example noise.

To transmit information remote control uses 36KHz. Two logics levels are used in Infrared light emitted IR Diodes, logic "1" for transmitting purposes and logic "0" for silence or no transmission (Lipnharski, 2003).

2.3 IR Remote Control:

Remote control is the main component of the project. Hear a ready-made IR Remote Control has been used. Infrared remote control is everywhere nowadays. It is always contained with almost all electronics, from air condition to CRT (Cathode Ray Tube), from TVs to computers; all of them must contain an infrared remote control. All these devices are nowadays operated by using IR Remote Control. Typically 36-40 KHz carrier frequency is used for these infrared signals to be operated. Serial transmission is used to send control codes which are modulated at 36-40 kHz carrier frequency and this is done by turning the carrier on and off. Infrared light can't be seen as it is below visible frequency range. LED source is responsible of production of IR signals. IR signals are usually one way just like in the case of TV remote. A signal is sent by the IR Remote Control and is sent as very slow rupture up to the distance of 10 meters. Amplitude shift keying is used to send IR signal and these signals are modulated at carrier frequency of 38 kHz. Data rate is in the range of 100-2000bps. Some applications and systems use different data rates and modulation techniques to send signals from IR remote control.

IR transceivers are steadfast and mostly low-priced. But a minor issue comes when other IR sources causes interference between sender and receiver. These interferences come from IR audio systems. Other sources that cause interferences are light bulbs such as fluorescent lights. In order to cope up with these interference problems the frequency of these equipments has to be chosen is such a way that it bypasses 36 kHz frequency area.

IR light is modulated at the frequency around 36-40 kHz of these existing IR systems. Thing has to be kept in mind that this is the frequency of the IR carrier not of the IR light. Interference usually occurs at the probability around 40 kHz. By using higher IR frequencies interference can be minimized and for this mega hertz IR systems are also in use nowadays.

Generally, modulated square wave at the frequency of 36-40 kHz is used for the communication of Infrared remote control. IR transmitter usually IR LED receives that square wave. Amplitude modulation is used for carrier frequency but it depends on the data used by the system. TTL voltage on the modulation control input is used to turn On/Off of the Infrared LED and that's how transmitter part is constructed. On the other hand, photodiode receives that signal. A receiver which consists of receiving chip is specifically operated at the frequency of 36-40 kHz. Demodulated digital signal is the output which was just used to drive the transmitter. These kinds of receivers work well when IR carrier is present. If the carrier is not present then the output will be low. A general DVD player remote control is used in the project using the above describes system (Ariffin, 2007). Little more detail about IR remote control transmitter and receiver are discussed below.

2.3.1 Transmitter of IR Remote Control:

A carrier is generated in the range of 38-40 kHz by the remote control. After that this carrier is modulated according to data signal by using amplitude shift keying that is On/Off. A NAND truth table is used for the logic levels that are Logic 0 and Logic 1 which is figured below. As illustrated in figure, when both are logic 1 still the transmitter is Off and it gets On when any of them gets changes (Ariffin, 2007).

http://www.elshem.com/images/guide/3/index.36.jpg

Table 2.1: NAND truth Table.

The 38kHz carrier pulses from logic "1" to logic "0" at a rate of approximately 38,000 cycles per second, hence 38KHz. The serial data signal is 1200 or 2400 bps (bits per second), and considerably slower the 38 kHz carrier frequency.

2.3.2 IR Receiver:

On the receiver side a photodiode takes up the signal. The integrated circuit inside a typical receiving chip is sensitive only to the 38 kHz frequency. The output is the demodulated digital input, just what was used to drive the transmitter. Usually these kinds of receivers work as that when IR the carrier is present, this output is high and when no carrier is detected, the output is low, the IR receiver removes the carrier and forward the data signal to microcontroller for decoding which decode the data signal according to a specific protocol and forwards the bits stream to PC (Ariffin, 2007).

Chapter 3: Research Chapter

3: Microcontroller 8051 (AT89S52):

Intel Corporation introduces 8051 8 bit microcontroller. A general-purpose microprocessor is used by the system designer. Microprocessors typically are Intel or Motorola's which are well known and are used nowadays. They don't have built in ROM/RAM, I/O Ports and Timers externally to work properly. By adding these ROM/RAM and I/O ports make the system heavier and make it more expensive. Microprocessors got the advantage in the sense that by depending on the task and size of the task ROM/Ram and I/O ports can be added and configured. In case of Microcontroller, amount of RAM/ROM and I/O Ports are fixed and can't be changed thus to it is mainly used because of its fixed size and makes it more ideal for most of the applications where space and cost is the main issue (Mazidi, 2000).

3.1: Microcontroller for embedded systems:

Embedded systems uses microcontroller to accomplish their tasks. Microcontrollers do one task only used by embedded systems.

Some of the microcontrollers used by embedded systems to do their tasks are as follows:

Home

Office

Auto

Appliance

Colour printing

ABS

Camcorder

Computers

Air bag

Garage door opener

Fax machine

Cellular phone

Remote control

Laser printer

Climate control

Security System

Microwave

Engine control

Telephones

Paging

Transmission control

TVs

Security systems

Trip computer

Table 3.1: Products using Microcontroller.

3.2: Choosing a Microcontroller:

8-bit microcontrollers are divided into four main major typically includes: Intel's 8051, Zilog's Z8, Motorola's 6811 and PIC 16X are from Microchip technology. Register and instruction set are unique and different of each microcontroller so a code of one microcontroller is not compatible on other's one. Question arises which microcontroller is to choose and why? The criteria in choosing microcontroller are as follows:

1: Hand efficiency and cost effectively must be in mind to meet any computing task.

2: Availability of software development tool such as compilers, assemblers and debuggers.

3: Wide availability and reliable sources of the microcontroller (Mazidi, 2000).

3.2.1: Choosing 8051 (AT89S52) for Wireless Interface:

8051 is used for this project for some reasons. First it is cost effective and meets the task efficiently. Availability of assembler, debugger, compiler and code efficient C language are key considerations. It is most widely used microcontroller in Pakistan.

3.3: Features of 8051:

Intel Corporation introduces 8051 8-bit processor in 1981. The best quality in this microcontroller is that all the functionalities like ROM/RAM, I/O Ports, Timers, and Serial Ports etc are set into one chip that is why it is called "System on a chip". It works on 8 bits of data at a time that's why it is known as 8-bit processor. CPU works on 8 bits of data at a time. Data larger than 8 bits are divided into chunks and then it is processed by CPU (Mackenzie, 1995).

Some of the features of 8051 microcontroller are shown in table below:

Feature

Quantity

ROM (on-chip program space in bytes )

4K

RAM (bytes)

128

Timers

2

I/O pins

32

Serial Port

1

Interrupt sources

6

Table 3.2: Features of 8051 Microcontroller (Mackenzie, 1995).

3.3.1: Pin Configuration of 8051 Microcontroller:

A detail pins configuration of 8051 microcontroller is shown in figure below:

8051aa.jpg

Figure 3.1: 8051 Pins configuration (Mackenzie, 1995).

3.3.2: I/O Ports Pins and their functions:

Below are the pin descriptions of 8051 Microcontroller:

3.3.2.1: Port 0:

It comprises of 8 pins and may serve as Input and Output. Port 0 pins can be used together and may be served as dual-purpose low-order address and data bus for external memory. When it is used as bi-directional, it becomes a multiplexed address and data bus. 8 pins starts from 32-39 of port 0. It has pull up resistor which is used to interface outer world with Port 0 and usually it runs on 10K ohm resistance (Mazidi, 2000)(Ayala, 1991).

3.3.2.2: Port 1:

It is not used as dual purpose as Port 1 is a dedicated I/O port pins started from 1-8. They are used to interface external devices only. Port 1 doesn't require any pull p resistor as it already has pull-up resistor internally (Mackenzie, 1995).

3.3.2.3: Port 2:

Just like Port 1, Port 2 can be used as Input/output purposes. To address external memory, a high order address byte will be used in conjunction with low order address byte of Port 0. It also does not need any pull-up resistor (Ayala, 1991)(Mackanzie, 1995).

3.3.2.4: Port 3:

It also occupies 8 pins of 8051 microcontroller. Like other ports, it may also be used as I/O purposes. It also has an internal pull-up resistor. Apart from all these functionalities, Port 3 has some special features which are summarized in a table below (Ayala, 1991):

Port Pins

Alternate functions

Pin

P3.0

RxD (serial input port)

10

P3.1

TxD (serial output port)

11

P3.2

INT0 (external interrupt 0)

12

P3.3

INT1 (external interrupt 1)

13

P3.4

T0 ( timer 0 external input)

14

P3.5

T1( timer 1 external input)

15

P3.6

WR (external data memory write strobe)

16

P3.7

RD (external data memory read strobe)

17

Table 3.3: Alternate pin functions for Port 3 pins (Ayala, 1991) (Mackanzie, 1995).

3.4: Features of 8051 used in Project:

To operate PC and other applications via Wireless Interface features of 8051 microcontroller which are explained above are used. Microcontroller is the centre of attraction for this wireless interface. All the decoding and generation of interrupts are done in this face. After dealing with the signal generated by IR Remote Control, data is sent to Computer via RS232 link which is a communication point between PC and outer world that is microcontroller. INT0 pin of Port 3 is used as interrupt input pin. By default output of IR module s active low; its output is low when a beam of 38 KHz to 48 KHz is incident on IR module. Remote control transmission protocol is based on negative transmissions timings and on these bases zero and one bits are transmitted. Smaller the time delay, the bit decoded will be one and thus longer the time delay, the bit decoded will be zero. Scan code which is 33 bits long will be generated when any key of the remote control is pressed. Transmissions of these bits are done by modulating the carrier ranges from 38 to 48 KHz via IR diode in the remote control. These data stream bits are received at the other end by IR module. Interrupt is raised by microcontroller when a first bit of this data stream is received. As stated earlier, by default IR module output is active low and only the interrupt is raised when a bit is received. Interrupt is raised for each resulting negative transitions and TIMER0 of microcontroller is used for time delay purposes between the transitions. Transitions which are spaced narrowly represent one and those of wider spaced represents bit zero. When all these 33 bits are received Interrupt is automatically disabled and data stream bits are communicated to the computer via RS232 link (Atmel, 2006) (Triwiyanto, 2006). A figure below shows a brief diagram of 8051 microcontroller.

8051 pin confa.gif

Figure 3.2: 8051 Microcontroller diagram (Mazidi, 2000).

3.5: Interrupts:

In operating PC and other applications via wireless interface AT89S52 is used for generating interrupts so detail of all those interrupt pins has to be discussed. Once the interrupt is generated than microcontrollers takes some action and do the task according the triggered interrupt and by looking into the data stream, data is sent to the computer. There are six interrupts vectors in AT89S52; typically includes three interrupts for timers that are TIMER0, TIMER1, TIMER2, INT0 and INT1 are used as external interrupts and the last one is interrupt for serial port which is used typically to communicate microcontroller with computer or any external device. Special Function Register is responsible for resetting and clearing all these interrupts and enabling and disabling of these interrupts are done in SFR register. All interrupts can be disabled at once by IE (Interrupt Enable) which contains global disable bit. IE register is shown in table below (Mazidi, 2000).

EA

---

ET2

ES

ET1

EX1

ET0

EX0

Table 3.4: Interrupt Enable Register (Mazidi, 2000).

It's a 8 bit register and from the table it can be seen that bit 6 that is IE 6 is not used it is because it is unimplemented yet but can be used in future products (Atmel, 2006) (Triwiyanto, 2006).

3.6: Oscillator Characteristics:

For On-chip oscillator inverting amplifier can be used and for this XTAL1 and XTAL2 are the inputs and outputs. Ceramic resonator or crystal quartz may be used. XTAL2 should be unconnected to drive the device from external clock while XTAL1 is driven. Following diagram shows the crystal oscillator (Atmel, 2006) (Mackenzie, 1995).

clock.jpg

Figure 3.3: Crystal Oscillator (Mazidi, 2000).

3.7: Protocols used for Decoding of Signal:

Here is the description of the protocol which will be used to decode the signal. These all instructions and jobs are done in microcontroller. The process is discussed below:

When a pulse is detected, an output of IR module sensor digital low.

Time start running at first transition from high to low.

Time taken by the resultant transition to occur is calculated and after calculation the time is reset to no signal time out value.

If the transition occurs earlier, then it is registered as 1 otherwise 0 will be registered and this is determined by constant BITWD which is the number of instructions for the delay. Delay between transitions is calculated to be 1.2 ms but in project it is used as 1.5ms. Usually transitions representing 0s are 2.4ms long.

Timer interrupt is raised when there is no pulse for the longer period of time. If there are appreciable number of bits (33) then they are handled otherwise they will be discarded.

There are different numbers of codes for handling different devices. For example if key number 1 is pressed from the remote control then each key has assigned 33 bits scan codes which will perform some task in the computer or any other device. These all keys are separated by a delay of 40ms means that to minimum 40ms are required to adjust the timer to do a specific job. When a key is pressed, a sequence of 33 bits is transmitted in the form of 0s and 1s. After transmission all these codes are decoded and all the concerns interrupts is disabled and the data corresponding to that code is sent to the PC via RS232 link. If the key is kept pressed then small pulses are sent after that scan code but these small pulses contains no information and decided as 0s.

3.8.1: Flowchart of Interrupt INT0:

No

Start the timer

Since the timer is already running. TH & TL register to find the elapsed time

Enter bit 0 into array

Enter bit 1 into the array

Reset the timer for new timing

Increment the bit index to enter the bit into next location in array

Index++

Interrupt

Is timer running?

If elapsed time > threshold

No

Yes

Here is the flowchart of the Interrupt INT0 which will be enabled whenever any signal is detected.

Yes

Yes

Figure 3.4: Interrupt INT0 Flowchart.

3.8.2: Flowchart of Interrupt TIMER0:

Yes

Start INT Timer0

Index=33?

RS-232

Corrupt code. Reject the code

END

NO

Index=1?

Transmit all of the 33 bits using 0-32 index values

Yes

Repeat code, so transmit CODE-REPEAT as 2

No

Index=0

When TIMER0 is started first it will check for 33 bits scan code, if all the bits are present then it will be forwarded to RS232 link and if not then code will be rejected and will be again initialized. Figure shows all these processes:

Figure 3.4: Interrupt TIMER0 Flowchart.

3.9: Serial Data Communication through 8051: