26-10-2016, 04:01 PM
1461473522-MAINPRJCT.docx (Size: 891.14 KB / Downloads: 6)
ABSTRACT
This project controlled the robot system in a new economical solution and as well as it is used for different sophisticated robot application. The control system consists of Touch screen and ZigBee modules, a microcontroller that collects and controls the robot. Now Spying area in military ground where enemy stay can be took before taking any action. The Mini Spy Robot is small robot with a camera attached to it. The body of the robot consists of two wheels attached to geared motors. The motors will be run by the relays which will be then controlled through Touch screen via “ZIGBEE” device. Just by using a ZigBee enabled Touch screen, the user can control the SPY ROBOT from anywhere area.
INTRODUCTION
A complete solution of a robot control solution is presented in this project. This spy robot was fully controlled by the TOUCH SCREEN and the commands from the TOUCH SCREEN via ZigBee transmitter were received by the microcontroller. So this spy robot can be used in military applications. Most of the military organization now takes the help of robots to carry out many risky jobs that cannot be done by the soldier. These spy robots used in military are usually employed with the integrated system including gripper and cameras, video screens, sensors. The military robots also have different shapes according to the purposes of each robot. Here this system is proposed with the help of low power ZigBee wireless sensor network to trace out the intruders and the robot will take the necessary action automatically. Thus the proposed system, an Intelligent Robot using ZigBee saves human live and reduces manual error in defence side. This is specially designed spy robotic system to save human life and protect the country from enemies. One of the most important things about these robots is that they have the capability to perform missions remotely in the field, without any actual danger to human lives.
.
1.2 PROJECT OVERVIEW
The advent of new high-speed technology and the growing computer capacity provided realistic opportunity for new robot controls and realization of new methods of control theory. This technical improvement together with the need for high performance robots created faster, more accurate and more intelligent robots using new robots control devices, new drives and advanced control algorithms. An embedded system is a combination of software and hardware to perform a dedicated task. Some of the main device used in embedded. Here In a robot section gas sensor senses the gas leakage. Metal detector used to detect bombs. A camera is a device that records images, either as a still photograph or as moving images known as videos. This is used in the robot to take the video surveillance of the area.
1.3 OPERATION
There are two major components in our project namely, spy robot and touch screen sensor. The body of the robot consists of two wheels attached to geared motors. The motors will run by the relays which will be then controlled through touch screen via "ZIGBEE” device.
In our project power 2 pin converter is used for power supply. The Bridge rectifier is used which converts the alternating current to direct current. While converting Ac to Dc we are getting ripples. In order to avoid that ripples we are using Electrolytic capacitor. Electrolytic capacitor is of frequency range 1000UF.microcontroller requires 5V, but we are getting 9V from the power 2 pin converter. So, Ic7805 voltage regulator gives constant voltage of 5v to microcontroller. The IC7805 voltage regulator has 3 pins they are input of 12 or 9v, ground 0v, output 5v. The output of voltage regulator 5v is connected to microcontroller. Crystal oscillator which gives the pulses to microcontroller of frequency range 11.0592MHZ. Disk capacitor is used which gives the pulses to crystal oscillator. Led requires 2-3v, but we are getting 5v from voltage regulator. So pull up Resistor is used. All pins of microcontroller are activated port 1, Port 2; port3.There is no current for port 0. To get the current for port 0 pull up Resistor Is used. Resistor which opposes the flow of current and supplies the required 2-3 v for led. Resistor is of range 33k ohms.
1.4 L293D
L293D is a dual H- bridge motor driver IC. It drives and controls the robot. L293D acts as current amplifiers. Since they take the low current control signal and provide a higher current.
1.4.1 Operation of L293D:
The 2 motors can be controlled by input logic at pins 2 & 7 and 10 & 15. When input logic is 00 or 11 it will stop the motor. When input logic is 01 or 10 it will rotate it in clockwise & anticlockwise direction.
It 3 pins they are:
• power pin
• data pin
• direction pin
This power pin is used to supply the power to L293D IC.
1.5 ZigBee module
It is a two way communication of frequency 2.4GHZ frequency and wavelength of 500 meters. Xbee offers application programming three modes of operation
• AT mode, following the command mode.
• Secondly, it can identify the source address of each packet
• Thirdly, it will receive update on the transmission status whether it is successful or fail
ZigBee has 5 pins:
• VDD
• GND
• XD
• RXD
• CMD
ZigBee has address IC, control IC data storage.
TOUCHSCREEN DISPLAY
In our project Touch screen has 5 different options in order to monitor the spy robot.
They are:
• Forward
• Backward
• Light
• Left
• Stop.
The commands from touch screen are sent via ZigBee transmitter was received by the microcontroller.
1.6.1 INDICATIONS:
1. Power indication
2. Signal indication
When the commands is sent by touch screen then the signal indication glows or ON. Power indication is ON when the current is support. One of the important components used is RS232 PROTOCOL.
It has 2 pins, they are:
• Power pin and
• Data pin.
The data pin is used to send the data to microcontroller with touch screen. In RS232 there is address IC, which requires pulses so we used crystal oscillator.
INTRODUCTION TO EMBEDDED SYSTEMS:
An embedded system is a specialized computer system that is housed in a large system in order to carry out certain specific applications. Some embedded systems include operating systems and most are so specialized such that the entire logic can be implemented as a single program.
2.1.1 The System Components of Embedded
An embedded system is, basically, a computer controlled device designed to perform specific tasks. In most cases, these tasks help resolve the real-time control of machines or processes. Embedded systems are cheaper than general purpose system, such as PCs.
2.1.2 Processor
The main part of an embedded system is the processor, which could also be a generic microprocessor or a microcontroller and programmed to perform the specific tasks for which the integrated system has been designed.
2.1.3 Memory
Electronic memory is an important part of embedded systems and three essential types of memory can be described: RAM, or random access memory, ROM, or read only memory, and Cache. The RAM is one of the hardware components where data are temporarily stored during execution of the system. The ROM contains input/output routines that are needed for the system at boot time. The cache, instead, is used by the processor as a temporary storage during the processing and transferring of data.
2.1.4 System Clock
The system clock is used for all processes is running on an embedded system and requiresprecisetiminginformation.Thisclockisgenerallycomposedofanoscillator and some associated digital circuitry.
2.1.5 Peripherals
The peripheral devices are provided on the embedded system boards for an easy integration. Typical devices include serial port, parallel port, network port, keyboard and mouse ports, a memory unit port and monitor port. Some specialized embedded systems also have other ports such as CAN-bus.
2.2 Characteristics and Example of Embedded System
Most embedded systems are designed to perform a continued action at a low cost. Mostofthesesystemsalsohaveconstraintsontheperformanceintermsofhardware and software, such as require operating in real time when a system needs high sped while executing some functions, but may tolerate lower speed for other activities. It is difficult to characterize the speed or the cost of a generic embedded system, especially for systems that have to process a large quantity of data. Fortunately,
2.2.1 Characteristics and Example of Embedded System 27
Most of the embedded systems have the essential characteristics that can be designed with combination of hardware and high-performance software. To get an idea, just think of a decoder for a satellite television. Although a system should process tens of megabits of data per second, most of work performed by dedicated hardware, separates rule and decoding of the data flow in multi-channels digital video output. Embedded CPU calculated the locations of detain the system, manages interrupts and clock systems. Usually, the hardware of an embedded system must comply with the performance requirements much less stringent in according to the hardware of the primary system itself. This allows that the architecture of an embedded system, for example, must beintentionallysimplifiedandcomparedtothatofageneral-purposecomputerwith the same tasks, using a CPU more economic that basically behaves well for these secondary functions. In the case of portable systems, costs reduction becomes a priority. This kind of system, in fact, often is made by a highly integrated CPU, a chip dedicated to all other functions and a single board of memory. In this case each component is selected and designed to reduce as much as possible the costs. The useful software to manage many embedded systems is called firmware. The firmware is a type of software that, for example, can be found in ROM or Flash memory chips. The software and firmware are designed and tested with much more at tension than traditional software for personal computers. Many embedded systems avoid incorporating components with moving parts (such as hard disk) that are less reliable than solid-state components such as flash memory. Moreover, embedded systems may not be physically accessible (e.g. space systems); therefore, the system must be capable of a self-reset in case of data loss or corruption. This feature is very often obtained with the addition of a component called Watchdog that resets the computer in regular time intervals by an internal timer. In the design of a modern and reliable embedded system is possible to note two fundamental characteristics: reprogram ability and the dimension. In fact, it would be helpful to think of a dedicated system can be readapted if, for example, system upgrade is required. Embedded systems are classical discrete elements of ASIC design that allow the advanced optimization because the hardware occupies the necessary space strictly, making the control system easily integrated. An application-specific integrated circuit (ASIC) is an integrated circuit (IC) that has been customized for purpose use. Today the control of vehicles is one of the main applications of embedded systems. In a single high-end carry you can find hundreds of embedded systems called ECU (Electronic Control Unit), physically distributed in the vehicle and connected to the different internal networks(networks intra-vehicle) specially designed, in most cases with stringent requirements of quality of service’. A computer is the first and foremost versatile: it can be programmed to suit various areas of application. Conversely, the embedded system is a device dedicated to the performance of a single task, or a very narrow class of tasks. Thanks to the specify of the run application, the embedded system can be designed to optimize particular.
The general purpose of the computers is designed with standards and reference architectures; and vice versa is difficult to define standards for embedded systems because each specific application leads to different design choices.
Typical functions of embedded systems can be the following:
• Processing: ability to process the analog/digital signals.
• Communication: ability to transfer signals (“Information”) from/to the outside world.
• Storage: the ability to preserve the temporary information within the embedded system.
• Each specific application made by an embedded system has different requirements for processing, power supply, storage and communication.
• A same functionality (e.g., the ability to acquire still images via a CCD sensor) can be optimized radically in different way when applied, for example, a digital camera or a cell phone or a digital camcorder.
Moreover, commercial features of embedded systems can be described in the following points:
• Final Cost: The cost of the final product is a very important parameter for the design choices.
• Time to market: in the design of an embedded system must always keep in mind the timing you want the product listed on the market; taking too long to design a device means that it’s difficult to overcome the fast changes in the market.
• Lifetime: Another important factor is the expected life time for the product; which can vary from a few days to several years or decades.
• Volume: the quantity of stock planned for the system is one important factor in the design phase.
Embedded systems are not always standalone devices. Many embedded systems consist of small, computerized parts within a larger device that serves a more general purpose.
Hardware and software characteristics of embedded systems can be described in the following points:
• Communication interfaces: typically the sale price of an embedded system is low, the choice of communication interfaces is critical because it greatly affects the final price of the product.
• User Interface: In many embedded systems the user interface consists of a few buttons and/or LEDs; in others, it uses the user interface of a host system. • Power management: is a crucial factor to be considered for all embedded systems are powered by batteries.
• Dimensions and weight: in many cases, the physical characteristics are another critical factor; usually the embedded system must be small, very light or with a particular form (for example, very thin).
• Quality of service: many applications of embedded systems have stringent requirements in terms of QoS (Quality of Service); as a particular case, many applications require the provision of services in real time with stringent timing constraints.
2.2.2 Characteristics and Example of Embedded System 29
• Code size: the storage capacity of embedded systems is limited, so the size of the internal program (e.g. firmware) is an important factor.
• Numeracy/Communication skills/Storage: commensurate to the specific application performed by the embedded system.
• Updating the program: it is useful to include the ability to update the programs in embedded systems so as to correct errors discovered after the production and introduce new features.
In addition to the parameters involved in the market, the hardware, software features and embedded systems are used to be dependable. Actually, in the design phase is necessary to consider the following aspects:
• Reliability: realistic assessment of the probability that the system fails.
• Maintainability: the system can be repaired or replaced within a certain time interval.
• Availability: probability that the system is working; essentially depends on the reliability and maintainability.
• Safety: properties related to the possibility that in the event of system failure are caused damages to people or things.
• Security: resilience of the system against unauthorized use. To design the embedded systems, it should take into account aspects such as the speed of development, the economy of scale, maintainability and so on.
Consequently, it is not possible to develop the hardware also without consider the software design. If the embedded system is safety-critical, the choice of the software organization plays a crucial role in the ability to certify the system for the use to which it is intended. The real-time system is a system designed to operate within the well-define time parameters. Practically, a real-time system operates correctly only if every input configurationisproducedbytherightoutputrespectingwell-definedtimeconstraints.
2.3 Hardware and Software Design
The device required to achieve by designing an embedded system is, certainly, a system that will optimize various metrics of design; the most common areas the following:
• Unit cost and cost NRE (non-recurring costs).
• Size and weight.
• Performance and power consumption.
• Flexibility and maintainability.
• Time-to-market.
• Correctness.
2.4 APPLICATIONS OF EMBEDDED SYSTEMS:
• Industrial machines
• Automobiles
• Medical equipment
• Cameras
• Household appliances
• Airplanes
• Vending machines
• Toys etc
CHAPTER 3
Touch screen
Today’s society, the way in which we physically interact with electronic devices is changing how we focus our technological research. This change has led to many great advances, including the development of touch screen technology. Through the use of touch screen technology, the operator is given an alternative method of how he or she can interact with a device. This technology operates in three distinct ways: resistive systems, capacitive systems, and infrared systems. This paper will investigate, discuss, and compare these different technologies, focusing on the differences in application, aspects of sustainability, as well as the positive and negative qualities. Key Words – Capacitive, Infrared, Multi-Touch, Resistive, Sustainability, and Touch Screens A BRIEF HISTORY OF TOUCH SCREENS Throughout the past century, technology has improved in many ways. The way in which humans interact with technology is one of the most important ways technology is changing. By using touch screen technology, the user is able to manipulate a digital environment by only the touch of their finger, or another input device, on the screen. Throughout this paper we will discuss the different technologies that make this possible: infrared, resistive, and capacitive touch screens, as well as their qualities in modern devices. Touch screen technology first entered the public eye in 1971, with the invention of the Elograph, by Elographics. This company was created to “produce Graphical Data Digitizers for use in research and industrial applications”. This technology set the stage for many devices to come. One of the next devices to be invented was the HP-150, the first touch screen computer. Hewlett Packard invented this device in 1983. This technology is important because it “had infrared touch-screen capability, allowing for creation of ATM-like applications”. These are two of the most important devices in the development of touch screen technology. As time progressed, touch screen devices have become increasingly more complex and sustainable, providing the user with greater accuracy and more features to improve the quality of life. INFRARED TOUCH SCREENS The first type of touch screen technology we shall discuss is based upon infrared light. There are two main infrared systems: a standard grid and an internal reflection system. These systems are very accurate however; they require more space than other touch screen systems.
Touch Screens have become very commonplace in our daily lives: cell phones, ATM’s, kiosks, ticket vending machines and more all use touch panels to enable the user to interact with a computer or device without the use of a keyboard or mouse. But did you know there are several uniquely different types of Touch Screens?
The five most common types are: 5-Wire Resistive,
1. Resistive Touch
2. Surface Capacitive
3. SAW Touch
4. Projected Capacitive
5. Infrared (IR) Touch
MICROCONTROLLER
4.1 Features
• Compatible with MCS®-51 Products
• 8K Bytes of In-System Programmable (ISP) Flash Memory
• Endurance: 10,000 Write/Erase Cycles
• 4.0V to 5.5V Operating Range
• Fully Static Operation: 0 Hz to 33 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
• Full Duplex UART Serial Channel
• Low-power Idle and Power-down Modes
• Interrupt Recovery from Power-down Mode
• Watchdog Timer • Dual Data Pointer
• Power-off Flag • Fast Programming Time
• Flexible ISP Programming (Byte and Page Mode)
• Green (Pb/Halide-free) Packaging Option
4.2 Description
The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmel’s high-density non-volatile memory technology and is compatible with the industry standard 80C51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional non-volatile memory pro-grammar. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 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 con-tents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset.
ALE/PROG:
Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives high for 98 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled
PSEN
Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.
EA/VPP
External Access enable (EA) must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.
EA should be strapped to VCC for internal program executions.
This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2 Output from the inverting oscillator amplifier.
4.4 Memory Organization
MCS-51 devices have a separate address space for Program and Data Memory. Up to 64K bytes each of external Program and Data Memory can be addressed
Program Memory: If the EA pin is connected to GND, all program fetches are directed to external memory.
On the AT89S52, if EA is connected to VCC, program fetches to addresses 0000H through 1FFFH are directed to internal memory and fetches to addresses 2000H through FFH are to external memory.
Data Memory: The AT89S52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy a parallel address space to the Special Function Registers. This means that the upper 128 bytes have the same addresses as the SFR space but are physically separate from SFR space. When an instruction accesses an internal location above address 7FH, the address mode used in the instruction specifies whether the CPU accesses the upper 128 bytes of RAM or the SFR space. Instructions which use direct addressing access the SFR space. For example, the following direct addressing instruction accesses the SFR at location 0A0H (which is P2). MOV 0A0H, #data Instructions that use indirect addressing access the upper 128 bytes of RAM. For example, the following indirect addressing instruction, where R0 contains 0A0H, accesses the data byte at address 0A0H, rather than P2 (whose address is 0A0H). MOV @R0, #data Note that stack operations are examples of indirect addressing, so the upper 128 bytes of data RAM are available as stack space.
4.5 Watchdog Timer (One-time Enabled with Reset-out)
The WDT is intended as a recovery method in situations where the CPU may be subjected to software upsets. The WDT consists of a 14-bit counter and the Watchdog Timer Reset (WDTRST) SFR. The WDT is defaulted to disable from exiting reset. To enable the WDT, a user must write 01EH and 0E1H in sequence to the WDTRST register (SFR location 0A6H). When the WDT is enabled, it will increment every machine cycle while the oscillator is running. The WDT timeout period is dependent on the external clock frequency. There is no way to disable the WDT except through reset (either hardware reset or WDT overflow reset). When WDT over-flows, it will drive an output RESET HIGH pulse at the RST pin.
Using the WDT
To enable the WDT, a user must write 01EH and 0E1H in sequence to the WDTRST register (SFR location 0A6H). When the WDT is enabled, the user needs to service it by writing 01EH and 0E1H to WDTRST to avoid a WDT overflow. The 14-bit counter overflows when it reaches 16383 (3FFFH), and this will reset the device. When the WDT is enabled, it will increment every machine cycle while the oscillator is running. This means the user must reset the WDT at least every 16383 machine cycles. To reset the WDT the user must write 01EH and 0E1H to WDTRST. WDTRST is a write-only register. The WDT counter cannot be read or written. When WDT overflows, it will generate an output RESET pulse at the RST pin. The RESET pulse durations is 98xTOSC, where TOSC = 1/FOSC. To make the best use of the WDT, it should be serviced in those sections of code that will periodically be executed within the time required to prevent a WDT reset.
WDT during Power-down and Idle
In Power-down mode the oscillator stops, which means the WDT also stops. While in Power-down mode, the user does not need to service the WDT. There are two methods of exiting Power-down mode: by a hardware reset or via a level-activated external interrupt which is enabled prior to entering Power-down mode. When Power-down is exited with hardware reset, servicing the WDT should occur as it normally does whenever the AT89S52 is reset. Exiting Power-down with an interrupt is significantly different. The interrupt is held low long enough for the oscillator to stabilize. When the interrupt is brought high, the interrupt is serviced. To prevent the WDT from resetting the device while the interrupt pin is held low, the WDT is not started until the interrupt is pulled high. It is suggested that the WDT be reset during the interrupt service for the interrupt used to exit Power-down mode. To ensure that the WDT does not overflow within a few states of exiting Power-down, it is best to reset the WDT just before entering Power-down mode. Before going into the IDLE mode, the WDIDLE bit in SFR AUXR is used to determine whether the WDT continues to count if enabled. The WDT keeps counting during IDLE (WDIDLE bit = 0) as the default state. To prevent the WDT from resetting the AT89S52 while in IDLE mode, the user should always set up a timer that will periodically exit IDLE, service the WDT, and re-enter IDLE mode. With WDIDLE bit enabled, the WDT will stop to count in IDLE mode and resumes the count upon exit from IDLE.
4.6 UART:
The UART in the AT89S52 operates the same way as the UART in the AT89C51 and AT89C52.
4.7 Timer 0 and 1
Timer 0 and Timer 1 in the AT89S52 operate the same way as Timer 0 and Timer 1 in the AT89C51 and AT89C52.
4.8 Timer 2
Timer 2 is a 16-bit Timer/Counter that can operate as either a timer or an event counter. The type of operation is selected by bit C/T2 in the SFR T2CON. Timer 2 has three operating modes: capture, auto-reload (up or down counting), and baud rate generator. The modes are selected by bits in T2CON, as shown in. Timer 2 consists of two 8-bit registers, TH2 and TL2. In the Timer function, the TL2 register is incremented every machine cycle. Since a machine cycle consists of 12 oscillator periods, the count rate is 1/12 of the oscillator frequency.
In the Counter function, the register is incremented in response to a 1-to-0 transition at its corresponding external input pin, T2. In this function, the external input is sampled during S5P2 of every machine cycle. When the samples show a high in one cycle and a low in the next cycle, the count is incremented. The new count value appears in the register during S3P1 of the cycle following the one in which the transition was detected. Since two machine cycles (24 oscillator periods) are required to recognize a 1-to-0 transition, the maximum count rate is 1/24 of the oscillator frequency. To ensure that a given level is sampled at least once before it changes, the level should be held for at least one full machine cycle.
Capture Mode
In the capture mode, two options are selected by bit EXEN2 in T2CON. If EXEN2 = 0, Timer 2 is a 16-bit timer or counter which upon overflow sets bit TF2 in T2CON. This bit can then be used to generate an interrupt. If EXEN2 = 1, Timer 2 performs the same operation, but a 1-to-0 transition at external input T2EX also causes the current value in TH2 and TL2 to be captured into RCAP2H and RCAP2L, respectively. In addition, the transition at T2EX causes bit EXF2 in T2CON to be set. The EXF2 bit, like TF2, can generate an interrupt.