Documente Academic
Documente Profesional
Documente Cultură
MATHURA
AT
ASSOCIATED ELECTRONICS
RESEARCH FOUNDATION
C-53, PHASE-II,
NOIDA
AT
AERF NOIDA
Submitted by:
NIVEDITA SINGH
We would like to list here few of them. First we gratefully acknowledge the
(Design Engineer) and Mr. Ajit Yadav (Design Engineer) for their able
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
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.
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
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
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.
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:
information about the connectivity of the circuit and the parts that make
up the circuit.
drawings. A complete circuit design can use just a single sheet, or it can
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.
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):
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
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.
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.
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
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
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
Selected Pins:- Lists all pins connecting to the selected net(s). Choose
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
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
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
a PCB. A footprint may contain pads for connecting to the pins of a device, a
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
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.
regard to each other. Components must not overlap, nets must not short,
design rules. These design rules are monitored as you layout the PCB.
highlighted. Also, during the board verification process you can run the
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,
board.
Design rules are set up and configured in the Design Rules dialog box
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
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.
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
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
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
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 STENCIL includes the PCB variant together with the ability to
prepare data for the STENCIL Laser.
Programming In “C” Language
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
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.
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.
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.
Input Stage: it is the dual input, balanced out put differential amplifier. This
stage generally provides over all gain and gives high input impedance.
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:
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.
Input Voltage Range: - it is the range of common mode voltages over which
the offset specifications apply. It is mainly used for test purposes.
Acm=Vocm/Vcm
Open Loop
1. Differential Amplifier: the op-amp amplifies the difference between two input
and other terminal grounded. Then the output voltage is out of phase with respect
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
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
phase with input signal. An amplifier with negative feed back has self correcting
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
A circuit in which the output wave form is the differentiation of input wave
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.
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
Positive clipper
Waveform of positive clipper
Clampers
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
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
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:
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
IN 4007
1
7812 3 +12V
2
4700 uf 1000 uf
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
Component list :
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
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
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.
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.
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.
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:
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:
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
DESCRIPTION
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.
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.
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:
…………………..The End