Você está na página 1de 76

ENVIRONMENT MONITORING ROBOT

CHAPTER 1
INTRODUCTION

1.1 Introduction

R obotic systems are increasingly being effective as basic data-collecting

tools by scientists, making new representation and a greater understanding of the


planet and its environmental action. Todays robots are already searching our deep
oceans, tracking un useful algal blooms and pollution spread, monitoring climate
variables, and even studying remote volcanoes. Emerging research develops for
accomplishing large-scale environmental monitoring are also reviewed, including
helpful robotic teams, robot and wireless sensor network (WSN) communication,
adaptive sampling and model-aided path planning. These trends offer useful and
accurate measurement of environmental processes at unprecedented scales that will
move the extreme limit of robotic and natural sciences [1].
The need for large-scale prolong environmental monitoring has become
particularly related in recent times after a set of serious natural accidents and
environmentally harmful accidents. These include earthquakes, tsunamis, hurricanes,
floods, large forest fires, volcanic instance, oil spills, and nuclear meltdowns.
The basic needs of the project is to collect large amount of information or
collecting data such as temperature, humidity, light intensity and smoke presence
and then analyzing this information and transforming into useful information to make
it consist able to work with different IT Technologies, which can be planted on the
Robotic Car.
There are various technologies which can be considered for the planed
application but the most useful is the Wireless Sensors Network (WSN). As
this is the technology we considered in our project and it will be discussed in
detail later in this report. Here the prominence is to build an infrastructure
using WSN for the smart highway. Another reason of using Wireless system
is to keep away the traditional wired networks which normally result in problems
such as deficiency of scalability, cost of maintenance, and difficult installation
and other several disadvantages.
ENVIRONMENT MONITORING ROBOT

Before proceeding with the further discussion we need to understand the


concept of WSN and how they work, so it has been explained in Section 1.2.

1.2 WIRELESS SENSORS NETWORK


A wireless sensor network (WSN) consists of specific distributed
autonomous sensors to cooperatively monitor physical or environmental conditions,
such as temperature, sound, vibration, pressure, motion or contaminants.

Figure 1.1: WSN [1].

EXPLANATION:
The background of WSN refers to its use in the military applications as in
Battle Surveillance, but now its use has wide in applications such as in many
industrial and civilian applications including the environmental and health
monitoring systems as in our respective project it is being used to r e c o r d t h e
e n v i r o n m e n t a l d a t a f r o m a g r e a t d i s t a n c e , it is also one of its important
application.

In our project, each node in a sensor network is supplied with a RF


ENVIRONMENT MONITORING ROBOT

Transmitter, a small microcontroller, and a battery. The size of a sensor node can
change from being very small to be a very large in size; it only relies on the required
application.

1.2.1 APPLICATIONS
There are a variety of applications of WSN, and some of the common are
listed below:
A r e a monitoring
V e h i c l e detection
I n d u s t r i a l monitoring
E n v i r o n m e n t a l monitoring
M a c h i n e health monitoring

Unique characteristics of a WSN include:


Limited power they can harvest or store
Ability to withstand harsh environmental conditions
Ability to overcome node failures
Nodes Mobility
Dynamic network topology
Lack of communication
Heterogeneous nodes
Deployment on large scale is possible
Node capacity is scalable
ENVIRONMENT MONITORING ROBOT

1.3 SYSTEM OVERVIEW DIAGRAM (BLOCK DIAGRAM)

Figure 1.2(a): System Block Diagram

Figure 1.2(b): System Block Diagram


ENVIRONMENT MONITORING ROBOT

CHAPTER 2
DESIGN CONSIDERATIONS
2.1 Basic Design
The system has three main functions:

Monitoring the Environment


Controlling the Robots Movement
Receiving Data on Computer and Storing it in Database
First of all the video camera fastened with the robotic car will send real time
video signals to our monitoring device i.e. monitor. The video camera is wireless and
has a range of over 200 ft radius. After watching the video on the display, the operator
can make his own decision and take an action accordingly.

After the user had made his decision, he sends the control commands via serial
communication to the PIC micro controller which processes the digital data input. The
user observes the real time video by a software called SUPER TV pro.

There are basically two circuit boards of the project

Computer Side Device Circuitry


Robot Side Circuitry
The third most important design consideration is the choice of a video camera

2.2 System Structure


The Environment Monitoring robot system consists of a transmitter, a receiver
and a video camera. The communication between receiver and transmitter is wireless
i.e. RF communication. The video camera is wireless and operates on radio frequency.

The receiver circuitry is the heart of the system which moves the robot to left,
to right, forward and reverse. The user can monitor all the activities of the robot; in
fact user is controlling the robot. The user is controlling the robot by sending the
control commands via serial communication to the transmitter circuitry [2].
ENVIRONMENT MONITORING ROBOT

2.3 Control Section


The control section is mainly responsible of acquiring video from the site in
order to monitor and control the activity of the robot. User remotely controls the
activity of the robot by RF communication.

On our control PC, there is application software Super TV pro which is


responsible to show the video and provides a user interface as a control window.

The transmitter circuitry is connected to the control PC via serial cable so that
RF communication can be coupled with serial communication of the control PC.

Figure 2.1: Computer Side Block Diagram

An opto-coupler is used to avoid the interference between RF transmitter and


the remaining circuitry in the transmitter section.

The radio transmitter has a range of 100 ft radius to be sufficiently received at


the receiver.

For serial communication we use Microsoft Visual Studio 2012.


ENVIRONMENT MONITORING ROBOT

2.4 Receiver

The receiver section consists of:

A Robotic car
A Wireless Video Camera
A Receiver Circuitry
4 Sensors (Temperature, Humidity, Light, Smoke)
The receiver circuitry receives the control commands from the transmitter of the
control section via RF receiver. Two motors are connected to the robotic car and the
receiver circuitry such that motors move the robot exactly to the same position and
direction as directed by the control section. This is done by decoding the control
instruction sent by the transmitter with the help of remote control decoder PT 2272.
The PIC microcontroller of the receiver section is programmed in C language. The
speed of the motors can be varied by varying the duty cycle of the PWM of the PIC
micro controller. Greater the duty cycle of the PWM greater will be the speed of the
motor [3].

Figure 2.2: Robot Side Block Diagram


ENVIRONMENT MONITORING ROBOT

CHAPTER 3
HARDWARE DESCRIPTION

The hardware of Environment Monitoring Robot is divided into three categories

Transceiver and Control unit


Transceiver with Robotic car.
Wireless Camera

In this type of project, it is often useful to have a conceptual model of the


monitoring and controlling process. Some of the fundamental concepts in this context
are as follows.

Monitoring and Controlling

This is the principle by which a system is monitored and controlled according


to our requirement. For example, in this project a robotic car is being controlled for
spying purposes. A user can monitor subjects movement and can take actions
accordingly. This is the basic working principle of this project.

In everyday life, when anyone drives a car. He monitors his surroundings and
controls the movement of his car. Likewise, this principle is implemented in many
industrial applications. The following figure shows an overview how this project is
using monitoring and controlling principle.

Figure 3.1: Monitoring and controlling


ENVIRONMENT MONITORING ROBOT

3.1Transmitter and Control Unit:

Transmitter is defined as the device which actually transmits the signals. In this project
Transmitter is transmitting the control signals. In this project transmitter transmits control
signals after monitoring the robotic car. This transmitter is connected with computer through
serial port. Computer sends commands which come to transmitter circuitry through serial port
and then these are transmitted to receiver through RF to control robotic car.

Transceiver (Control) circuitry consists of the following parts.

PIC microcontroller 16F877


MAX232
Optocoupler
Serial Port
RF Transceiver

3.1.1PIC Microcontroller16F877A:

PIC are popular with developers and hobbyists alike due to their low cost,
wide availability, large user base, extensive collection of application notes,
availability of low cost or free development tools, and serial programming (and re-
programming with flash memory) capability [6].

Figure 3.2: PIC microcontrollers in DIP [4].


ENVIRONMENT MONITORING ROBOT

Features [6]

Operating frequency DC-20MHz

Flash program memory 8K

Data memory (bytes) 368

EEPROM data memory 256

Interrupts 15

I/O ports Port A, B, C, D, E

Timers 3

Serial communications MSSP, USART

Parallel communication PSP

10-bit Analogue to Digital module 8 input channels

Instruction set 35 Instructions

Packages 40-pin PDIP

Resets & (Delays) POR, BOR

Typical Applications:

16F877A chips are used in a wide variety of control systems,


telecommunication applications, and robotics and as well as in RF remote control
application.

Pins Details: [7]

PIN 1(MCLR/VPP): Master Clear (Reset) input or programming voltage input or


high voltage test mode control. This pin is an active low RESET to the device.

PIN 2(RA0/AN0): It is a bi-directional I/O pin and can be used as analog I/O0.

PIN 3(RA1/AN1): It is a bi-directional I/O pin and can be used as analog I/O1.

PIN 4(RA2/AN2/Vref-): It is a bi-directional I/O pin and can also be used as analog
I/O2 or negative analog reference voltage.
ENVIRONMENT MONITORING ROBOT

Figure 3.3 Pin configuration of PIC microcontrollers in DIP [5].

PIN 5(RA3/AN3/Vref+): It is a bi-directional I/O pin and can also be used as analog
I/O3 or positive analog reference voltage.

PIN 6(RA4/T0CKI): It is a bi-directional I/O pin and can also be the clock input to
the Timer0 timer/counter. Output is open drain type.

PIN 7(RA5/SS/AN4): It is a bi-directional I/O pin and can also be used as analog
I/O4 or the slave selects for the synchronous serial port.

PIN 8(RE0/RD/AN5): It is a bi-directional I/O pin and can also be used to read
control for the PSP or analog input5.

PIN 9(RE1/WR/AN6): It is a bi-directional I/O pin and can also be used to write
control for the PSP or analog input6.

PIN 10(RE3/CS/AN7): It is a bi-directional I/O pin and can also be used to select
control for the PSP or analog input7.
ENVIRONMENT MONITORING ROBOT

