Wireless Monitoring and Controlling Rescue Robot using Zigbee

Description

Description

Contributor:

Durga Prasad Kolhari

Now a days child often fall down in the borehole which is left uncovered and get trapped. It is very difficult and risky to rescue the trapped children. A small delay in the rescue can cost the child his or her life .The objective of the project is to construct and design a bore well rescue robot .This project is a human controlled robot the gives an insight view of rescuing the baby safely and steps taken to achieve this. The project aims in designing “Robot to rescue of a child in a borehole” which works according to the user commands given from PC. The project also used for picking and placing of objects based on arm design.

The robot is operated through PC using wireless technology using zigbee and using wireless camera we can view both audio and video on the TV. This robot has a high power LED which acts as a light source when light intensity inside the pipe is low .It is a low cost robot used to monitor the changes of different parameters in the industrial pipes. By connecting temperature sensor to the robot we can get the temperature of dangerous zones in PC itself. By connecting smoke sensor to the robot we can get the information related concentration of smoke or gases in respective fields. Wireless controlling of robot through PC using zigbee technology. Live and video can seen on TV. Implementation of pick and place concept to the robot. DC motor based gripper operation for robotic arm. The robot also has head lamp vision with LED‘S and it gets ON when LDR sensor detects the darkness inside the borehole. By connecting temperature sensor to the robot we can get the temperature of dangerous zones in PC itself. By connecting smoke sensor to the robot we can get the information related concentration of smoke or gases in respective fields. We can develop a robot machine that can take out the trapped body in systematic way. It will also perform various life saving operations for the sufferers such as oxygen supply. A video camera to observe the actual situation closely and continuous interaction with the sufferer could also be attached. In this alternative scenario, there is no requirement of digging any hole parallel to the bore-well. The remotely controlled robot will go down the bore-well and perform the action

The project aims in designing Robot to rescue of a child in a borehole which works according to the user commands given from PC. The project also used for picking and placing of objects based on arm design. The robot is operated through PC using wireless zigbee technology and using wireless camera we can view both audio and video can be seen on TV. This robot has a high power LED which acts as a light source when light intensity inside the pipe. By connecting temperature sensor to the robot we can get the temperature of dangerous zones in PC itself. By connecting smoke sensor to the robot we can get the information related concentration of smoke or gases in respective fields.

Implementation Keil

METHODS OF IMPLEMENTATION KEIL

1. Click on the Keil Vision Icon on Desktop

2. The following fig will appear

Fig. 1: Screenshot of Keil IDE

3. Click on the Project menu from the title bar

4. Then Click on New Project

Fig. 2: Screenshot of opening new project on Keil IDE

5. Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\

1. Place the IC on the development board and connect it to the serial port of the computer.

2. Click on PROG ISP and open the software

Fig. 17: Screenshot of PROG ISP application

3. Now click on LOAD FLASH button and search for the HEX file which needs to be dumped.

Fig. 18: Screenshot of loading hex file on PROG ISP

4. Now, the source code is dumped onto the IC.

AT89S52 Microcontroller

A microcontroller is a general purpose device that is meant to read data, perform limited calculations on that data and control its environment based on those calculations. The prime use of a microcontroller is to control the operation of a machine using a fixed program that is stored in ROM and that does not change over the lifetime of the system.

Features

· Compatible with MCS-51Products

· 8K Bytes of In-System Programmable (ISP) Flash Memory

· 4.0V to 5.5V Operating Range

· 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

· >

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 contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset.

Pin Configuration of AT89S52 Microcontroller

Fig. 19: Pin Diagram of AT89S52 8051 Microcontroller

Pin Description

VCC

Supply voltage

GND

Ground

Port 0

Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs.Port 0 can also be configured to be the multiplexed low order address/data bus during access to external program and data memory. In this mode, P0 has internal pull-ups. External pull-ups are required during program verification.

Port 1

Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The port 1output buffers can sink/source TTL inputs. When 1s are written to port 1 pins, they are pulled high by the internal pull-ups can be used as inputs.

Port 2

Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The port 2 output buffers can sink/source TTL inputs. When 1s are written to port 2 pins, they are pulled high by the internal pull-ups can be used as inputs. As inputs, P2 pins that are externally being pulled low will source current because of the internal pull-ups.

Port 3

Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The port 3 output buffers can sink/source four inputs. When 1s are written to port 3 pins, they are pulled high by the internal pull-ups can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current because of the internal pull-ups.

PORT PIN

ALTERNATE FUNCTION

P 3.0

RXD(serial input port)

P 3.1

TXD(serial input port)

P3.2

INT0(external interrupt 0)

P 3.3

INT1(external interrupt 1)

P 3.4

