You are on page 1of 128

( Rtd. MJ. GEN) VMS Sr. DESIGN ENGINEER G.L.N.A.

MATHURA
AT
ASSOCIATED ELECTRONICS
RESEARCH FOUNDATION
C-53, PHASE-II,
NOIDA
AT

AERF NOIDA

Submitted by:

NIVEDITA SINGH

COURSE: B-TECH ELECTRONICS


FROM: G.L.N.A. MATHURA
ACKNOWLEDGEMENT
This training report itself is an acknowledgement to the intensity, drive &

technical competence of the many individuals who have contributed to it.

We would like to list here few of them. First we gratefully acknowledge the

contribution made by Mr. Ramesh Khosla VMS(CEO, AERF), Mr. G.D

Sharma (Sr.Design Engineer), Mr. Shobhit Jaiswal (Sr.Design

Engineer), Mr. Nayan kr. Tiwari ( Design Engineer), Ms. Renuka

(Design Engineer) and Mr. Ajit Yadav (Design Engineer) for their able

supervision and invaluable suggestions without which it can not been

possible to complete this project work. We simply & sincerely thank our

beloved parents for there blessings and encouragement. We would also like

to give our thanks to all the Staff of AERF, NOIDA without there support

this would never been a successful training report.


PREFACE

WHY PRACTICAL TRAINING IS ESSENTIAL

The practical training is a must for any engineering course, the practical
training helps the student to put into practice whatever he has studied in
theory. The bookish knowledge the student has in college is put into
practical difficulties what so ever he come across, are solved by the practical
experience of the seniors in the organization establishment, where the
student is under going the practical training.

 IT IS GOOD TO HAVE GOOD WILL


 IT IS GOOD TO HAVE ENTHUSIASM
 BUT IT ESSENTIAL TO HAVE TRAINING

By:
JAWAHAR LAL NEHRU
INDEX
PCB DESIGNING:-
1. Introduction
2. Design Database Explorer
3. Schematic Capture
4. Printed Circuit Board Layout
5. Development of SCH. & PCB documents
6. Hand on practices on circuit CAM / LPKF Board Master

PROGRAMMING IN ‘C’ LANGUAGE


1. Introduction
2. Constants
3. Variables
4. Arrays
5. Flow Charts
6. Programs

EMBEDDED SYSTEM:-
1. Power Simulator(PSIM)
2. Hardware Designing Using OP-AMP
3. Introduction to Microcontroller ATMEL 89C2051/89S8252 and
Embedded System Design using Embedded- C:
a) Led Interfacing
b) 7 Segment Display
c) 4-Way Traffic Light
d) LCD Interfacing
e) Interfacing with Hex Keyboard
f) Scrolling Display
g) Interfacing with DC motor
h) Interfacing with DC Relay
A

COURSE

ON

COMPUTER AIDED

PCB DESIGN

THROUGH

PROTEL 99se
INTRODUCTION

Protel 99 SE is designed as a "client - server” application, i.e. the


main application program of Protel 99 SE, called Client99.exe, provides
the basic infrastructure and user interface for Protel 99 SE, while
specific services, such as editing a schematic or PCB are provided by a
series of plug-in "servers".

When you click on the Protel 99 SE icon in the Windows Start menu,
Client99.exe is the application that is started. You do not then need to
launch a schematic editor, PCB editor, etc. as separated programs - all
your Protel EDA tools are available from within the Protel 99 SE
desktop.

The use of a "client – server" architecture for Protel 99 SE means that


you can easily expand the capabilities of the software. As well as the
servers supplied with Protel 99 SE, various add-on servers are available
from both Protel and numerous third-party vendors. To use Protel 99 SE
it is not necessary to understand how the client – server architecture
works, however a basic knowledge of servers will help you get the most
from Protel 99SE.
Creating a new DDB Using
the Design Explorer

To create a new Design Database select File» New Design from the
menus. The New Design Database dialog will pop up. Complete the
following steps:

1. Select the Storage Type


2. Enter the Database name
3. Set the location as required

If you would like to password-protect the Design Database now, click on


the Password tab and enter the password. This password is assigned to
the default user name Admin.You can password-protect a Design
Database at any time, by going to the Members folder and entering a
password for the Admin member. To unprotect a Database remove the
password from the Admin member. Note that you can only password-
protect a design database whose storage type is MS Access database.
Once the new design database is created an icon for it will appear in the
navigation tree of the Design Explorer, and its corresponding design
window will open in the work area.
Working with SCH.
Documents

A schematic is a diagrammatic representation of an electronic circuit,

and schematic capture is the process of capturing a design as a

schematic in a computer-aided design environment. A computer-based

schematic is more than a simple drawing of the circuit. It also contains

information about the connectivity of the circuit and the parts that make

up the circuit.

In Protel, the basic workspace for capturing a schematic is called a

schematic sheet. Electrical, drawing and directive objects are placed on

a schematic sheet to design the circuit and produce working schematic

drawings. A complete circuit design can use just a single sheet, or it can

comprise a number of electrically linked sheets. Protel allows you to

create complex hierarchical and modular designs by linking any number

of sheets to form a complete project.


Schematic design topics

 Schematic electrical design objects


 Schematic drawing objects
 Schematic design directives
 Setting schematic workspace preferences
 Setting schematic document options
 Using schematic sheet templates
 Managing schematic components
 Editing schematic component libraries

 Repositioning design objects on a schematic


 Wiring up a schematic
 Workspace editing techniques
 Creating projects with multiple schematic sheets
 Schematic design verification - the ERC
 Printing and plotting a schematic
 Generating schematic reports
 Preparing a schematic for PCB layout
 Interfacing from a schematic to third-party tools
 Default schematic shortcut keys

Open Printed Circuit Board File


To begin the PCB design phase of a project, create a new PCB document in your
design database (see the Adding a new document or folder to a design topic in the
Links section below).
Before bringing design information from the schematic, you should first create the
mechanical and electrical board outline for your board, and configure the layer
stack. The mechanical outline defines the physical shape and size of the board, and
also includes items such as dimension detail, photo tool targets and other company
and fabrication specific information. This information is usually placed on the four
Mechanical layers.
Tile electrical board outline defines the routing and component placement limits of
the board. This is done by defining an outline of the board on the Keep Out layer.
The Keep Out layer is a special layer that allows you to define "legitimate"
placement and routing areas in the PCB workspace. Generally you would define an
area which is the same as the physical board outline. All signal-layer objects and
routing would then be confined within this area. You could also define areas on the
Keep Out layer within the board outline to act as "no go" areas for placement and
routing.
The layer stack defines what signal and plane layers are available. Part of the layer
stack definition process is to define the drill-pairs.
Protel 99 SE includes a powerful Board Wizard that guides you through the
complete process off creating a new PCB document and board definition. The
Wizard includes a number of predefined board templates, and allows you to create
your own templates.

PCB Definition Topics:


 Defining the PCB layer stack
 Defining the drill pairs
 Creating the mechanical definition of a PCB
 Defining the PCB placement & routing outline
 Using the Board Wizard to create a new PCB
 Loading a schematic design into a PCB document

Open Schematic File:


A schematic is a diagrammatic representation of an electronic circuit,
and schematic capture is the process of capturing a design as a
schematic in a computer-aided design environment. A
computer-based schematic is more than a simple drawing of the circuit.
It also contains information about the connectivity of the circuit and the
parts that make up the circuit.
In Protel, the basic workspace for capturing a schematic is called a
schematic sheet. Electrical, drawing and directive objects are placed on
a schematic sheet to design the circuit and produce working schematic
drawings. A complete circuit design can use just a single sheet, or it can
comprise an number of electrically linked sheets. Protel allows you to
create complex hierarchical and modular designs by linking any number
of sheets to form a complete project.

Creating a new schematic


Symbols
To create a new schematic component; from a schematic library
document select Tools» New Component from the menus. A new
component will be created in the library and you will be presented with
an empty component sheet. Rename the component by selecting Tools »
Rename Component from the menus.
Initially the schematic component sheet is shown fully zoomed out. The
origin for the sheet is marked by the intersection of the crossed guide
lines. Before drawing your component, you should zoom in [shortcut
Page Up] until the grid becomes visible. You should also draw your
component based around the component sheet origin. Select Edit » Jump
» Origin [shortcut JO] to center the origin in the workspace.
To define your new component, complete the following steps:

1. Define the component body using the various drawing objects


available from the Place menu, or from the SchLib Drawing Tools
toolbar. These tools provide the same drawing object available in
schematic sheets.

2. Place the component pins by selecting Place» Pins from the menu
[shortcut P P]. When you enter Pin placement mode, the pin will appear
floating on the cursor. Note that you “hold" the pin by its non-electrical
end, which goes against the component body. Press SPACEBAR to
rotate the pin while it is floating on the cursor. Press the TAB key during
placement to edit the pin's properties before placing it.

3. If you are creating a multipart component, select Tools» New Part to


add another part to the component and repeat the above steps to create
the symbols for all parts in the component.

4. Set the component's properties by selecting Tools» Description from


the menus. This opens the Component Text Fields dialog in which you
set the component's default designator and PCB footprint, a description
of the component, and set up the various part fields and library fields
that are displayed when the component properties are edited from a
schematic sheet.

5. Save the component sheet to save the component in the library.

Note: The IEEE symbols can be resized during placement. Press the ‘+’
and ‘-’ keys to enlarge and shrink the symbols as you place them.
Aligning schematic design
objects

