You are on page 1of 66

WOMEN ROBOT

A PROJECT REPORT SUBMITTED IN PARTIAL FULFILLMENT OF


REQUIREMENTS FOR THE DEGREE OF

BACHELOR OF TECHNOLOGY
IN
ELECTRICAL AND ELECTRONICS ENGINEERING

Submitted By

SUGYANI SAHU 1821301279

UNDER THE ESTEEMED GUIDANCE OF

PROF. M. SAI DABASISA PATRO


Asst. Prof.Dept of EEE

DEPTARTMENT OF ELECTRICAL AND ELECTRONICS


VIGNAN INSTITUTE OF TECHNOLOGY AND MANAGEMENT
WOMEN ROBOT

DECLERATION
We do hereby declare that we have undergone a project on
“WOMEN ROBOT ” at Vignan Institute of Technology And Management,
under the guidance of M. SAI DABASISA PATRA, Department Of
Electrical And Electronics Engineering, VITAM, and Berhampur.

We submit this report in partial fulfilment of the requirement for the


B.Tech, in Electrical and Electronics Engineering from Vignan Institute of
Technology And Management, Berhampur. The report is exclusively and
comprehensively prepared and conceptualized by us. All the information and
data given here in this project are collected during our study from various
sources and it has not been published anywhere before.

SUGYANI SAHU 1821301279

Department Of Electrical And Electronics Engineering

2
WOMEN ROBOT

ACKNOWLEDGMENT
This work was completed due to the grace of almighty god. We are
highly indebted to god that he has given the strength and encouragement to
complete this work and hope his blessings will continue to be showered on
us so that we can active the goal of our lives.

We avail this opportunity to place our profound gratitude to our


Asst.Prof. M. SAI DABASISA PATARA , Department Of Electrical And
Electronics Engineering for his constant supervision , inspiration and
encouragement , right from the beginning of the project.

We are also indebted Prof. B. SRINIVAS RAO , HOD, Department


Of Electrical And Electronics Engineering for his help and valuable
suggestion in completion of this project.

Finally, we would like to extend our sincere thanks to all my friends


and all those persons who have rendered their valuable help directly or
indirectly in completion of this project.

SUGYANI SAHU 1821301279

Department Of Electrical And Electronics Engineering

3
WOMEN ROBOT

CONTENTS

Sl No. PAGE NO.

ACKNOWLEDGEMENT I

ABSTRACT II
1 INTRODUCTION

1.1 INTRODUCTION................................................................ 01

1.2 LITERTURE REVIEW......................................... 01

1.3 PROBLEM DESCRIPTION.................................. 03

1.4 METHODOLOGY................................................. 03

1.5 SCOPE OF PROJECT............................................ 03

1.6 APPARATUS REQUIRED....................................


2 SOFTWARE DESCRIPTION

2.1 SOFTWARE USED.............................................................

2.2 PROCEDURE......................................................................

3 HARDWARE DESCRIPTION
3.1 BLOCK DIAGRAM………………….…………………….. 04
3.2 BLOCK DISCRIPTION...………………………..............… 05
3.3 CIRCUIT DIAGRAM…………..……………………..……. 17
3.4 COMPONENTS USED …………………….……………… 07
4 TESTING 08

4.1 HARDWARE TESTING ..……….………….....…….. 05

4.2 SOFTWARE TESTING..…………..…….………...… 06

5 RESULTS……….…………….………………………………..… 26

6 ADVANTAGES AND DIS ADVANTAGES.................................

7 APPLICATIONS……..……….………………………………..…

4
WOMEN ROBOT

8 CONCLUSION… ………………………………………………..

9 FUTURE SCOPE…………………………………………………

10 REFERENCES………………….…………………………………

11 APPENDIX

11.1 APPENDIX A ……………………………………………

11.2 APPENDIX B……………….……………………………

5
WOMEN ROBOT

1. INTRODUCTION
One of the first recognizably modern embedded systems was the Apollo Guidance
Computer, developed by Charles Stark Draper at the MIT Instrumentation Laboratory. At
the project's inception, the Apollo guidance computer was considered the riskiest item in
the Apollo project as it employed the then newly developed monolithic integrated circuits
to reduce the size and weight. When the Minuteman II went into production in 1966, the
D-17 was replaced with a new computer that was the first high-volume use of integrated
circuits. This program alone reduced prices on quad nand gate ICs from $1000/each to
$3/each, permitting their use in commercial products.

Since these early applications in the 1960s, embedded systems have come down
in price and there has been a dramatic rise in processing power and functionality. The
first microprocessor for example, the Intel 4004, was designed for calculators and other
small systems but still required many external memory and support chips. In 1978
National Engineering Manufacturers Association released a "standard" for programmable
microcontrollers, including almost any computer-based controllers, such as single board
computers, numerical, and event-based controllers.

As the cost of microprocessors and microcontrollers fell it became feasible to


replace expensive knob-based analog components such as potentiometers and variable
capacitors with up/down buttons or knobs read out by a microprocessor even in some
consumer products. By the mid-1980s, most of the common previously external system
components had been integrated into the same chip as the processor and this modern form
of the microcontroller allowed an even more widespread use, which by the end of the
decade were the norm rather than the exception for almost all electronics devices.

The integration of microcontrollers has further increased the applications for


