Professional Documents
Culture Documents
Introduction
The Maze Robot is a kind of robot which can move in any possible direction. But, this is not
the basic purpose of this robot. As the name suggests, a Maze robot can change its direction
whenever any obstacle occurs in a particular direction. So Maze robot basically is a helpful
device so as to explore any particular hidden region which is beyond human intervention.
In the Maze robot, we have made use of certain infrared transmitters as well as
receivers that continuously transmit as well as receive signals. As and when any obstacle
such as wall occurs in front of the robot during its motion, receiver sends a signal to the
microcontroller which sends appropriate signals to the driver IC. The driver IC starts and
stops the appropriate wheels to be needed at the time. And thus the purpose of moving the
robot in a direction other than the obstacle is served.
The Maze robot we have designed here is a very basic form of the big Maze robots
that are actual building blocks of any exploration project etc. The Maze Robot can also be
upgraded with many other modifications. One of the most known modification among these
is to design it in such a way that it can move on any terrain. Then it can be called as All-
terrain Maze Robot.
Notice that in some cases it is better to choose one wall to follow over another. Here
the shortest path from start (S) to finish (F) is via the right wall. So it is good practice to be
able to command your robot to follow one wall over another before it is set in the start box.
This can be accomplished by using the left and right bumper switches. Tapping the left or
right switch before the start commands the robot to follow the left or right wall.
So we set out to build and program a maze robot to follow one wall. We choose to use
a differential drive system on a round body. This would allow us to control the robot rather
easily and prevent it from getting hung up on maze walls. We mounted two GP2D02 IR
Sensors on a single shaft on top of a servomotor. The sensors were positioned 90 degrees
apart. The motor allowed the robot to look straight ahead and the left or right wall at the same
time.
2
In order to tell if the robot was getting closer or further away from a wall a minimum of two
sensor readings would have to be taken over a period of time while the robot was moving. I
had some difficulty in fine-tuning the reactions needed to prevent the robot from touching the
walls. I quickly realized that this sensor arrangement had some shortcomings. I needed to be
able to look at a wall and determine if the robot was parallel to it without moving forward. If
I could achieve this, the robot would always start off parallel to a given wall. So I made some
sensor placement changes that would not require the robot to be moving in order to determine
if it was parallel or not.
3
2. Basic Components
4. Diodes(IN4007) - 4
5. Capacitor
C1 100µF/25V 1
C2 10µF/16V 1
6. Resistance
R1-R4 10KΩ 4
R5 6.8KΩ 1
7. Push to ON Button - 1
4
Crystal Oscillator
5
Quartz has the further advantage that its elastic constants and its size change in such a way
that the frequency dependence on temperature can be very low. The specific characteristics
will depend on the mode of vibration and the angle at which the quartz is cut (relative to its
crystallographic axes). Therefore, the resonant frequency of the plate, which depends on its
size, will not change much, either. This means that a quartz clock, filter or oscillator will
remain accurate. For critical applications the quartz oscillator is mounted in a temperature-
controlled container, called a crystal oven, and can also be mounted on shock absorbers to
prevent perturbation by external mechanical vibrations.
Quartz timing crystals are manufactured for frequencies from a few tens of kilohertz to tens
of megahertz. More than two billion (2×109) crystals are manufactured annually. Most are
small devices for consumer devices such as wristwatches, clocks, radios, computers, and cell
phones. Quartz crystals are also found inside test and measurement equipment, such as
counters, signal generators, and oscilloscopes.
The crystal oscillator circuit sustains oscillation by taking a voltage signal from the quartz
resonator, amplifying it, and feeding it back to the resonator. The rate of expansion and
contraction of the quartz is the resonant frequency, and is determined by the cut and size of
the crystal. When the energy of the generated output frequencies matches the losses in the
circuit, an oscillation can be sustained.
A regular timing crystal contains two electrically conductive plates, with a slice or tuning
fork of quartz crystal sandwiched between them. During startup, the circuit around the crystal
applies a random noise AC signal to it, and purely by chance, a tiny fraction of the noise will
be at the resonant frequency of the crystal. The crystal will therefore start oscillating in
synchrony with that signal. As the oscillator amplifies the signals coming out of the crystal,
the signals in the crystal's frequency band will become stronger, eventually dominating the
output of the oscillator. Natural resistance in the circuit and in the quartz crystal filter out all
the unwanted frequencies.
The output frequency of a quartz oscillator can be either the fundamental resonance or a
multiple of the resonance, called an overtone frequency. High frequency crystals are often
designed to operate at third, fifth, or seventh overtones.
A major reason for the wide use of crystal oscillators is their high Q factor. A typical Q for a
quartz oscillator ranges from 104 to 106, compared to perhaps 102 for an LC oscillator. The
maximum Q for a high stability quartz oscillator can be estimated as Q = 1.6 × 107/f, where f
is the resonance frequency in megahertz.
One of the most important traits of quartz crystal oscillators is that they can exhibit very low
phase noise. In many oscillators, any spectral energy at the resonant frequency will be
amplified by the oscillator, resulting in a collection of tones at different phases. In a crystal
oscillator, the crystal mostly vibrates in one axis, therefore only one phase is dominant. This
property of low phase noise makes them particularly useful in telecommunications where
stable signals are needed, and in scientific equipment where very precise time references are
needed.
Environmental changes of temperature, humidity, pressure, and vibration can change the
resonant frequency of a quartz crystal, but there are several designs that reduce these
environmental effects. These include the TCXO, MCXO, and OCXO (defined below). These
designs (particularly the OCXO) often produce devices with excellent short-term stability.
6
The limitations in short-term stability are due mainly to noise from electronic components in
the oscillator circuits. Long term stability is limited by aging of the crystal.
Due to aging and environmental factors (such as temperature and vibration), it is difficult to
keep even the best quartz oscillators within one part in 10−10 of their nominal frequency
without constant adjustment. For this reason, atomic oscillators are used for applications
requiring better long-term stability and accuracy.
Although crystals can be fabricated for any desired resonant frequency, within technological
limits, in actual practice today engineers design crystal oscillator circuits around relatively
few standard frequencies, such as 3.58 MHz, 10 MHz, 14.318 MHz, 20 MHz, 33.33 MHz,
and 40 MHz. The vast popularity of the 3.58 MHz and 14.318 MHz crystals is attributed
initially to low cost resulting from economies of scale resulting from the popularity of
television and the fact that this frequency is involved in synchronizing to the color burst
signal necessary to display color on an NTSC or PAL based television set. Using frequency
dividers, frequency multipliers and phase locked loop circuits, it is practical to derive a wide
range of frequencies from one reference frequency.
Care must be taken to use only one crystal oscillator source when designing circuits to avoid
subtle failure modes of metastability in electronics. If this is not possible, the number of
distinct crystal oscillators, PLLs, and their associated clock domains should be rigorously
minimized, through techniques such as using a subdivision of an existing clock instead of a
new crystal source. Each new crystal source must be rigorously justified, since each one
introduces new, difficult-to-debug probabilistic failure modes, due to multiple crystal
interactions.
7
D.C. Geared Motor
An electric motor is a device using electrical energy to produce mechanical energy,
nearly always by the interaction of magnetic fields and current-carrying conductors. The
reverse process, that of using mechanical energy to produce electrical energy, is
accomplished by a generator or dynamo. Traction motors used on vehicles often perform both
tasks.
Electric motors are found in myriad uses such as industrial fans, blowers and pumps, machine
tools, household appliances, power tools, and computer disk drives, among many other
applications. Electric motors may be operated by direct current from a battery in a portable
device or motor vehicle, or from alternating current from a central electrical distribution grid.
The smallest motors may be found in electric wristwatches. Medium-size motors of highly
standardized dimensions and characteristics provide convenient mechanical power for
industrial uses. The very largest electric motors are used for propulsion of large ships, and for
such purposes as pipeline compressors, with ratings in the thousands of kilowatts. Electric
motors may be classified by the source of electric power, by their internal construction, and
by application.
The physical principle of production of mechanical force by the interaction of an electric
current and a magnetic field was known as early as 1821. Electric motors of increasing
efficiency were constructed throughout the 19th century, but commercial exploitation of
electric motors on a large scale required efficient electrical generators and electrical
distribution networks.
Geared dc motor is ideally suited to a wide range of applications requiring a combination of
low speed operation and small unit size. The integral iron core DC motor provides smooth
operation and a bidirectional variable speed capability while the gearhead utilizes a
multistage metal spur gear train rated for a working torque up to 0.2Nm. The unit, which is
suitable for mounting in any attitude, provides reliable operation over a wide ambient
temperature range and is equipped with an integral VDR (voltage dependant resistor)
electrical suppression system to minimize electrical interference.
The 1271 unit offers a range of gear ratio options for operating speeds from 5-200 rpm and is
ideally suited to applications where small size and low unit price are important design
criteria. The D.C. geared motor is used to drive the wheels of the robotic vehicle. In order to
move right one motor is stopped so that it steers in the other direction.
8
Features -
• 6 or 12Vdc operation
• Ratios from 10:1 to 392:1
• Rated torque up to 20Ncm
• 4mm Output shaft
• 45 rpm speed.
A DC geared motor works by converting electric power into mechanical work. This is
accomplished by forcing current through a coil and producing a magnetic field that spins the
motor. The simplest DC motor is a single coil apparatus, used here to discuss the DC motor
theory.
The voltage source forces voltage through the coil via sliding contacts or brushes that are
connected to the DC source. These brushes are found on the end of the coil wires and make a
temporary electrical connection with the voltage source. In this motor, the brushes will make
a connection every 180 degrees and current will then flow through the coil wires. At 0
degrees, the brushes are in contact with the voltage source and current is flowing. The current
that flows through wire segment C-D interacts with the magnetic field that is present and the
result is an upward force on the segment.
The current that flows through segment A-B has the same interaction, but the force is in the
downward direction. Both forces are of equal magnitude, but in opposing directions since the
direction of current flow in the segments is reversed with respect to the magnetic field. At
180 degrees, the same phenomenon occurs, but segment A-B is forced up and C-D is forced
down. At 90 and 270-degrees, the brushes are not in contact with the voltage source and no
force is produced. In these two positions, the rotational kinetic energy of the motor keeps it
spinning until the brushes regain contact.
One drawback to the motor is the large amount of torque ripple that it has. The reason for this
excessive ripple is because of the fact that the coil has a force pushing on it only at the 90 and
270 degree positions. The rest of the time the coil spins on its own and the torque drops to
zero. The torque curve produced by this single coil, as more coils are added to the motor, the
torque curve is smoothed out.
9
The resulting torque curve never reaches the zero point and the average torque for the motor
is greatly increased. As more and more coils are added, the torque curve approaches a straight
line and has very little torque ripple and the motor runs much more smoothly. Another
method of increasing the torque and rotational speed of the motor is to increase the current
supplied to the coils. This is accomplished by increasing the voltage that is sent to the motor,
thus increasing the current at the same time.
10
Step Down Transformer
A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled electrical conductors. A changing current in the first circuit (the
primary) creates a changing magnetic field. This changing magnetic field induces a changing
voltage in the second circuit (the secondary). This effect is called mutual induction.
If a load is connected to the secondary circuit, electric charge will flow in the secondary
winding of the transformer and transfer energy from the primary circuit to the load connected
in the secondary circuit.
The secondary induced voltage (VS), of an ideal transformer, is scaled from the primary
voltage (VP) by a factor equal to the ratio of the number of turns of wire in their respective
windings:
11
An ideal step-down transformer showing magnetic flux in the core
A simplified transformer design is shown. A current passing through the primary coil creates
a magnetic field. The primary and secondary coils are wrapped around a core of very high
magneti permeability, such as iron; this ensures that most of the magnetic field lines
produced by the primary current are within the iron and pass through the secondary coil as
well as the primary coil.
Induction law
The voltage induced across the secondary coil may be calculated from Faraday's law of
induction, which states that:
where VS is the instantaneous voltage, NS is the number of turns in the secondary coil and Φ
equals the magnetic flux through one turn of the coil. If the turns of the coil are oriented
perpendicular to the magnetic field lines, the flux is the product of the magnetic field strength
B and the area A through which it cuts. The area is constant, being equal to the cross-sectional
area of the transformer core, whereas the magnetic field varies with time according to the
excitation of the primary.
12
Since the same magnetic flux passes through both the primary and secondary coils in an ideal
transformer, the instantaneous voltage across the primary winding equals
Taking the ratio of the two equations for VS and VP gives the basic equation for stepping up or
stepping down the voltage
13
Pincoming = IPVP = Poutgoing = ISVS
If the voltage is increased (stepped up) (VS > VP), then the current is decreased (stepped
down) (IS < IP) by the same factor. Transformers are efficient so this formula is a reasonable
approximation.
The impedance in one circuit is transformed by the square of the turns ratio. For example, if
an impedance ZS is attached across the terminals of the secondary coil, it appears to the
14
Diodes(IN4007)
Most modern diodes are based on semiconductor p-n junctions. In a p-n diode,
conventional current can flow from the p-type side (the anode) to the n-type side (the
cathode), but cannot flow in the opposite direction. Another type of semiconductor diode, the
Schottky diode, is formed from the contact between a metal and a semiconductor rather than
by a p-n junction.
Current–voltage characteristic
15
If an external voltage is placed across the diode with the same polarity as the built-in
potential, the depletion zone continues to act as an insulator, preventing any significant
electric current flow. This is the reverse bias phenomenon. However, if the polarity of the
external voltage opposes the built-in potential, recombination can once again proceed,
resulting in substantial electric current through the p-n junction. For silicon diodes, the built-
in potential is approximately 0.6 V. Thus, if an external current is passed through the diode,
about 0.6 V will be developed across the diode such that the P-doped region is positive with
respect to the N-doped region and the diode is said to be "turned on" as it has a forward bas.
16
following the end of forward conduction in any diode, there is reverse current for a short
time. The device does not attain its full blocking capability until the reverse current ceases.
The second region, at reverse biases more positive than the PIV, has only a very small reverse
saturation current. In the reverse bias region for a normal P-N rectifier diode, the current
through the device is very low (in the µA range).
The third region is forward but small bias, where only a small forward current is conducted.
As the potential difference is increased above an arbitrarily defined "cut-in voltage" or "on-
voltage" or "diode forward voltage drop (Vd)", the diode current becomes appreciable (the
level of current considered "appreciable" and the value of cut-in voltage depends on the
application), and the diode presents a very low resistance.
The current–voltage curve is exponential. In a normal silicon diode at rated currents, the
arbitrary "cut-in" voltage is defined as 0.6 to 0.7 volts. The value is different for other diode
types — Schottky diodes can be as low as 0.2 V and red light-emitting diodes (LEDs) can be
1.4 V or more and blue LEDs can be up to 4.0 V.
17
Capacitor
For an ideal parallel plate capacitor with a plate area and a plate separation :
In SI units, a capacitor has a capacitance of one farad when one coulomb of charge stored on
each plate causes a voltage difference of one volt between its plates. Since the farad is a very
large unit, capacitance is usually expressed in microfarads (µF), nanofarads (nF), or
picofarads (pF). In general, capacitance is greater in devices with large plate areas, separated
by small distances. When a dielectric is present between two charged plates, its molecules
become polarized and reduce the internal electric field and hence the voltage. This allows the
capacitor to store more charge for a given voltage, so a dielectric increases the capacitance of
a capacitor, by an amount given by the dielectric constant , of the material.
18
Capacitor and DC Voltage:
When a DC voltage source is applied to a capacitor there is an initial surge of current, when
the voltage across the terminals of the capacitor is equal to the applied voltage, the current
flow stops. When the current stops flowing from the power supply to the capacitor, the
capacitor is 'charged'. If the DC source is removed from the capacitor, the capacitor will
retain a voltage across its terminals (it will remain charged). The capacitor can be discharged
by touching the capacitor's external leads together. When using very large capacitors (1/2
farad or more) in your car, the capacitor partially discharges into the amplifier's power supply
when the voltage from the alternator or battery starts to fall. Keep in mind that the discharge
is only for a fraction of a second. The capacitor can not act like a battery. It only serves to fill
in what would otherwise be very small dips in the supply voltage.
Generally, if an AC voltage source is connected to a capacitor, the current will flow through
the capacitor until the source is removed. There are exceptions to this situation and the A.C.
current flow through any capacitor is dependent on the frequency of the applied A.C. signal
and the value of the capacitor.
Leakage:
Even though a capacitor's plates are insulated from each other, there is a small amount of
'leakage' current between its plates. This current is generally insignificant but will cause a
capacitor to slowly discharge with no external circuit path between the capacitor's leads.
TYPES
Film Capacitors:
Many low value capacitors (less than 1 microfarad) will have a plastic type of insulator
(polyethylene, polypropylene...) between the plates. Sometimes the plates are actually a
metallized layer bonded onto one side of the plastic material. Multiple layers of the metalized
plastic material make up the capacitor. Adding layers or increasing the size of the layers
(without increasing the thickness of the layers) will increase capacitance.
Electrolytic Capacitors:
Electrolytic caps are more complex than film capacitors and are generally used for larger
capacitance values (0.47 microfarad and higher). The electrolytic capacitor generally consists
of 2 layers of aluminum foil with a layer of paper material between the plates.
19
Resistors
The resistor's function is to reduce the flow of electric current. The symbol is used to
indicate a resistor in a circuit diagram, known as a schematic. Resistance value is designated
in units called the "Ohm(Ω).
Resistors are characterized primarily by their resistance and the power they can dissipate.
Other characteristics include temperature coefficient, noise, and inductance. Practical
resistors can be made of resistive wire, and various compounds and films, and they can be
integrated into hybrid and printed circuits.
Size, and position of leads are relevant to equipment designers; resistors must be physically
large enough not to overheat when dissipating their power. Variable resistors, adjustable by
changing the position of a tapping on the resistive element, and resistors with a movable tap
("potentiometers"), either adjustable by the user of equipment or contained within, are also
used.
The resistance value of the resistor is not the only thing to consider when selecting a resistor
for use in a circuit. The "tolerance" and the electric power ratings of the resistor are also
important.
The tolerance of a resistor denotes how close it is to the actual rated resistence value.
The maximum rated power of the resistor is specified in Watts.
20
Classifications:
A fixed resistor is one in which the value of its resistance cannot change. And therefore a
variable resistor is one the value of which can be changed according to need.
Most general purpose, cheap resistor.Usually the tolerance of the resistance value is ±5%.
Power ratings of 1/8W, 1/4W and 1/2W are frequently used.
Carbon film resistors have a disadvantage; they tend to be electrically noisy. Metal film
resistors are recommended for use in analog circuits.
Metal film resistors are used when a higher tolerance (more accurate value) is needed. They
are much more accurate in value than carbon film resistors. They have about ±0.05%
tolerance. They have about ±0.05% tolerance. I don't use any high tolerance resistors in my
circuits. Resistors that are about ±1% are more than sufficient. Ni-Cr (Nichrome) seems to be
used for the material of resistor. The metal film resistor is used for bridge circuits, filter
circuits, and low-noise analog signal circuits.
21
Resistor Colour Coding
Most axial resistors use a pattern of colored stripes to indicate resistance. Surface-mount resistors
are marked numerically. Cases are usually tan, brown, blue, or green, though other colors are
occasionally found such as dark red or dark gray.
The value of a resistor can be measured with an ohmmeter, which may be one function of a
multimeter.
22
Push to ON button
23
Microcontroller AT89C2051
The AT89C2051 provides the following standard features: 2K bytes of Flash, 128
bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt
architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator and
clock circuitry. In addition, the AT89C2051 is designed with static logic for opera-tion down
to zero frequency and supports two software selectable power saving modes.
The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and
interrupt system to continue functioning. The power-down mode saves the RAM contents but
freezes the oscillator disabling all other chip functions until the next hardware reset.
Features
24
Pin Configuration
25
Block Diagram
26
PIN Description
1) VCC - Supply voltage.
2) GND - Ground.
3) Port 1 - The Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 to P1.7 provide
internal pull-ups. 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 out-put buffers can sink 20 mA 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.
4) Port 3 - Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/O pins 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 gen-eral-purpose I/O pin. The Port 3 output buffers can sink 20 mA. When 1s
are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as
inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL)
because of the pull-ups. Port 3 also serves the functions of various special features of the
AT89C2051 as listed below:
27
5) 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. Each
machine cycle takes 12 oscillator or clock cycles.
6) XTAL1 - Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.
28
Flash Programming Modes
29
2. I.C. L293D
The L293D is a high voltage, high current four channel driver designed to accept
standard TTL logic levels and drive inductive loads (such as relays solenoids, DC and
stepping motors) and switching power transistors. The L293D is suitable for use in switching
applications at frequencies up to 5 KHz.
Features
• 600 mA Output Current Capability Per Driver
• Pulsed Current 1.2 A / Driver
• Wide Supply Voltage Range: 4.5 V to 36 V
• Separate Input-Logic Supply
• NE Package Designed for Heat Sinking
• Thermal Shutdown & Internal ESD Protection
• High-Noise-Immunity Inputs
30
PIN Diagram
31
Block Diagram
32
Truth Table and Switching Time Graph.
33
3. I.C. 7805
The 7805 I.C. is a three-terminal positive regulator I.C. available in the TO-220/D-
PAK package and with fixed output voltage of 5V., making them useful in a wide range of
applications. It employs internal current limiting, thermal shut down and safe operating area
protection, making it essentially indestructible. If adequate heat sinking is provided, they can
deliver over 1A output current. Although designed primarily as fixed voltage regulators, these
devices can be used with external components to obtain adjustable voltages and currents.
Features
34
Absolute Maximum Ratings
35
Electrical Characteristics
36
LM324
The LM324 series are low−cost, quad operational amplifiers with true differential inputs.
They have several distinct advantages over standard operational amplifier types in single
supply applications. The quad amplifier can operate at supply voltages as low as 3.0 V or as
high as 32 V with quiescent currents about one−fifth of those associated with the MC1741
(on a per amplifier basis).
The common mode input range includes the negative supply, thereby eliminating the
necessity for external biasing components in many applications. The output voltage range
also includes the negative power supply voltage.
Features
37
Characteristics
• In the linear mode the input common-mode voltage range includes ground and the
output voltage can also swing to ground, even though operated from only a single
power supply voltage
• The unity gain cross frequency is temperature compensated
• The input bias current is also temperature compensated.
Pin diagram
38
The LM124 series are op amps which operate with only a single power supply voltage, have
true-differential inputs, and remain in the linear mode with an input common-mode voltage of
0 VDC. These amplifiers operate over a wide range of power supply voltage with little
change in performance characteristics.
At 25°C amplifier operation is possible down to a minimum supply voltage of 2.3 VDC. The
pinouts of the package have been designed to simplify PC board layouts. Inverting inputs are
adjacent to outputs for all of the amplifiers and the outputs have also been placed at the
corners of the package (pins 1, 7, 8, and 14).
Precautions should be taken to insure that the power supply for the integrated circuit never
becomes reversed in polarity or that the unit is not inadvertently installed backwards in a test
socket as an unlimited current surge through the resulting forward diode within the IC could
cause fusing of the internal conductors and result in a destroyed unit.
Large differential input voltages can be easily accommodated and, as input differential
voltage protection diodes are not needed, no large input currents result from large differential
input voltages. The differential input voltage may be larger than V+ without damaging the
device. Protection should be provided to prevent the input voltages from going negative more
than −0.3 VDC (at 25°C). An input clamp diode with a resistor to the IC input terminal can
be used. To reduce the power supply drain, the amplifiers have a class A output stage for
small signal levels which converts to class B in a large signal mode.
39
This allows the amplifiers to both source and sink large output currents. Therefore both NPN
and PNP external current boost transistors can be used to extend the power capability of the
basic amplifiers. The output voltage needs to raise approximately 1 diode drop above ground
to bias the on-chip vertical PNP transistor for output current sinking applications. For ac
applications, where the load is capacitively coupled to the output of the amplifier, a resistor
should be used, from the output of the amplifier to ground to increase the class A bias current
and prevent crossover distortion.
40
Circuit Diagram
Power Supply
41
Transmitter
42
Receiver
43
Construction
For the construction of the Maze Robot, we firstly design the circuit in appropriate
software such as Multisim. The multisim software is a great tool for rapid designing of a
circuit (schematic entry and simulation). The Placement and wiring technology in the
software speeds development. Thus, we used Multisim software to design the circuit for the
Robotic vehicle. Through this designed circuit we obtained the PCB Layout of the circuit
using a counterpart software of Multisim viz. Ultiboard. The Ultiboard software is used to
obtain the PCB Layout of the circuit designed in the Multisim software.
Now, we write the coding of the device. The coding thus written is checked and tested
virtually using another simulator software. But the simulator used here is for the simulation
of coding while Multisim is the simulator used for the hardware of the device. The simulator
software that we used for the purpose of simulation of coding is EDSIM51. In EDSIM51
there is a Assembly Code Panel in which the assembly language codes are written of the
program to be used. Then these codes are run and tested for the errors, if any.
This tested coding is ready to be burnt in the Microcontroller. For this purpose, we use
Universal Burner or programmer for microcontrollers. For the burning of the program in the
microcontroller, firstly we use an editor to type in the program. The editor must be able to
produce an ASCII file. The source file has the extension "asm" or "src", depending on the
assembler used. The asm source file containing the program code is fed to the assembler,
which converts the instructions into machine code. The assembler will produce an object file
and a list file. The extension for the object file is "obj" while the extension for the list file is
"lst". Assemblers then require linking.
The link program takes one or more object files and produces an absolute object file with the
extension "abs”. The "abs" file is fed into a program called "OH" (object to hex converter),
which creates a file with extension "hex" that is ready to burn into ROM using burners.
Burners are the hardware that programs/writes/burns the pogram into the chip. It comes with
it's own software to download stuff onto the chip. Now the Microcontroller chip is removed
from the burner.
Now we take the printout of the already generated PCB Layout in order to impose the
pattern on the PCB. PCB, is used to mechanically support and electrically connect electronic
components using conductive pathways, or traces, etched from copper sheets laminated onto
a non-conductive substrate. Thus, after obtaining the printout of the PCB Layout, we draw
the exact patterns as in the printout on the zero PCB.
The patterns are drawn using a good quality marker so that when the etching is done the
pattern doesn’t get hindered. The PCBs are mostly used for the purpose because they are
rugged, inexpensive and highly reliable. So the exact pattern as obtained in the printout is
drawn on the PCB.
44
After the layout being designed on the PCB, we dip it in a solution of Water and
FeCL3. Where the copper at the places where the pattern is not drawn using marker is peeled
of because of the reaction occurring between the copper of the PCB and the solution. Only
the patterns that were made, remains.
This is due to the fact that the patterns marked using marker are resistive in nature, due to
which the solution does not react with the copper contained inside the marked patterns. And
thus the copper etching is done serving the purpose of connection wires on the PCB.
Now, the drills are done at the points where the components such as ICs etc. are to be
mounted and soldered. Holes through a PCB are typically drilled with tiny drill bits made of
solid tungsten carbide. The drilling is performed by automated drilling machines with
placement controlled by a drill tape or drill file.
These computer-generated files are also called numerically controlled drill (NCD) files or
"Excellon files". The drill file describes the location and size of each drilled hole. These holes
are often filled with annular rings to create vias. Vias allow the electrical and thermal
connection of conductors on opposite sides of the PCB.
Finally, the components are mounted on the other side of the PCB i.e. the side other
than the patterned side and then soldered carefully using solder machine. Placement of
components on both sides of the board allows much higher circuit densities.
45
PCB Layout
46
Copper Bottom of Power Supply System
47
Copper Bottom of Maze robot
48
Silk screen top of maze robot
49
Working
First of all, the microcontroller AT89C2051 is loaded or programmed with the coding
using a universal burner. The programming contains the specifications of each type of
movement that vehicle is going to exhibit. Now when the power supply is switched on i.e.
230V comes to the power supply circuit, it firstly gets converted to 12V using a Step Down
transformer. The step down transformer consists of less secondary windings as compared to
primary windings, which is essential for the step down process.
This 12V voltage is now rectified i.e. converted from alternating current. to direct current
using Bridge Rectifiers. A bridge rectifier makes use of four diodes in a bridge arrangement
to achieve full-wave rectification. A bridge rectifier consists of 4 diodes arranged in a bridge
arrangement, for one half cycle, 2 diodes operate and for the other half cycle another 2 diodes
operate, thus full wave rectification is achieved.
Now this rectified supply is the passed through the capacitor to make it ripple free. The
capacitor stops all the ripples coming alongwith the signal and makes it completely d.c. From
this phase we get a ripple free 12V supply.
In our circuit a power supply of 5V is also needed at many places. Thus, in order to
have a power supply of 5V, we use voltage regulator I.C. 7805. I.C. 7805 limits the power to
+5V.Thus the 12V signal coming is directly fed to the I.C. 7805 which limits the power to
+5V.
When this 5V is applied to the vcc. Pin situated at the pin 20 of the microcontroller, it
gets reset. A crystal Oscillator of 12MHz. frequency is used to drive the microcontroller. Pin
10 of the microcontroller is grounded, while the pins 11,12,13,14 are connected to the I.C.
L293D, which is a high voltage, high current, four channel driver I.C. designed to accept
standard DTL or TTL logic levels and drive inductive loads and switching power transistors.
The pin 11 of the microcontroller is of port3, while the other pins 12,13,14 are the pins of
port1. The microcontroller sends the instructions to the H-Bridge to drive the motor
connected with it.
Two D.C. geared motors are connected with the driver I.C. One motor is connected at
pins 3 and 6, while the other is connected at pins 11 and 14 of the driver I.C. The pins vss,
chip enable1 and vcc are fed 12V supply. The pin11 of the microcontroller is connected to
the pin7 that is the input2 pin of the driver I.C.
The pin 12 of microcontroller is connected to the pin2 that is input1 pin of the I.C. The pin
13 is connected to the pin 15 of the driver which is the input 4 pin and the pin14 is connected
to the pin 10 which is the input 3 pin of the driver.
50
When the signals are received to the driver I.C. from the microcontroller it starts working
according to the instructions fed by the microcontroller and thus the motor starts running
which in turn causes the wheels to move in the desired direction. The instructions are given in
the following manner:
• When pin 11 i.e. the pin P3.7 is high, the instructions given to the driver I.C. is of
moving in forward direction.
• When pin 12 i.e. the pin P1.0 is fed high the instructions given is to move in the
backward direction.
• Now an interrupt is given which is the instruction to stop the left motor so that only
right motor works and due to this reason the vehicle steers in right direction.
• When pin 13 i.e. the pin P1.1 is fed high the instruction given is to move in forward
direction but this time the movement is in the right direction with respect to the above
forward movement.
• Now when pin 14 i.e. the pin P1.2 is fed high the instruction given is to move in
backward direction.
• Now an interrupt is given which is the instruction to stop the right motor so that only
left motor works due to which the vehicle steers in left direction.
• When pin 13 i.e. the pin P1.1 is fed high the instruction given is to move in forward
direction but this time the movement is in the left direction with respect to the above
forward movement.
• When pin 14 i.e. the pin P1.2 is fed high the instruction given is to move in backward
direction.
51
The time delay between each movement is set at 1 sec. the cycle of the above described
movement continues until the power is switched off.
This was the basic working of how the maze robot will actually move. Now comes the most
important thing, i.e. to change the position as and when any obstacle occurs.
The infrared transmitter of the robot keeps on sending signal in the forward direction and
when any obstacle occurs the receiver sends the signals to the microcontroller AT89C2051.
The microcontroller then sends the signals to the driver ic LM293D, to which the two dc
geared motors are connected.
The driver ic sends the signal to one of the motors to stop working so that the robot
automatically turns either right or left whichever is the appropriate direction. And if there is
no way in left or right then the vehicle moves backwards. In this way the purpose of the maze
robot is served.
52
Block Diagram
230V
Supply
Rectifier
I.C.
I.C. 7805
L293D
D.C.
Microcontroller
Geared
AT89C2051
Motors
Transmitter Receiver
53
Coding
$ Mod 51
Var equ 0
Var equ 1
Var equ 2
Org 00H
Forward:
Set b P3.7
Clr P1.0
Set b P1.1
Clr P1.2
LCALL TTO
Backward:
Clr P3.7
Set b P1.0
Clr P1.1
Set b P1.2
LCALL TTO
54
Left:
Clr P3.7
Clr P1.0
Setb P1.1
Clr P1.2
LCALL TTO
Right:
Set b P3.7
Clr P1.0
Clr P1.1
Clr P1.2
LCALL TTO
TTO:
MOV Var 3, # 8
MOV Var 2, # 161
MOV Var 1, # 115
55
TT1:
RET
56
Picture of the Maze Robot
57
Picture of a Maze
58
Conclusion
This device forms a sub-section to a lot other bigger and more useful applications
where a robot is needed to move. This forms a lot of industrial applications. Controlling the
movement of a robot is necessary for almost all type of robots, thus the device serves as a
basic necessity accomplished while designing any high level robots. The device also has
precise control, fast processing, reduced error rate and the most important being cost-
effective.
In this project we have created simple controls for the movement of the robot. The
instructions are already loaded into the microcontroller using universal burner are fed to the
driver I.C. which is connected to the motors that starts rotating on the reception of the signal.
Interfacing electrical and electronic circuits with the microcontroller gives lots of
advantages and scope for extended as well as extension purposes. Using this technique we
can design a circuit for the higher level robots too. Even the usage of different simulators as
well as emulators gave us a lot of knowledge about the working of the embedded system
devices.
In a nutshell, it may be said that this project can be used very well else where i.e. in
other applications and lays the basic foundation for interfacing external circuits using the
microcontroller.
59
References
The 8051 Microcontroller and Embedded Systems, Muhammad Ali Mazidi, Rolin D.
McKinley, Edition 2004, Page No. 34-71.
60