There are a number of alignment options available for lining up design objects on a
schematic. The alignment options work on all selected objects. To align selected
objects on both axes, from the schematic select Edit» Align » Align to open the
Align Objects dialog [shortcut A A]. Select the desired vertical and horizontal
alignment from the option buttons and click OK to have all selected objects moved
to the chosen horizontal alignments. Enable the Move Primitives to Grid option to
constrain alignment to the nearest grid point.
The following single-axis alignments are available from the Edit » Align submenu
[shortcut A] or via shortcut keys:
Align Left CTRL+L
Align Right CTRL+R
Center Horizontal CTRL+H
Distribute Horizontally CTRL+SHIFT+H
Align Top CTRL+T
Align Bottom CTRL+B
Center Vertical CTRL+V
Distribute Vertically CTRL+SHIFT+V
Note: The alignment options affect ALL selected objects. Before using any
alignment command, ensure that only the objects that you wish to align are
selected. If necessary, use the shortcut X A to deselect all objects before selecting
the objects you want to align.
Note: Connectivity is not preserved during alignment.
Within the Protel environment menus, toolbars and keyboard shortcut
tables are referred to as resources.
Whenever you open or activate a document in the Design Explorer,
Protel automatically initiates the appropriate editor for that document
type and displays the appropriate menus and toolbars, as well as
activating the appropriate shortcut keys. You can configure the resources
assigned to each document editor available in the system. Each
document editor can have one menu and keyboard shortcut table active
at a time, and assigned any number of toolbars. The following topics
detail the resource customization process.
Power port (Schematic electrical design object):

Description: A power port is a special schematic object that lets you


easily define a power or ground net. Seven graphical styles of power
port are available, and can be set by editing the object’s properties.

Please Note: The graphical symbol selected for a power port does not
determine which net it is assigned to. You must explicitly set the net
name in the object's properties dialog. To place: Once in power port
placement mode, a power port symbol will appear "floating" on the
cursor. Use the SPACEBAR key to rotate this to the desired orientation.
Press TAB to change the properties of the port. Position the object and
left-click or press ENTER to place the bus entry. Continue placing
further power ports, or right-click or press ESC to exit placement
mode.Graphical editing: When a power port is in focus, the following
editing handles are available Click anywhere within the dashed box to
"pick up" the power port and reposition it.
Creating a new PCB

component

To create a new component, you must first open the library that will hold the
component (see Opening a PCB library for editing in the Links section below)
Once the desired PCB library file is open and active, select the Tools» New
Component menu item. The Component Wizard will automatically start to guide
you through the process of building a new PCB component.

If you do not want to use the Component Wizard, press Cancel to manually create
a component. You will be presented with an empty component footprint
workspace. Select Tools » Rename Component to give your new component a
name (255 characters maximum).

Creating a component footprint uses the same tools and design objects that are
used to design a PCB. Place tracks and arcs in the footprint sheet to create the
body of the component, then place pads to form the component pin connections.
As with PCB design, design objects can be placed on any layer. When you
subsequently place the footprint on a PCB document, all objects that make up the
footprint will be assigned to their defined layers.
Links
Opening a PCB library for editing
Editing footprints in PCB libraries
You can browse for schematic components in the schematic

panel, using the Mini Viewer that appears at the bottom of the

panel when the Browse mode is set to Libraries. You can also

browse schematic component libraries in the Browse

Components dialog (Design » Browse Library).


Placing design objects in

documents
The method for placing objects is similar for both schematic and PCB
documents. The basic placement steps are outlined below. For help on
placing specific objects, use the See also... link at the bottom of the page

1. Select the object that you want to place - You can do this by selecting
an object from the Place menu or by clicking on one of buttons from the
various placement toolbars. For components and footprints, you can also
click the Place button in the Panel when browsing libraries.

2. When an object is selected for placement, the cursor will change to a


crosshair, indicating that you are in editing mode, and, if relevant, the
object will appear "floating" on the cursor.

3. Press the TAB key to edit the properties of the object before placing
it. This will open the property dialog for the particular object, allowing
you to change various options. Once you have finished setting the
properties, close the dialog to return to placement mode.

4. Position the cursor and left-click or press ENTER to place the object.
For complex objects such as wires, tracks, polygons, etc. you must
continue the position and click procedure to place all vertices of the
object. Note: If auto panning is active, you can move around the
document by simply moving the cursor past the edge of the editing
window in the direction that you wish to go.

5. After placing an object you will remain in placement mode (indicated

by the crosshair cursor), allowing you to place another object of the

same type immediately.

6. To end placement mode, right-click or press the ESC key (in some

cases, such as placing a polygon, you may need to do this twice; once to

finish placing the object and once to exit placement mode). When you

exit placement mode, the cursor will return its default shape.
Connecting schematic objects using net

identifiers

In connectivity terms, a net defines electrically connected points in a circuit. By


placing a wire between two nodes in a schematic, you effectively assign the two
points to the same net. In a schematic, Protel internally assigns a unique name to
each net in the circuit, but you can manually define net names to create
connectivity between nodes on the schematic.
To manually assign a net name (or net identifier) to a point in your schematic,
place a Net Label on that point. The net name is the name given to the Net Label.

If you assign the same net name two or more points on a


schematic, these points are effectively connected electrically. You
do not need to manually connect them using a wire.

The diagram (left) shows two electrically equivalent circuits. The


top shows two resistors connected in parallel using wires to make
the connections. The bottom shows two resistors connected in
parallel using net labels to define the connections

A typical use of connections using net identifiers is connecting to power nets.


When you place a power port on a schematic it defines a net which has a net name
equivalent to the power object's name (VCC, GND, etc.). You can then place net
labels on any schematic circuit nodes which have the same net name as the power
port to automatically connect these nodes. You do not need to physically wire the
nodes to the power port.
1 2 3 4
VCC

C4
P1 CAP

1
PORT1
RP1

8
7
6
5
4
3
2
1
RP8
D D

1 40

9
P2
2 39
a 1
2
3 38
b 3
4
4 37
c 5
6
5 36
d 7
8
6 35
VCC e
PORT2
7 34
U1 f
SW1 IC 89C2052
8 33
+

TACKSW C1 g
C 10UF/16V C
9 32
VCC
R1 10 31
10K
11 30

12 29 LCD
16
13 28
15
14
14 27
13
12
15 26
11
10
16 25
9
8
17 24
7
C2 6
18 23
B 22PF 5 B
X1 4
19 22
CRYSTAL 3
2
20 21
C3 1
L1
22PF

Title
A A
CIRCUIT DIAGRAM FOR MC
Size Number Revision
A4
Date: 2-May-2009 Sheet of
File: G:\Previous Backup of VIKAS P.DDB Drawn By: VIKAS SHARMA
1 2 3 4

Part Type Designator Footprint Description


10K R1 RES1OP2WS RESISTOR
22PF C3 CAP5P2WS CAPACITOR
10UF16V C1 EC5P6W ELE.CAPACITOR
RP8 RP1 RP8 COM.RESISTOR
CRYSTAL X1 CRYSTAL CRYSTAL
22PF C2 CAP5P2WS CAPACITOR
CAP C4 CAP5P2WS CAPACITOR
PORT1 P1 8CONN2.5P CONNECTOR
PORT2 P2 8CONN2.5P CONNECTOR
IC 89C2052 U1 DIP40 IC
LCD L1 16CONN2.5P LCD
SW SW1 TACKSW SWITCH
Schematic sheet with simple
hierarchy

This model is referred to as simple hierarchy. It supports multi-level or block


design, where the design hierarchy can be represented by a tree- like structure. A
sheet symbol represents a child sheet, which descends from the parent All the
inter-sheet connections are vertical; the sheet entries in each sheet symbol are
connected to similarly named ports on the respective sub-sheets. The sheet
symbol-to-sheet symbol wiring is included on the parent sheet.

This model is a true hierarchy because the inter-sheet connections follow the
hierarchy of the sheets themselves, and the design can be as many levels “deep” as
you like.

To use this model for multi-sheet schematic designs, set the Net Identifier Scope to
Sheet Symbols / Port Connections when performing an ERC,
running a simulation, creating a net list, compiling a schematic-based PLD, or
synchronizing between schematic and PCB documents.
Generating schematic reports

A range of reports on the currently active schematic sheet can be generated.


Reports are generated by selecting the appropriate item on the Reports menu.
The following options are available:-

Selected Pins:- Lists all pins connecting to the selected net(s). Choose

Select >> Net, then click on a net.

Bill of Materials :-When you select Reports >> Bill of Materials the schematic

BOM Wizard will start, which guides you through the process of creating a bill of

materials from your schematic.

Cross Reference:- When you select Reports >> Cross Reference, an ASCII text
report is generated giving a listing of part designators, type and the sheet location
for each part. The report is named filename. XRF and is stored in the same folder
as the schematic sheet.
Project hierarchy:- When you select Reports >> Project Hierarchy, an ASCII
text report is generated giving a listing of project files for the active design. The
report is named filename. REP and is stored in the same folder as the schematic
sheet.
Netlist Compare:- When you select Reports >> Netlist Compare, an ASCII text
report is generated that lists the differences between two netlists. Use this report to
document changes made to a project from one revision to another. This feature
works with Protel, Protel 2 and Tango format netlists. Among other details, the
report lists matched nets, partially matched nets, extra nets in the first or second
netlist, and total nets in each netlist. The report is named filename. REP and is
stored in the same folder as the schematic sheet.
Add Port References (Flat):- Select this to include a string next to each port,
detailing the sheet name and grid reference of all other ports of the same name in
the project. The location of each port reference is determined by the location of the
port on the sheet and the position of the connecting wire. Port references are a
calculated attribute of the port; they can not be edited and are not stored with the
design.
Add Port References (Hierarchical):- Select this to include a string next to
each port, detailing the sheet name and grid reference of the sheet entry that this
port connects to.
Remove Port References:- Select to remove all Port references in the project.
Preparing a schematic for making
a PCB layout

In Protel 99 SE, creating a PCB layout from a schematic is a fully automated


process handled by Protel's design synchronizer. The synchronizer allows you to
initially transfer the design to a PCB, maintaining full connectivity, and
subsequently update design changes from the schematic to the PCB and vice versa.