T0(timer 0 external input)

P 3.5

T1(timer 1 external input)

P 3.6

WR(external data memory write strobe)

P3.7

RD(external data memory read strobe)

PORT 3 DESCRIPTION

RST

Reset input A on this pin for two machine cycles while the oscillator is running resets the device.

ALE/PROG

Address Latch Enable is an output pulse for latching the low byte of the address during access 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/16 the oscillator frequency and may be used for external timing or clocking purpose. Note, however, that one ALE pulse is skipped during each access to external Data memory.

PSEN

Program Store Enable 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. 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& XTAL 2

XTAL1 forms the input to the inverting oscillator amplifier and input to the internal clock operating circuit. Output from the inverting oscillator amplifier is taken from XTAL2.

AT89S52 Block Diagram

Fig. 20: Block Diagram of AT89S52 8051 Microcontroller

ARCHITECTURE

Operating Description

The detail description of the AT89S52 included in this description is:

• Memory Map and Registers

• Timer/Counters

• Interrupt System

Memory Map and Registers

Memory

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 FFFFH 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 128bytes have the same addresses as the SFR space but are physically separate from SFR space.

Timer/Counters

The AT89S52 has three 16-bit Timer/Counter registers. All can be configured to operate either as Timers or event counters. As a Timer, the register is incremented every machine cycle. Thus, the register counts machine cycles. Since a machine cycle consists of 12 oscillator periods, the count rate is 1/12 of the oscillator frequency.

As a Counter, the register is incremented in response to a 1-to-0 transition at its corresponding external input pin, T0 and T1. The external input is sampled every machine cycle. When the samples show a high in one cycle and a low in the nextcycle, the count is incremented. 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. There are no restrictions on the duty cycle of the external input signal, but it should be held for at least one full machine cycle to ensure that a given level is sampled at least once before it changes.

Interrupts

The AT89S52 has a total of six interrupt vectors: two external interrupts (INT0 and INT1), three timers interrupts (Timers0, 1, and 2), and the serial port interrupt. These are shown in the table given below. Each of these interrupt sources can be individually enabled or disabled by setting or clearing a bit in Special Function Register IE. IE also contains a global disable bit, EA, which disables all interrupts at once.

IE.7

Symbol

Position

Function

EA

Disables all interrupts. If EA = 0,

no interrupt is acknowledged. If

EA = 1, each interrupt source is

individually enabled or disabled

by setting or clearing its enable

bit

-

IE.6

Reserved.

ET2

IE.5

Timer 2 interrupt enable bit.

ES

IE.4

Serial Port interrupt enable bit.

ET1

IE.3

Timer 1 interrupt enable bit.

EX1

IE.2

External interrupt 1 enable bit.

ET0

IE.1

Timer 0 interrupt enable bit.

EX0

IE.0

External interrupt 0 enable bit.

INTERRUPTS

BLOCK DIAGRAM

Master Control System: This system works as a transceiver. When we give commands to the robot, it acts as a transmitter. When we receive the values of temperature and smoke from sensors it acts as a receiver.

The controlling device of the whole system is a micro controller. Whenever the user presses a button from the keyboard of the PC ,the data related to that particular button is sent through zigbee module interfaced to PC. The robot also has arm to lift the obstacle using servo motor. The system also has head lamp vision with high power LED‘s and it gets ON when the LDR sensor detects the darkness inside the borehole.

This data will be received by the zigbee module in the robot system and feds this to micro controller which judges the relevant task to the information received and acts accordingly on robot and arm movement. The live images from the camera in the robot system can be sent to TV through AV transmitter system. The micro controllers used in the project are programmed using embedded c language.

Here we use 4 DC motors ,two for robot direction and two for robot arm. LM293D is used to drive the motors. These motors are connected to the port0 of micro controller.LCD is used to display messages which is connected to the port2 of micro controller. zigbee is interfaced to the micro controller using MAX 232. This project contains three sensors named as temperature sensor, smoke sensor and LDR sensor. These three sensors are connected to the port3 of micro controller.

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 by using Atmel’s high-density nonvolatile 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 nonvolatile memory pro-grammar.

The monitor section controls the robot movement using PC. By using Hyper terminal in PC we can send commands to control the movement of the robot.

Command For Operation robot:

Commands to robot is F-> forward, B->backward, L->left, R->right direction.when you switch on the supply we can see these commands displaying on pc . with that, we can give commands to robot to move different directions.For example: if we want robot to move forward direction just type capital letter ‘F’ in hyper terminal. From pc serial port, it is connected to zigbee module directly as shown in circuit diagram. pc sends signal to the robot through zigbee module.

