RF Based PC Controlled Robot - Anup Chhetri

0 downloads 98 Views 950KB Size Report
robot in every house there by 2015-2020 in order to help catch up technologically with Japan. Similarly, different highl
CHAPTER 1 INTRODUCTION 1.1Introduction to the Project “RF Based PC Controlled Robot” is a wireless communication based project in which robot is remotely controlled by computer. A robot is a mechanical device that can perform tasks automatically. It may – but need not – be humanoid in appearance. Some robots require some degree of guidance, which may be done using a remote control, or with a computer interface. A robot is usually an electro-mechanical machine that is guided by a program or circuitry. Robots can be autonomous, semi-autonomous or remotely controlled and range from humanoids such as ASIMO and TOPIO to Nano robots, 'swarm' robots, and industrial robots. By mimicking a lifelike appearance or automating movements, a robot may convey a sense of intelligence or thought of its own. The branch of technology that deals with robots is called robotics. Our robot is a sample robot which is controlled by computer. It moves under the guidance of computer what the computer user wants the robot to do, move either left, right or forward, reverse and stop. It too got the headlight and one can on/off the headlight in need. It updates the detected information continuously in the computer through RF module which is a transceiver. This project is based on both hardware and software. It consists of a mechanical parts like wheel to move around and different hardware parts with visual basic software application. It is a wireless communication based robot which is controlled by PC (that is through computer interface). In this microcontroller based embedded project, computer (PC), RF module, a microcontroller and sensors (PIR motion sensor, temperature sensor) are major components. Our robot can work in hazardous and critical places where a threat to human rescuers is more. It can detect situation and give feedback to the computer with temperature and other detected obstacles. The sensed temperature, motion of obstacle detected between and from the obstacles can be updated in the computer regularly. Since, this project controls the object remotely we can make it indoor and outdoor according to our need. It can be successfully place in industries, home for security purpose and even for research on landscapes and abrupt changing environment. 1

1.2 Background Project is the one of the most important part for we engineering students where we implement our theoretical knowledge that we have acquired in the course of study from practical viewpoint and in order to attain a degree. It is good to develop a project which covers all the courses that we are offered in the session of study period. Looking to this we thought to choose those projects which would cover both software and hardware part along with some mechanical parts and too should be innovative in design and should be remotely controlled (wireless in nature). A robot system based project was a good choice.

The field of robotics is very interesting to anyone that curious about how living things or organisms (including people) interact with the real world. Robotics is a very comprehensive, applications-oriented field of study. A complete understanding of different principles,

technical

areas

such as

electromechanical

robotics

electrical principles, electronic

fundamentals,

involves many devices,

digital

basic programming techniques, hydraulics,

pneumatics, and basic manufacturing process. Generally, robots had been created for certain purposes or agency. A robot has artificial intelligence programmed which running by its own

or

control

by

a controller. The research about robot actually had started from

12thcentury consider about the high level of achievement of watchmakers whom made clockwork robots called automaton. The automatons are examples of the true robots as they were programmable via a system of interchangeable cams. As the time flows, the coming of industrial age, with its heavy use of machines, had a big culture impact. So, we came to find out “RF Based PC Controlled robot” which is a remotely controlled robot and works under the control of computer where the software part is handled by computer parts by itself which is interfaced with RS232 and leaves the message to RF module transceiver which is then information is again responded by RF module transceiver of robot.

2

1.3 Problem Statement Security has become the prime concern of every human being. Everyone wants to be secured from everything that comes in their life. He/she wants to be fit and fine from everything health wisely and from environmental conditions. So, to get secure from intruders to make the robot work 24 hours which the every human can’t do, we try to design and develop this project analyzing these types of problems. We can’t predict environmental condition changing and can’t keep our eyes 24 hour in and out of the door even in big industries. We need a mechanism that can be controlled remotely so, this project can do this type of work. We can know the environmental condition changing through temperature detector and detect the intruders through PIR motion sensor and even can find out the range of object located indoor and outdoor on the basis of placement of robot under the control of computer. The robot can be controlled remotely without the notice of anyone.

3

1.4 Objectives The main objective of the project is to develop and design a “RF Based PC Controlled Robot” which helps to detect: 

Temperature of surrounding



Motion of an obstacles around (humans, wall etc) through use of PIR motion sensor



To control the remote object from remote place (robot)

4

1.5 Application of Project The main application of “RF Based PC Controlled Robot” can be used on various areas of applications which are listed below. 

Remote control



Industry



Home automation



Medical appliances



Security



Instrumentation

5

CHAPTER 2 LITERATURE REVIEW

2.1 Literature Review of Project Development of Robot was found to be since 400 BC and 3rd century. Robot had come to human life for the past almost 90 years ago. Robot once was created with the purpose as a human assistant tool. But nowadays, people create robot for many reasons and purposes. Other than as human assistant tools, people make robots for hobby, entertainment, and personal use. Some people think or sense a robot is just about wires and wheels but several just think over the limit. Math rules physics, and physics rules robots.