which embedded systems are used into areas where traditionally a computer would not
have been considered. Although in this context an embedded system is usually more
complex than a traditional solution, most of the complexity is contained within the

6
WOMEN ROBOT

microcontroller itself. Very few additional components may be needed and most of the
design effort is in the software.

1.1 CHARACTERISTICS

 Embedded systems are designed to do some specific task, rather than be a


general-purpose computer for multiple tasks. Some also have time performance
constraints that must be met, for reasons such as safety and usability; others may
have low or no performance requirements, allowing the system hardware to be
simplified to reduce costs.
 Embedded systems are not always standalone devices. Many embedded systems
consist of small, computerized parts within a larger device that serves a more
general purpose. For example, the Gibson Robot Guitar features an embedded
system for tuning the strings, but the overall purpose of the Robot Guitar is, of
course, to play music.[5] Similarly, an embedded system in an automobile provides
a specific function as a subsystem of the car itself.
 The program instructions written for embedded systems are referred to
as firmware, and are stored in read-only memory or Flash memory chips. They
run with limited computer hardware resources: little memory, small or non-
existent keyboard or screen.

1.2 TOOLS
As with other software, embedded system designers use compilers,  assemblers,
and debuggers to develop embedded system software. However, they may also use some
more specific tools:

1. In circuit debuggers or emulators (see next section).


2. Utilities to add a checksum or CRC to a program, so the embedded system can
check if the program is valid.
3. Custom compilers and linkers may be used to optimize specialized hardware.
4. An embedded system may have its own special language or design tool, or add
enhancements to an existing language such as Forth or Basic.

7
WOMEN ROBOT

5. Another alternative is to add a real-time operating system or embedded operating


system, which may have DSP capabilities like DSP nano RTOS.
6. Modeling and code generating tools often based on state machines.
7. Software tools can come from several sources:
8. Software companies that specialize in the embedded market.

As the complexity of embedded systems grows, higher level tools and operating
systems are migrating into machinery where it makes sense. For example, cell
phones, personal digital assistants and other consumer computers often need significant
software that is purchased or provided by a person other than the manufacturer of the
electronics. In these systems, an open programming environment such
as Linux, Embedded Java is required so that the third-party software provider can sell to a
large market.

1.3 DEBUGGING
Embedded debugging may be performed at different levels, depending on the
facilities available. From simplest to most sophisticated they can be roughly grouped into
the following areas:

 Interactive resident debugging, using the simple shell provided by the embedded
operating system (e.g. Forth and Basic).

 External debugging using logging or serial port output to trace operation using
either a monitor in flash or using a debug server like the Remedy Debugger which
even works for heterogeneous multicore systems.

 An in-circuit debugger (ICD), a hardware device that connects to the


microprocessor via a JTAG or Nexus interface. This allows the operation of the
microprocessor to be controlled externally, but is typically restricted to specific
debugging capabilities in the processor.

 An in-circuit emulator (ICE) replaces the microprocessor with a simulated


equivalent, providing full control over all aspects of the microprocessor.

8
WOMEN ROBOT

 A complete emulator provides a simulation of all aspects of the hardware,


allowing all of it to be controlled and modified and allowing debugging on a
normal PC.
1.4 USER INTERFACE
Embedded systems range from no user interface at all dedicated only to one task
to complex graphical user interfaces that resemble modern computer desktop operating
systems. More sophisticated devices which use a graphical screen with touch sensing or
screen-edge buttons provide flexibility while minimizing space used: the meaning of the
buttons can change with the screen, and selection involves the natural behavior of
pointing at what's desired.  Handheld systems often have a screen with a "joystick button"
for a pointing device.

Some systems provide user interface remotely with the help of a serial (e.g. RS
232, USB, I²C, etc.) or network (e.g. Ethernet) connection. This approach gives several
advantages: extends the capabilities of embedded system, avoids the cost of a display,
simplifies BSP, allows us to build rich user interface on the PC. The user interface is
displayed in a web browser on a PC connected to the device, therefore needing no
bespoke software to be installed.

9
WOMEN ROBOT

2. LITRATURE REVIEW
Robots and robotic systems are increasingly being used in various industries today.
Robotics has come a long way in the last 20 years, from its beginning in highly structured
environments, where native intelligence on the part of the robot was not mandatory.
Today, once prohibitive costs in developing on-board intelligence are plummeting, and
robots are now gearing up to play a major role in less structured and more flexible
manufacturing environments. In this assignment an agricultural application like seeding
or obstacle detecting will be demonstrated using the robot.
Eldercare is one of the most important healthcare concerns, particularly in
countries such as Italy, Germany, and Sweden, and in the most rapidly aging nation of
all, Japan. The number of Japanese who are 65 or older is already 29 million people,
amounting to 23.1% of the population as of 2010. With the government’s strategies to
promote home-based elder-care and to reduce long-term hospital stays, home care
services for elderly people are also growing. The number of home users has increased
from 1.45 million people in 2001 to 2.41 million people in 2008. However, problems
involving home care services are also increasing. There are fundamental problems with
the variations in service quality of home care services. By their nature, home care
services heavily depend upon a care givers implicit knowledge about how to assist the
elderly person in e.g. eating, rolling over in bed, and bathing. However, care givers often
have little time for study and training to master these practical skills. To address these
problems, Yaguchi et al. proposed a care monitoring support system for home care
services. Their system is designed to use the tacit knowledge shared among care-givers
and supervisors in a more effective manner. We think that a Network Robot System will
be a key technology for assisting elderly people, especially in home care services. The
notion of the Network Robot System was defined by a European study group for the
European Robotics Research Network, where robots communicate among themselves
about the environment and people to fulfill their tasks. A network robot system consists
not only of robots but also separately installed sensors and backend servers. Therefore,