Before you can use Protel's synchronization features, you must create a PCB
document based on your schematic design. To do this, create a new PCB document
in the design database, draw the board outline and then run the design synchronizer
to transfer the schematic information to the PCB. For information on creating a
new PCB document, see the topic

Adding a new document or folder to a design


In the Links section below. For information on creating the board outline, see the
topic creating a PCB outline in the Links section below. For information on using
the design synchronizer, see the topic Synchronizing schematic & PCB documents
in the Links section below.
Note: It is advisable to perform an ERC on your schematic and fix and errors
before starting the PCB layout process.
The following topics detail the steps necessary to prepare a schematic for transfer
to a PCB layout:
 Reassigning part designators in a schematic design
 Checking schematic parts for missing PCB footprints
 Including PCB layout information in a schematic
Component Footprint (PCB
design object)

Toolbar: Placement Tools-

Menu: Place» Component [P C]

Valid layers:- Top or Bottom signal layers Can be connected to a net?: No

(Component pads, however, can be assigned to net)

Description: A component footprint is the representation of a physical device on

a PCB. A footprint may contain pads for connecting to the pins of a device, a

physical outline of the package, device mounting features, etc.

To place: When you enter component placement mode the Place Component
dialog will open. In this dialog, type the name or browse for a component footprint
from a loaded PCB library. Set the appropriate designator and any comment text,
then click OK to close the dialog. You will return to the PCB document and an
outline of the component will be "floating" on the cursor. Position the component
and left-click or press ENTER to place it. The Place Component dialog will re-
open, allowing you place another component. Press Cancel to exit component
placement mode.
Graphical editing:- A component footprint cannot be focused and graphically

edited directly. To edit the graphical attributes of a component you must open it the

relevant PCB library.

Notes: Generally when you start a new PCB you will load information from a
schematic. This process is known as synchronization. When the PCB is
synchronized with the schematic project, the necessary PCB footprints are placed
on the board ready for positioning, and the connectivity of the schematic is
preserved on the PCB. Component footprints can be converted to a set of primitive
objects by selecting Tools» Convert» Explode Component to Free Primitives from
the menus. Once a component is exploded it can no longer be manipulated as a
group object.

Using PCB design rules


You design your PCB by placing components, tracks, vias and other

design objects. These objects must be placed in the workspace with

regard to each other. Components must not overlap, nets must not short,

power nets must be kept clear of signal nets, etc.

To allow you to remain focused on the task of designing the board,

Protel 99 SE can monitor these design requirements for you. You

instruct the PCB editor of your requirements by setting up a series of

design rules. These design rules are monitored as you layout the PCB.

As soon as an object is placed in violation of a design rule it is

highlighted. Also, during the board verification process you can run the

integrated Design Rule Checker, which will generate a report of any

design rule violations in you PCB.

Protel allows a wide range of design rules to be defined for a PCB.

These include clearances, object geometry, parallelism, impedance


control, routing priority and topology, placement rules, and signal

integrity rules. Each rule has a Rule Scope that defines how it is applied.

The scope allows you to apply a rule to objects, nets, net classes,

components, component classes, layers, regions, through to the whole

board.

Design rules are set up and configured in the Design Rules dialog box

(from the PCB document select Design » Rules).

Design rule topics


Design rule topics
Creating and editing PCB design rules
Setting the scope of a PCB design rule
Situations where PCB design rules are applied
Checking which rules apply to an object
PCB design rule definitions
PCB design rule examples
Importing and exporting design rules
PCB connectivity
When you load a schematic design into a PCB document, the pin-to-pin
connections in each net are displayed as a series of thin connection lines. The line
that connects each pin in the net to another pin in the net is called a from-To, going
FROM one pin in the net TO another pin. The From-Tos are collectively referred
to as the Ratsnest.
The pattern or arrangement of the From-Tos in a net is called the net topology. If a
net has not been assigned a user-defined topology then From-Tos are arranged to
give the shortest possible connection distances for the entire net, based on the
current arrangement of the components.
If the net has a user-defined topology applied the connection line is added to
maintain the topology, and is shown as a dotted line (called a Broken Net Marker),
indicating that the net should be routed between these two points to maintain the
topology.
A specific topology can applied to a net by either defining a Topology Rule, or by
defining fixed From-Tos in the Form-To editor.

PCB connectivity topics


Specifying PCB topology in the From-Tos
editor
Display/hide connection lines in a PCB
document
Changing the properties of a net in a PCB
Managing the netlist Links
Loading a schematic design into a PCB
document
Using PCB design rules
Working in PCB documents

A printed circuit board (PCB), sometimes referred to as printed wiring board


(PWB), is the foundation of circuit construction. Components are soldered onto the
PCB, and the PCB provides the electrical connection pathways between
components to form the physical circuit. Connections are made using copper tracks
etched onto the various layers of the PCB. A PCB document is displayed as a set of
superimposed layers, with each layer corresponding to an individual "phototool"
used to fabricate the board.

In general, a PCB is derived from a schematic representation of the circuit. When a


schematic is loaded into a PCB document, schematic part symbols are translated to
corresponding board component footprints and the connectivity of the schematic is
preserved and displayed as connection lines in the PCB document.
D4

LED
L1
1N4007

W3
1
WIRE

1 2 3 4

D D
+5V POWER SUPPLY CIRCUIT DIAGRAM

NIVE

U1
IC7805 +5V
D1 W4
1 3 1
IP OP

GND

2
W1 1N4007 WIRE

1
WIRE T1 D2
1 1 4

220uF/16V
104PF

104PF

1K
R1
C2
C 1N4007 C

C4
C1
1000uF/35V

C3
2
W2 D3
1 2 3
WIRE TRANS 1N4007

1
D4

LED
L1
1N4007

W3
1
WIRE

B B

Title
A
+5V POWER SUPPLY CIRCUIT DIAGRAMA
Size Number Revision
A4
Date: 25-Jul-2013 Sheet of
File: D:\NIVEDITA_GLNA. ddb Drawn By: NIVEDITA
1 2 3 4

Part Type Designator Footprint Description


1K R1 AXIAL0.4 RES
1N4007 D1 DIODE0.4 DIODE
1N4007 D3 DIODE0.4 DIODE
1N4007 D4 DIODE0.4 DIODE
1N4007 D2 DIODE0.4 DIODE
104PF C2 RAD-0.2 CAP
104PF C4 RAD-0.2 Capacitor
220uF/16V C3 RB.2/.4 Electrolytic Capacitor
1000uF/35V C1 RB.3/.6 Electrolytic Capacitor
IC7805 U1 TO22V IC7805
LED L1 LED
TRANS T1 EE20 TRANSFORMER
WIRE W3 WIRE WIRE
WIRE W2 WIRE WIRE
WIRE W4 WIRE WIRE
WIRE W1 WIRE WIRE
SINGAL SIDE PCB LAYOUT
DOUBLE SIDED PCB LAYOUT
File extensions used to identify
each Gerber file
When you generate the Gerber output a series of files are created, each one
corresponding to one of the layers enabled in the Gerber setup. These files are then
loaded into a Gerber photo plotter, which produces the necessary photo tools for
PCB manufacture. Each Gerber file is given the name of the PCB document, with
a unique extension that identifies that layer and plot type. For example, the Top
layer Gerber file for a PCB called MyDesign will be saved as MyDeisgn.GTL, to
indicate "Gerber Top Layer". Because each design normally generates numerous
Gerber files, these extensions help identify each file.

We recommend that you follow this convention which conforms to general


industry practice. T4e following table shows the extensions that are used:

Top Overlay .GTO


Bottom Overlay .GBO
Top Layer .GTL
Bottom Layer .GBL
Mid Layer 1, etc. .GI, .G2, etc
Power Plane 1, etc. .GP1, GP2, etc
Mechanical Layer 1, etc. .GM1, .GM2, etc
Top Solder Mask .GTS
Bottom Solder Mask .GBS
Top Paste Mask .GTP
Bottom Paste Mask .GBP
Drill Drawing .GDD
Drill Drawing; Top to Mid 1, Mid2 to Mid 3, etc.
Drill Guide .GDG
Drill Guide; Top to Mid 1, Mid 2 to Mid 3, etc
Pad Master, Top .GPT
.GD1, GD2, GD3, etc.
.GG1, GG2, GG3, etc.
Pad Master, Bottom .GPB
Keep out Layer .GKO
Gerber Panels .PO 1, .P02, etc.
Links:-
Setting up the Gerber file options
Working in PCB documents
Generating the manufacturing files
Gerber file output setup
Printing and plotting a
schematic

Protel 99 SE includes support for a wide variety of hard copy options for
schematic sheets. Virtually any device that is supported by Windows can be used
to print or plot your schematic drawings.

Schematic printing and pen-plotting are handled similarly to other Windows


applications. Windows manages the printing (or plotting) process and provides a
range of raster and PostScript printer drivers and vector plotter drivers. These
range from 9 pin dot matrix printers and multi-pen plotters, to high-resolution
raster image setters.

To setup to print or plot from the active schematic or schematic library, select the
File » Setup Printer menu item (shortcut: F, R). This will open the Schematic
Printer Setup dialog, allowing you to choose a printer and set up the output
options.

To start the print process, click the Print button in the Schematic Printer Setup
dialog, or from a schematic select File» Print from the menus.

Tiling a schematic for printing:- When the size of the sheet or library document to
be printed exceeds the print area available on the target device, it will
automatically be cut and printed across two or more sheets, or tiles. The sheets are
tiled such that the correct margin is maintained at the outer edge of each sheet.
It is often possible to reduce the number of sheets required to tile a print, by

changing the printer page orientation and adjusting margins. Experiment while in

Preview mode to obtain the best match before printing.

Schematic PostScript printing issues:- Some PostScript printers will "time out" and

discard the current data when they don't receive the end of page marker within a

specified time. This can cause problems where you seem to be missing pages from

your plots. If you experience this problem using a PostScript printer or any other