The laws of physics and math are evident in everyday life. Throughout the history of science and technology, the path to great discoveries has almost started with the observation of simple events. Newton’s apple, Einstein’s empty room in space, and Shannon’s word games are clear examples. The sense that the technology was running away by itself was felt during this time and people felt that

it is unwise to develop a high functioning mechanical

human with no emotions no humanoid behaviors in it. Therefore, as the idea was there, in the year 1920, a Czechoslovakian name Karel Capek introduced the word ‘robota’ in the play of R.U.R – Rossum’s Universal Robot; human-like mechanical creature produced by Rossum’s factory. The word robot eventually comes from the Czech word, ‘robota’, which means labour. In this case, it means about a very long lasting labor. From the play, it certainly defines the stereotype of a modern age robots. And in early 1930, a programmable humanoid robot named Electro was invented by Westinghouse Electric Corporation.

Thus, in 1942, came the Three Laws of Robotics which are designed to protect human from robots. The Three Laws of Robotics are stated as follow; first, a robot may not injure a human being,

or, through inaction allow a human being to come to harm, Second, a robot

must obey the orders given to it by human beings, except where such orders conflict with the First Law, and Third, a robot must protect its own existence as long such protection does not conflict with the First and Second Laws.

6

Basically, there are two types of robots that widely use in human daily life which are industrial robot and mobile robot. Today we too see service robots, modular robots and military robots. These all are modern robots.

One robot in particular, the EATR, has generated public concerns over its fuel source, as it can continually refuel itself using organic substances. Although the engine for the EATR is designed to run on biomass and vegetations pacifically selected by its sensors, which it can find on battlefields or other local environments, the project has stated that chicken fat can also be used. As robots have become more advanced and sophisticated, experts and academics have increasingly explored the questions of what ethics might govern robots' behavior, and whether robots might be able to claim any kind of social, cultural, ethical or legal rights. One scientific team has said that it is possible that a robot brain will exist by 2019. Others predict robot intelligence breakthroughs by 2050. Recent advances have made robotic behavior more sophisticated. The social impact of intelligent robots is subject of a 2010 documentary film called Plug & Pray. By regional perspectives, in Japan and South Korea, ideas of future robots have been mainly positive, and the start of the pro-robotic society there is thought to be possibly due to the famous 'Astro Boy'. Asian societies such as Japan, South Korea, and more recently, China, believe robots to be more equal to humans, having them care for old people, play with or teach children, or replace pets etc.

The general view in Asian cultures is that the more robots advance, the better. "This is the opening of an era in which human beings and robots can co-exist," says Japanese firm Mitsubishi about one of the many humanistic robots in Japan. South Korea aims to put a robot in every house there by 2015-2020 in order to help catch up technologically with Japan. Similarly, different highly programmed Robots existed in this world along with different Robots with IR based remote control, RF based remote control and serial port communication Robots has also been found but visual basic based RF interfaced controlled Robot is a new innovation to us which we have designed.

7

2.2 Case Study The world is moving towards the automation and easiness to solve all real world problems. Day by day new innovations are evolving and the world is highly moving towards the development of robot. Looking to this, to facilitate the people with the services as per the human needs different highly programmable Robots is developed. The Robot we are designing is a basic Robot which will be capable of doing different activities under the guidance of computer and will store the information on the computer. The information is carried by RF modem which is totally wireless and range depends on how strong RF modem we use. The study matters are listed below: 1. Determine temperature of the surrounding 2. Detect the motion of an obstacles using PIR motion sensor. 3. To control Robot remotely through Visual Basic application 4. How RF module works

8

CHAPTER 3 SYSTEM ANALYSIS 3.1 Requirement Analysis In this requirement analysis we will discuss about the overall requirements of the system. This includes the components of the system that we need in order to give a shape to our project. The requirements we will be using is listed below. 

Mechanical parts of Robot



Circuit Components



Interfacing components

In the mechanical parts of Robot, the components required to built or designed a Robot will be discussed. We need to know about the wheels that Robot needs and a chip that it needs to control its movements. Its details will be discussed in next chapter in the system development. Similarly, in the circuit components requirement, we will discuss about the chips or electronic components used in designing a complete system.

Finally, in the interfacing components part we will discuss about the requirements of the components used in the project in order to interface the Robot with the Computer for date sharing and update.

9

3.2 Design Philosophy The overall design of our project is focused on hardware and software parts and mechanical parts. These are the two building blocks used in designing our project. In the hardware and software parts, we discuss about the hardware components used in the project along with the software that may be any application program in order to run the project smoothly. So talking about hardware and software parts individually, Hardware parts includes the circuit components like different chips, wires etc used in the project and their functions and operations whereas software part includes the application program that may be written either in C++, C#, VB.Net or VB6. The application that we are using in this project is VB6 (Visual Basic Ver.6) On the basis of the application that we designed the Robot works in that direction which the application user wants the Robot to do.