When the robot receives the signal from monitor section using zigbee module. The microcontroller will receive the commands from zigbee module through MAX 232. Then micro controller sends 0101 to motor driver circuits at Port pins P1^1, P1^2, P1^3, P1^4. Then two motors will starts rotating forward directions so the robot moves in forward directions. The same operation is continued when we give commands B,L,R for backward,left,right directions.

In LCD screen we can find displays for robot movement directions…

Pick and place Commands to robot is O-> gripper open, C->gripper close, U->gripper moves in upward direction, D-> gripper moves in downward direction. we can give these commands from pc to robot to pick & place different actions.

For example: if we want robot to picks an object just type capital letter ‘C’ in hyper terminal. From pc serial port, it is connected to zigbee module directly as shown in circuit diagram. pc sends signal to the robot through zigbee module.

When the robot receives the signal from monitor section using zigbee module. The microcontroller will receive the commands from zigbee module through MAX 232. Then micro controller sends 1000 to motor driver circuits at Port pins P0^1, P0^2, P0^3, P0^4. Then motor will starts rotating clockwise direction so the gripper will closed. The same operation is continued when we give commands C,U,D for CLOSE, DOWN, UP directions.

Monitor sections receives the information about robot operations and also sends the commands to the robot to move in several directions. Buzzer gives sound for an indication. Every message will get display on LCD screen.

When temperature sensor (thermistor) connected at pin P3.2 and its senses the temperature and output is given to microcontroller and micro controller sends commands to monitor section that is “temperature is high” message and also displayed on lcd.

When Smoke sensor(mq-5) connected at pin P3.3 and its senses the smoke and output of smoke sensor is given to the micro controller and micro controller sends commands to monitor section that is “smoke is high” message and also displayed on lcd.

When the light is sensed by LDR is connected at pin P3.4 and micro controller sends commands to monitor section that is “light is low” message and also displayed on lcd.

LDR

WORKING:

A photo resistor or Light Dependent Resistor or CdS Cell is a resistor whose resistance decreases with increasing incident light intensity. It can also be referred to as a photoconductor. A photo resistor is made of a high resistance semiconductor. If light falling on the device is of high enough frequency, photons absorbed by the semiconductor give bound electrons enough energy to jump into the conduction band. The resulting free electron (and its hole partner) conduct electricity, thereby lowering resistance.

A photoelectric device can be either intrinsic or extrinsic. An intrinsic semiconductor has its own charge carriers and is not an efficient semiconductor, e.g. silicon. In intrinsic devices the only available electrons are in the valence band, and hence the photon must have enough energy to excite the electron across the entire band gap. Extrinsic devices have impurities also called dopants added whose ground state energy is closer to the conduction band since the electrons don't have as far to jump, lower energy photons (i.e., longer wavelengths and lower frequencies) are sufficient to trigger the device. If a sample of silicon has some of its atoms replaced by phosphorus atoms (impurities), there will be extra electrons available for conduction. This is an example of an extrinsic semiconductor.

Fig. 24: Representational Image of Light Dependant Resistor (LDR)

A Light Dependent Resistor (LDR, photoconductor, or photocell) is a device which has a resistance which varies according to the amount of light falling on its surface. They will be having a resistance of 1 MOhm in total darkness, and a resistance of a 1 to 10 of kOhm in bright light. A photoelectric device can be either intrinsic or extrinsic.

2 APPLICATIONS:

An LDR can even be used in a simple remote control circuit using the backlight of a mobile phone to turn on a device - call the mobile from anywhere in the world, it lights up the LDR, and lighting can be turned on remotely!

Fig. 25: Image of Light Dependant Resistors (LDR)

There are two basic circuits using light dependent resistors - the first is activated by darkness, the second is activated by light.

Exclusive Digi-key Tools

In the circuit diagram on the left, the led lights up whenever the LDR is in darkness. The 10K variable resistor is used to fine-tune the level of darkness required before the LED lights up. The 10K standard resistor can be changed as required to achieve the desired effect, although any replacement must be at least 1K to protect the transistor from being damaged by excessive current.

By swapping the LDR over with the 10K and 10K variable resistors , the circuit will be activated instead by light. Whenever sufficient light falls on the LDR (manually fine-tuned using the 10K variable resistor), the LED will light up.

Fig. 27: Circuit Diagram of Light activated Light Sensor

The circuits shown above are not practically useful. In a real world circuit, the LED (and resistor) between the positive voltage input (Vin) and the collector (C) of the transistor would be replaced with the device to be powered.

Thermistor

Thermistor is a type of resistor with resistance inversely proportional to its temperature. The word is a portmanteau of thermal and resistor. Samuel Ruben invented the thermistor in 1930, and was awarded U.S. Patent No. 2,021,491.