printing device, open the Windows Control Panel, select the printer icon, select the

printer and click the Configure button. Change the Transmission Retry to 500

seconds, or some other large number. This will allow the printer sufficient time to

catch up before the Print Manager gives up.

If you find your printout is incomplete, say all the components are there but not all

the wires, there may be insufficient memory in the printer. Laser printers must

capture the entire image in memory before printing it, so if does not all fit in

memory, then the image in memory is printed as is.


Introduction to CircuitCAM

This manual is an introduction into the operation of CircuitCAM V3.1 and V3.2
for Windows TM. You can use CircuitCAM to import, check and edit circuit board
production data in various CAM formats, and then output them again into a CAM
format (LMD/HP-GL). CircuitCAM is particularly useful in calculating the
isolation channels between the conductor tracks in circuit board prototype
production using LPKF circuit board plotters.
Another major usage of CircuitCAM is for the production of high quality Stencils,
needed for the soldering process of fine pitch SMD PCBs. For this purpose
CircuitCAM is extended to prepare the data for a Stencil-LASER from a pad-
layout.
CircuitCAM is available in five different variant, optimized for different purposes:

 CircuitCAM DEMO to test its functionality without being able to store the
resulting data.

 CircuitCAM LITE is the low cost solution. It includes most of the


functionality of the PCB variant, but has an optimized user interface for
infrequent usage and is limited for 2 insulation tools.

 CircuitCAM PCB is the standard variant with full insulate functionality.

 CircuitCAM PRO includes the PCB variant plus additional shape


manipulations and Export functionality.

 CircuitCAM STENCIL includes the PCB variant together with the ability to
prepare data for the STENCIL Laser.
Programming In “C” Language

The C programming language (often, just "C") is a general-purpose,


procedural, imperative computer programming language developed in
the early 1970s by Dennis Ritchie for use on the Unix operating system.
It has since spread to many other operating systems, and is now one of
the most widely used programming languages. C has also had a great
influence on most other popular languages, especially C++ which was
originally designed as an enhancement to C. It is distinguished for the
efficiency of the code it produces, and is the most commonly used
programming language for writing system software, though it is also
widely used for writing applications. Though not originally designed as
a language for teaching, and despite its somewhat unforgiving character,
C is commonly used in computer science education, in part because the
language is so pervasive. Note that C# is a very different programming
language.

C also has the following specific properties:

 Low-level access to computer memory via machine addresses and


pointers
 Function pointers allow for a rudimentary form of closures and
runtime polymorphism
 A standardized C preprocessor for macro definition, source code
file inclusion, conditional compilation, etc.
 A simple, small core language, with functionality such as
mathematical functions and file handling provided by library
routines
 C (and partially B) was the language that orginally discarded well
established operators such as and, or and = (for equality test).

As a systems implementation language, C lacks features found in other


languages:
 No non-scalar operations such as copying of arrays or strings (old
versions of C did not even copy structs automatically).
 No automatic garbage collection
 No bounds checking of arrays (expensive in languages with only
scalar operations)
 No semi-dynamic (i.e. stacked, runtime-sized) arrays until the C99
standard (despite not requiring garbage collection).
 No syntax for ranges, such as the A..B notation used in both newer
and older languages (does not fit scalar-only semantics well).
 No nested functions, though the GCC compiler provides this
feature as an extension
 No closures or functions as parameters, only machine-level
function pointers
 No generators or coroutines; intra-thread control flow consists of
nested function calls, barring the (somewhat arcane) use of the
longjmp or setcontext library functions
 No exception handling; standard library functions signify error
conditions with the global errno variable
 Very rudimentary support for modular programming; a
cumbersome compilation model dependent on operating system-
specific tools.
 No compile-time polymorphism in the form of function or operator
overloading; only rudimentary support for generic programming
 No support for object-oriented programming, although C++ was
originally implemented as a preprocessor that translated C++ into
C; there are libraries offering object systems for C, and many
object-oriented languages are themselves written in C
 No native support for multithreading and networking, though these
facilities are provided by popular libraries

Although the list of built-in features C lacks is long, this has contributed
significantly to its acceptance, as new C compilers can be developed
quickly for new platforms. The relatively low-level nature of the
language affords the programmer close control over what the program is
doing, while allowing solutions that can be specially tailored and
aggressively optimized for a particular platform. This allows the code to
run efficiently on very limited hardware, such as mass-produced
consumer embedded systems, which today are as capable as the first
machines used to implement C. Often, only hand-tuned assembly
language code runs faster, although advances in compiler technology
have narrowed this gap.

1.1 Variables
In C, a variable must be declared before it can be used. Variables can be
declared at the start of any block of code, but most are found at the start
of each function. Most local variables are created when the function is
called, and are destroyed on return from that function

C provides a wide range of types. The most common are

All of the integer types plus the char are called the integral types. float
and double are called the real types.
1.2 Constants
A C constant is usually just the written version of a number. For
example 1, 0, 5.73, 12.5e9. We can specify our constants in octal or
hexadecimal, or force them to be treated as long integers.

 Octal constants are written with a leading zero - 015.


 Hexadecimal constants are written with a leading 0x - 0x1ae.
 Long constants are written with a trailing L - 890L.

Character constants are usually just the character enclosed in single


quotes; 'a', 'b', 'c'. Some characters can't be represented in this way, so
we use a 2 character sequence.
1.3 Arrays
An array is a collection of variables of the same type. Individual array
elements are identified by an integer index. In C the index begins at zero
and is always written inside square brackets.

We have already met single dimensioned arrays which are declared like
this

int results[20];

Arrays can have more dimensions, in which case they might be declared
as

int results_2d[20][5];
int results_3d[20][5][3];
Each index has its own set of square brackets.

Where an array is declared in the main function it will usually have


details of dimensions included. It is possible to use another type called a
pointer in place of an array. This means that dimensions are not fixed
immediately, but space can be allocated as required. This is an advanced
technique which is only required in certain specialized programs.

When passed as an argument to a function, the receiving function


need not know the size of the array. So for example if we have a
function which sorts a list (represented by an array) then the
function will be able to sort lists of different sizes. The drawback is
that the function is unable to determine what size the list is, so
this information will have to be passed as an additional argument
To insert an element in an array:

START

INPUT
a [11],pos,value

NO
k = 11
Is
k = k-1 k > pos

a [k] = a[k-1]

a [pos] =value

NO
j=0 Is
j <11 STOP
j = j+1

YES

PRINT a [j]
To delete an element from an array:

START

INPUT
a [11], pos, value

k = pos NO
Is
k = k+1 k < 11

a [k] = a[k+1]

NO
j=0 Is
j <10 STOP
j = j+1

YES

PRINT a [j]
Program to find Binary of a Decimal number

#include<stdio.h>
#include<conio.h>
void main()
{
int num,b,c,a=1,sum=0;
clrscr();
printf("Enter the decimal number =");
scanf("%d",&num);
for(num;num!=0;num=num/2)
{
b=num%2;
c=a*b;
sum=sum+c;
a=a*10;
}
printf("\nBinary no. is =%d",sum);
getch();
}
Program to add Digits of a five digit number.

#include<stdio.h>
#include<conio.h>
void main()
{
int num,rev,sum=0,count ;
clrscr();
printf("enter the number =");
scanf("%d",&num);
count=1;
while(count<=5)
{
rev=num%10;
num=num/10;
sum=sum+rev;
count=count+1;
}
printf("sum is=%d",sum);
getch();
}
PSIM
Operational Amplifier

Introduction

Op-amp is a direct coupled high gain amplifier usually consist of one or more
differential amplifier & usually followed by level translator & output stage, which
do the operation of adding subtraction and multiplication.

It consists following four parts:

Input Stage: it is the dual input, balanced out put differential amplifier. This
stage generally provides over all gain and gives high input impedance.

Intermediate Stage: The intermediate stage is dual input, unbalanced output.

Level Shifter: It is used after the intermediate stage to shift the dc level at the
out put of the intermediate stage downward to zero with respect to ground.

Out put Stage: It is usually a push pull complementary amplifier out put stage.
the out put stage increases the out voltage swing and raises the current supplying
the capability of the op-amp. This stage also provides low out put resistance.
Block Diagram of Op-Amp:

Some important terms

Input offset voltage: -Input offset voltage is the voltage that is applied between
the two input terminals of an op-amp to null the output.
Input Offset Current: - The algebraic difference between the current into the
inverting and non-inverting terminals is referred to as input off set current.

Iio=|IB1-IB2 |

Input bias current: - Input bias current is the average of the current that flow
into the inverting and non-inverting input terminals of the op-amp.

Differential Input Resistance: - It is the equivalent resistance that can be


measured at either inverting or non-inverting input terminal with other terminal
connected to ground.

Input Capacitance: - It is the equivalent capacitance that can be measured at


either inverting or non-inverting input terminal with other terminal connected to
ground.

Input Voltage Range: - it is the range of common mode voltages over which
the offset specifications apply. It is mainly used for test purposes.

Common Mode Rejection Ratio: - CMRR is the ratio of the differential


voltage gain (Ad) to the common mode voltage gain (Acm).
CMRR=Ad/Acm

Acm=Vocm/Vcm

The ideal op-amp would exhibit the following electrical characteristics: -


Op-amp operates in two following configurations:
 Open loop
 Closed loop

Difference between Open Loop and Closed Loop

Open Loop

1. It has very high voltage gain.


2. But it has the disadvantage of that its output voltage and the stability is
changed with change in temperature and supply voltage.
3. It amplifies the small input signal of low frequency.
4. It has low bandwidth 0f about 5 kHz.
Closed Loop

1. It has low voltage gain.


2. Its output voltage and stability doesn't effected by the change in temperature
and supply voltage.
3. It is frequency independent, thus its stability doesn't change with change in
frequency.
4. It has high band width, thus it amplifies large input signal.
Open-loop OP-AMP configurations

There are three open loop op-amp configurations:

1. Differential Amplifier: the op-amp amplifies the difference between two input

signals, this configuration is called differential amplifier.


2. Inverting Amplifier: When one input signal is applied to the inverting terminal

and other terminal grounded. Then the output voltage is out of phase with respect

to the input by 180degree or is of opposite polarity.

3. Noninverting Amplifier: When one input signal is applied to the non inverting

terminal and other input grounded .then the output voltage is in same phase with

respect to the input.

Closed Loop OP-AMP Configuration

Closed loop have two feedbacks:

Positive Feedback: The signal fed back is of the same polarity or in phase with

input signal. In positive feedback signal aids the input signal thus it is called

regenerative feedback. Thus it is used in oscillator circuit.

Negative Feedback: the signal fed back is of opposite polarity or in out of

phase with input signal. An amplifier with negative feed back has self correcting

capability against any change in output voltage caused by environmental

conditions .negative feedback is also called degenerative feedback. When used it

degenerates the output voltage and in turn reduces the voltage gain.

INTEGRATOR

 A circuit in which the output voltage waveform is the integral of the input
wave form is called integrator.
 With the application of square wave it generates the triangular wave.
 With the application of sine wave it generates the cosine wave.
Circuit Diagram of Integrator

Wave form of Integrator Output


DIFFERENTIATOR

 A circuit in which the output wave form is the differentiation of input wave

form is called differentiator.

 With the application of square wave it generates spikes.

 With the application of sine wave it also produce cosine wave.


Circuit diagram of Differentiator

Wave form of Differentiator


First Order Low Pass Filter
A low pass filter passes the low frequencies signal and block high frequencies
signal. It shows constant gain from 0 to a high cut off frequencies. At high cut
of frequencies the gain is down by 3 db.

Second Order Low Pass Filter


Its gain is down by 6 db at high cut of frequencies.

First Order High Pass Filter


A high pass filter passes the high frequencies signals and blocks the low
frequencies signal. It blocks the low frequencies signal from 0 to low cutoff
frequencies. For the first order high pass signal the gain increases by 20
db/decade in the stop band.

Second Order High Pass Filter


Its gain increases 40db/decade in stop band.

All Pass Filter


All pass filters passes all frequencies components of the input signal without
attenuation, while providing predictable phase shifts for the different
frequencies of the input signal.

Oscillators
An oscillator is a circuit that generates a repetitive wave form of fixed
amplitude and frequency without any external input signal.
The two requirements for oscillations:
1. The magnitude of the loop gain AB must be at least 1.
2. The total phase shift of open loop gain AB must be equal to 0 degree or 360
degree.
3. The output off set voltage (Volt) will initiate the oscillation
Types of oscillator
Square wave generator
 When the op-amp is forced to operate in saturation square wave are
generated.
 This mean the output of op-amp is forced to swing repetitively between
positive +Vsat (=+Vcc) and negative –Vsat.
 Square wave generator is also called a free-running or multivibrator.

Circuit diagram of square wave generator

Triangular wave generator

 The triangular wave generator can be formed by connecting an integrator to


a square wave generator.

 The frequency of triangular wave generator is same as that of square wave

Circuit diagram of triangular wave generator


Schmitt Trigger
 An inverting comparator with positive feedback.
 This circuit converts an irregular-shaped wave form to square wave pulse
 The input voltage triggers the out put every time it exceeds certain voltage
levels called the upper threshold voltage and lower threshold voltage.
 Thus if the thresholds are made larger than the input noise voltage will
eliminate the falls output transition.
 Also the positive feed back because of its regenerative action, will make output
voltage switch faster between +Vsat and –Vsat.

Circuit diagram of Schmitt trigger


Voltage limiters

To keep the out put voltage swing within specific limits op-amp are used with
externally wired component such as zeners or diodes the resultant circuits ,in
which the output are limited to predetermined values , are called limiters.

Voltage limiter

Waveform of voltage limiter


Clippers
A circuit that removes positive and negative part of the input signal, can be formed
by the using an op-amp with a rectifier diode is called positive or negative clipper.
In these circuit the op-amp is basically Used as a voltage follower with a diode in
the feedback circuit.
The clipping level is determined by the reference voltage level Vref which should
be less then the input voltage range of the op-amp.

Positive clipper
Waveform of positive clipper

Clampers

In clamper circuits a predetermined dc level is added to the output voltage.


In other words the output is clamped to a desired dc level.
If the clamped dc level is positive the clamper is a positive clamper.
If the clamped dc level is negative, the clamper is called a negative clamper

Positive clamper
Waveform

Peak detector

 Peak detector that measures the positive peak values of the square wave input.
 During the positive half cycle of Vin the output of the op-amp drives D1 on, charging
capacitor C to the positive peak value Vp of the input voltage Vin. Thus, when D1 is
forward biased, the op-amp operates as a voltage follower.
 On the other hand, during the negative half cycle of Vin, diode D1 is reverse biased and
voltage across C is retained. The only discharge path for C is through Rl since the input
bias current Ib is negligible.

Peak detector
Waveform

Simple and hold circuit

 Sample an input signal and holds on to its at last sampled value until the input
is sampled again.
 Sample-and-hold circuit is formed by using op-amp with an E-MOSFET.
 E-MOSFET works as a switch .And controlled by the sample-and-hold control
voltage.
 Capacitor C serves as a storage element.
Sample and hold circuit

Waveform

Peaking amplifier
The peaking amplifier provides high gain at resonant frequency. In peaking
amplifier a tuned circuit is connected in parallel with feedback resistor. At resonant
frequency the impedance of tuned circuit is very high thus it provides high gain.
MIROCONTOLLER
89C2051
8-bit Microcontroller with 2K
Bytes Flash

• Compatible with MCS-51™ Products

• 2K Bytes of Reprogrammable Flash Memory

– Endurance: 1,000 Write/Erase Cycles

• 2.7V to 6V Operating Range

• Fully Static Operation: 0 Hz to 24 MHz

• Two-level Program Memory Lock

• 128 x 8-bit Internal RAM

• 15 Programmable I/O Lines

• Two 16-bit Timer/Counters

• Six Interrupt Sources

• Programmable Serial UART Channel

• Direct LED Drive Outputs

• On-chip Analog Comparator

• Low-power Idle and Power-down Modes


Pin Configuration
Pin Description

•VCC Supply voltage.


•GND Ground.
Port 1
Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 to P1.7 provide internal
pull up. P1.0 and P1.1 require external pull-ups. P1.0 and P1.1 also serve as the
positive input (AIN0) and the negative input (AIN1), respectively, of the on-chip
precision analog comparator. The Port 1 output buffers can sink 20mA and can
drive LED displays directly. When 1s are written to Port 1 pins, they can be used
as inputs. When pins P1.2 to P1.7 are used as inputs and are externally pulled low,
they will source current (IIL) because of the internal pull-ups. Port 1 also receives
code data during Flash programming and verification.

Port 3
Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/Opins with internal pull-
ups. P3.6 is hard-wired as an input to the output of the on-chip comparator and is
not accessible as a general purpose I/O pin.

RST
Reset input. All I/O pins are reset to 1s as soon as RST goes high. Holding the RST
pin high for two machine cycles while the oscillator is running resets the device.

Idle Mode
In idle mode, the CPU puts itself to sleep while all the onchip peripherals remain
active. The mode is invoked by software. The content of the on-chip RAM and all
the special functions registers remain unchanged during this mode. The idle mode
can be terminated by any enabled interrupt or by a hardware reset.
Power-down Mode
In the power down mode the oscillator is stopped, and the instruction that invokes
power down is the last instruction executed. The on-chip RAM and Special
Function Registers retain their values until the power down mode is terminated.
The only exit from power down is a hardware reset. Reset redefines the SFRs but
does not change the on-chip RAM. The reset should not be activated before VCC
is restored to its normal operating level and must be held active long enough to
allow the oscillator to restart and stabilize.

Programming Algorithm:

To program the AT89C2051:-


1. Power-up sequence:
Apply power between VCC and GND pins
Set RST and XTAL1 to GND
2. Set pin RST to “H”
Set pin P3.2 to “H”
3. Apply the appropriate combination of “H” or “L” logic levels to pins P3.3, P3.4,
P3.5, 3.7 to select one of the programming operations shown in the PEROM
Programming Modes table.

To Program and Verify the Array:-

1. Apply data for Code byte at location 000H to P1.0 toP1.7.

2. Raise RST to 12V to enable programming.

3. Pulse P3.2 once to program a byte in the PEROM array or the lock bits. The
byte-write cycle is self-timed and typically takes 1.2 ms.
4. To verify the programmed data, lower RST from 12V to logic “H” level and set
pins P3.3 to P3.7 to the appropriate levels. Output data can be read at the port P1
pins.

5. To program a byte at the next address location, pulse XTAL1 pin once to
advance the internal address counter. Apply new data to the port P1 pins.

6. Repeat steps 5 through 8, changing data and advancing the address counter for
the entire 2K bytes array or until the end of the object file is reached.

7. Power-off sequence:
Set XTAL1 to “L”
Set RST to “L”
Turn VCC power off

AT89S8252 Features

1. Compatible with MCS-51™ Products


2. 8K Bytes of In-System Reprogrammable Downloadable Flash Memory
-SPI Serial Interface for Program Downloading
-Endurance: 1,000 Write/Erase Cycles
3. 2K Bytes EEPROM
4. 4V to 6V Operating Range
5. Fully Static Operation: 0 Hz to 24 MHz
6. Three-level Program Memory Lock
7. 256 x 8-bit Internal RAM
8. 32 Programmable I/O Lines
9. Three 16-bit Timer/Counters
10.Nine Interrupt Sources
11.Programmable UART Serial Channel
12.SPI Serial Interface
13.Low-power Idle and Power-down Modes
14.Interrupt Recovery From Power-down
15.Programmable Watchdog Timer
16.Dual Data Pointer
17.Power-off Flag