Similarly, in the mechanical parts, we discuss about the mechanical parts of the Robot that ate used in the project in order to deign it. We discuss about Robots wheel, its movements, its driving force to move Robot and physical design of Robot.

10

3.3 Block Diagram

Fig 3.1: Block Diagram of “RF Based PC Controlled Robot”

11

3.4 Flowchart

Fig 3.2: Flow chart Diagram of “RF Based PC Controlled Robot”

12

3.5 Working Principle In the system Block Diagram, the overall system is isolated into three different components. The first one is PC where through RS 232 it is interfaced with RF module and the second one is Robotic section which includes the microcontroller, RF module and the motor-driver chip and the third part is the sensor part. In this section we have used the sensors which are interfaced with Robot and give the information to the Robot on the basis of their design function. As we see, computer is interfaced with RS232 from where the Robot is controlled and the information is carried out by RS232 unto RF module. RF module is a transceiver; it receives and sends the data simultaneously as needed.

The two RF modules are installed on the system one for PC and another for robot from which the messages are exchanged. After the message is received the messages is passed to the motor driver chip through microcontroller in which a program is programmed for the robot and the different sensors used in the project and it works as per the program. Then the robot works under the control of PC as PC asks to do. The robot in then with the help of various sensors, temperature sensor, and PIR motion sensor, detects the temperature, finds the range to and from robot and detects the motion of an obstacles around it.

Then all the sensed information is passed to the PC through the RF module again and the computer updates the data. Thus, it works continuously.

13

3.6 Feasibility Analysis This project is feasible and user friendly. Robot can be controlled by the user, it moves in those directions where the user wants the Robot to move. Its sensors can be added on the basis of requirements on the Robot what the user wants on its system. The temperature sensor, PIR motion sensor are the added features on this Robot where the Robot can work as the security agent. We can add gas detector, humidity detector, and mine detector and obstacle detector sensors on the basis of user requirements with certain modification of programs. Thus our project is feasible from the economic and application point of view.

14

CHAPTER 4 SYSTEM DEVELOPMENT/ METHODOLOGY

In the system development, we discuss how the system is developed? How it works and how the problems encountered during the project period is debugged. 4.1 Tools Used In this project, tools used in designing a project are mainly mechanical devices and some electrical and electronically devices which are listed below: 

Universal Burner, software like Keil,Proteus,Visual Basic



Screw drivers, Soldering iron, soldering paste, soldering paste, tin wires, flexible wires



Matrix PCB board,switches,push button switches



Pliers,wire stripper,tape,fabicol



Furniture (piece of plywood board)



Knots/Bolts



Saw



Burner (ASM program burner)

All the above mentioned tools were used in designing a mechanical part of the project and soldering chips along with burning a program in the microcontroller. In the microcontroller ASM file is burned through universal program burner. Knots & Bolts, tapes and Saw was used to give shape to Robot by finishing furniture.

15

4.2 System Design Our system is divided into two sections one is software and hardware section and another is mechanical parts section .In software part, visual basic application as a user wizard is used to control the robot remotely. In hardware we discuss about circuit system implementation how it operates.In the next section Mechanical parts are discussed which constitute the robot. Its physical design is taken into account. In it we discuss about circuit design and their operation and working of overall components of the system.

4.2.1 Circuit Diagram The circuit diagram of the system is divided into two sections. One is PC interface part and another Robot interface part.

4.2.1.1 Circuit diagram I (PC interface with RF through RS232)

Fig4.1: PC (RS232) Interface with RF modem

16

4.2.1.2 Circuit diagram II (Robot interface with RF)

Fig4.2: Robot interface with RF modem

17

4.2.2 Circuit Components 

PC



RS232



Power supply



Microcontroller



RF modem



Motor driver chip (L293D)



Temperature sensor (DS1820)



Motion sensor (PIR)



MAX232



LM7805

Note: Datasheet of all the circuit components are attached with appendix. 4.2.3 Components Description 4.2.3.1 Computer (PC) Computer is an electronic device which reads the machine language in the binary form. It consists of volatile and non volatile memories RAM, ROM along with processors and mouse and keyboard as an input device from where we can input data. It is operated on various operating systems with different preloaded applications and utilities. In our project, PC is used to give direction (control) to the robot with the visual basic application installed in it.

Fig 4.3: A man using computer (PC) retrieved form computers clip art

18

4.2.3.2 RS232 RS 232 is a serial port connector used to interface the computer to transfer the data.

Fig 4.4: RS 232

4.2.3.3 Power supply Power supply is used to give a required power to the system for the system operation. In this system we are using 5-12 v power supply as required for microcontroller. We can use rectifiers for converting the A.C to D.C and a step down transformer to step down the voltage. We can also use the voltage regulator for this purpose. We will be using voltage regulator (adapter) as a power supply in the PC section as shown above in the circuit diagram I.

Fig 4.5: Power supply with LM7805

19