Thermistors are widely used as inrush current limiters, temperature sensors, self-resetting over current protectors, and self-regulating heating elements.

Assuming, as a first-order approximation, that the relationship between resistance and temperature is linear, then:

Fig. 28: Screenshot of resistance calculation for Thermister from datasheet

Thermistors can be classified into two types depending on the sign of k. If k is positive, the resistance increases with increasing temperature, and the device is called a positive temperature coefficient (PTC) thermistor. If k is negative, the resistance decreases with increasing temperature, and the device is called a negative temperature coefficient (NTC) thermistor. Resistors that are not thermistors are designed to have a k as close to zero as possible, so that their resistance remains nearly constant over a wide temperature range.

Thermistors differ from resistance temperature detectors (RTD) in that the material used in a thermistor is generally a ceramic or polymer, while RTDs use pure metals. The temperature response is also different; RTDs are useful over larger temperature ranges, while thermistors typically achieve a higher precision within a limited temperature range.

Applications:

NTC thermistors are used as resistance thermometers in low-temperature measurements of the order of 10 K.

NTC thermistors can be used as inrush-current limiting devices in power supply circuits. They present a higher resistance initially which prevents large currents from flowing at turn-on, and then heat up and become much lower resistance to allow higher current flow during normal operation. These thermistors are usually much larger than measuring type thermistors, and are purposely designed for this application.

NTC thermistors are regularly used in automotive applications. For example, they monitor things like coolant temperature and/or oil temperature inside the engine and provide data to the ECU and, indirectly, to the dashboard.

Thermistors are also commonly used in modern digital thermostats and to monitor the temperature of battery packs while charging.

ZIGBEE

Zig-bee is a specification for a suite of high level communication protocols using small, low-power digital radios based on the IEEE 802.15.4,2006 standard for wireless personal area networks (WPANs),

ZIGBEE MODULE

such as wireless headphones connecting with cell phones via short-range radio. The technology defined by the Zig-bee specification is intended to be simpler and less expensive than other WPANs, such as Bluetooth. Zig-bee is targeted at radio-frequency (RF) applications that require a low data rate, long battery life, and secure networking.

Fig. 29: Typical Image of Zigbee Module

Zig-bee is a low data rate, two-way standard for home automation and data networks. The standard specification for up to 254 nodes including one master, managed from a single remote control. Real usage examples of Zig-bee includes home automation tasks such as turning lights on, setting the home security system, or starting the VCR. With Zig-bee all these tasks can be done from anywhere in the home at the touch of a button. Zig-bee also allows for dial-in access via the Internet for automation control.

Zig-bee protocol is optimized for very long battery life measured in months to years from inexpensive, off-the-shelf non-rechargeable batteries, and can control lighting, air conditioning and heating, smoke and fire alarms, and other security devices. The standard supports 2.4 GHz (worldwide), 868 MHz (Europe) and 915 MHz (Americas) unlicensed radio bands with range up to 100 meters.

IEEE 802.15.4

IEEE 802.15.4 is a standard which specifies the physical layer and medium access control for low-rate wireless personal area networks (LR-WPAN's).This standard was chartered to investigate a low data rate solution with multi-month to multi-year battery life and very low complexity. It is operating in an unlicensed, international frequency band. Potential applications are sensors, interactive toys, smart badges, remote controls, and home automation.

802.15.4 Is part of the 802.15 wireless personal-area network efforts at the IEEE? packet-based radio protocol aimed at very low-cost, battery-operated widgets and sensors (whose batteries last years, not hours) that can intercommunicate and send low-bandwidth data to a centralized device.

– There are a multitude of standards that address mid to high data rates for voice, PC LANs, video, etc. However, up till now there hasn‘t been a wireless network standard that meets the unique needs of sensors and control devices. Sensors and controls don‘t need high bandwidth but they do need low latency and very low energy consumption for long battery lives and for large device arrays.

– There are a multitude of proprietary wireless systems manufactured today to solve a multitude of problems that also don‘t require high data rates but do require low cost and very low current drain.

– These proprietary systems were designed because there were no standards that met their requirements. These legacy systems are creating significant interoperability problems with each other and with newer technologies.

Integrating features of all the hardware components used have been developed in it. presence of every module has been reasoned out and placed carefully, thus contributing to the best working of the unit. Secondly , using highly advanced IC‘s with the help of growing technology, the project has been successfully implemented. Thus the project has been successfully designed and tested.

Comments

hi,i am a second year student studying mechanical engineering in PESIT bangalore.Please can you send me full details of this project? like parts list,how to program the robot from scratch etc??thank you in advance.my mail id is sreshtiyer@gmail.com.