10
WOMEN ROBOT

the robot need not move around if the situation around people is monitored and
intelligently processed in the backend server.

3. BLOCK DIAGRAM

POWER SUPPLY BLOCK

TRANSFORMER RECTIFIER FILTER

VOLTAGE REGULATOR VOLTAGE REGULATOR

7805 7812

INPUT BLOCK
MICROCONTROLLER
OUTPUT BLOCK
AT89S52

IR MODULE

MOTOR DRIVER

MOTORS

11
WOMEN ROBOT

[ Fig. 3.01 Block Diagram Of Women Robot]

3.1 POWER SUPPLY

3.1.1 INTRODUCTION

Power supply is a supply of electrical power. A device or system that supplies


electrical or other types of energy to an output load or group of loads is called a power
supply unit or PSU. The term is most commonly applied to electrical energy supplies,
less often to mechanical ones, and rarely to others. Conversion of one form of electrical
power to another desired form and voltage, typically involving converting AC line
voltage to a well-regulated lower-voltage DC for electronic devices. Low voltage, low
power DC power supply units are commonly integrated with the devices they supply,
such as computers and household electronics; for other examples, see switched-mode
power supply, linear regulator, rectifier and inverter (electrical).

[Fig. 3.02 block diagram of regulated power supply system]

12
WOMEN ROBOT

3.2 MICROCONTROLLER

3.2.1 INTRODUCTION TO AT89S52

The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller


with 8K bytes of in-system programmable Flash memory. The device is manufactured
using Atmel’s high-density 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 programmer. By combining a versatile 8-bit CPU with in-system programmable
Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which
provides a highly-flexible and cost-effective solution to many embedded control
applications.

[ Fig. 3.03 89S52 microcontroller ]

The AT89S52 provides the following standard features: 8K bytes of Flash, 256
bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit
timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-
chip oscillator, and clock circuitry The Idle Mode stops the CPU while allowing the
RAM, timer/counters, serial port, and interrupt system to continue functioning.

13
WOMEN ROBOT

The Power-down mode saves the RAM con-tents but freezes the oscillator,
disabling all other chip functions until the next interrupt or hardware reset.

3.3 INPUT BLOCK

Infrared transmitter is one type of LED which emits infrared rays generally called as IR
Transmitter. Similarly IR Receiver is used to receive the IR rays transmitted by the IR
transmitter. One important point is both IR transmitter and receiver should be placed
straight line to each other. The transmitted signal is given to IR transmitter whenever the
signal is high, the IR transmitter LED is conducting it passes the IR rays to the receiver.
The IR receiver is connected with comparator. The comparator is constructed with LM
358 operational amplifier. In the comparator circuit the reference voltage is given to
inverting input terminal. The non inverting input terminal is connected IR receiver. When
interrupt the IR rays between the IR transmitter and receiver, the IR receiver is not
conducting. So the comparator non inverting input terminal voltage is higher than
inverting input. Now the comparator output is in the range of +5V. This voltage is given
to microcontroller or PC and led so led will glow. When IR transmitter passes the rays to
receiver, the IR receiver is conducting due to that non inverting input voltage is lower
than inverting input. Now the comparator output is GND so the output is given to
microcontroller or PC. This circuit is mainly used to for counting application, intruder
detector etc.

14
WOMEN ROBOT

[Fig. 3.04 block diagram of IR Module]

3.4 OUTPUT BLOCK

3.4.1 MOTOR DRIVER


The driver IC L293D is quad push-pull drivers capable of delivering output
currents to 1A per channel respectively. Each channel is controlled by a TTL-compatible
logic input and each pair of drivers (a full bridge) is equipped with an inhibit input
available at pin 1 and pin 9. The motor will run only when chip inhibit is at high logic i.e.
chip inhibit is enabled. The input to the motor driver IC is controlled by the controller
through its motor driver input connector.

[Fig. 3.05 Pin Description of L293D]

The L293D is a 16 pin IC, with eight pins, on each side, dedicated to the
controlling of a motor. There are 2 INPUT pins, 2 OUTPUT pins and 1 ENABLE pin for
each motor. L293D consist of two H-bridge. H-bridge is the simplest circuit for
controlling a low current rated motor. H-bridge is given this name because it can be
modeled as four switches on the corners of ‘H’. The basic diagram of H-bridge is given
below:

15
WOMEN ROBOT

[ Fig. 3.06 Motor Operation ]

In the given diagram, the arrow on the left points to the higher potential side of
the input voltage of the circuit. Now if the switches S1 & S4 are kept in a closed position
while the switches S2 & S3 are kept in a open position meaning that the circuit gets
shorted across the switches S1 & S4.  This creates a path for the current to flow, starting
from the V input to switch S1 to the motor, then to switch S4 and then the exiting from
the circuit. This flow of the current would make the motor turn in one direction. The
direction of motion of the motor can be clockwise or anti-clock wise, this is because the
rotation of the motor depends upon the connection of the terminals of the motor with the
switches. For simplicity, let assume that in this condition the motor rotates in a clockwise
direction. Now, when S3 and S2 are closed then and S1 and S4 are kept open then the
current flows from the other direction and the motor will now definitely rotates in
counter-clockwise direction When S1 and S3 are closed and S2 and S4 are open then the
‘STALL’ condition will occur(The motor will break).