4.2.3.4 Microcontroller (AT89C52) A microcontroller is a computer-on-a-chip optimized to control electronic devices. It is a type of microprocessor emphasizing self-sufficiency and cost-effectiveness in contrast to a general purpose microprocessor.

It is an inexpensive single-chip computer that contains all the components comprising a controller. Typically this includes a central processing unit (CPU), random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), input/output lines, timers, and other built-in peripherals such as analog-to-digital converters (ADC). Unlike general-purpose computer, which also includes all of these components, a microcontroller is designed for a very specific task, to control a particular system. As a result, the part can be simplified and reduced, which cuts down on production cost. We are using AT89C52 microcontroller in our project.

Fig 4.6: AT89c52

20

The AT89C52 is a low-power, high-performance CMOS 8-bit microcomputer with 8K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industrystandard 80C51 and 80C52 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C52 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.

The AT89C52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a fullduplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89C52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next hardware reset.

4.2.3.4.1 Features of AT89C52  Compatible with MCS-51™ Products  8K Bytes of In-System Reprogrammable Flash Memory  Endurance: 1,000 Write/Erase Cycles  Fully Static Operation: 0 Hz to 24 MHz  Three-level Program Memory Lock  256 x 8-bit Internal RAM  32 Programmable I/O Lines  Three 16-bit Timer/Counters  Eight Interrupt Sources  Programmable Serial Channel  Low-power Idle and Power-down Modes

21

4.2.3.4.2 Applications of Microcontroller  Remote control  Industry  Home automation  Medical appliances  Security  Instrumentation  Transmission control  Cellular phones  Answering machines  Lighting control  Keyless entry  Answering machine

22

4.2.3.5 RF module (HM-TR) 4.2.3.5.1 Introduction RF Module is a (usually) small electronic circuit used to transmit, receive, or transceiver radio waves on one of a number of carrier frequencies. RF Modules are widely used in consumer application such as garage door openers, wireless alarm systems, industrial remote controls, smart sensor applications, and wireless home automation systems. They are often used instead of infrared remote controls as they have the advantage of not requiring line-of-sight operation. Transmission through RF is better than IR (infrared) because of many reasons. Firstly, signals through RF can travel through larger distances making it suitable for long range applications. Also, while IR mostly operates in line-of- sight mode, RF signals can travel even when there is an obstruction between transmitter & receiver.

Next, RF transmission is more strong and reliable than IR transmission. RF communication uses a specific frequency unlike IR signals which are affected by other IR emitting sources. This RF module comprises of an RF Transmitter and an RF Receiver. The transmitter/receiver (Tx/Rx) pair operates at a frequency of 434 MHz An RF transmitter receives serial data and transmits it wirelessly through RF through its antenna connected at pin4. The transmission occurs at the rate of 1Kbps - 10Kbps.The transmitted data is received by an RF receiver operating at the same frequency as that of the transmitter. Several carrier frequencies are commonly used in commercially-available RF modules, including 433.92MHz, 315MHz, 868MHz and 915MHz

Fig 4.7: RF module Source http://www.google.com/search?q=rf+module&hl=en&rlz=1T4NDKB_enNP525NP526&source= lnms&tbm=isch&sa=X&ei=KNdRUfyyEIOA4gTy0oGIBA&ved=0CAoQ_AUoAQ

23

The HM-TR series UHF wireless transparent data transceiver, developed by Hope Microelectronics Co. Ltd, is designed for applications that need wireless transmission. It features high data rate, longer transmission distance, programmable frequencies, configurable UART formats and low sleep current make it deal choice. The commjunication protocol is self controlled and completely transparent to users. The module can be embeded to yourexisting design so that low cost high perfornance wireless data communication can be utilized easily.

4.2.3.5.2 Features 

FSK (Freqency Shift Keying ) modulation, high interference immunity



2-way half-duplex communication



315/433/868/915MHz ISM band, globally license free.



Programmable frequencies all allowing be used in FDMA applications



Self controlled RF to UART protocol translation, reliable and easy to use.



Configurable UART format, with data rate from 900-19200bps.



Using enable pin to control duty-cycle to satisfydifferent application requirements



Hig performance, long transmission range.>300m in open area.



Standard UART interface, with TTL or RS232 logic level available



Compact size, standard 0.1” pinch SIP connector and SMA anteena socket



No RF tunuing needed in application

4.2.3.5.3 Applications 

Remote control, remote measurement system



Wireless metering



Access contol



Identity discrimination



Data collection



It home appliance



Smart house products



Data store and forward repeater

24

4.2.3.6 Motor driver chip (L293D) The L293 and L293D are quadruple high-current half-H drivers. The L293 is designed to provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V. Both devices are designed to drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage loads in positive-supply applications All inputs are TTL compatible.

Each output is a complete totem-pole drive circuit, with a Darlington transistor sink and a pseudo- Darlington source. Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN. When an enable input is high, the associated drivers are enabled, and their outputs are active and in phase with their inputs. When the enable input is low, those drivers are disabled, and their outputs are off and in the high-impedance state. With the proper data inputs, each pair of drivers forms a full-H (or bridge) reversible drive suitable for solenoid or motor applications.