PIN 11(VDD): Positive supply for logic and I/O pin.

PIN 12 (VSS): Ground reference for logic and I/O pin.

PIN 13(OSC1/CLKIN): Oscillator crystal input/external clock source input.

PIN 14(OSC2/CLKOUT): Oscillator crystal output. Connect to crystal or resonator


in crystal oscillator mode. In RC mode, OSC2 pin outputs CLKOUT which has 1/4
the frequency of OSC1, and denotes the instruction cycle rate.

PIN 15(RC0/T1OS0/T1CK1): It is a bi-directional I/O pin and can be used as


Timer1 oscillator output or a Timer clock input.

PIN 16(RC1/T1OS1/CCP2): It is a bi-directional I/O pin and can be used as Timer1


oscillator input or a Capture2 input/Compare2 output/PWM2 output.

PIN 17(RC2/CCP1): It is a bi-directional I/O pin and can be used as a Capture1


input/Compare1 output/PWM1 output.

PIN 18(RC3/SCK/SCL): It is a bi-directional I/O pin and can be used as a


synchronous serial clock input/output for both SPI and I2C modes.

PIN 19(RD0/PSP0): It is a bi-directional I/O pin or parallel slave pin when interface
to microprocessor bus.

PIN 20(RD1/PSP1): It is a bi-directional I/O pin or parallel slave pin when interface
to microprocessor bus.

PIN 21(RD2/PSP2): It is a bi-directional I/O pin or parallel slave pin when interface
to microprocessor bus.

PIN 22(RD3/PSP3): It is a bi-directional I/O pin or parallel slave pin when interface
to microprocessor bus.

PIN 23(RC4/SD1/SDA): It is a bi-directional I/O pin and can also be used as SPI
Data In (SPI mode) or data I/O (I2C mode).
ENVIRONMENT MONITORING ROBOT

PIN 24(RC5/SD0): It is a bi-directional I/O pin and can also be used as SPI Data Out
(SPI mode).

PIN 25(RC6/TX): It is a bi-directional I/O pin and can be used as USART


Asynchronous Transmit or Synchronous Clock.

PIN 26(RC7/RX/DT): It is a bi-directional I/O pin and can be used as USART


Asynchronous Receive or Synchronous Data.

PIN 27(RD4/PSP4): It is a bi-directional I/O pin or parallel slave pin when interface
to microprocessor bus.

PIN 28(RD5/PSP5): It is a bi-directional I/O pin or parallel slave pin when interface
to microprocessor bus.

PIN 29(RD6/PSP6): It is a bi-directional I/O pin or parallel slave pin when interface
to microprocessor bus.

PIN 30(RD7/PSP7): It is a bi-directional I/O pin or parallel slave pin when interface
to microprocessor bus.

PIN 31(VSS): Ground reference for logic and I/O pin.

PIN 32(VDD): Positive supply for logic and I/O pin.

PIN 33(RB0/INT): It is a bi-directional I/O pin and can be used as external interrupt
pin. It can be software programmed for internal weak pull-up on all input.

PIN 34(RB1): It is a bi-directional I/O pin.

PIN 35(RB2): It is a bi-directional I/O pin.

PIN 36(RB3/PGM): It is a bi-directional I/O pin and can be used as low voltage
programming input.

PIN 37(RB4): It is a bi-directional I/O pin and also used as Interrupt-on-change pin.

PIN 38(RB5): It is a bi-directional I/O pin and also used as Interrupt-on-change pin.
ENVIRONMENT MONITORING ROBOT

PIN 39(RB6/PGC): It is a bi-directional I/O pin and also used as Interrupt-on-change


pin or In-Circuit Debugger pin or Serial programming clock.

PIN 40(RB7/PGD): It is a bi-directional I/O pin and also used as Interrupt-on-change


pin or In-Circuit Debugger pin or Serial programming data.

PORTS:

There are 5 ports of 16F877 A, B, C, D and E.

PORT A (Pins 2 to 7): The port A is a general purpose bi-directional input/output


port which can be used for a variety of interfacing tasks. The other ports have dual
roles or additional functions associated with them based upon the context of their
usage.

PORT B (Pins 10 to 17): PORTB is a bi-directional I/O port. PORTB can be


software programmed for internal weak pull-up on all input. It has function of
interrupt.

PORT C (Pins 15-18, 23-26): PORT C includes the pins which are timer inputs or
outputs. It also includes compare and PEM outputs. Comparing is additional function
of this port.

PORT D (pins19-22, 27-30): PORTD is a bi-directional I/O port or parallel slave


port when interfacing to a microprocessor bus.

PORT E (Pins 8, 9, 10): PORT E is a bi directional I/O port. It includes 8,9,10 pins.
Where 8 and 9 pin can be read and write control for parallel slave port or analogue
inputs 5and 6 respectively. The pin 10 is control select for parallel slave port or
analogue input 7.

A/D Converter:

Certain PIC pins can be set up as inputs to an analog-to-digital converter


(ADC). The PIC16F877A has eight analog inputs, which are connected to Port A and
Port E. When used in this mode, they are referred to as AD0AD7. The necessary
control registers are initialized in CCS C using a set of functions that allow the ADC
operating mode and inputs to be selected. An additional device directive at the top
ENVIRONMENT MONITORING ROBOT

of the program sets the ADC resolution. An analog voltage presented at the input is
then converted to binary and the value assigned to an integer variable when the
function to read the ADC is invoked [8]. The default input range is set by the supply
(nominally 05 V). If a battery supply is us (which drops over time) or additional
accuracy is needed, a separate reference voltage can be fed in at AN2 (+VE V ref) and
optionally AN3 (V ref). If only +VE V ref is used, the lower limit remains 0 V,
while the upper is set by the reference voltage. This is typically supplied using a zener
diode and voltage divider. The 2.56 V derived from a 2V7 zener gives a conversion
factor of 10 mV per bit for an 8-bit conversion. For a 10-bit input, a reference of
4.096 V might be convenient, giving a resolution of 4mV per bit. The essentials of
ADC operation are illustrated.

Data EEPROM and FLASH Program Memory:

The 16F877A can be programmed in PL/M, C and a number of other high-


level languages. In our project we have used C language for coding and used Mikro
C compiler for compiling C code. Further details are given in chapter containing
software section.

The Data EEPROM and FLASH Program Memory are readable and writable
during normal operation over the entire VDD range. These operations take place on a
single byte for Data EEPROM memory and a single word for Program memory. A
write operation causes an erase-then-write operation to take place on the specified
byte or word. So we can re-write in this microcontroller. There are three memory
blocks in each of thePIC16F87X MCUs. The Program Memory and Data Memory
have separate buses so that concurrent access can occur. The PIC16F87X devices
have a 13-bit program counter capable of addressing an 8K x 14 program memory
space. The PIC16F877A has 8K x 14 words of FLASH program memory,

The data memory is partitioned into multiple banks which contain the General
Purpose Registers and the Special Function Registers. Bits RP1 (STATUS<6>) and
RP0 (STATUS<5>) are the bank select bits. Each bank extends up to 7Fh (128 bytes)
[9]. The lower locations of each bank are reserved for the Special Function Registers.
Above the Special Function Registers are General Purpose Registers, implemented as
static RAM. All implemented banks contain Special Function Registers. Some
ENVIRONMENT MONITORING ROBOT

frequently used Special Function Registers from one bank may be mirrored in another
bank for code reduction and quicker access.

The Special Function Registers are registers used by the CPU and peripheral
modules for controlling the desired operation of the device. These registers are
implemented as static RAM. GENERAL PURPOSE REGISTER FILE The register
file can be accessed either directly or indirectly through the File Select Register
(FSR).

PIC16 Serial Interfaces:

USART asynchronous link


SPI synchronous bus
I2C synchronous bus

Serial data connections are useful because only one or two signal wires are
needed compared with at least eight data lines for a parallel bus plus control signals.
The typical PIC microcontroller offers a choice of serial interfaces. The best one for
any given communication channel depends on the distance between nodes, the speed,
and the number of hardware connections required.

USART:

The universal synchronous/asynchronous receive transmit (USART) device is


typically used in asynchronous mode to implement off-board, one-to-one connections.
The term asynchronous means no separate clock signal is needed to time the data
reception, so only a data send, data receive, and ground wires are needed. It is quick
and simple to implement if a limited data bandwidth is acceptable [10]. A common
application is connecting the PIC chip to a host PC for uploading data acquired by the
MCU subsystem .The USART link can send data up to 100 meters by converting the
signal to higher-voltage levels (typically+ 12 V). The digital signal is inverted and
shifted to become bipolar (symmetrical about 0V, line negative when inactive) for
transmission.

The PIC 16F877A has a dedicated hardware RS232 port, but CCS C allows
any pin to be set up as an RS232 port, providing functions to generate the signals in
ENVIRONMENT MONITORING ROBOT

software. The basic form of the signal has 8 data bits and a stop and start bit. The bit
period is set by the baud rate. A typical value is 9600 baud, which is about 10k bits
per second. The bit period is then about 100 s, about 1 byte per millisecond, or 1 K
byte per second. The data are transferred between shift registers operating at the same
bit rate; the receiver has to be initialized to the same baud setting as the transmitter.
Assuming we are looking at TTL level data, in the idle state, the line is high. When it
goes low, the receiver clock is started, the data are sampled in the middle of each
following data bit period, and data are shifted into the receive register . RS232 is used
to access the standard serial LCD display, in which case, line drivers are not
necessarily required. ASCII characters and control codes are sent to operate the
display, which has its own MCU with a serial interface to receive and decode the data.
It then drives the pixel array to display alphanumeric characters. Most LCD may also
be set up to display simple bit-mapped graphics. In simulation mode, an RS232
virtual terminal provides a convenient way of generating alphanumeric input into the
MCU for testing.

PIC16 C Program Basics :

Variables
Looping
Decisions

Variables:

The purpose of an embedded program is to read in data or control inputs,