PIN DIAGRAM OF AT89S8252


PIN DESCRIPTION OF
AT89S8252

1. VCC Supply voltage.


2. GND Ground.
3. Port 0:- Port 0 is an 8-bit open drain bi-directional I/O port. As an output
port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins,
the pins can be used as high impedance inputs.
4. Port 1:- Port 1 is an 8-bit bi-directional I/O port with internal pullups. 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 internal pullups 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.
5. Port 2:- Port 2 is an 8-bit bi-directional I/O port with internal pullups. The
Port 2 output buffers can sink/source four TTL inputs.
6. When 1s are written to Port 2 pins, they are pulled high by the internal
pullups 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 pullups.
7. Port 3:- Port 3 is an 8 bit bi-directional I/O port with internal pullups. 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 pullups and can be used as
inputs.
8. RST:- Reset input. A high on this pin for two machine cycles while the
oscillator is running resets the device.
9. XTAL1:- Input to the inverting oscillator amplifier and input to the
internal clock operating circuit.
10. XTAL2:- Output from the inverting oscillator amplifier.
11. Timer 0 and 1:- Timer 0 and Timer 1 in the AT89S8252 operate the same
way as Timer 0 and Timer 1 in the AT89C51, AT89C52 and AT89C55. For
further information, see the October 1995 Microcontroller Data Book, page
2-45, section titled, “Timer/Counters.”
12. Timer 2:- Timer 2 is a 16 bit Timer/Counter that can operate as either a
timer or an event counter. The type of operation is selected by bit C/T2 in
the SFR T2CON (shown in Table 2). Timer 2 has three operating modes:
capture, auto-reload (up or down counting), and baud rate generator. The
modes are selected by bits in T2CON; Timer 2 consists of two 8-bit
registers, TH2 and TL2. In the Timer function, the TL2 register is
incremented every machine cycle. Since a machine cycle consists of 12
oscillator periods, the count rate is 1/12 of the oscillator frequency.

POWER SUPPLY FOR DIGITAL CIRCUITS


Summary of circuit features

 Brief description of operation: Gives out well regulated +9V


output, output current capability of 100 mA.
 Circuit protection: Built-in overheating protection shuts down
output when regulator IC gets too hot.
 Circuit complexity: Simple and easy to build.
 Circuit performance: Stable +9V output voltage, reliable
operation.
 Availability of components: Easy to get, uses only common
basic components.
 Design testing: Based on datasheet example circuit, I have used
this circuit successfully as part of other electronics projects.
 Applications: Part of electronics devices, small laboratory power
supply.
 Power supply voltage: Unregulated DC 8-18V power supply.
 Power supply current: Needed output current 1A.
 Components cost: Few rupees for the electronic components
plus the cost of input transformer.

DESCRIPTION OF POWER SUPPLY


This circuit is a small +12 volts power supply, which is useful when
experimenting with digital electronics. Small inexpensive wall transformers
with variable output voltage are available from any electronics shop. Those
transformers are easily available, but usually their voltage regulation is very
poor, which makes them not very usable for digital circuit experimenter
unless a better regulation can be achieved in some way. The following
circuit is the answer to the problem.This circuit can give +12V output at
about 1A current. The circuit has overload and terminal protection.

IN 4007

1
7812 3 +12V
2
4700 uf 1000 uf

Circuit diagram of power supply

The above circuit utilizes the voltage regulator IC 7812 for the constant
power supply. The capacitors must have enough high voltage rating to
safely handle the input voltage feed to circuit. The circuit is very easy to
build for example into a piece of Vero board.
1 2 3

Pin diagram of 7812 regulator IC

PIN 1 : Unregulated voltage input


PIN 2 : Ground
PIN 3 : Regulated voltage output

Component list :

1. 7812 regulator IC.


2. 4700 uf electrolytic capacitor, at least 25V voltage rating.
3. 1000 uf electrolytic capacitor, at least 25V voltage rating.
7 SEGMENT DISPLAYS

The 7 segment display is used as a numerical indicator on many types of


test equipment. It is an assembly of light emitting diodes which can be
powered individually. They most commonly emit red light. They are
arranged and labeled as shown in the diagram. Powering all the segments
will display the number 8.Powering a, b, c, d, and g will display the number
3. Numbers 0 to 9 can be displayed. The d.p represents a decimal point.
The one shown is a common anode display since all anodes are joined
together and go to the positive supply. The cathodes are connected
individually to zero volts. Resistors must be placed in series with each
diode to limit the current through each diode to a safe value. Early wrist
watches used this type of display but they used so much current that the
display was normally switched off. To see the time you had to push a
button. Common cathode displays where all the cathodes are joined are
also available. Liquid crystal displays do a similar job and consume much
less power. Alphanumeric displays are available which can show letters as
well as numbers.
The seven-segment LED display has four individual digits, each with a
decimal point. Each of the seven segments (and the decimal point) in a
given digit contains an individual LED. When a suitable voltage is applied
to a given segment LED, current flows through and illuminates that
segment LED. By choosing which segments to illuminate, any of the nine
digits can be shown. For example, as shown in the figure below, a 2 can be
displayed by illuminating segments a, b, d, e, and g.

Seven segment displays come in two varieties - common anode (CA) and
common cathode (CC). In a CA display, the anodes for the seven
segments and the decimal point are joined into a single circuit node. To
illuminate a segment in a CA display, the voltage on a cathode must be at a
suitably lower voltage (about .7V) than the anode. In a CC display, the
cathodes are joined together, and the segments are illuminated by bringing
the anode voltage higher than the cathode node (again, by about .7V). The
Dig lab board uses CA displays.

The seven LED’s in each digit are labeled a-g. Since the Dig lab board
uses CA displays, the anodes for each of the four digits are connected in a
common node, so that four separate anode circuit nodes exist (one per
digit). Similar cathode leads from each digit have also been tied together to
form seven common circuit nodes, so that one node exists for each
segment type. These four anode and seven cathode circuit nodes are
available at the J2 connector pins labeled A1-A4 and CA-CG. With this
scheme, any segment of any digit can be driven individually. For example,
to illuminate segments b and c in the second digit, the b and c cathode
nodes would be brought to a suitable low voltage (by connecting the
corresponding circuit node available at the J2 connector to ground), and
anode 2 would be brought to a suitable high voltage (by connecting the
corresponding circuit node available at the J2 connector to Vdd).
The Dig lab board uses two 2-digit displays to create a single 4-digit display. These
displays use the reference designators DSP1 and DSP2, and they appear as
relatively large rectangular boxes on the silk screen. Since they contain LED’s,
they must be loaded into the board with the correct orientation or they will not
function - the displays must be loaded with the decimal points nearest the slide
switches.
DIGITAL TO ANALOG CONVERTER:
D/A Converters with binary weighted resistors: - it uses an op-amp &
binary weighted resistors. These are connected to either ends. The no of binary
input is four the converter is 4 bit converter because there are 16 combinations; an
analog o/p should have 16 corresponding values.

D/A converter with R & 2R resistors: - the binary inputs are simulated by
switches b0 through b3,& the o/p is proportional to the binary I/P. Binary I/P are
either be high or low assume most significant bit switch b3 is connected to 5v &
other switch are connected to ground.

Rth= [{(2R||2R+R)||2R}||2R]+R

ANALOG TO DIGITAL CONVERTER:

SUCCESSIVE-APPROXIMATION METHOD:- The heart of the circuit


is an 8bit successive approximation resistor (SAR) whose o/p is applied to an 8 bit
D/A converter. The analog o/p of the D/A converter is then compared to an analog
input-output signal by the comparator .The o/p of the comparator is a serial data
input to the SAR.
Liquid Crystal Display(LCD)

INTRODUCTION

The ORIOLE DISPLAY MODULE is a dot matrix liquid crystal display that
displays alphanumeric, kana (Japanese) characters and symbols. The built in
controller & driver LSI’s provide convenient connectivity between a dot matrix
LCD and most 4-8 bit micro’s or microc’s.All the functions required for dot matrix
crystal display drive are internally provided .Internal refresh is provided by the
ODM. The CMOS technology makes the device ideal for application in hand held,
portable and other battery powered instruments with low consumption.

FEATURES

 Easy interface with a 4 bit or 8 bit MPU.

 Built in dot matrix LCD controller with font 5*7 or 5*10dots.

 Display data RAM for 80 characters (80*8bits)

 Character generator ROM, which provides 160 characters with font 5*7
dots and 32 characters with font 5*10 dots.

 Both display data and character generator RAM’s can be read from the
MPU.

 Internal automatic reset circuit at power ON.

 Build in oscillator circuit .(no external ckt is required)

 Wide range of instruction functions, clear display, cursor home, display


on/off, cursor on/off, cursor shift, display shift.
LCD INITIALIZATION
ABBREVATED INFORMATION:

I/D =1 : Increment
=0 : Decrement
S =0 : Accompanies display shift
S/C = 1 : Display shift
=0 : Cursor move
R/L = 1 : Shift to right
=0 : Shift to left
DL = 1 : 8-bits
=0 : 4-bits
N =1 : 2-lines
=0 : 1-line
F =1 : 5*10 Dots
=0 : 5*8 Dots
BF = 1 : Internally operating
=0 : Can accept instruction.

DDRAM : Display data RAM


CGRAM : Character generator RAM
ACG : CG RAM address
ADD : DD RAM address corresponds to cursor address
AC : Address counter used for DD and CG RAM address.
OPERATIONAL OVERVIEW :

Busy Flag: When the busy flag is HIGH level, it indicates that the internal
operation mode and the next instruction will not be accepted. When R/W is
‘1’ and RS is ‘0’,the busy flag is o/p from DB7 . The next instruction must
be written after the busy flag goes low.

Address Counter (AC): The AC generates the address for the