Fig 4.8: L293D Source: From Datasheet

25

4.2.3.6.1 Features 

Wide Supply-Voltage Range: 4.5 V to 36 V



Separate Input-Logic Supply



Internal ESD Protection



Thermal Shutdown



High-Noise-Immunity Inputs



Functionally Similar to SGS L293 and SGS L293D



Output Current 1 A Per Channel (600 mA for L293D)



Peak Output Current 2 A Per Channel (1.2 A for L293D)



Output Clamp Diodes for Inductive



Transient Suppression (L293D)

4.2.3.7 Temperature sensor (DS1820) 4.2.3.7.1 Introduction The DS18S20 digital thermometer provides 9-bit Celsius temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. The DS18S20 communicates over a 1-Wire bus that by definition requires only one data line (and ground) for communication with a central microprocessor. It has an operating temperature range of –55°C to +125°C and is accurate to ±0.5°C over the range of –10°C to +85°C. In addition, the DS18S20 can derive power directly from the data line (“parasite power”), eliminating the need for an external power supply.

Each DS18S20 has a unique 64-bit serial code, which allows multiple DS18S20s to function on the same 1-Wire bus. Thus, it is simple to use one microprocessor to control many DS18S20s distributed over a large area. Applications that can benefit from this feature include HVAC environmental controls, temperature monitoring systems inside buildings, equipment, or machinery, and process monitoring and control systems.

26

Fig 4.9: Temperature Sensor (DS1820) Source: http://www.google.com/search?q=DS1820&hl=en&rlz=1T4NDKB_enNP525NP526&tbm=isch &gs_l=img.1.0.0l10.205596.208890.0.211895.17.6.0.0.0.0.1155.1155.71.1.0...0.0...1c.1.XObEdg8yaEA&oq=DS1820 4.2.3.7.2 Operation (Measuring temperature) of DS1820 The core functionality of the DS18S20 is its direct-to-digital temperature sensor. The temperature sensor output has 9-bit resolution, which corresponds to 0.5°C steps. The DS18S20 powers-up in a low-power idle state; to initiate a temperature measurement and A-to-D conversion, the master must issue a Convert T [44h] command. Following the conversion, the resulting thermal data is stored in the 2-byte temperature register in the scratchpad memory and the DS18S20 returns to its idle state. If the DS18S20 is powered by an external supply, the master can issue “read-time slots” after the Convert T command and the DS18S20 will respond by transmitting 0 while the temperature conversion is in progress and 1 when the conversion is done. If the DS18S20 is powered with parasite power, this notification technique cannot be used since the bus must be pulled high by a strong pull up during the entire temperature conversion. The bus requirements for parasite power are explained in detail in the Powering the DS18S20 section. The DS18S20 output data is calibrated in degrees centigrade; for Fahrenheit applications, a lookup table or conversion routine must be used. The temperature data is stored as a 16-bit signextended two’s complement number in the temperature register. The sign bits (S) indicate if the temperature is positive or negative: for positive numbers S = 0 and for negative numbers S = 1. Table 1 gives examples of digital output data and the corresponding temperature reading. 27

Resolutions greater than 9 bits can be calculated using the data from the temperature, COUNT REMAIN and COUNT PER °C registers in the scratchpad. Note that the COUNT PER °C register is hard-wired to 16 (10h). After reading the scratchpad, the TEMP_READ value is obtained by truncating the 0.5°C bit (bit 0) from the temperature data. The extended resolution temperature can then be calculated using the following equation: Temperature= Temp_read-0.25+ (Count_Per_C-Count_remain/Count_Per_C)

28

4.2.3.8 PIR motion sensor (TDL-718A) 4.2.3.8.1 Introduction The passive Infrared (PIR) sensor will, under typical conditions detect a human being moving around within approximately 10m from the sensor. This is an average value and the actual detection range is between 5m to 12m. As the performance of the sensor is determined primarily by environmental conditions

Fig 4.10: PIR motion sensor Source: http://www.google.com/search?q=pir+motion+sensor&hl=en&rlz=1T4NDKB_enNP525NP526 &source=lnms&tbm=isch&sa=X&ei=59RRUeeMHMKZhQevsYDAAQ&ved=0CAoQ_AUoAq

4.2.3.8.2 Background Passive Infra-Red Sensors have been around since the 1940s, originally being used for military and scientific applications. Now the technology is being used in a wide range of products designed specifically for commercial and domestic automatic lighting. Today’s modern sensor maximizes efficiencies in automatic light control, promoting convenience, safety and cost-savings.

29

4.2.3.8.3 Common Location for PIR sensor Nearly any area where people only occasionally walk or move through and which is not required to be continuously lit, could benefit from the installation of a PIR sensor. Some examples are hallways, foyers, paths, driveways, garden areas and car parks.