3.4.2 STEPPER MOTOR

A stepper motor, as its name suggests, moves one step at a time, unlike those
conventional motors, which spin continuously. If we command a stepper motor to move
some specific number of steps, it rotates incrementally that many number of steps and
stops. Because of this basic nature of a stepper motor, it is widely used in low cost, open
loop position control systems. Open loop control means no feedback information about
the position is needed. This eliminates the need for expensive sensing and feedback
devices, such as optical encoders. Motor position is known simply by keeping track of the
number of input step pulses.

16
WOMEN ROBOT

[ Fig. 3.07 Motor Operation ]

The stepper motor is as a bar magnet that pivots about its center with four
individual, but exactly identical electromagnets, as shown in Figure 1A. If we manually
rotate the magnet without energizing any coils, we get the ‘notched’ feeling whenever a
relatively larger magnetic force is generated, because of the alignment of the permanent
magnet with the core of the electromagnets, as in Figure 1A. This force is termed ‘detent
torque’. Let’s assume that the initial position of the magnetic rotor. Now turn on coil A;
i.e., flow current through it to create an electromagnet, as shown in Figure 1B. The motor
does not rotate, but we cannot move it freely by hand (more torque has to be applied to
move it now), because of a larger ‘holding torque’.

17
WOMEN ROBOT

4. CIRCUIT DESCRIPTION

4.1 CIRCUIT DIAGRAM

(1)
RV1
[Fig. 4.01Circuit diagram of Women Robot]

U4:A(V+)

2K

U4:A

8
3
1
2

C1 U1 R2

4
19 39
XTAL1 P0.0/AD0 10k LM358N
38
P0.1/AD1
33p 37
P0.2/AD2
X1 18
XTAL2 P0.3/AD3
36
CRYSTAL 35
P0.4/AD4
34
C2 P0.5/AD5
33
P0.6/AD6
9 32
RST P0.7/AD7
33p 21
P2.0/A8
C2(1) 22
P2.1/A9
23
P2.2/A10
29 24
PSEN P2.3/A11
30 25
ALE P2.4/A12
31 26
EA P2.5/A13
27
P2.6/A14
28
P2.7/A15
1 10
P1.0 P3.0/RXD
C3 2
P1.1 P3.1/TXD
11
R1 1u 3 12
P1.2 P3.2/INT0
4 13
P1.3 P3.3/INT1
5 14
P1.4 P3.4/T0
10k 6
7
8
P1.5
P1.6
P3.5/T1
P3.6/WR
15
16
17
4.2 CIRCUIT
P1.7 P3.7/RD
AT89C51
OPERATION
U2(VS)

16 8 U2
This project works with 12V. 60RPM DC motor is used
+88.8

2 3
IN1 VSS VS OUT1
7 6
IN2 OUT2
1
EN1 for robot movement. A power supply is also designed to
9
10
15
EN2
IN3 OUT3
11
14
give power. This circuit uses regulated 12V, 750mA
IN4 GND GND OUT4

power supply. 7812 three terminal voltage regulator is


+88.8

L293D

used for voltage regulation. Bridge type full wave


rectifier is used to rectify the ac output of secondary of
230/18V step down transformer. The generated power DC power is given to the
microcontroller and IR modules.

18
WOMEN ROBOT

When the obstacle is detected the IR module produces 5V dc voltage which is given to
the microcontroller as an input, depending on the input the motor driver is activated
which drives the motor in left or right direction. The DC motors are used to rotate the
robot in arbitrary direction.

The microcontroller is programmed by using KEIL’C and Proload such that if any
obstacle is detected the robot moves. The motor driver helps the stepper motor to rotate
both the directions.

4.2 COMPONENTS USED

4.2.1 POWER SUPPLY

4.2.1.1 TRANSFORMER

Transformer is a device which can efficiently transform the electric energy. Major
use of transformer is in power distribution. Which is used in electrical devices, control
systems, communication system devices etc. Step-up transformers increase voltage, step-

19
WOMEN ROBOT

down transformers reduce voltage. Most power supplies use a step-down transformer to
reduce the dangerously high mains voltage (230V) to a safer low voltage.

The ratio of the number of turns on each coil, called the turn’s ratio, determines
the ratio of the voltages. A step-down transformer has a large number of turns on its
primary (input) coil which is connected to the high voltage mains supply, and a small
number of turns on its secondary (output) coil to give a low output voltage.

Turns ratio=Vp/Vs=Np/Ns

Vp = primary (input) voltage

Np = number of turns on primary coil

Vs = secondary (output) voltage

Ns = number of turns on secondary coil

[ Fig. 4.02 Transformer and AC waveform ]

The low voltage AC output is suitable for lamps, heaters and special AC motors.
It is not suitable for electronic circuits unless they include a rectifier and a smoothing
capacitor.

4.2.1.2 RECTIFIER

There are several ways of connecting diodes to make a rectifier to convert AC to


DC. The bridge rectifier is the most important and it produces full-wave varying DC. A
full-wave rectifier can also be made from just two diodes if a centre-tap transformer is
used, but this method is rarely used now that diodes are cheaper. A single diode can be