process them, and operate the outputs as required. Input from parallel, serial, and
analog ports are held in the file registers for temporary storage and processing; and
the results are output later on, as data or a signal. The program for processing the data
usually contains repetitive loops and conditional branching, which depends on an
input or calculated value. Variables most programs need to process data in some way,
and named variables are needed to hold their values. A variable name is a label
attached to the memory location where the variable value is stored. When working in
assembly language, a register label acts as the variable name and has to be assigned
explicitly [11]. In C, the variable label is automatically assigned to the next available
location or locations (many variable types need more than 1 byte of memory). The
variable name and type must be declared at the start of the program block, so that the
ENVIRONMENT MONITORING ROBOT

compiler can allocate a corresponding set of locations. Variable values are assumed to
be in decimal by default; so if a value is given in hexadecimal in the source code, it
must be written with the prefix 0x, so that 0xFF represents 255, for example.

Longer labels are sometimes preferable, such as output value, but spaces are
not allowed. Only alphanumeric characters (az, AZ, 09) and underscore, instead of
space, can be used. By default, the CCS compiler is not case sensitive, so a is the
same as A (even though the ASCII code is different). A limited number of key
words in C, such as main and include, must not be used as variable names.

Looping:

Most real-time applications need to execute continuously until the processor is


turned off or reset. Therefore, the program generally jumps back at the end to repeat
the main control loop. In C this can be implemented as a while loop, the condition
for continuing to repeat the block between the while braces is contained in the
parentheses following the while keyword [11]. The block is executed if the value or
result of the expression, in the parentheses is not zero. In this case, it is 1, which
means the condition is always true; and the loop repeats endlessly. This program
represents in simple form the general structure of embedded applications, where an
initialization phase is followed by an endless control loop. Within the loop, the value
of x is incremented (x ++. The output therefore appears to count up in binary when
executing. When it reaches the maximum for an 8-bit count (11111111 =255), it rolls
over to 0 and starts again.

Decision Making:

The simplest way to illustrate basic decision making is to change an output


depending on the state of an input. The switch generates an input at RC0 and RD0
provides the test output. The common keyword for selection in many high level
languages is IF. The input state is read within the loop using the bit read function
input (PIN_C0). This assigns the input value 1 or 0 to the variable x. The value is
then tested in if statement and the output set accordingly. Note that the test uses a
double equals to differentiate it from the assignment operator used in the previous
statement. The effect of the program is to switch on the output if the input is high. The
ENVIRONMENT MONITORING ROBOT

switch needs to be closed before running to see this effect. The LED cannot be
switched off again until the program is restarted [11].

Hi-Tech PIC C:

The Hi-Tech PIC C is a professional standard compiler supplied by a company


established as a development system tool supplier [11]. Hi-Tech supplies C compile
wide range of microcontrollers on the market: PIC 16, 18, 24, and ds PIC (digi
processors) as well as free scale 68000-based types, ARM, 8051 derivatives, T
Instruments MSP430 devices, and other legacy products. The features claimed are
these:

ANSI Cfull featured and portable.

Reliablemature, field-proven technology.

Multiple C optimization levels.


An optimizing assembler.
Full linker, with overlaying of local variables to minimize RAM usage
Comprehensive C library with all source code provided.
Support for 24-bit and 32-bit IEEE floating point and 32-bit long data
types included.
Mikro C and Assembler programming.
Unlimited number of source files.
Listings showing generated assembler.

Compatibleintegrates into the MPLAB

IDE, MPLAB ICD, and most third party development tools.


Runs on multiple platforms: Windows ,Linux , UNIX ,Mac OS X,
Solaris

Optimization involves reducing the final code size by removing redundant


code and modifying the assembler version to reduce the number of instructions to the
minimum achievable. The most obvious disadvantage of this compiler is that only the
standard library functions for data conversion, memory management, mathematical
ENVIRONMENT MONITORING ROBOT

operations, and basic I/O are provided. It is assumed that the user will develop the
peripheral drivers as required, to suit the particular range of applications and hardware
to be supported, or that the peripheral control registers will be accessed directly. On
the other hand, a major advantage is that a fully featured freeware version, PICC-Lite,
is available for hobbyists, students, and limited commercial purposes. At the time of
writing, the following PIC MCUs are supported with no limitations, as compared to
the full version: 12F629, 12F675, and 16F84. A further set of 16 series chips can be
used with a limitation on RAM and program memory: 627, 684, 690, 877,
887, and 917. Other limitations are imposed due to the limited memory available in
these chips. Hi-Tech also supplies Salvo RTOS, including a freeware version. This is
a cooperative, event-driven, priority-based, multitasking, real-time operating system
designed for microcontrollers with limited RAM and ROM. The manual supplied
(www.pumpkininc.com) with this product contains a very useful introduction to
RTOS principles and is recommended if further information is required on using
RTOS in PICs. An example of Hi-Tech C source code is shown in Listing D.3 . It
outputs a binary count at Port B that is incremented every second using a timer
interrupt. The port register is addressed directly, using the label PORTB . The timer
control bit labels are defined in the header file PIC.H and set directly in the main
routine. Note that here the calculation of the initial loop count constant RELOADS
is calculated in the initial directive block using the arithmetic and logic operations
provided within the directive syntax. Recall that CCS C uses a directive to declare a
function as an ISR; here, the compiler recognizes the keyword interrupt within the
function name instead.

Mikro C:

Mikroelectronica supplies range evaluation and development boards for the


PIC and other microcontrollers, as well as C, Pascal, and Basic compilers. The C
compiler MikroC is well documented in a downloadable user manual and includes a
good range of peripheral driver libraries, including CAN, Ethernet, and graphical
LCD drivers as part of a comprehensive I/O library. The packages are oriented toward
the educational and hobby market, offering additional features designed to assist the
beginner in developing C applications. An evaluation version does not appear to be
ENVIRONMENT MONITORING ROBOT

available at the time of this writing, and the compiler syntax can be assessed prior to
purchase only by reference to code fragments given in the manual. As we see, the
control registers are set up by loading control codes as hex numbers, which requires
the program designer to look up the necessary bit configurations. However, the ADC
access function is simple and concise, allowing the input channel to be selected as the
function parameter.

3.1.2 MAX 232:


As we know that the RS232 is not compatible with todays microcontrollers,
we need a voltage converter to convert the RS232s signals to TTL voltage levels that
will acceptable to the 16F877As TxD and RxD pins. So for this situation we use
MAX232 [12].

Figure 3.4: Pin Diagram of MAX232 [13].

It converts from RS232 voltage level to TLL voltage levels, and vice versa. It
has dual voltage converters (line drivers) for transferring and receiving data. The
transmitting line drivers are designated as T1 and T2, while the receiving line drivers
are called R1 and R2.

We use only one application in our project i.e. T1 and R1. We place it between
microcontroller and RS-232DB connector. Microcontroller operates at +5V whereas
RS-232 communicates through Computer at +12V. So there is a need to convert the
signal levels going through Computer via serial port to microcontroller and vice
versa.Data coming through serial port is converted from +12V to +5V. Similarly data
coming through microcontroller is converted from +5V to +12V.

In MAX232, the T1 line driver has a designation of T1in and T1out on pin
number 11 and 14, respectively. The T1in (pin 11) is the TTL side and is connected to
ENVIRONMENT MONITORING ROBOT

TxD (pin 25) of the microcontroller, while T1out (pin 14) is the RS232 side that is
connected to RxD (pin 2) of the RS232 DB connector. The R1 line driver has a
designation of R1in and R1out on pin number 13 and 12, respectively. The R1in (pin
13) is the TTL side and is connected to TxD (pin 25) of the RS232 DB connector,
while R1out (pin 12) is the TTL side that is connected to RxD (pin 26) of the
microcontroller.

Figure 3.5: Interfacing of PIC with computer using MAX232 [14].

Max232 requires four capacitors ranging from 1 to 22F. In our project we


use four capacitors, each has values 10F. We connect C1 to pin 1 and pin3, C2 to pin
4 and pin5, C1 to pin 2 and C4 to pin 6 of the MAX232 IC. C3 must be connected to
VCC and C4 to ground.
ENVIRONMENT MONITORING ROBOT

Voltage Levels:

It is helpful to understand what occurs to the voltage levels. When a MAX232


IC receives a TTL level to convert, it changes TTL logic 0 to between +3 and +15 V,
and changes TTL logic 1 to between -3 to -15 V, and vice versa for converting from
RS232 to TTL.

Features :

Input supply voltage range, VCC (-0.3 V to 6 V)


Positive output supply voltage range, VS+ (VCC - 0.3 V to 15)
Negative output supply voltage range, VS- ( -0.3 V to 15 V)
Input voltage range, VI: Driver ( -0.3 V to VCC + 0.3 V )
Receiver (+30 V)
Output voltage range, VO: T1OUT, T2OUT VS-( - 0.3 V to VS+ + 0.3 V )
R1OUT, R2OUT( -0.3 V to VCC + 0.3 V)
Short-circuit duration: TlOUT, T2OUT (Unlimited)
Package thermal impedance (D package 730C/W )
Operating virtual junction temperature, TJ (150C)
Storage temperature range, Tstg (-65C to 150C)

Applications:

Portable Computers
Low-Power Modems
Interface Translation
Battery-Powered RS-232 Systems
Multidrop RS-232 Networks

3.1.3 Optocoupler PC817:


An optocoupler, also known as an opto-isolator, is an integral part of the opto
electronics arena. It has fast proven its utility as an electrical isolator or a high-speed
switch, and can be used in a variety of applications.
ENVIRONMENT MONITORING ROBOT

The basic design for optocouplers involves use of an LED that produces a
light signal to be received by a photodiode to detect the signal. In this way, the output
current or current allowed to pass can be varied by the intensity of light.

A very common application for the optocoupler is a FAX machine or


MODEM, isolating the device from the telephone line to prevent the potentially
destructive spike in voltage that would accompany a lightning strike.

Opto-couplers typically come in a small 6-pin or 8-pin IC package, but are


essentially a combination of two distinct devices: an optical transmitter, typically a
gallium arsenide LED (light-emitting diode) and an optical receiver such as a
phototransistor or light-triggered diac. The two are separated by a transparent barrier
which blocks any electrical current flow between the two, but does allow the passage
of light. The basic idea is shown for a four pin optocoupler.

Figure 3.6: Internal Structure of Otpocoupler [15].

In this project optocoupler is performing the isolation between RF antenna and


remaining circuit. It also performs isolation to the motor and camera circuitries.
Optocoupler is behaving both as a switch as an isolator in this project. In order to
avoid interference optocoupler has been used between RF antenna and transmitter
circuitry. In this project fifteen 4-pin optocoupler PC817 IC chip has been used.

PC817 Features:

CTR: MIN 50% at If =5mA, VCE =5v

High isolation voltage between input and output Viso= 5000 Vrms
ENVIRONMENT MONITORING ROBOT

Compact dual in line package is 1 channel type

Figure shows 4-PIN optocoupler & functional block diagram.

Figure 3.7(a): PC817 [16].

Figure 3.7(b): Function Block Diagram of PC817 [17].

Applications:

1. Computer terminals

2. System appliances, measuring instruments

3. Registers, copiers, automatic vending machines.

4. Electric home appliances, such as fan, heaters etc.

5. Signal transmission between circuits of different potentials and impedances


ENVIRONMENT MONITORING ROBOT

6. Opto-isolators can help cut down on ground loops, block voltage spikes, and provide
electrical isolation. Where electrical safety is paramount, optocouplers can
totally isolate circuitry which may be touched by humans from mains electricity.

7. Medical equipment often uses optocouplers.

3.1.4 Serial Port


A serial port is a serial communication physical interface through which
information transfers in or out one bit at a time (contrast parallel port). Throughout
most of the history of personal computers, data transfer through serial ports connected
the computer to devices such as terminals and various peripherals.

Transmitter in this project is connected to computer through serial port. DB-9


serial cable is connecting computer with Transmitter through DB-9 connector. There
is really nothing special about this cable. It just a standard 9-pin Male (Female serial)
cable. Make sure your computer has a serial connection! Many newer laptops only
have USB ports and no COM (communications) port. Controlling commands are
coming from computer as serial data into transmitter. These control commands are in
the form of which are further encoded and transmitted to receiver through antenna via
RF.

Figure 3.8: Male DB-9 connector [18].


ENVIRONMENT MONITORING ROBOT

Figure 3.9: RS232 to USB Convertor.

For serial communication we are using hp terminal. We have built window


within HP terminal for serial communication of control commands which will be
discussed in software section. We have connected DB-9 female part with transmitter
board and an RS-232 cable is being used for serial communication purpose B/W PC
and transmitter.

Serial ports have a lot of applications which have been described below:

Computer terminal
Dial-up modems
Printers
Networking (Macintosh AppleTalk at 230.4kbit/s)
Serial Mice
Older Joysticks
GPS receivers (typically NMEA 0183 at 4800bit/s)
Older GSM phones

3.1.5 RF Transmitter

To make the communication between transmitter and receiver sections we


used RF communication. For that purpose we used transmitter and receiver. In this
project we use two pairs of transmitters and receivers. Every pair has 433MHz
frequency and 300feets range.
ENVIRONMENT MONITORING ROBOT

Figure 3.10: Transmitter and Receiver pair.

3.2 Receiver and Robotic Car:


The second important portion of hardware design is Receiver circuitry and
robotic car.

Receiver side consists of the following parts.

Robotic Car
Decoder PT2272
PIC microcontroller 16F877A
Motor Driver L298

3.2.1 Robotic Car

In this project the whole receiver circuitry is embedded over the robotic car.
Further we are actually controlling this car movement. This car is moving with
motors, controlled by motor driver.

The car structure was obtained from the market. It is easily available and it has
a lot of space for mounting motors circuitry and battery packs. It is economical and
easily moveable.
ENVIRONMENT MONITORING ROBOT

Figure 3.11: Atypical Robotic Car

Figure 3.12: Front View of Computer Side Circuit


ENVIRONMENT MONITORING ROBOT

Figure 3.13: Top view of Robot Side Circuit

Figure 3.14: Bottom view of Robot Side Circuit

3.2.2 Decoder PT 2272


ENVIRONMENT MONITORING ROBOT

Decoder has a lot of implementations in daily life. It decodes the encoded


message signal and bring message in a reliable form. So we can say that a decoder is
a device which does the reverse of an encoder, undoing the encoding so that the
original information can be retrieved. The same method used to encode is usually just
reversed in order to decode. In digital electronics, a decoder can take the form of a
multiple-input, multiple-output logic circuit that converts coded inputs into coded
outputs, where the input and output codes are different. e.g. n-to-2n, binary-coded
decimal decoders. Decoding is necessary in applications such as data multiplexing, 7
segment display

In this project PT2272 has been used as decoder. PT2272 is a remote control
decoder paired with PT2262 utilizing CMOS Technology. It has 12 bits of tri-state
address pins providing a maximum of 531,441 (or 312) address codes; thereby,
drastically reducing any code collision and unauthorized code scanning possibilities.
PT2272 is available in several options to suit every application need: variable number
of data output pins, latch or momentary output type. PT2272 is available in 18 pin
package.

Features:

This decoder has the following features:

CMOS Technology
Low Power Consumption
Very High Noise Immunity
Up to 12 Tri-State Code Address Pins
Up to 6 Data Pins
Wide Range of Operating Voltage: VCC=4~15V
Single Resistor Oscillator
Latch or Momentary Output Type
Available in DIP and SOP

Applications:

This decoder has a lot of its applications in Car security system, Garage door
controller and Remote control toys etc.
ENVIRONMENT MONITORING ROBOT

In this project this is decoding the signal coming from Receiving antenna and
forwarding the decoded signal to PIC microcontroller which is taking actions to
control motors accordingly the decoded signal.

Figure 3.15(a): Decoder PT2272 [19].

Figure 3.15(b): Decoder PT2272 Pin configuration [20].

3.2.3 PIC Microcontrollers


The discussion about microcontroller has been done before in Transmitter
circuitry.

3.2.4 Motor Driver L 298

Motor Control some might even say the holy grail of robotics & mobility in
general. Whether it is a Servo, DC, Stepper, Gas or whatever engine/motor, Motor
driver is being able to control speed, torque, direction...Etc, accurately. It gives us a
great advantage over just being able to turn it on or off. Using a microcontroller like
ENVIRONMENT MONITORING ROBOT

the PIC to control the motors gives us the additional advantage of being able to make
split (micro) second decisions through programmed logic.

The L298 is an integrated monolithic circuit in a 15- lead Multi watt and
Power SO20 packages. It is a high voltage, high current dual full-bridge driver
designed to accept standard TTL logic levels and drive inductive loads such as relays,
solenoids, DC and stepping motors. Two enable inputs are provided to enable or
disable the device independently of the input signals. Board Dimensions are 89 71
28 m. It has 15 pins.

The L298N is a high-voltage, high-current dual full-bridge driver designed to


accept TTL logic levels such as those from a PIC, BASIC Stamp, or similar
microcontroller and drive inductive loads like motors (DC and stepper), relays, and
solenoids. Also features current sensing outputs for each half of the bridge to detect
current draw.

Figure 3.16(a): Motor Driver IC L298 [30].

Figure 3.16(b): Pins detail of IC L298 [31].


ENVIRONMENT MONITORING ROBOT

Features:

High Noise Immunity - Dual L298 Motor Driver has logical 0 voltage up to
1.5V.
Bidirectional DC motor control - Dual L298 Motor Driver can control four
DC motors.
Two Phase Bipolar Stepper Motor control - Dual L298 Motor Driver
drivers bipolar stepper motors with winding currents up to 2 A.
Current Sense output - Dual L298 Motor Driver gives voltage output
proportional to motor current.
Easy mounting and setup - Dual L298 Motor Driver has screw terminals for
the high power connections and FRC connectors for the low power
connections. It has four mounting holes for 3mm screws.

Applications:

It has a lot of applications in industry & robotics. It is becoming famous


because of its high noise immunity and suitable features for industry.

It is a full bridge motor driver intended for a wide range of automotive


applications. We can drive two stepper motors or four DC motors using it. We can
directly interface the input with microcontroller to select the motor direction velocity
and break condition.

3.3 DC Gear Motors


We have used four 12V/500A DC gear motors. However it can operate from 5-14
Volts. These motors are mounted on robotic car and they are responsible for robotic
car movement. The purpose of using four motors is to move the car easily. Motors are
connected to every wheel of the car. So our project is 4X4. .

These DC gear motors are compact, economical and easily available. These
are controlled from motor driver L298. This driver is actually responsible for motors
control. It takes commands from microcontroller and forward to motors accordingly.
ENVIRONMENT MONITORING ROBOT

Figure 3.17: DC Gear Motor [29].

H-Bridge:

control the speed and direction of a motor


Use Power Electronics MOSFET (DMOS) as a switching device
App. Notes: National Semiconductor
AN 694 (H-Bridge)
AN 558 (Power MOSFET)
The H-Bridge Chip has a Direction Pin that can be set using digital logic
High/Low
controls flow through the motor in the forward or reverse configuration:
By turning our MOSFETs (switches) ON and OFF really fast, we change the
average voltage seen by the motor.
This technique is called Pulse-Width Modulation (PWM).
The higher the voltage seen by the motor, the higher the speed
Well manipulate the PWM Duty Cycle
ENVIRONMENT MONITORING ROBOT

Figure 3.18(a): H-Bridge.

Figure 3.18(b): PWM duty cycles of the motor [28].

3.4 Battery

Battery has been used in this project to provide power to gear motors and also
to the whole circuit of robot. They are mounted on robotic car. The batteries used for
this project are Acid battery which is used in bike. These batteries are providing
approximately 12V/4A to our robotic car. These are easily available in the market.
ENVIRONMENT MONITORING ROBOT

Figure 3.19: Acid Battery

3.5 Charger

In our project we have used three 12v/1A adapters as shown in figure. First
one is connected to the Camera receiver, second is connected to the computer side
circuit and the third one is used to charge the Acid battery.

Figure 3.20: Chargers

3.6 Wireless Camera


Wireless camera is an important part of our project. it is mounted over robotic
car. It captures the video and transmits it at certain RF. RF is different for different
Wireless camera models. Wireless camera is easily available in the market and it is
usually used for security purposes. The wireless camera used in our project is
basically used for security purposes in shops malls etc.
ENVIRONMENT MONITORING ROBOT

Figure 3.21(a): Wireless Camera (Transmitter).

Figure 3.21(b): Wireless Camera (Receiver).

First of all the wireless camera installed on our robot car sends the video in form of
RF signals to our computer which receives the signals through TV card inserted in our mother
board of our PC. This TV card supports RF signals coming from wireless camera. The real
time video signals sent by Wireless Camera can be seen on the computer through supported
software named Super TV Pro. This Software Instantly Turns our Computer into a Super
TV.

The wireless camera is actually performing monitoring as explained before in monitor


and control principle. After reception of the real time video through our camera we are in a
position to take decision for the robot car whether we have to move it forward, back, left or
right. This controlling of robot car is done through micro controller which is installed on both
sides i.e. transmitter and receiver.
ENVIRONMENT MONITORING ROBOT

3.7 TRANSDUCERS
A transducer is a device which measures a physical quantity and converts it
into a signal which can be read by an observer or by an instrument. Monitoring
and controlling of the environmental conditions involve the process that senses the
changes. Following are the sensors that are being used in our project:

L i g h t Sensor (LDR)

T e m p e r a t u r e sensor (LM35)

H u m i d i t y Sensor

S m o k e Sensor

3.7.1 LIGHT SENSOR

The light sensor is basically a light dependant resistor whose resistance


changes with illumination. A light dependant resistor is also called photo transistor
or cadmium sulfide cell. It is also referenced as a photoconductor. Basically the
resistance of LDR decreases with increase in intensity of the incident light [21].

Figure 3.22(a): Light Sensor [27].

FEATURES:

A photo-resistor is made of a high resistance semiconductor. If light falling


on the device is of h i g h frequency, so that the photons absorbed by
t h e semiconductor give bound electrons enough energy to jump into the
conduction band, the free electrons therefore provide conduction. Hence the
resistance of LDR decreases. For better sensitivities and accurate results the width of
the sensor must be increased and inter-electrode distance must be reduced.
ENVIRONMENT MONITORING ROBOT

The LDR is implemented in the form of a voltage divider. A voltage divider


is a linear circuit producing an output voltage which is the fraction [divided] of the
input voltage.

The two possible circuits of LDR as a voltage divider are as follows:

Figure 3.22(b): LDR Sensor Circuits [26].

The circuit that we have implemented in our project is the dark circuit. Its
basic principle of operation is that when an increased intensity of light is incident on
the LDR, its resistance increases and hence the voltage Vout across the LDR
increases. This voltage is basically the output of the light sensor that is then
applied to the pin 14 of CD4051 IC.

The formula for calculating output voltage is:

3.7.2 TEMPERATURE SENSOR

LM35 is basically called precision centigrade temperature sensor. The


output voltage of LM35 is linearly proportional to the Celsius (Centigrade)
temperature. Thus we have an advantage over other temperature sensors that are
calibrated in Kelvin because in those sensors we have to subtract a constant voltage
from the output voltage for the Kelvin to Celsius conversions which is avoided in
case LM35D.Thus providing simple calculations.
ENVIRONMENT MONITORING ROBOT

Figure 3.23: Temperature Sensor [23].

FEATURES:

LM35 is of low cost as it is calibrated on wafer level plus it has easier


interfacing, low output impedance and linear output. It can operate within a voltage
range of 4-60V.It draws only 60 micro amperes of current from its supply. LM35 has
very low self heating i.e. 0.1 degree Celsius in still air. The scale factor is
.01V/degree Celsius. It maintains an accuracy of +/- 0.4 degree Celsius at room
temperature and +/- 0.8 degree Celsius over a range of 0 C to +100 degree Celsius
and has a sensitivity of 10mV / degree Celsius.

The general equation used to convert output voltage to temperature is:

Temperature (degree Celsius) = Vout/5 * (100 degree Celsius/V)

The temperature range over which LM35 can sense is -40 to +110 degree Celsius
and it packaged in a plastic TO-92 transistor [22].

3.7.3 HUMIDITY SENSOR

Based on a unique capacitive cell, these relative humidity sensors are


designed for cost sensitive applications such as home appliances, and industrial
process control systems is useful in all applications where humidity compensation is
needed.
ENVIRONMENT MONITORING ROBOT

Figure 3.24: Humidity Sensor.

FEATURES:

It is full interchangeability with no calibration required in standard


conditions has high reliability and long term stability is suitable for linear voltage or
frequency output circuitry has fast response time.

Humidity sensors are used in cars, office and in meteorology stations to report and
predict weather.

A humidity sensor is used to sense relative humidity. It is used to measure both air
temperature and moisture. Relative humidity that is expressed as a percent is the
ratio of actual moisture in the air to the highest amount of moisture air that
temperature can hold. The warmer the air the more moisture it can hold, so
relative humidity changes with fluctuations in temperature [24].

The m o s t c o m m o n t y p e o f h u m i d i t y s e n s o r u s e s c a p a c i t i v e
measurements. This system depends on electrical capacitance, or the ability
of two nearby electrical conductors to create an electrical field between them. The
sensor itself is composed of two metal plates with a non-conductive polymer film
between the plates. The film is used to collect moisture from the air, and the
moisture causes minute changes in the voltage between the two plates. The
changes in voltage are converted into digital readings showing the total amount of
moisture in the air.

3.7.4 SMOKE SENSOR

A smoke detector is a device that identifies smoke, typically as an indicator of fire.


Commercial, industrial, and mass residential devices issue a signal to a fire alarm
system, while household detectors, known as smoke alarms, generally issue a local
audible or visual alarm from the detector itself [25].

Smoke detectors are typically housed in a disk-shaped plastic enclosure about 150
millimeters (6 in) in diameter and 25 millimeters (1 in) thick, but the shape can vary
by manufacturer or product line. Most smoke detectors work either by optical
detection (photoelectric) or by physical process (ionization), while others use both
detection methods to increase sensitivity to smoke. Sensitive alarms can be used to
ENVIRONMENT MONITORING ROBOT

detect, and thus deter, smoking in areas where it is banned such as toilets and schools.
Smoke detectors in large commercial, industrial, and residential buildings are usually
powered by a central fire alarm system, which is powered by the building power with
a battery backup. However, in many single family detached and smaller multiple
family housings, a smoke alarm is often powered only by a single disposable battery.

In the United States, the National Fire Protection Association estimates that nearly
two-thirds of deaths from home fires occur in properties without working smoke
alarms/detectors.

Figure 3.25(a): Smoke Sensor


ENVIRONMENT MONITORING ROBOT

Figure 3.25(b): PCB Bottom View of Smoke Sensor Circuit

Figure 3.25(c): PCB Front View of Smoke Sensor Circuit


ENVIRONMENT MONITORING ROBOT

CHAPTER 4

SOFTWARE CONSIDERATIONS

4.1 Introduction
The programming languages and software used in Environment Monitoring
Robot are:

C Language (PIC microcontroller programming language)


Visual Basic 2012 (for Front End Application)
Mikro C Pro for PIC (for PIC microcontroller programming)
Proteus (Version 6.9) (for Electric Circuit Designing and Simulation)
Super TV pro (for viewing the environment captured from Wireless
Camera)

The detailed description of each of them is given below, whereas the code
written in C.

4.2 C Language

The C programming language was designed for computers, though, and not
embedded systems. It does not support direct access to registers, nor does it allow for
the reading and setting of single bits, two very important requirements for PIC. In
addition, most software developers are accustomed to writing programs that will be
executed by an operating system, which provides system calls the program may use to
access the hardware. However, much code for the PIC is written for direct use on the
processor, without an operating system.

4.3 Micro C

There are many software development tools are available for PIC but Mikro C
is the most famous for educational purposes.

Mikroelectronica supplies range evaluation and development boards for the PIC
and other microcontrollers, as well as C, Pascal, and Basic compilers. The C compiler
ENVIRONMENT MONITORING ROBOT

Mikro C is well documented in a downloadable user manual and includes a good


range of peripheral driver libraries, including CAN, Ethernet, and graphical LCD
drivers as part of a comprehensive I/O library. The packages are oriented toward the
educational and hobby market, offering additional features designed to assist the
beginner in developing C applications. An evaluation version does not appear to be
available at the time of this writing, and the compiler syntax can be assessed prior to
purchase only by reference to code fragments given in the manual. As we see, the
control registers are set up by loading control codes as hex numbers, which requires
the program designer to look up the necessary bit configurations. However, the ADC
access function is simple and concise, allowing the input channel to be selected as the
function parameter

4.4 PROTEUS

This software helped us to draw a complete circuit for a micro-controller


based system and then test it interactively, all from within the same piece of software.
Meanwhile, this software retains a host of features aimed at the PCB designer, so that
the same design can be exported for production with ARES or other PCB layout
software.

The Proteus Design Suite comprises a fully integrated EDA package with
modules for schematic capture (ISIS), circuit simulation (PROSPICE), PCB layout
(ARES) and embedded co-simulation (VSM). The simulation functions take place
entirely within the schematic editor whilst ISIS and ARES share a common, easy to
use, Windows user interface. All of which reduces the time it will take you to master
the software. Naturally, ISIS and ARES are themselves tightly integrated, offering
both forward and backward annotation.
ENVIRONMENT MONITORING ROBOT

Figure 4.1: Schematic Diagram of Robot side in Proteus

Figure 4.2: Schematic Diagram of Transmitter in Proteus


ENVIRONMENT MONITORING ROBOT

4.5 Super TV Pro

In this project, we have used Super TV Pro to make our PC a super TV. The
hardware required for this application software for proper working is PCI Video
Capture Card. With the help of this software, we are able to watch the real time video
sent by the video camera on our PC at remote location from the site. After observing
the video on the software, user can make his decision and can take actions
accordingly.

4.6 Visual Basic 2012


Visual Basic .NET (VB.NET) is an object-oriented computer programming
language that can be viewed as an evolution of the classic Visual Basic (VB),
implemented on the .NET Framework. Microsoft currently supplies two main editions
of IDEs for developing in Visual Basic: Microsoft Visual Studio 2012, which is
commercial software and Visual Basic Express Edition 2012, which is free of charge.

In our project, we have developed the front end form for controlling the robotic car
and receiving values from robotic car.

In first section of form, we add a configure section from where we select


the COM PORT for communicating with the help of a serial port. Also,
baud rate can be set through this section.
In second section, we add control unit of robotic car and wireless camera,
it contains buttons functions which are for forward, reverse, left and right.
Camera ON/OFF.
In third section, we add text boxes for receiving values such as
Temperature, Humidity, Light intensity and Smoke presence.
In fourth section, we add database part which stores the values for their
correspondence location with location ID.

After all, we accomplished to achieve to this application which is much useful at


project level. Not professional but quite useful and successful.
ENVIRONMENT MONITORING ROBOT

Figure 4.3: Front End Form Application in Visual Basic 2012.


ENVIRONMENT MONITORING ROBOT

CHAPTER 5

CONCLUSION

The experimental setup of device installed with computer is able to control the
Robotic car via RF and also receiving all sensors readings from a robotic car at a
desired location with the help of PIC 16F877A Microcontroller. Microcontroller is
also controlling the robotic car with the help of H-Bridge circuitry. Our Front end
application is developed in Visual Basic 2012 able to control the robotic car and
collects the environmental values on user request successfully. First, we will move the
robotic car to desired location and then request for values.

5.1 Future Scope

As per the requirement different type of sensors can be connected to the PIC
16F877A and the data read can be sent to the user at regular intervals.
As the PIC 16F877A can receive data from external devices through its ports,
the status of such devices can be transmitted to the user regularly through RF
or any greater communication system.
It is not only limited to ground but also extended for monitoring in air,
mountains and sea level etc.

Figure 5.1: Environment Robot on Land and in water [1].


ENVIRONMENT MONITORING ROBOT

APPENDICES

APPENDIX A
A.1 SOURCE CODE
A.1.1 C Code for Microcontroller of Computer Side Circuit

#define alert PORTb.F0 //Configure PORTB pin 0 for Alert


unsigned char input; //Initialize input as unsigned char type
unsigned short i; //Initialize i as unsigned short type
void right(); //Declaration of function for car to turn right
void left(); //Declaration of function for car to turn left
void fwr(); //Declaration of function to move forward
void rev(); //Declaration of function to move backward
void get_data(); //Declaration of function for getting data
void data_recev() //Function for giving alert when data is received
{
while(alert==0);
input=porta;
delay_ms(100);
}
void main()
{
USART_init(9600); //initialize USART module
TRISD = 0; //Configure PORTD pins as outputs
TRISA = 255; //Configure PORTA pins as inputs
TRISB = 0; //Configure PORTB pins as outputs
trisb.f0=1; //Configure PORTB pin 0 as input for Alert
ADCON1 = 7; //A/D voltage reference is VCC
TRISA = 255; //rf module input
/*
loads the ADCON1 register with decimal number 7. This value tells
the PIC16F877A that we want to use the A/D-pins as digital I/O. The
ENVIRONMENT MONITORING ROBOT

ADCON1 and TRIS registers control the operation of the A/D port pins.
To be used as analog inputs, the TRIS bits must be set to inputs.
*/
trisb.f0=1; //Configure PORTB pin 0 as input for Alert
PORTd = 255; //(8 bit, 19200 baud rate, no parity bit...)
porta=255;
while (1) //Infinite loop
{
if(alert==1)
{
}
if (USART_Data_Ready()) //if data is received
{
i = USART_Read(); // read the received data
switch(i) //Using switch statement
{
case '1': //For forward movement
PORTD = 0B11111100; //3CODE
// fwr();
DELAY_MS(500); //500ms delay
PORTD = 0B11111111; //To stop the car
break;

case '2': //For reverse movement


PORTD = 0B11111011; //4CODE
// rev();
DELAY_MS(500);
PORTD = 0B11111111; //To stop the car
break;

case '3': //To turn left


PORTD = 0B11111110; //1CODE
// left();
DELAY_MS(500);
ENVIRONMENT MONITORING ROBOT

PORTD = 0B11111111; //To stop the car


break;

case '4': //To turn right


PORTD = 0B11111101; //2CODE
// right();
DELAY_MS(500);
PORTD = 0B11111111; //To stop the car
break;

case 'n': //To turn On the camera


PORTD = 0B11111010; //5CODE
DELAY_MS(800);
PORTD = 0B11111111; //CODE
break;

case 'f': //To turn Off the Camera


PORTD = 0B11111001; //6CODE
DELAY_MS(800);
PORTD = 0B11111111; //CODE
break;

case 'g': //To get data


PORTD = 0B11110110; //7CODE
// get_data();
DELAY_MS(800);
PORTD = 0B11111111; //CODE
DELAY_MS(500);
/*********************Getting Temperature Sensor data********************/
i='T';
USART_Write(i); //send data via USART
i='E';
USART_Write(i); //send data via USART
i='M';
ENVIRONMENT MONITORING ROBOT

USART_Write(i); //send data via USART


i='P';
USART_Write(i); //send data via USART
i='=';
USART_Write(i); //send data via USART
data_recev(); //Calling Data receive function
data_recev(); //Calling Data receive function
data_recev(); //Calling Data receive function
/**********************Getting Humidity Sensor Data*********************/
i='H';
USART_Write(i); //send data via USART
i='U';
USART_Write(i); //send data via USART
i='M';
USART_Write(i); //send data via USART
i='=';
USART_Write(i); //send data via USART
data_recev(); //Calling Data receive function
data_recev(); //Calling Data receive function
data_recev(); //Calling Data receive function
/************************Getting Light Sensor
Data***********************/
i='L';
USART_Write(i); //send data via USART
i='I';
USART_Write(i); // send data via USART
i='G';
USART_Write(i); //send data via USART
i='H';
USART_Write(i); //send data via USART
i='T';
USART_Write(i); //send data via USART
i='=';
USART_Write(i); //send data via USART
ENVIRONMENT MONITORING ROBOT

data_recev(); //Calling Data receive function


data_recev(); //Calling Data receive function
data_recev(); //Calling Data receive function
/**********************Getting Smoke Sensor Data***********************/
i='S';
USART_Write(i); //send data via USART
i='M';
USART_Write(i); //send data via USART
i='O';
USART_Write(i); //send data via USART
i='K';
USART_Write(i); //send data via USART
i='E';
USART_Write(i); //send data via USART
i='=';
USART_Write(i); //send data via USART
data_recev(); //Calling Data receive function
i='$';
USART_Write(i); //Send data via USART
USART_Write('\r'); //Carriage Return
USART_Write('\n'); // Line Feed
break;
}
}
}
}
void get_data()
{
i='G';
USART_Write(i); //send data via USART
i='E';
USART_Write(i); //send data via USART
i='T';
USART_Write(i); //send data via USART
ENVIRONMENT MONITORING ROBOT

i=' ';
USART_Write(i); //send data via USART
i='D';
USART_Write(i); //send data via USART
i='A';
USART_Write(i); //send data via USART
i='T';
USART_Write(i); //send data via USART
i='A';
USART_Write(i); //send data via USART
USART_Write('\r'); //Carriage Return
USART_Write('\n'); //Line Feed
}
void right() //Defining Function for right turn
{
i='R';
USART_Write(i); //send data via USART
i='I';
USART_Write(i); //send data via USART
i='G';
USART_Write(i); //send data via USART
i='H';
USART_Write(i); // send data via USART
i='T';
USART_Write(i); //send data via USART
USART_Write('\r'); //Carriage Return
USART_Write('\n'); //Line Feed
}
void left() //Defining Function for left turn
{
i='L';
USART_Write(i); //send data via USART
i='E';
USART_Write(i); //send data via USART
ENVIRONMENT MONITORING ROBOT

i='F';
USART_Write(i); //send data via USART
i='T';
USART_Write(i); //send data via USART
USART_Write('\r'); //Carriage Return
USART_Write('\n'); // Line Feed
}
void fwr() //Defining Function for forward
{
i='F';
USART_Write(i); //send data via USART
i='O';
USART_Write(i); //send data via USART
i='R';
USART_Write(i); //send data via USART
i='W';
USART_Write(i); //send data via USART
i='A';
USART_Write(i); //send data via USART
i='R';
USART_Write(i); //send data via USART
i='D';
USART_Write(i); //send data via USART
USART_Write('\r'); //Carriage Return
USART_Write('\n'); //Line Feed
}
void rev() //Defining Function for reverse
{
i='R';
USART_Write(i); //send data via USART
i='E';
USART_Write(i); //send data via USART
i='V';
USART_Write(i); //send data via USART
ENVIRONMENT MONITORING ROBOT

i='E';
USART_Write(i); //send data via USART
i='R';
USART_Write(i); //send data via USART
i='S';
USART_Write(i); //send data via USART
i='E';
USART_Write(i); //send data via USART
USART_Write('\r'); //Carriage Return
USART_Write('\n'); //Line Feed
}
*********************************************************************

A.1.2 C Code for Microcontroller of Robot Side Circuit

typedef unsigned char byte; //use to give a type a new name


long tlong; //Initialize tlong as long type
unsigned short val; //Initialize val as unsigned short type
unsigned char ch; //Initialize ch as unsigned char type
unsigned int adc_rd1; //Initialize int as unsigned int type
char temp; //Initialize temp as char type
void send(); //Declaration of function for send data
void reset(); //Declaration of function for reset
void InitMain()
{
PORTB = 0; //set PORTB to 0 or Clear PORTB
TRISB = 0; //Make PORTB pins as output
TRISD = 0; //configure PORTD pins as output
PORTD = 255; //set PORTD to 255
ADCON1 = 0x82; //configure VDD as Vref, and analog channels
& is A\D control register
TRISA = 0xFF; //designate PORTA as input
}
void up()
{
ENVIRONMENT MONITORING ROBOT

portd.f6=0;
portd.f5=1;
Delay_ms(800);
portd.f6=1;
portd.f5=1;
}
void dwn()
{
portd.f6=1;
portd.f5=0;
Delay_ms(800);
portd.f6=1;
portd.f5=1;
}
void fwr()
{
PORTd.F7=0;
PORTd.F6=1;
PORTd.F5=0;
PORTd.F4=1;
Delay_ms(300);
}
void rev()
{
PORTd.F7=1;
PORTd.F6=0;
PORTd.F5=1;
PORTd.F4=0;
Delay_ms(300);
}
void right()
{
PORTd.F7=0;
PORTd.F6=1;
ENVIRONMENT MONITORING ROBOT

PORTd.F5=1;
PORTd.F4=0;
}
void left()
{
PORTd.F7=1;
PORTd.F6=0;
PORTd.F5=0;
PORTd.F4=1;
}
void stop()
{
PORTd.F7=1;
PORTd.F6=1;
PORTd.F5=1;
PORTd.F4=1;
}
void reset()
{}
void send ()
{}
void chk()
{
val=&portc;
val=~val;
val=val&0x0f;
}
void main()
{
Usart_Init(9600); //initialize USART module
initMain(); //Calling function
PORTB = 255; //set PORTB to 255
PORTD.F7=1; //set PORTD's pin7 to 1
PORTC.F4=0; //set PORTC's pin4 to 0
ENVIRONMENT MONITORING ROBOT

Delay_ms(2000);
PORTC.F4=1; //set PORTC's pin4 to 1
while (1)
{ //endless loop
chk();
if (val ==9) //If val = 9 then getting data from sensors
{
Delay_ms(2000);
adc_rd1 = ADC_read(0); //get ADC value from channel 0 (RA0/AN0)
Delay_ms(200);
adc_rd1 = ADC_read(0); //get ADC value from channel 0 (RA0/AN0)
tlong = (long)adc_rd1 * 5000; // covert adc reading to milivolts
tlong = tlong / 1023; //0..1023 -> 0-5000mV
ch = tlong / 1000; //extract volts digit
temp=ch;
send(); //Calling send function
ch = (tlong / 100) % 10; //extract 0.1 volts digit
temp=ch;
send(); //Calling stop function
ch = (tlong / 10) % 10; //extract 0.01 volts digit
temp=ch;
send(); //Calling send function
adc_rd1 = ADC_read(1); //get ADC value from Ist channel
(RA1/AN1)
Delay_ms(200);
adc_rd1 = ADC_read(1); //get ADC value from Ist channel (RA1/AN1)
tlong = (long)adc_rd1 * 5000; //covert adc reading to milivolts
tlong = tlong / 1023; //0..1023 -> 0-5000mV
ch = tlong / 1000; //extract volts digit
temp=ch;
send(); //Calling send function
ch = (tlong / 100) % 10; //extract 0.1 volts digit
temp=ch;
send(); //Calling send function
ENVIRONMENT MONITORING ROBOT

ch = (tlong / 10) % 10; //extract 0.01 volts digit


temp=ch;
send(); //Calling send function
adc_rd1 = ADC_read(2); //get ADC value from 2nd channel (RA2/AN2)
Delay_ms(200);
adc_rd1 = ADC_read(2); //get ADC value from 2nd channel (RA2/AN2)
tlong = (long)adc_rd1 * 5000; //covert adc reading to milivolts
tlong = tlong / 1023; //0..1023 -> 0-5000mV
ch = tlong / 1000; //extract volts digit
temp=ch;
send(); //Calling send function
ch = (tlong / 100) % 10; //extract 0.1 volts digit
temp=ch;
send(); //Calling send function
ch = (tlong / 10) % 10; //extract 0.01 volts digit
temp=ch;
send(); //Calling send function
delay_ms(300);
if(portc.f5=0)
{
temp=0;
send(); //Calling send function
delay_ms(300);
}
else
{
temp=1;
send(); //Calling send function
delay_ms(300);
}
}
stop(); //Calling stop function
if (val == 1) //If val = 1 then turn to left
{
ENVIRONMENT MONITORING ROBOT

left(); //Calling left function


Delay_ms(800);
stop(); //Calling stop function
// while(PORTA.F0 ==1); //fwr();
}
if (val== 2) //If val = 2 then turn to right
{
right(); //Calling right function
Delay_ms(800);
// while(PORTA ==3); //fwr();
stop(); //Calling stop function
}
if (val == 3) //If val = 3 then move forward
{
fwr(); //Calling forward function
Delay_ms(300);
// while(PORTA.F2 ==1); //fwr();
stop(); //Calling stop function
}
if (val == 4) //If val = 4 then move reverse
{
rev(); //Calling reverse function
Delay_ms(300);
stop(); //Calling stop function
}
If (val == 5) //If val = 5 then On the camera
{
portc.f4=0;
Delay_ms(800);
stop(); //Calling stop function
}
if (val == 6) //If val = 6 then Off the camera
{
portc.f4=1;
ENVIRONMENT MONITORING ROBOT

Delay_ms(800);
}
}
}
*********************************************************************

A.1.3 Visual Basic Code for creation of Form and how to connect it to MS-Access

Imports System
Imports System.ComponentModel
Imports System.Threading
Imports System.IO.Ports

Public Class Form1


Dim con As System.Data.OleDb.OleDbConnection
Dim cmd As System.Data.OleDb.OleDbCommand
Dim dr As System.Data.OleDb.OleDbDataReader
Dim sqlStr As String
'For DataBase

Dim myPort As Array 'COM Ports detected on the system will be stored here
Delegate Sub SetTextCallback(ByVal [text] As String) 'Added to prevent threading
errors during receiveing of data

Dim count As Boolean = False


Dim count1 As Boolean = False
Private Sub From1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'When our form loads, auto detect all serial ports in the system and populate the
cmbPort Combo box.
myPort = IO.Ports.SerialPort.GetPortNames() 'Get all com ports available
cmbBaud.Items.Add(9600) 'Populate the cmbBaud Combo box to common
baud rates used
ENVIRONMENT MONITORING ROBOT

cmbBaud.Items.Add(19200)
cmbBaud.Items.Add(38400)
cmbBaud.Items.Add(57600)
cmbBaud.Items.Add(115200)
Timer1.Start()

For i = 0 To UBound(myPort)
cmbPort.Items.Add(myPort(i))
Next
cmbPort.Text = cmbPort.Items.Item(0) 'Set cmbPort text to the first COM port
detected
cmbBaud.Text = cmbBaud.Items.Item(0) 'Set cmbBaud text to the first Baud
rate on the list
btnDisconnect.Enabled = False 'Initially Disconnect Button is Disabled
End Sub

Private Sub btnConnect_Click(ByVal sender As Object, e As EventArgs) Handles


btnConnect.Click
SerialPort1.PortName = cmbPort.Text 'Set SerialPort1 to the selected
COM port at startup
SerialPort1.BaudRate = cmbBaud.Text 'Set Baud rate to the selected value
on

'Other Serial Port Property


SerialPort1.Parity = IO.Ports.Parity.None
SerialPort1.StopBits = IO.Ports.StopBits.One
SerialPort1.DataBits = 8 'Open our serial port
SerialPort1.Open()
btnConnect.Enabled = False 'Disable Connect button
btnDisconnect.Enabled = True 'and Enable Disconnect button
End Sub
ENVIRONMENT MONITORING ROBOT

Private Sub btnDisconnect_Click(ByVal sender As Object, e As EventArgs)


Handles btnDisconnect.Click
SerialPort1.Close() 'Close our Serial Port
btnConnect.Enabled = True
btnDisconnect.Enabled = False
End Sub

Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As


System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
ReceivedText(SerialPort1.ReadExisting()) 'Automatically called every time a
data is received at the serialPort
End Sub

Private Sub ReceivedText(ByVal [text] As String)


'compares the ID of the creating Thread to the ID of the calling Thread
If Me.rtbReceived.InvokeRequired Then
Dim x As New SetTextCallback(AddressOf ReceivedText)
Me.Invoke(x, New Object() {(text)})
Else
Me.rtbReceived.Text &= [text]
End If
End Sub

Private Sub cmbPort_SelectedIndexChanged(ByVal sender As Object, e As


EventArgs) Handles cmbPort.SelectedIndexChanged
If SerialPort1.IsOpen = False Then
SerialPort1.PortName = cmbPort.Text 'pop a message box to user if he is
changing ports
Else 'without disconnecting first.
MsgBox("Valid only if port is Closed, Constraint given by Sajjad!",
vbCritical)
End If
End Sub
ENVIRONMENT MONITORING ROBOT

Private Sub cmbBaud_SelectedIndexChanged(ByVal sender As Object, e As


EventArgs) Handles cmbBaud.SelectedIndexChanged
If SerialPort1.IsOpen = False Then
SerialPort1.BaudRate = cmbBaud.Text 'pop a message box to user if he
is changing baud rate
Else 'without disconnecting
first.
MsgBox("Valid only if port is Closed, Constraint given by Sajjad!",
vbCritical)
End If
End Sub

Private Sub Button3_Click(ByVal sender As Object, e As EventArgs) Handles


Button3.Click
Try
SerialPort1.Write("1")
Catch ex As Exception
End Try
End Sub

Private Sub Button4_Click(ByVal sender As Object, e As EventArgs) Handles


Button4.Click
Try
SerialPort1.Write("4")
Catch ex As Exception
End Try
End Sub

Private Sub Button5_Click(ByVal sender As Object, e As EventArgs) Handles


Button5.Click
Try
SerialPort1.Write("3")
Catch ex As Exception
End Try
ENVIRONMENT MONITORING ROBOT

End Sub

Private Sub Button6_Click(ByVal sender As Object, e As EventArgs) Handles


Button6.Click
Try
SerialPort1.Write("2")
Catch ex As Exception
End Try
End Sub

Private Sub Button7_Click(ByVal sender As Object, e As EventArgs) Handles


Button7.Click
Try
SerialPort1.Write("n")
Catch ex As Exception
End Try
End Sub

Private Sub Button8_Click(ByVal sender As Object, e As EventArgs) Handles


Button8.Click
Try
SerialPort1.Write("f")
Catch ex As Exception
End Try
End Sub

Private Sub Button9_Click(ByVal sender As Object, e As EventArgs) Handles


Button9.Click
Try
count = True
SerialPort1.Write("g")
Catch ex As Exception
End Try
End Sub
ENVIRONMENT MONITORING ROBOT

Private Sub rtbReceived_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles rtbReceived.TextChanged
End Sub

Private Sub Timer1_Tick(ByVal sender As Object, e As EventArgs) Handles


Timer1.Tick
Try
If count = True Then
If rtbReceived.Text(31) = "$" Then
count1 = True
End If

If count1 = True Then


If rtbReceived.Text(0) = "T" Then
TextBox1.Text = rtbReceived.Text(5) + rtbReceived.Text(6) +
rtbReceived.Text(7)
End If

If rtbReceived.Text(8) = "H" Then


TextBox2.Text = rtbReceived.Text(12) + rtbReceived.Text(13) +
rtbReceived.Text(14)
End If

If rtbReceived.Text(15) = "L" Then


TextBox3.Text = rtbReceived.Text(21) + rtbReceived.Text(22) +
rtbReceived.Text(23)
End If

If rtbReceived.Text(24) = "S" Then


If Val(rtbReceived.Text(30)) = 0 Then
TextBox4.Text = "Normal"
End If
If Val(rtbReceived.Text(30)) = 1 Then
ENVIRONMENT MONITORING ROBOT

TextBox4.Text = "Alert"
End If
count = False
End If

If rtbReceived.Text(31) = "$" Then


rtbReceived.Text = ""
count = False
count1 = False
End If
End If
End If
Catch ex As Exception
End Try
End Sub

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles


TextBox1.TextChanged
End Sub

Private Sub Button10_Click(sender As Object, e As EventArgs) Handles


Button10.Click
Dim id As Integer
'Dim name As String
id = Val(InputBox("Enter Location id"))
'id contains the value of ID
'name = Val(InputBox("Enter Location Name"))
con = New

System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=C:\ENVIRONMENT MONITORING ROBOT\ENVIRONMENT
MONITORING ROBOT.accdb")
con.Open()
'paste the connection string above
ENVIRONMENT MONITORING ROBOT

'open the connection

MsgBox("Connection OK")
sqlStr = "Select * from Datap where Id=" & id & ""
'Write the sql query

cmd = New OleDb.OleDbCommand(sqlStr, con)


'pass the parameter as sql Query, con "Connection OBJ"
dr = cmd.ExecuteReader()

If dr.HasRows = True Then


While dr.Read()
TextBox5.Text = dr(0)
TextBox6.Text = dr(1)
TextBox1.Text = dr(2)
TextBox2.Text = dr(3)
TextBox3.Text = dr(4)
TextBox4.Text = dr(5)

End While
End If

'"ExecuteReader() for Select Query"


'It return the result
MsgBox("Record found OK")
con.Close()
'close the connection after operation get completed.
End Sub

Private Sub Button12_Click(sender As Object, e As EventArgs) Handles


Button12.Click
con = New
ENVIRONMENT MONITORING ROBOT

System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=C:\ENVIRONMENT MONITORING ROBOT\ENVIRONMENT
MONITORING ROBOT.accdb")
con.Open()
'paste the connection string above
'open the connection
MsgBox("Connection OK")
sqlStr = "insert into Datap values(" & TextBox5.Text & ",'" & TextBox6.Text &
"'," & TextBox1.Text & "," & TextBox2.Text & "," & TextBox3.Text & ",'" &
TextBox4.Text & "');"
'Write the sql query
cmd = New OleDb.OleDbCommand(sqlStr, con)
'pass the parameter as sql Query, con "Connection OBJ"
cmd.ExecuteNonQueryAsync()
'cmd.ExecuteNonQuery()
'"ExecuteNonQuery() for insert, update, delete query"
MsgBox("Record Inserted OK")
con.Close()
'close the connection after operation get completed.
End Sub
End Class

*********************************************************************
ENVIRONMENT MONITORING ROBOT

APPENDIX 8

B.1 ACRONYMS

ADC Analog to Digital Converter


ASCII American Standard Code for Information Interchange
AT Antenna
AUC Authentication Register
BOR Brown out Reset
CAD Computer Aided Design
CCS Code Composer Studio
CMOS Complementary Metal Oxide Semiconductor
CTR Current Transmission Rate
CS Chip Select
D/A Digital to Analog Converter
DC Direct Current
DIP Dual Inline Package
DMOS Diffused Metal Oxide Semiconductor
EEPROM Electrical Erasable Programmable Read Only Memory
EIA Electronic Industry Association
EIR Equipment Identity Register
FRC Frame Relay Capabilities
FS Full Scale
FSR File Select Register
GPRS General Packet Radio System
GPS Global Positioning Systems
GSM Global System for Mobile
IC Integrated Circuit
I2C Inter-Integrated Circuit
IDE Integrated Development Environment
INT Interrupt
I/O Input and Output
IT Information Technology
LCD Liquid Crystal Display
LDR Light Dependent Resistor
LED Light Emitting Diode
LSB Least Significant Bit
MCLR Master Clear
MCU Microcontroller Unit
MOSFET Metal-Oxide Semiconductor Field-Effect Transistor
ENVIRONMENT MONITORING ROBOT

MS Microsoft
MSB Most Significant Bit
MSSP Master Synchronous Serial Port
OSC Oscillator
PC Personal Computer
PCB Printed Circuit Board
PGC Programming Clock
PGD Programming Data
PIC Peripheral Interface Controller
PICC Peripherally Inserted Central Catheter
PLC Peripheral Interface Controller
POR Power on Reset
PSP Parallel Slave Pin
PWM Pulse Width Modulation
RAM Read Access Memory
RF Radio Frequency
ROM Read Only Memory
RX Receiver
SFR Special Function Register
SOP Small Outline Package
SPI Serial Peripheral Interface
SS Slave Select
TTL Transistor Transistor Logic
TV Television
TX Transmitter
USART Universal Synchronous/Asynchronous
USB Universal Serial Bus
VB Visual Basic
WAP Web Access Protocol
WSN Wireless Sensor Networks
ENVIRONMENT MONITORING ROBOT

APPENDIX C

C.1 REFERENCES

[1] http://lifesciences.ieee.org/articles/116-robotics-for-environmental-monitoring
[2] http://www.ecse.monash.edu.au/staff/mehmety/IEEESensors_electronicpill.pdf
[3] http://www.scribd.com/doc/114108613/LIVE-HUMAN-BEING-DETECTION-
WIRELESS-REMOTE-CONTROLLED-ROBOT
[4] http://nerdclub-uk.blogspot.com/2011/11/pic16f877a-resetting.html
[5] http://www.hobbyprojects.com/microcontroller-tutorials/pic16f877a/introduction-to-the-
pic16f877a.html
[6]http://www.academia.edu/1846824/Wireless_Radio_Frequency_Module_Using_PIC_Micr
ocontroller
[7] http://www.mikroe.com/chapters/view/16/
[8] http://zux163-090.adsl.green.ch/armando/eBooks/Programming%208-
bit%20PIC%20Microcontrollers%20in%20C.pdf
[9] http://www.dimensionengineering.com/appnotes/Gmeter/PIC16F818.pdf
[10] http://zux163-090.adsl.green.ch/armando/eBooks/Programming%208-
bit%20PIC%20Microcontrollers%20in%20C.pdf
[11] Programming 8-bit PIC Microcontrollers in C: with Interactive Hardware Simulation
By Martin P. Bates
[12] http://www.pantechsolutions.net/microcontroller-boards/uart-interfacing-with-
pic16f877a-primer
[13] http://www.societyofrobots.com/electronics_negative_voltages.shtml
[14] http://myfreetimehobbies.blogspot.com/2012/09/pic-serial-communication-tutorial-
uart.html
[15] http://wiki.analog.com/university/courses/electronics/electronics-lab-22
[16] http://www.pro-tecc.co.za/store/index.php?main_page=product_info&products_id=6688
[17] http://entegreciniz.com/asp/product/5122/pc817
[18] http://www.usconverters.com/index.php?main_page=page&id=61&chapter=0
[19] http://www.ebay.ca/itm/5pcs-PT2272-L4-PT2272-DIP-18-Remote-Control-Decoder-IC-
/290776861732?pt=LH_DefaultDomain_0&hash=item43b3a6cc24
[20] http://www.datasheetdir.com/PT2272+RF-transceiver
[21] http://www.electronics-tutorials.ws/io/io_4.html
[22] http://www.ti.com/lit/ds/symlink/lm35.pdf
[23] http://www.facstaff.bucknell.edu/mastascu/elessonsHTML/Sensors/TempLM35.html
ENVIRONMENT MONITORING ROBOT

[24] http://www.wisegeek.com/what-is-a-humidity-sensor.htm
[25] http://knowledgeweb.afac.com.au/research/community/detectors
[26] http://tutorial.cytron.com.my/wp-content/uploads/2011/08/sens01.gif
[27] http://ayo-baca-aja.blogspot.com/2010/01/ldr-dan-photodioda.html
[28] http://www.ni.com/white-paper/2991/en/
[29] http://leisonmotor.en.made-in-china.com/productimage/jMNJDeiPfBrk-
2f0j00MBtESATyLFzs/China-CE-RoHS-12V-Low-Rpm-DC-Gear-Motor.html
[30] http://commons.wikimedia.org/wiki/File:L298_IMGP4533_wp.jpg
[31] http://www.rapidonline.com/electronic-components/l298-dual-full-bridge-driver-
34494/

THE END

Você também pode gostar