4.2.3.8.4 Working of PIR sensor All PIR sensors detect changes in infra-red radiation, in the form of heat emitted by a number of bodies including people, cars and, to a lesser extent, dogs or other small animals. The bigger the body, the more infra-red radiation is emitted and the easier it is for a PIR sensor to detect. The field of view is the area in which changes in infra-red radiation can be detected. The field of view can alter with changes in temperature and the size of the heat source. It senses an object with the coning angle of 110 degree and distance 7-10 meters

Fig 4.11: Area of coverage shown by PIR sensor Source: From Datasheet 30

Each zone is constantly monitored by the sensor. When a person or other heat source enters any zone, the level of infra-red radiation in that zone increases. This change is detected and processed by the sensor, switching on the connected lighting and starting the in-built ‘Time’ process.Providing the heat source (person) continues to move in the field of view, the PIR sensor will keep processing the changes in infra-red radiation and the lighting will stay on. If a person stands still in the field of view or moves out of the detection area, the sensor will not detect any changes in infra-red radiation between the zones and the lights will go out after the ‘Time’ period is complete.

In order for the sensor to most effectively detect changes in heat between zones, it is advisable to walk across the zones not up or along a zone. PIR sensors are passive devices; they do not emit or radiate any energy or beams.

4.2.3.8.5. Effects of temperature changes in PIR sensor All PIR operate by detecting the temperature difference between the ambient air temperature and a moving heat source (person). Outside air temperature changes have the greatest effect on the operating performance of PIRs. The sensitivity of the sensor increases on cold nights and decreases on hot nights. On cold nights, the difference in temperature between a person (normal body temperature is 37°C) and the outside air temperature is relatively large, giving an apparent increase in performance of the sensor. On hot nights, this difference in temperature is relatively small and a decrease in performance of the sensor can be expected. At 15° – 20°C, the sensor should perform according to the stated specifications. If the ambient temperature increases to 30°C or more, the following changes occur: 1. The maximum distance and field of view significantly decrease (up to as much as 50%). 2. The distance a heat source has to move across the zones to activate the sensor increases. 3. The size of the heat source required to activate the sensor increases. At an ambient temperature of 10°C or less, the opposite occurs: 1. The maximum distance and field of view increases. 2. The distance a heat source has to move across the zones to activate the sensor decreases. 3. The size of the heat source required to activate the sensor decreases. 31

Fig 4.12: Effect of temperature changes in PIR sensor

Source: From datasheet 4.2.3.8.6 Applications & Functions and Features 

Automatic induction: when people enter into the range of induction, it will turn on, when people leave; it will turn off with delay.



It can be applied to corridor, passageway, toilet, basement, warehouse, garage, etc., which have the function of automatic lighting, and control.



luminance metering: we can add photo activity according to customers’ requirement



Random delay time:16seconds(customized 2seconds~120minutes)



Temperature compensation: tuodi specialized temperature compensation chip, which used to reducing the effect of temp. On detecting distance.



Triggering mode: repeatable triggering mode, non-triggering mode(option)

32

4.2.3.9 MAX 232 The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and a typical hysteresis of 0.5 V, and can accept ±30-V inputs. Each driver converts TTL/CMOS input levels into EIA-232 levels.

Fig 4.13: MAX232 Source: From datasheet

4.2.3.9.1 Features of MAX232 

Meet or Exceed TIA/EIA-232-F and ITU Recommendation V.28



Operate With Single 5-V Power Supply



Operate Up to 120 kbit/s



Two Drivers and Two Receivers



±30-V Input Levels



Low Supply Current . . . 8 mA



Typical Designed to be Interchangeable With Maxim MAX232



ESD Protection Exceeds JESD 22 – 2000-V Human-Body Model (A114-A)

4.3.9.2 Applications of MAX232 

TIA/EIA-232-F



Battery-Powered Systems Terminals



Modems



Computers 33

4.2.3.10 LM7805 4.2.3.10.1 Introduction It is a chip used to convert the input voltage into regulated output 5V. This series of fixedvoltage integrated-circuit voltage regulators is designed for a wide range of applications. These applications include on-card regulation for elimination of noise and distribution problems associated with single-point regulation. Each of these regulators can deliver up to 1.5 A of output current. The internal current-limiting and thermal-shutdown features of these regulators essentially make them immune to overload.

In addition to use as fixed-voltage regulators, these devices can be used with external components to obtain adjustable output voltages and currents, and also can be used as the powerpass element in precision regulators.

Fig 4.14: LM7805 Source retrieved from http://www.google.com/search?q=lm7805&hl=en&rlz=1T4NDKB_enNP525NP526&tbm=isch &oq=LM7805&gs_l=img.1.0.0l10.205596.208890.0.211895.17.6.0.0.0.0.1155.1155.71.1.0...0.0...1c.1.XObEdg8yaEA

4.2.3.10.2 Features of LM7805 

3-Terminal Regulators



Output Current up to 1.5 A



Internal Thermal-Overload Protection