20
WOMEN ROBOT

used as a rectifier but it only uses the positive (+) parts of the AC wave to produce half-
wave varying DC.

4.2.1.3 BRIDGE RECTIFIER

A bridge rectifier can be made using four individual diodes, but it is also available
in special packages containing the four diodes required. It is called a Bridge rectifier
because it uses all the AC wave (both positive and negative sections). 1.4V is used up in
the bridge rectifier because each diode uses 0.7V when conducting and there are always
two diodes conducting, as shown in the diagram below. Bridge rectifiers are rated by the
maximum current they can pass and the maximum reverse voltage they can withstand
(this must be at least three times the supply RMS voltage so the rectifier can withstand
the peak voltages). Please see the Diodes page for more details, including pictures of
bridge rectifiers.

[ Fig 4.03 Bridge Rectifier Circuit and Waveform of DC ]

4.2.1.4 SMOOTHING

Smoothing is performed by a large value electrolytic capacitor connected across


the DC supply to act as a reservoir, supplying current to the output when the varying DC
voltage from the rectifier is falling. The diagram2.3 shows the unsmoothed varying DC
(dotted line) and the smoothed DC (solid line). The capacitor charges quickly near the

21
WOMEN ROBOT

peak of the varying DC, and then discharges as it supplies current the output. Smoothing
is not perfect due to the capacitor voltage falling a little as it discharges, giving a small
ripple voltage. For many circuits a ripple which is10% of the supply voltage is
satisfactory and the equation 5 below gives the required value for the smoothing
capacitor. A larger capacitor will give fewer ripples. The capacitor value must be doubled
when smoothing half-wave DC.

[ Fig. 4.04 Charging and Discharging of Capacitor ]

From figure 3.04 we can observe that when waveform is rising it is getting
charged and when it is decaying it will discharge.

4.2.1.5 REGULATOR

Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or
variable output voltages. They are also rated by the maximum current they can pass.
Negative voltage regulators are available, mainly for use in dual supplies. Most regulators
include some automatic protection from excessive current ('overload protection') and
overheating ('thermal protection'). Many of the fixed voltage regulator ICs has 3 leads
and look like power transistors, such as the 7805 +5V 1A regulator shown on the right.

[ Fig. 4.05 Three Terminal of Regulator ]

22
WOMEN ROBOT

From the above figure, we can see that regulator consists of three terminals, one
is input, second is output and third one is grounded.

4.2.2 MICROCONTROLLER

4.2.2.1 PIN DIAGRAM

[ Fig. 4.06 pin diagram of 89S52 microcontroller ]

4.2.2.2 PIN DESCRIPTION

VCC: Supply voltage.

GND: Ground.

Port 0:
23
WOMEN ROBOT

Port 0 is an 8-bit open drain bidirectional 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 accesses to external program and data memory. In this mode, P0
has internal pull-ups. Port 0 also receives the code bytes during Flash programming and
outputs the code bytes during program verification. External pull-ups are required during
program verification.

Port 1:

Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are
pulled high by the inter-nal pull-ups and can be used as inputs. As inputs, Port 1 pins that
are externally being pulled low will source current (IIL) because of the internal pull-ups.
In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count
input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown
in the follow-ing table. Port 1 also receives the low-order address bytes during Flash
programming and verification.

[ Table 4.01 port alternate functions ]

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

24
WOMEN ROBOT

ups.In this application, Port 2 uses strong internal pull-ups when emitting 1s. During
accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits
the contents of the P2 Special Function Register. Port 2 also receives the high-order
address bits and some control signals during Flash programming and verification.

Port 3:

Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output
buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are
pulled high by the internal pull-ups and can be used as inputs.. Port 3 also serves the
functions of various special features of the AT89S52, as shown in the following table.

[ Table 4.02 port function ]

RST:
Reset input. A high on this pin for two machine cycles while the oscillator is
running resets the device. This pin drives high for 98 oscillator periods after the
Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to
disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is
enabled.

ALE/PROG:

Address Latch Enable (ALE) is an output pulse for latching the low byte of the
address during accesses to external memory. This pin is also the program pulse input
(PROG) during Flash programming. In normal operation, ALE is emitted at a constant

25
WOMEN ROBOT

rate of 1/6 the oscillator frequency and may be used for external timing or clocking
purposes. ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin
is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is
in external execution mode.

PSEN:

Program Store Enable (PSEN) is the read strobe to external program memory.
When the AT89S52 is executing code from external program memory, PSEN is activated
twice each machine cycle, except that two PSEN activations are skipped during each
access to external data memory.

EA/VPP:

External Enable. EA must be strapped to GND in order to enable the device to


fetch code from external program memory locations starting at 0000H up to FFFFH.
Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.
EA should be strapped to VCC for internal program executions. This pin also receives the
12-volt programming enable voltage (VPP) during Flash programming.

XTAL1:

Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

XTAL2:

Output from the inverting oscillator amplifier.

5. SOFTWARE DESCRIPTION

5.1 KEIL SOFTWARE INTRODUCTION

26
WOMEN ROBOT

In this chapter the software used and the language in which the program code is
defined is mentioned and the program code dumping tools are explained. The chapter
also documents the development of the program for the application. This program has
been termed as “Source code”. Before we look at the source code we define the two
header files that we have used in the code.

5.1.1 INTERNAL STAGES