DDRAM, the CGRAM and for the cursor display. When an instruction code
for DD or CGRAM address is written to the controller, after deciding
whether it is DDRAM or CGRAM, the address information is transferred to
AC.
After writing into (or reading from) DD or GRAM display data , AC is
automatically incremented (or decremented) .The data of the AC is output
to DB0 ~DB6 when RS is ‘0’ and R/W is ‘1’.

Character Generator ROM (CGROM): The character generator


ROM generates 5*7 dot or 5*10 dot character patterns from 8-bit character
codes.
When the 8-bit character code of a CGROM is written to the DDRAM, the
character pattern of the CGROM corresponding to the code is displayed on
the LCD display position corresponding to the DDRAM.

Character Generator RAM (CGRAM): The character generator


RAM (CGRAM) is the RAM with which the user can generate character
patterns by program. The CGRAM has the capacity to store 8 kinds of 5*7
or 4 kinds of 5*10 dots. Programming of these character patterns is
explained in CGRAM programming.

Display Data RAM (DDRAM): The display data RAM (DDRAM)


stores display data represented in 8-bit (Hex-decimal) character codes its
capacity is 80*8 bits or 80 characters. The DDRAM that is not used for
display can be used as general data RAM. LCD will select the character
pattern either from CGROM or CGROM.

Underline / Blinking Cursor: Cursor is under the control of the MPU


programe.The display of the cursor on t5he LCD is made at a position
corresponding to the DDRAM address set to the address counter (AC).
Line Follower ROBOT
The robot built with 2051, L293D, and four IR sensors. Simple circuit
and platform, quick tracking and easy-understand program using C
language.

I designed my Robot, which use two motors control rear wheels and the
single front wheel is free. It has 4-infrared sensors on the bottom for detect
black tracking tape, when the sensors detected black color, output of
comparator, LM324 is low logic and the other the output is high.
Microcontrollor AT89C2051 and H-Bridge driver L293D were used to
control direction and speed of motor.
Fig 1. Circuit diagram of my Robot.
Fig 2. Circuit diagram of Infrared sensors and comparators.
Fig 3. Position of sensors, left hand side is side view and right
hand side is top view.

Software:

Software for write to AT89C2051 is robot1.hex ,which was written by C-


language ,the source code is robot1.ccompiled by using MC51 in TINY
model with my start up code robot.asm .
Introduction
For my final project, I decided to make a line-follower robot. This
simple robot is designed to be able to follow a black line on the ground
without getting off the line too much. The robot has two sensors installed
underneath the front part of the body, and two DC motors drive wheels
moving forward. A circuit inside takes an input signal from two sensors and
controls the speed of wheels’ rotation. The control is done in such a way that
when a sensor senses a black line, the motor slows down or even stops. Then
the difference of rotation speed makes it possible to make turns. For
instance, in the figure on the right, if the sensor somehow senses a black
line, the wheel on that side slows down and the robot will make a right turn.
Theory of operation
a). How to sense a black line:
The sensors used for the project are Reflective Object Sensors, 0PB710F
that are already ready in the Electronic Lab. The single sensor consists of an
infrared emitting diode and a NPN Darlington phototransistor. When a light
emitted from the diode is reflected off an object and back into the
phototransistor, output current is produced, depending on the amount of
infrared light, which triggers the base current of the phototransistor. In my
case, the amount of light reflected off a black line is much less than that of a
white background, so we can detect the black line somehow by measuring
the current. (This current is converted to voltage.)

b).How to control a DC motor :


Instead of applying a constant voltage across a DC motor, we repeat
switching on and off the motor with a fixed voltage (Vcc) applied to the
motor. This is done by sending a train of PWM (Pulse Width Modulation)
pulses to a power MOSFET in order to turn it on and off. Then, the motor
sees the average voltage while it depends on duty cycle of PWM pulses. The
speed of rotation is proportion to this average voltage.
By PWM method, it’s easier to control the DC motor than by directly
controlling the voltage across it. All we have to do is to modulate pulse
width, in order words, a duty cycle. Also, a power MOSFET consumes only
negligible power in switching. In this way, the duty cycle of output pulses
Q2 can be controlled. Back to my circuit, the output voltage of the sensor
part provides CV. For instance, if any sensor senses a black line, the current
from the photodiode decreases, the CV drops, the duty cycle gets low and
the motor slows down.

Third, the PWM pulses are supplied to the gate of a power MOSFET
(IRF520) to switch the DC motor on and off. Then, the DC motor only sees
the average voltage proportional to the duty cycle of the pulses. When CV is
high, so is the duty cycle and the motor turns fast.

In my robot, the distance between sensors and the ground is fixed. So,
when a sensor is off the black line (The sensor sees white paper.), CV keeps
its maximum value and both motors keep turning in a constant speed. As
soon as the sensor enters the black line part, CV drops down and thus duty
cycle decreases, which means the slowdown of a wheel.

* Component Values:

R1=6K, R2=1K, R3=20K, R4=10, R5=82, R6=5K(variable), R7=1K

C1=1μF, C2=0.1μF, C3=0.1μF,


Circuit diagram
My circuit consists of two parts: PWM (Pulse Width Modulation) part
and a sensor part. First, we take a look at the sensor part. The photodiode
turns on the phototransistor and then the output current is converted to
output voltage through the first op-amp circuit. The R6 is a variable resistor,
so that we can tune the scale of output voltage. The second op-amp circuit is
added to change the polarity of voltage. (Positive CV is necessary later.)
One thing we should know is that –Vcc to Vcc of voltage rail is needed, not
from 0 to Vcc. In the circuit built-up, LM747 Dual Operational Amplifiers
were used.

Second, in the PWM section, two 555 timers (LM555) are used to
produce a pulse-width modulated train of pulses. The timer on the left works
in astable mode to generate regular square-wave pulses. The frequency is
fixed by the values of R1, R2 and C1 here. Then, this output Q1 is
connected to the trigger pin of the second timer that works in monostable
mode this time. As you can see in the diagram, at a falling edge of Q1, a
pulse is triggered and stays high during some time. The time (width of a
pulse) is purely determined by the value of R3 and C3 if CV (Control
Voltage) pin is not connected at all. (Look at the pulse diagrams of Q1 and
Q2 at the bottom of the circuit diagram.) CV plays a role of changing the
threshold level of a timer. (Without CV, threshold = 2/3 * Vcc) CV just
becomes the triggering voltage level. Therefore, the higher the CV is,the
longer it takes time until discharge.
PROGRAM

#include <REGX52.H>
void main()
{
P1_2=0; //IN1
P1_3=1; //IN2
P1_4=1; //IN3 LEFT MOTOR
P1_5=0; //IN4 RIGHT MOTOR
while(1)
{
if((P0_1==0)&&(P0_0==0)) // if robot on black line
{
P1_0=1; //EN1 RIGHT MOTOR
P1_1=1; //EN2 LEFT MOTOR
}
if((P0_1==1)&&(P0_0==0)) // if robot on left of black line
{
P1_0=0; //EN1RIGHT MOTOR STOP
P1_1=1; //EN2 LEFT MOTOR
}
if((P0_1==0)&&(P0_0==1)) // if robot on right of black line
{
P1_0=1; //EN1RIGHT MOTOR
P1_1=0; //EN2 LEFT MOTOR STOP
}
if((P0_1==1)&&(P0_0==1)) // if robot outside the black line
{
P1_0=1; //EN1 RIGHT MOTOR
P1_1=1; //EN2 LEFT MOTOR
}}}
HEX CODE
:0300000002000EED
:03000300020055A3
:
20000B0002002475810F438901D2AFD2A9D28C120058
80FE12001B80FBC0E0C0D0758CFFC3
:
20002B00758A000508E508B46403750800C395094004C
2908002D290E508C3950A4004C2F4
:
20004B00918002D291D0D0D0E032050B327440F59074
FFF5B07450F50C741EF50D7400F548
:
20006B000E7432F50F120080E5B0440FF5B01200BC020
0732205810581740178FD12022609
:
20008B00F678FD120226E670030200B7E59008F6E6544
01202517B0012024812025A45F0D2
:
2000AB0070030200B4740018F602008C15811581220581
E5B0540FF5B078FE120226F6E6FF
:
2000CB0054011202517B0012024812025A45F070030200
E91201A97401F50E02018478FE52
:
2000EB00120226E654081202517B0012024812025A45F0
700302010D1201C87402F50E02C1
:
20010B00018478FE120226E61202517B0912024812025A
45F0700302013CE50C75F000C009
:
20012B00E0C0F0120187158115817400F50E02018478FE
120226E61202517B0B1202481271

:
20014B00025A45F0700CE61202517B0D12024812025A4
5F0600CE50E75F0007B007C0012E8
:
20016B00025A45F07003020184E50D75F000C0E0C0F01
20187158115811581227464F59067
:
20018B0078FB120226E6240AF509E6F50AE50F75F000
C0E0C0F012020915811581227468C0
:
2001AB00F590E50D2405F509E50DF50AE50F75F000C0
E0C0F012020915811581227454F5D4
:
2001CB0090E50D2405F509E50DF50AE50F75F000C0E0
C0F012020915811581227458F59015
:
2001EB0078FB120226E6F509E62405F50AE50F75F000
C0E0C0F0120209158115812278FBCE
:
20020B001202268603088604BB0004BC00012279E5A3D
9FD1BBBFFF01C80F4C82581C8225C
:
20022B00C92581C97A0022D083D082CF2581F581CFC0
82C08322CF2581F581CF227C00CBB6
:
20024B0030E7011CCB2275F00030E70215F02212026D6
009E4F5F02212026D60F7E4F5F057
:
20026B000422C5F0C39C7003E5F09B22FBE493CB22F
CE493FB740193CC22FAE493F9740192
:03028B0093CA22F1
:00000001FF
Building the robot
Before starting to build a real circuit, I built is on the lab breadboard and
verified everything worked fine. Then, I bought a blank breadboard from
ECE storeroom. I put together each electronic part and wires on the board
and soldered them all. (The work would have been much easier to use a
PCB (Printed Circuit Board).) After that, I checked if there is any bad
connection, and tested if the circuit generates correct pulses at each point.
(i.e. Q1 and Q2) This whole work took quite a time, much longer than I
expected.
For a robot body, I bought a container and two flying wheel toys at the Wal-
Mart. With every part ready, I drilled holes to fix two DC motors, some
supporting aluminum plates and sensors in front