High Power-Dissipation Capability



Internal Short-Circuit Current Limiting



Output Transistor Safe-Area Compensation

34

4.2.4 Working of Circuit Diagram Working of circuit diagram is the process introducing the mechanism and principle operation of the whole system of the project. Here, operation of the system is the way of functioning through getting specific inputs so as to response towards the outputs which are assumed or predicted towards its development.

The system is divided into two parts. Part I consists of (RF interfaced with PC) through RS232. The second part consists of (Microcontroller interfaced with RF modem and motor driving chip) Robot interfaced with RF as shown in above fig: 4 and fig: 5. In the first section, we see RS232’s one section will be connected with PC and the another part of RS 232’s pin 2 and pin 3 will be connected with MAX232’s pin 7 and pin 8 as receiver and transmitter respectively. Again pin 10 and pin 9 of MAX232 will be connected to Rx and TX pin of RF modem for communication to receive and transmit the information.

Computer is the important part of our project. We are using computer as a remote for the robot. The PC controls the movement of robot with the help of visual basic software. The visual basic program is installed in the PC and with the help of it, robot is remotely controlled and is guided the direction that the user wants the robot to move. It may be forward, reverse, left and right and even stop. It too has got facility of headlight system. We can on and off the head light of robot as we need. The computer gets the BCD codes and then computer converts it into its required ASCI code or machine language that computer can read with the help of visual basic software and information is displayed on the screen or window of PC over a window of VB.

In the second part, system deals with Robot interface with RF modem as its circuit diagram is shown is fig: 5. Here, RF modem is connected to microcontroller (AT89c52) to pin 10 and 11 as TX and RX respectively to receive and transmit the information to and from the PC and robot. The microcontroller is equipped with a program for the robot and different sensors we use in the project. The hex file of a program in the microcontroller is converted to binary coded decimal so that the microcontroller can easily read the program. In then, pin 1, 2, 7, 10, 15 of L293D is connected to pin 28, 27, 26, 39, 38 and 37 of microcontroller respectively as an enable pin to make full-H drives for motors. Pin 3, 6 and pin 14, 11 of L293D are respectively used for motors 35

to drive. The motor is internally designed with two pairs of drivers 1, 2 and 3, 4. Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN. When an enable input is high, the associated drivers are enabled, and their outputs are active and in phase with their inputs. When the enable input is low, those drivers are disabled, and their outputs are off and in the high-impedance state. When the voltage is applied in the microcontroller and the motor driver chip as required by them, the motor starts and motor runs in the required direction as suggested by the computer. Similarly, for sensors the sensors temperature detector and Passive Infrared (PIR) motion sensor are connected to port 2.0 and port 2.4 i.e. pin 21 and 25 respectively of microcontroller.

The temperature is updated in the window of VBB software installed in PC and motion of obstacles is also updated over the PC and the information is shared with the help of RF modem (transceiver). In this way, the robot works under the guidance of PC and is operated remotely through RF. It moves the directions forward, reverse, left, right and even stops as the user needs. All the information is then updated on the PC through RF.

36

4.2.5 Mechanical Section In mechanical section, working of mechanical parts and their assembling is studied. In our robotic system, robots wheel and the motor we use to run wheel is discussed. Mechanical parts used in our system are listed below. 

DC geared motor



Caster wheel



Wheel

4.2.5.1 DC geared motor 4.2.5.1.1 Introduction Motor gives power to microcontrollers. Power to do physical works for example to move robot in different desired directions. We can control dc motor easily with microcontrollers. We can start it, stop it or make it go either clockwise or anti clockwise direction. We can also control its speed.

A dc motor is electromechanical device that converts electrical into mechanical energy that can be used to do many useful works. DC motors come in different ratings like 6v and 12v. It has two wires or pins. It can hold about 2.7 kg load and operates 6-12 v in 200 rpm.

Fig 4.15: DC Geared Motor, 12v, 200rpm

37

4.2.5.1.2 Control with Microcontrollers As the microcontrollers port are not enough to drive DC motors directly so we need some kind of drivers. A very easy and safe is to use popular L293D chips. It is a 16 pin chip.

Fig 4.16: L293D pin configuration Source : From datasheet

4.2.5.2 Caster wheel It is front wheel of robot. It has no any resemblance with circuit components. It is a supporting wheel.

Fig 4.17: Caster wheel Source: From snapshots of our project

38

4.2.5.3 Wheel These are the two back wheels of a robot. They help to drive the load and is directly connected with L293D output pins 3 and 6 and 14 and 11 pins.

s Fig 4.18: Robots back wheel Source: From snapshots of our project

39

4.2.6 Interface for Controlling Robot In this section the robot is interfaced with computer with the help of visual basic application. Visual basic application is installed in the computer. The computer is interfaced with RF module through RS232 which in then helps to control the robot. Through the different directions as the user wants the robot is controlled. The robot moves left, right, forward, stop and reverse as guided by the user. The information the robot senses is then updated in the visual basic wizard, the information is then displayed in the screen of computer. This is the mechanism the robot works and is controlled as the user wants on pressing different icons available in the VB application.