[ Fig. 5.01 Keil Software- internal stage ]

µVISION

µVision3 adds many new features to the Editor like Text Templates, Quick
Function Navigation, and Syntax Coloring with brace high lighting Configuration Wizard

27
WOMEN ROBOT

for dialog based startup and debugger setup. µVision3 is fully compatible to µVision2
and can be used in parallel with µVision2.

µVision3 is an IDE (Integrated Development Environment) that helps you write,


compile, and debug embedded programs. It encapsulates the following components:

 A project manager.
 A make facility.
 Tool configuration.
 Editor.
 A powerful debugger.
To help you get started, several example programs (located in the
\C51\Examples, \C251\Examples, \C166\Examples, and \ARM\...\Examples) are
provided.
 HELLO is a simple program that prints the string "Hello World" using the Serial
Interface.
 MEASURE is a data acquisition system for analog and digital systems.
 TRAFFIC is a traffic light controller with the RTX Tiny operating system.
 SIEVE is the SIEVE Benchmark.
 DHRY is the Dhrystone Benchmark.
 WHET is the Single-Precision Whetstone Benchmark.

BUILDING AN APPLICATION IN µVISION

 To build (compile, assemble, and link) an application in µVision2, you must:


 Select Project -(forexample,166\EXAMPLES\HELLO\HELLO.UV2).
 Select Project - Rebuild all target files or Build target.
 µVision2 compiles, assembles, and links the files in your project.

CREATING YOUR OWN APPLICATION IN µVISION2


To create a new project in µVision2, you must:

 Select Project - New Project.

28
WOMEN ROBOT

 Select a directory and enter the name of the project file.


 Select Project - Select Device and select an 8051, 251, or C16x/ST10 device
from the Device Database™.
 Create source files to add to the project.
 Select Project - Targets, Groups, Files. Add/Files, select Source Group1, and
add the source files to the project.
 Select Project - Options and set the tool options. Note when you select the
target device from the Device Database™ all special options are set
automatically. You typically only need to configure the memory map of your
target hardware. Default memory model settings are optimal for most
applications.
Select Project - Rebuild all target files or Build target.

DEBUGGING AN APPLICATION IN µVISION2


To debug an application created using µVision2, you must:

 Select Debug - Start/Stop Debug Session.


 Use the Step toolbar buttons to single-step through your program. You may
enter G, main in the Output Window to execute to the main C function.
 Open the Serial Window using the Serial #1 button on the toolbar.
 Debug your program using standard options like Step, Go, Break, and so on.

Starting µVision2 and Creating a Project

µVision2 is a standard Windows application and started by clicking on the


program icon. To create a new project file select from the µVision2 menu.

Project

New Project…. This opens a standard Windows dialog that asks you for the new
project file name. We suggest that you use a separate folder for each project. You can
simply use the icon Create New Folder in this dialog to get a new empty folder. Then
select this folder and enter the file name for the new project, i.e. Project1. µVision2

29
WOMEN ROBOT

creates a new project file with the name PROJECT1.UV2 which contains a default target
and file group name. You can see these names in the Project.

Window – Files

Now use from the menu Project – Select Device for Target and select a CPU for
your project. The Select Device dialog box shows the µVision2 device database. Just
select the microcontroller you use. We are using for our examples the Philips 80C51RD+
CPU. This selection sets necessary tool options for the 80C51RD+ device and simplifies
in this way the tool Configuration.

5.2 STEPS TO CREATE A HEX FILE

Typical, the tool settings under Options – Target are all you need to start a new
application. You may translate all source files and line the application with a click on the
Build Target toolbar icon. When you build an application with syntax errors, µVision2
will display errors and warning messages in the Output Window – Build page. A double
click on a essage line opens the source file on the correct location in a µVision2 editor
window. Once you have successfully generated your application you can start debugging.

After you have tested your application, it is required to create an Intel HEX file to
download the software into an EPROM programmer or simulator. µVision2 creates HEX
files with each build process when Create HEX files under Options for Target – Output is
enabled. You may start your PROM programming utility after the make process when
you specify the program under the option Run User Program #1.

CPU Simulation

µVision2 simulates up to 16 Mbytes of memory from which areas can be mapped


for read, write, or code execution access. The µVision2 simulator traps and reports illegal
memory accesses.

In addition to memory mapping, the simulator also provides support for the
integrated peripherals of the various 8051 derivatives. The on-chip peripherals of the
CPU you have selected are configured from the Device.

30
WOMEN ROBOT

Database selection

You have made when you create your project target. Refer to page 58 for more
Information about selecting a device. You may select and display the on-chip peripheral
components using the Debug menu. You can also change the aspects of each peripheral
using the controls in the dialog boxes.

Start Debugging

You start the debug mode of µVision2 with the Debug – Start/Stop Debug
Session command. Depending on the Options for Target – Debug Configuration,
µVision2 will load the application program and run the startup code µVision2 saves the
editor screen layout and restores the screen layout of the last debug session. If the
program execution stops, µVision2 opens an editor window with the source text or shows
CPU instructions in the disassembly window. The next executable statement is marked
with a yellow arrow. During debugging, most editor features are still available.

For example, you can use the find command or correct program errors. Program
source text of your application is shown in the same windows. The µVision2 debug mode
differs from the edit mode in the following aspects:

 The “Debug Menu and Debug Commands” described below are available. The