Result

For a test, I held my robot in the air and I approached a white paper to
sensors. Then, both wheels rotated as expected and they slowed down when
either the paper moved away or sensors passed across a black line. Next, I
put it down on the track, but unfortunately, it didn’t move. I found the torque
of motors not enough to drive my robot. Even though the chosen DC motor
was slowest and gave highest torque among other DC motors in the lab, it
wasn’t enough. For solving this problem, I will have to find a suitable DC
motor with large torque.
Overall, the robot project wasn’t successful, but it was quite a fun to go
through all the process. I also realized that there were many things to
consider practically such as installation of motors, building up a circuit by
soldering and putting all parts together. This experience hopefully would be
helpful in the future work.
Some snapshots of my robot are on the next page.
MOTOR DRIVER L293D

PUSH-PULL FOUR CHANNEL


DRIVER WITH DIODES
 600mA OUTPUT CURRENT CAPABILITY
PER CHANNEL
 1.2A PEAK OUTPUT CURRENT (non repetitive)
PER CHANNEL
 ENABLE FACILITY
 OVERTEMPERATUREPROTECTION
 LOGICAL ”0” INPUT VOLTAGE UP TO 1.5 V
 (HIGH NOISE IMMUNITY)
 INTERNAL CLAMP DIODES

DESCRIPTION

The Device is a monolithic integrated high voltage,high current four


channel driver designed to accept standard DTL or TTL logic levels
and drive inductive loads (such as relays solenoides, DC and
stepping motors) and switching power transistors.
To simplify use as two bridges each pair of channels is equipped with
an enable input. A separate supply input is provided for the logic,
allowing operation at a lower voltage and internal clamp diodes are
included.
This device is suitable for use in switching applications at frequencies
up to 5 kHz. The L293D is assembled in a 16 lead plastic packaage
which has 4 center pins connected together and used for heatsinking
The L293DD is assembled in a 20 lead surface mount which has 8
center pins connected together and used for heatsinking.
Cell Phone Operated land Rover
( landrover )

INTRODUCTION :
Conventionally, wireless-controlled robots use RF circuits,which have the
drawbacks of limited working range, limited frequency range and limited
control. Use of a mobile phone for robotic control can overcome these
limitations. It provides the advantages of robust control, working range as
large as the coverage area of the service provider,no interference with other
controllers and up to twelve controls.Although the appearance and
capabilities of robots vary vastly, all robots share the features of a
mechanical, movable structure under some form of control. The control of
robot involves three distinct phases: reception, processing and action.
Generally, the preceptors are sensors mounted on the robot, processing is
done by the on-board microcontroller or processor, and the task (action) is
performed using motors or with some other actuators.

PROJECT OVERVIEW:
Cell phone operated land Rover, Robot, Moving Vehicle circuit

In this project, the robot is controlled by a mobile phone that makes a call to
the mobile phone attached to the robot. In the course of a call, if any button
is pressed,a tone corresponding to the button pressed is heard at the other
end of the call. This tone is called ‘dual-tone multiple-frequency’ (DTMF)
tone. The robot perceives this DTMF tone with the help of the phone
stacked in the robot. The received tone is processed by the ATmega16
microcontroller with the help of DTMF decoder MT8870. The decoder
decodes the DTMF tone into its equivalent binary digit and this binary
number is sent to the microcontroller.The microcontroller is preprogrammed
to take a decision for any given input and outputs its decision to motor
drivers in order to drive the motors for forward or backward motion or a
turn. The mobile that makes a call to the mobile phone stacked in the robot
acts as a remote. So this simple robotic project does not require the
construction of receiver and transmitter units. DTMF signaling is used fr
telephone signaling over the line in the voice-frequency band to the call
switching centre. The version of DTMF used for telephone tone dialing is
known as ‘Touch-Tone.’DTMF assigns a specific frequency (consisting of
two separatetones) to each key so that it can easily be identified by the
electronic circuit. The signal generated by the DTMF encoder is a direct
algebraic summation, in real time, of the amplitudes of two sine
(cosine)waves of different frequencies, i.e., pressing ‘5’ will send a tone
made by adding 1336 Hz and 770 Hz to the other end of the line. The tones
and assignments in a DTMF system are shown in Table I.

SCEMATIC OF CELLPHONE OPERATED LANDROVER:


Cell phone operated land rover circuit, robot, moving vehicle

CIRCUIT DESCRIPTION:
Fig. 1 shows the block diagram of the microcontroller-based mobile phone
operated land rover. The important components of this rover are a DTMF
decoder, microcontroller and motor driver. An MT8870 series DTMF
decoder is used here. All types of the MT8870 series use digital counting
techniques to detect and decode all the 16 DTMF tone pairs into a 4-bit code
output. The built-in dial tone rejection circuit eliminates the need for pre-
filtering. When the input signal given at pin 2 (IN-) in single-ended input
configuration is recognized to be effective, the correct 4-bit decode signal of
the DTMF tone is transferred to Q1 (pin 11) through Q4 (pin 14) outputs.
Table II shows the DTMF data output table of MT8870. Q1 through Q4
outputs of the DTMF decoder (IC1) are connected to port pins PA0 through
PA3 of ATmega16 microcontroller (IC2) after inversion by N1 through
N4,respectively. The ATmega16 is a low-power, 8-bit, CMOS
microcontroller based on the AVR enhanced RISC architecture. It provides
the following features: 16 kB of in-system programmable Flash program
memory with read-while-write capabilities, 512 bytes of EEPROM, 1kB
SRAM, 32 general-purpose input/output (I/O) lines and 32 general-purpose
working registers. All the 32 registers re directly connected to the arithmetic
logic unit, allowing two independent registers to be accessed in one single
instruction executed in one clock cycle. The resulting architecture is more
code-efficient. Outputs from port pins PD0 through PD3 and PD7 of the
microcontroller are fed to inputs IN1 through IN4 and enable pins (EN1 and
EN2) of motor driver L293D, respectively, to drive two geared DC motors.
Switch S1 is used for manual reset. The microcontroller output is not
sufficient to drive the DC motors, so current drivers are required for motor
rotation. The L293D is a quad, high-current, half-H driver designed to
provide bidirectional drive currents of up to 600 mA at voltages from 4.5V
to 36V. It makes it easier to drive the DC motors. The L293D consists of
four drivers. Pin IN1 through IN4 and OUT1 through OUT4 are input and
output pins, respectively, of driver 1 through driver 4. Drivers 1 and 2, and
drivers 3 and 4 are enabled by enable pin 1 (EN1) and pin 9 (EN2),
respectively. When enable input EN1 (pin 1) is high, drivers 1 and 2 are
enabled and the outputs corresponding to their inputs are active. Similarly,
enable input EN2 (pin 9) enables drivers 3 and 4. An actual-size, single-side
PCB for cell phone-operated land rover is shown in Fig. 4 and its component
layout in Fig. 5.

PCB LAYOUT FOR CELLPHONE OPERATED LANDROVER:

SOFTWARE DESCRIPTION:
The software is written in ‘C’ language and compiled using Code vision
AVR ‘C’ compiler. The source program is converted into hex code by the
compiler. Burn this hex code into ATmega16 AVR microcontroller. The
source program is well commented and easy to understand. First include the
register name defined specifically for ATmega16 and also declare the
variable. Set port A as the input and port D as the output. The program
will run forever by using ‘while’ loop. Under ‘while’ loop, read port A and
test the received input using ‘switch’ statement. The corresponding data will
output at port D after testing of the received data.

WORKING:
In order to control the robot, you need to make a call to the cell phone
attached to the robot (through head phone) from any phone, which sends
DTMF tunes on pressing the numeric buttons. The cell phone in the robot is
kept in ‘auto answer’ mode. (If the mobile does not have the auto answering
facility, receive the call by ‘OK’ key on the rover-connected mobile and then
made it in hands-free mode.) So after a ring, the cellphone accepts the call.
Now you may press any button on your mobile to perform actions as listed
in Table III. The DTMF tones thus produced are received by the cell phone
in the robot. These tones are fed to the circuit by the headset of the
cellphone. The MT8870 decodes the received tone and sends the equivalent
binary number to the microcontroller. According to the program in the
microcontroller, the robot starts moving. When you press key ‘2’ (binary
equivalent 00000010) on your mobile phone, the microcontroller outputs
‘10001001’ binary equivalent. Port pins PD0, PD3 and PD7 are high. The
high output at PD7 of the microcontroller drives the motor driver (L293D).
Port pins PD0 and PD3 drive motors M1 and M2 in forward direction (as
per Table III). Similarly, motors M1 and M2 move for left turn, right turn,
backward motion and stop condition as per Table III.

CONSTRUCTION:

Cell phone operated land rover project


When constructing any robot, one major mechanical constraint is the
number there a two-wheel drive or a four-wheel ive. Though four-wheel
drive is more complex than two-wheel drive, it provides more torque and
good control. Two-wheel drive, on the other hand, is very easy to construct.
Top view of a four-wheel-driven land rover is shown in Fig. 3. The chassis
used in this model is a 10×18cm2 sheet made up of parax. Motors are fixed
to the bottom of this sheet and the circuit is affixed firmly on top of the
sheet. A cellphone is also mounted on the sheet as shown in the picture. In
the four-wheel drive system, the two motors on a side are controlled in
parallel. So a single L293D driver IC can drive the rover. For this robot,
beads affixed with glue act as support wheels.

…………………..The End

You might also like