Fig 4.19: Snapshot of Visual basic application interfaced with Robot Source: From snapshots of our project

40

4.3 Total Cost Estimated components Price rate in the market S.N

Components

Quantity

Rate(Rs.)

Amount

Comment

1

Microcontroller(AT89c52)

1

150

150

*

2

DS1820

1

490

490



3

RS232

1

200

200



4

RF module

2

2450

4900



5

MAX232

1

115

115



6

PIR sensor

1

1850

1850

7

SMPS

1

200

200



8

LM7805

1

40

40



9

L293D

1

190

90



10

Wheel

2

250

500



11

Capacitors

10

15

150

12

Resistor pack

1

90

90

13

SIP10

1

10

10



14

PCB Board

5

35

175



15

Wire Connectors

3

60

180



16

Connecting pins

6

60

360



17

Sockets

10

35

350



18

LED Wire

2

30

60



19

Quartz crystal

1

35

35



20

Caster Wheel

1

100

100



21

Others

-

-

690



Total Amount

11140**

Fig Table 4.1: Total cost

41

*Purchased components not necessary to be used in system ** Includes only components expense Note: This table doesn’t include the expenses of printing and photocopying of the proposals, reports and other documents. Approximately spends NRS.15000 on this work. Transportations expenses are not considered here.

So, as stated in the above budget structure the funding source is we group members on ourselves. The estimated budgets for the project seem to be around NRS.12, 000/- in range without showing any other stationeries and transportation charge.

42

4.4 Problems Encountered Facing with the problems and finding out the solutions for it really make us feel happy and increases the idea or technique of playing with problems and finding the new solutions for it. It provides us the knowledge and increases the brain power and even increases our interest in the project. In the session of doing a project, main problem we faced was availability of integrated chips or required circuit components for the project in the market. We searched so many markets installs about chips however we get the chips but they were incompatible for the project. It’s really difficult to find out the exact components for the project. Getting the circuit components is not only the solution, the real problem occurs while testing the hardware. We undo the soldering of hardware so often which really makes the PCB dirty. It’s really difficult to get the output because making a program, doing hardware so fine really do not brings the output smoothly, we need to care the values of resistors and capacitors, and even the power supply plays a vital role in getting an output.

Similarly, burning a program in a microcontroller was also a common problem we faced. We need to have 3-4 extra microcontrollers burned with the same program because we can’t guarantee when the microcontroller with program will be corrupt. It’s good to keep reset pin outside the PCB because resetting a overall system of project is often unavoidable while testing a project. The problem increases with the tougher project we select, however it also increases our power of debugging. Giving a good finishing to a project is another thing we need to think. We so many times undo knots/bolts of the Robot and even undo wheels of the Robot. The chips were damaged so many times that was also so common problem we encountered. Really facing so many problems during testing of project and debugging it really spreads happiness in our face.

43

CHAPTER 5 RECOMMENDATIONS & CONCLUSION 5.1 Limitations Every project has its own merits and demerits while testing and debugging it, we achieve a final output what we have desired for. On the duration of working out the project we come to find some of the demerits of our project which our Robot can’t do. The problems and limitations that we faced during our project session are listed below. 

It cannot move in a rough surface smoothly



No audio and visual information of detected object.



Robot can be controlled around 100m as RF module specification.



It can’t detect very small objects.



Operator should watch the location of robot to control it.

44

5.2 Future Enhancement Future enhancement on any project is needed to make more effective and advancement of the project. So this project can be enhanced by adding following extra features in future 

We can enhance PC controlled robot and controlled through GSM based system.



We can enhance project by adding camera on the robot so that we can capture videos and audios of remote place in the screen.



Mine detection can be added.



Fire detection can be added.



The Robot can be further enhanced by controlled it through web based services.

45

5.3 Conclusion Our project named “RF Based PC Controlled Robot” was successfully succeeded. It is really a great achievement for us. We finally got what we have worked with great hardships. It built us new innovation of knowledge on robotics for us where we were benefited with various ideas on software, hardware and mechanical parts including knowledge about the wireless communication as well as to control the remote object from remote place. This project is a complete is a medium where we can testify and update our theoretical knowledge into real time scenarios. It imparted us visual basic programming knowledge with assembly language coding in microcontroller

46

BIBLIOGRAPHY/REFERENCES  Retrieved on august 15, 2012 from, http://www.8051projects.info/content/projects/48-rfbased-remote-control-robot.html  Let’s make robot, Retrieved Aug 20, 2012 from www.best-microcontroller-projects.com/  Robots, Retrieved Aug 21, 2012 from http://www.projects8051.info  M.A. Mazidi and J.G. Mazidi, “The 8051 Microcontroller and Embedded System” 10th Edition  All datasheet of circuit components, Retrieved on December 20, 2012 from http://www.alldatasheet.com/

47