additional debug windows are discussed in the following.
 The project structure or tool parameters cannot be modified. All build Commands
are disabled.

31
WOMEN ROBOT

Fig 5.1Snapshot 1

 Click on the Project menu from the title bar.


 Then Click on New Project.

Fig 5.2Snapshot 2

 Save the Project by typing suitable project name with no extension in your own
folder sited in either C:\ or D:\

32
WOMEN ROBOT

Fig 5.3Snapshot 3

 Then Click on save button above.


 Select the component for u r project. i.e., Atmel……
 Click on the + Symbol beside of Atmel.

Fig5.4 Snapshot 4

33
WOMEN ROBOT

 Select AT89C51 as shown below.

Fig5.5 Snapshot 5

 Then Click on “OK”.


 The Following fig will appear.

Fig5.6 Snapshot 6

34
WOMEN ROBOT

 Then Click either YES or NO.


 Now double click on the Target1, you would get another option “Source group 1” as
shown in next page.

Fig5.7 Snapshot 7

 Click on the file option from menu bar and select “new”.

Fig5.8 Snapshot 8

35
WOMEN ROBOT

 The next screen will be as shown in next page, and just maximize it by double
clicking on its blue boarder.

Fig5.9 Snapshot 9

 Now start writing program in either in “C” or “ASM”.

Fig5.10 Snapshot 10

 For a program written in Assembly, then save it with extension “.asm” and for “C”
based program save it with extension “.C”.

36
WOMEN ROBOT

Fig5.11 Snapshot 11

 Now right click on Source group 1 and click on “Add files to Group Source”.

37
WOMEN ROBOT

Fig5.12 Snapshot 12

 Now you will get another window, on which by default “C” files will appear.

Fig5.13 Snapshot 13

 Now select as per your file extension given while saving the file.
 Click only one time on option “ADD”.
 Now Press function key F7 to compile. Any error will appear if so happen.

38
WOMEN ROBOT

Fig5.14 Snapshot 14

 If the file contains no error, then press Control+F5 simultaneously.


 The new window is as follows:

Fig5.15 Snapshot 15

 Then Click “OK”.


 Now click on the Peripherals from menu bar, and check your required port as shown in fig
below.

39
WOMEN ROBOT

 Drag the port a side and click in the program file.

Fig5.16 Snapshot 16

 Now keep Pressing function key “F11” slowly and observe.


 You are running your program successfully.

5.2 STEPS TO CREATE A HEX FILE:

 First open the keil window it will look something like this.

40
WOMEN ROBOT

Fig 5.17 Snapshot1 to create HEX File

 Write the program in the window. It should be observed that the text is in normal
format till you save the text document.

Fig 5.18 Snapshot2 to create HEX File

 Save the document with a name .C extension. Where name is the name you want
to give to the file. The extension should be .asm for assembly level program files

41
WOMEN ROBOT

Fig 5.19 Snapshot3 to create HEX File

 Right click on the source group folder and select Add Files to Source Group

Fig 5.20 Snapshot4 to create HEX File

42
WOMEN ROBOT

 Now browse to the previously written program and click Add.

Fig 5.21 Snapshot5 to create HEX File

 Now click on translate the file, build target and rebuild it. You will get
notifications in case of any errors.

Fig 5.22 Snapshot6 to create HEX File

43
WOMEN ROBOT

Fig
5.23

Snapshot7 to create HEX File

44
WOMEN ROBOT

Fig 5.24 Snapshot8 to create HEX File

 Observe that Hex file is NOT created here. The option to create the Hex file will
be disabled by default we should manually enable it.  Here we enable the Create
hex file box and browse to a folder where we will be saving objects which
includes the hex file too.

 This window can be opened by the following path:

Flash-> Configure Flash Tools -> Output

Fig 5.25 Snapshot9 to create HEX File

45
WOMEN ROBOT

Fig 5.26 Snapshot10 to create HEX File

 Now after enabling the Create hex file and selecting the folder for objects we have
to repeat this step again:

46
WOMEN ROBOT

 Translate the file, Build target and rebuild it. Now you can find your Hex file and
other objects in the destination folder.

Fig 5.27 Snapshot11 to create HEX File

5.3 SCHEMATIC DESIGN IN PROTEUS:

Proteus window using the circuit:

 Open the Proteus software. A window with a menu bar appears.

47
WOMEN ROBOT

Fig 5.28 Proteus snapshot1

 Click on the file menu.

48
WOMEN ROBOT

Fig 5.29 Proteus snapshot2

 Select ‘new design’ from the drop down menu.


 Click on the library menu.

Fig
5.30 Proteus snapshot 3

49
WOMEN ROBOT

 Select ‘pick devices/symbol’ from the drop down menu.

Fig
5.31Proteus snapshot 4

 Select the relevant comment by double clicking on it, so that the component
appears on the window.

50
WOMEN ROBOT

Fig 5.32 Proteus snapshot 5

 Add all the components and draw the circuit with proper connections.

5.3.1POWER SUPPLY:

Fig5.33 Schematic Capture of Power Supply

5.3.2 IR RECIEVER:
51
WOMEN ROBOT

Fig 5.34Schematic Capture of IR Receiver

5.4 DESIGN OF PCB LAYOUTS IN PROTEUS

52
WOMEN ROBOT

5.4.1.1POWER SUPPLY:

Fig5.36PCB Layout of Power Supply

5.4.2 IR Tx AND Rx:

53
WOMEN ROBOT

Fig5.37 PCB Layout of IR Tx AND Rx

5.4.3 MAIN CIRCUIT:

Fig5.38 PCB Layout of Main Circuit

54
WOMEN ROBOT

6. HARDWARE TESTING

6.1 CONTINUITY TEST:

In electronics, a continuity test is the checking of an electric circuit to see if


current flows (that it is in fact a complete circuit). A continuity test is performed by
placing a small voltage (wired in series with an LED or noise-producing component such
as a piezoelectric speaker) across the chosen path. If electron flow is inhibited by broken
conductors, damaged components, or excessive resistance, the circuit is "open".
Devices that can be used to perform continuity tests include multi meters which
measure current and specialized continuity testers which are cheaper, more basic devices,
generally with a simple light bulb that lights up when current flows.
An important application is the continuity test of a bundle of wires so as to find the two
ends belonging to a particular one of these wires; there will be a negligible resistance
between the "right" ends, and only between the "right" ends.
This test is the performed just after the hardware soldering and configuration has
been completed. This test aims at finding any electrical open paths in the circuit after the
soldering. Many a times, the electrical continuity in the circuit is lost due to improper
soldering, wrong and rough handling of the PCB, improper usage of the soldering iron,
component failures and presence of bugs in the circuit diagram. We use a multi meter to
perform this test. We keep the multi meter in buzzer mode and connect the ground
terminal of the multi meter to the ground. We connect both the terminals across the path
that needs to be checked. If there is continuation then you will hear the beep sound.

6.2 POWER ON TEST:

This test is performed to check whether the voltage at different terminals is


according to the requirement or not. We take a multi meter and put it in voltage mode.
Remember that this test is performed without microcontroller. Firstly, we check the
output of the transformer, whether we get the required 12 v AC voltage.

55
WOMEN ROBOT

Then we apply this voltage to the power supply circuit. Note that we do this test
without microcontroller because if there is any excessive voltage, this may lead to
damaging the controller. We check for the input to the voltage regulator i.e., are we
getting an input of 12v and an output of 5v. This 5v output is given to the
microcontrollers’ 40th pin. Hence we check for the voltage level at 40th pin. Similarly, we
check for the other terminals for the required voltage. In this way we can assure that the
voltage at all the terminals is as per the requirement.

56
WOMEN ROBOT

7. RESULT

57
WOMEN ROBOT

8. APPLICATIONS
In the existing system the robot is built for some specific application such us (a)
Fruit Harvesting, (b) Transplant Handling, (c) Sheep Shearing, (d) Meat Cutting. It does
not reach the destination on its own. In proposed system the single robot can be used for
composite applications involving sensors and control software. The robotic vehicle can
be directed from a remote location, to detect the obstacle and reach the destination on its
own.

58
WOMEN ROBOT

9. CONCLUSION

We have successfully completed the project and fulfilled our aim of “WOMEN
ROBOT”. We have learnt that real time software programming that goes in to the
manufacturing of a final ready to use embedded system. The various available
microcontrollers have been studied and its features have been extensively reviewed and
the choice of AT89S52 has been the best hand off.

59
WOMEN ROBOT

11. REFERENCES

TEXT BOOKS:

 The “8051 Microcontroller and Embedded Systems” by Muhammad Ali


Mazidi and Janice Gillispe Mazidi, Pearson Education.
 ATMEL 89S52 Data sheets

REFERENCES:

 http://www.sparkfun.com/datasheets/Components/DS1307.pdf
 http://www.engineersgarage.com
 http://code.google.com/p/ds1307new/wiki/Reference

60
WOMEN ROBOT

 http://www.zntu.edu.ua/base/lection/rpf/lib/zh03/8051_tutorial.pdf
 http://www.slideshare.net
 http://electricly.com/at89s52-microcontroller/
 http://www.seeedstudio.com/wiki/Grove_-_RTC#Application_Ideas

12. APPENDIX

12.1 APPENDIX A

12.1.1 DATASHEET OF 7805, 7812

61
WOMEN ROBOT

62
WOMEN ROBOT

12.1.2 DATASHEET OF L293D

63
WOMEN ROBOT

12.2 APPENDIX B

SOURCE CODE

#include<reg51.h>

sbit LIR=P2^0;//left IR sensor

sbit RIR=P2^1;//Right IR sensor

void delay(unsigned int);

void main()

P2=0xff;//Declaring sensors as input devices.

P1=0x00;//Motors as output devices(Left motor connected to P1.0 & P1.1,Right


motor connected to P1.2 & P1.3)

while(1)

if(LIR==1 && RIR==1)

P1=0x0a;

else if(LIR==0 && RIR==1)

P1=0x00;

delay(100);

P1=0x05;

delay(100);

P1=0x08;

delay(100);

64
WOMEN ROBOT

else if(LIR==1 && RIR==0)

P1=0x00;

delay(100);

P1=0x05;

delay(100);

P1=0x01;

delay(100);

else

P1=0x00;

delay(100);

P1=0x05;

delay(100);

P1=0x01;

delay(100);

P1=0x0a;

delay(100);

void delay(unsigned int x)

65
WOMEN ROBOT

unsigned int i,j;

for(i=0;i<x;i++)

for(j=0;j<1275;j++);

66

You might also like