Upload
manish-goyal
View
45
Download
0
Tags:
Embed Size (px)
DESCRIPTION
line follower algorithm
Citation preview
2
The L-293D is quadruple high-current half-H drivers. The L-293D is mainframe to provide
bidirectional drive currents of up 600mA at voltages from 4.5V to 36V. Both devices are designs to
drive inductive load such as relays, solenoids, DC and bipolar servo motor. For examples as an L-293D
is used for power supply both servo motor operated.
Programmable Interface Controller (PIC) Microcontroller is a computer control system on a
single chip. It has many electronic built into it, which can decode written instructions and convert it to
electrical signals. For example like PIC16F84 used for control machine type signal receiver and
operated in specified action when the signal received.
In the end of this project, the line follower robot should be able to drive autonomously to finish
the whole route without any control by human being.
3
METHODOLOGY
A. Introduction Assembly Component
We need combining a lot of circuits to make a line follower robot; infrared sensor is control for
direction turning, LM7805 voltage regulator to convert a constant 5V output from high voltage,
Quadruple Half-H driver L-293D connect to power supply both of the servo motor and etc. The below
is shown what the function of all the components we have been using during the experiment.
1. Electronics Components
1.1. LM7805 Voltage Regulator
The LM7805 voltage regulators of three terminal positive regulators are available in the
TO-220 package and with several fixed output voltage, making them useful in a wide range
of application. Each type employs internal current limiting, thermal shut down and safe
operating area protection, making it essentially indestructible. Figure 1.1a is proving the
graphical diagram of LM7805 voltage regulator. Figure 1.1b is proving the schematic
diagram of LM7805 voltage regulator.
4
Figure 1.1a: The graphical diagram of
LM7805 voltage regulator.
Figure 1.1b: The schematic diagram of
LM7805 voltage regulator.
1.2. Infrared Sensor (IR Sensor)
An infrared sensor is an electronic device that transmitter (white) and receiver (black)
infrared radiation in order to sense some aspect of its surroundings. Infrared sensors can
measure the heat of an object, as well as detect motion. The function of infrared sensor in
the robot is corrected move on the route when the routes are curved. Figure 1.2a is showing
graphical diagram of infrared sensor; figure 1.2b is showing schematic diagram of infrared
sensor.
Figure 1.2a: The graphical diagram of
infrared sensor.
Figure 1.2b: The schematic diagram of
infrared sensor.
5
1.3. Capacitors
Capacitors store electric change. They are used to smooth varying DC power supplies by
acting as a reservoir of charge. Basically, capacitors easily pass AC (changing) signals but
they block DC (constant) signals. There have three type capacitor are Polarized Capacitors,
Unpolarized Capacitors and Variable Capacitors.
Polarized Capacitors are polarize and must be connected in the correct way, because a leads
have separated two part are „‟+‟‟ and „‟-„‟. The voltage rating of polarized capacitors can
supply minimum 25V, to supply large values and up to 1µF ++. Figure 1.3a is showing the
graphical diagram of Polarized Capacitors; figure 1.3b is showing the schematic diagram of
Polarized Capacitors.
Figure 1.3a: The graphical diagram of
Polarized Capacitors.
Figure 1.3b: The schematic diagram of
Polarized Capacitors.
Unpolarized Capacitors is small value capacitors and connected either way round. But it has
high voltage ratings of at least 50V, usually 250V or so, to supply small value and up to 1µF
only. Figure 1.3c is showing the graphical diagram of Unpolarized Capacitors; figure 1.3d is
showing the schematic diagram of Unpolarized Capacitors.
6
Figure 1.3c: The graphical diagram of
Unpolarized Capacitors.
Figure 1.3d: The schematic diagram of
Unpolarized Capacitors.
Variable capacitors are mostly used in radio tuning circuit. It has very small capacitance
values, generally between 100pF and 500pF. The type illustrated usually has trimmers built
in as well as the main variable capacitor. . Figure 1.3e is showing the graphical diagram of
Variable Capacitors; figure 1.3f is showing the schematic diagram of Variable Capacitors.
Figure 1.3e: The graphical diagram of
Variable Capacitors.
Figure 1.3f: The schematic diagram of
Variable Capacitors.
7
1.4. Diode
Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol show
the direction in which the current can flow. Besides that, diode must be connected the
correct way round, the diagram may be labeled either + for anode and k or – for cathode.
Figure 1.4a is showing the graphical diagram of diode; figure 1.4b is showing the schematic
diagram of diode.
Figure 1.4a: The graphical diagram of
diode.
Figure 1.4b: The schematic diagram of diode.
Zener diodes also one of the diode and used to maintain a fixed voltage. They are designed
to “breakdown” in a reliable and non-destructive way so that they can be used in reverse to
maintain a fixed voltage across their terminal. Figure 1.4c is showing the graphical diagram
of zener diode; figure 1.4d is showing the schematic diagram of zener diode.
Figure 1.4c: The graphical diagram of
zener diode.
Figure 1.4d: The schematic diagram of
zener diode.
8
1.5. Light Emitting Diodes (LEDs)
LED when an electric current flow through them. LED is same as diode‟s connection. The
application of LED is indicating what frequency signal transmit out. . Figure 1.5a is
showing the graphical diagram of LED; figure 1.5b is showing the schematic diagram of
LED.
Figure 1.5a: The graphical diagram of
LED.
Figure 1.5b: The schematic diagram of
LED.
1.6. Relays
A relay is an electrically operated switch. Current flowing through the coil of the relay
creates a magnetic field which attracts a lever and changes the switch contact. There are two
type of contact, normally close (NC) and normally open (NO). Used the relay to switch on
the directional signal LED for specified turn left or turn right of line follower robot. Figure
1.6a is showing the graphical diagram of relays; figure 1.6b is showing the schematic
diagram of relays.
Figure 1.6a: The graphical diagram of
relays.
Figure 1.6b: The schematic diagram of
relays.
9
1.7. Resistors
Resistors restrict the flow of electric current, for example a resistor is places in series with a
light-emitting diode (LED) to limit the current flowing through the LED. In addition,
resistor values are normally shown using color bands. The following below is a table of
each colour represents a number.
The Resistor Colour
Code
Colour Number
Black 0
Brown 1
Red 2
Orange 3
Yellow 4
Green 5
Blue 6
Violet 7
Grey 8
White 9
Figure 1.7a is showing the graphical diagram of resistors; figure 1.7b is showing the schematic
diagram of resistors.
Figure 1.7a: The graphical diagram of
resistors.
Figure 1.7b: The schematic diagram of
resistors.
10
1.8. Variable Resistors
Variable resistors consist of a resistance track with connect at both ends and a wiper which
moves along the track as you turn the spindle. The track may be made from carbon, ceramic
and metal mixture or a coil of wire. The Figure 1.8a is a terminal diagram of variable
resistors. Besides that, variable resistors have separated two type are potentiometer and
preset variable resistors.
Figure 1.8a: Terminal diagram of
variable resistors.
The potentiometer and preset variable resistors have all three terminals connected.
However, presets are much cheaper than potentiometer so we are used this preset in our
project. Figure 1.8b is showing the graphical diagram type of variable resistors; figure
1.8c is showing the schematic diagram type of variable resistors.
Figure 1.8b: The graphical diagram type of
variable resistors.
Figure 1.8c: The schematic diagram type of
variable resistors.
11
1.9. Transistor
Transistors amplify current, for example like can be used to amplify the small output current
from a logic IC so that it can operate a lamp, relay or other high current devices. In addition,
the transistors can be used as a switch and as an amplifier. There are two types of standard
transistor, NPN and PNP, with different circuit symbols. The NPN transistor is the easiest
type to produce from silicon. The transistors have three leads are labeled base (B), collector
(C) and emitter (E). Figure 1.9a is showing the graphical diagram type of transistor; figure
1.9b is showing the schematic diagram type of transistor.
Figure 1.9a: The graphical diagram type of
transistor.
Figure 1.9b: The schematic diagram type of
transistor.
1.10. Switches
In electronics, a switch is an electrical component that can terminate an electrical, stop the
current or contact with one conductor to another. There are much type of switch like SPST
(single pole, single throw) switch, SPDT (single pole, double throw) switch, DPST (double
pole, single throw) switch, DPDT (double pole, double throw), Push-button switch and etc.
Line follower robot have used two types of switches, there are SPDT switch and Push-
button switch.
The SPDT Switch can be on in both positions, switching on a separate device in each case.
It is often called changeover switch. We are used this switch to contact with the battery
12
9.6V and 6.5V. Figure 1.10a is showing the graphical diagram of SPDT Switch; figure
1.10b is showing the schematic diagram of SPDT Switch.
Figure 1.10a: The graphical diagram of
SPDT Switch.
Figure 1.10b: The schematic diagram of
SPDT Switch.
A push-button switch is a simple switch mechanism for controlling some aspect of a
machine or a process. We use the push-button to control line follower robot on remote
control circuit. Figure 1.10c is showing the graphical diagram of Push-button Switch; figure
1.10d is showing the schematic diagram of Push-button Switch.
Figure 1.10c: The graphical diagram of
Push-button Switch.
Figure 1.10d: The schematic diagram of
Push-button Switch.
1.11. Crystal Oscillator
A crystal oscillator is an electronic that uses the mechanical resonance of a vibrating crystal
of piezoelectric material to create an electrical signal with a very accuracy frequency.
Figure 1.11a is showing the graphical diagram of crystal oscillator; figure 1.11b is showing
the schematic diagram of crystal oscillator.
13
Figure 1.11a: The graphical diagram of
crystal oscillator.
Figure 1.11b: The schematic diagram of
crystal oscillator.
1.12. LED Arrow Display
LED Arrow Display is used to indicate direction of turning in the line follower robot (I-Car).
Figure 1.12a is showing the graphical diagram of LED Arrow Display.
Figure 1.12a: The graphical diagram of LED
Arrow Display.
2. Integrated Circuits (IC)
2.1. LM393 Dual Differential Comparator
LM393 consist of two independent voltage comparators designed to operate from a single
power supply over a wide voltage range. There are two inputs, labelled inverting and non-
inverting because of the phase relation of the input and output signals. So we used inverting
amplifier connected with infrared sensor. When non- detect object the infrared sensor the
14
input is 1 (high) then inverting the signal of infrared sensor become 0 (low); the input is 0
(low) when the infrared sensor is touched, the voltage regulator will invert the signal
become 1 (high). Operation from split power is also possible and the low power supply
current drain is in dependent of the magnitude of the power supply voltage. The LM393
series is available in standard DIP-8, SOP-8 and TSSOP-8 packages. Figure 2.1a is showing
LM393 series standard‟s graphical diagram. Figure 2.1b is showing schematic diagram of
LM393.
2.2. 74LS04 Hex Inverters
74LS04 hex inverter is a device contains six independent
positive inverters. Pins 14 and 7 provide power for all six
logic gates. Inverter is a logic gate which operated logical
negation. The truth table is shown on the left. The 7404 is
an inverting buffer, especially useful when the output of
one circuit cannot sink much current. Used this logic gate is getting signal from LM393
Figure 2.1a: The LM393 series
standard‟s graphical diagram.
Figure 2.1b: The schematic diagram of
LM393
Input Output
0 1
1 0
0 = low, 1 = high
15
Dual Differential Comparator then transfer to Quadruple Half-H driver L-293D to make the
servo changed direction when touched the infrared sensor. Figures 2.2a is showing
graphical diagram of 74LS04 Hex Inverters; figure 2.2b is showing schematic diagram of
74LS04 Hex Inverters.
Figure 2.2a: The graphical diagram
of 74LS04 Hex inverters.
Figure 2.2b: The schematic diagram of
74LS04 Hex Inverters.
2.3. Quadruple Half-H driver L-293D
The L-293D is quadruple high-current half-H drivers. The L-293D is designed to provide
bidirectional drive current of up to 600-mA at voltages from 4.5V to 36V. Both devices are
designed to drive inductive loads such as relays, solenoids, DC and bipolar servo motor, as
well as other high-current/high-voltage loads in positive supply applications. If want to
drive 1 and 2 channels, the 1,2EN must enabled by 5V or OV. In same driver, want to drive
3 and 4 channels, make sure the 3,4EN have been enabled. This device is enabled in pairs.
Figure 2.3a is showing graphical diagram of Quadruple Half-H driver L-293D; figure 2.3b
is showing schematic diagram of Quadruple Half-H driver L-293D.
16
Figure 2.3a: The graphical diagram of
Quadruple Half-H driver L-293D.
Figure 2.3b: The schematic diagram of
Quadruple Half-H driver L-293D.
2.4. Multiplexer IC PT2262
PT2262 is a remote control encoder paired with PT2272. It encodes data and address pins
into a serial coded waveform suitable for RF or IR modulation. PT2262 has a maximum of
12 bits of tri-state address pins providing up to 312
address codes. PT2262 is a transmitter
for sent signal to receiver PT2272. Figure 2.4a is showing the graphical diagram of
Multiplexer IC PT2262; figure 2.4b is showing the schematic diagram of De-Multiplexer IC
PT2262.
Figure 2.4a: The graphical diagram of
De-Multiplexer IC PT2262.
Figure 2.4b: The schematic diagram of De-
Multiplexer IC PT2262.
17
2.5. De-Multiplexer PT2272
PT2272 is a remote control decoder paired with PT2262. It has 12-bit of tri-state address
pins providing a maximum of 312 address codes. PT2272 is available in several options to
suitable each application need; variable number of data output pins, latch or momentary
output type. Figure 2.5a is showing the graphical diagram of De-Multiplexer IC PT2272;
figure 2.5b is showing the schematic diagram of De-Multiplexer IC PT2272.
Figure 2.5a: The graphical diagram of De-
Multiplexer IC PT2272.
Figure 2.5b: The schematic diagram of De-
Multiplexer IC PT2272.
2.6. PIC16F84A Microcontroller
A microcontroller is a computer control system on a single chip. It has many electronic
circuits built into it, which can decode written instructions and convert them to electrical
signal. The microcontroller will then step through these instructions and execute them one
by one. PIC16F84A Microcontroller is one of PIC microcontroller used into our project, it
has 18 pins to control system and provided 64-bytes of data EEPROM memory have the
address range 0h-3Fh.
The PIC16F84A can operate at up to 20MHz clock speed. It offer 1024 x 14 flash program
memory, 68 bytes of RAM data memory, 8-bit timer with pre-scaler, 13 I/O pins, external
18
and internal interrupt sources, and large current sink and source capability. Figure 2.6a is
showing the graphical diagram of PIC16F84A Microcontroller; figure 2.6b is showing the
schematic diagram of PIC16F84A Microcontroller.
Figure 2.6a: The graphical diagram of
PIC16F84A Microcontroller.
Figure 2.6b: The schematic diagram of
PIC16F84A Microcontroller.
2.7. USB ICSP PIC Programmer & ICSP Programmer Socket
USB ICSP PIC Programmer is designed to program popular Flash PIC microcontroller. It is
supported 8 bit, 16 bit and 32 bit PIC microcontroller. ICSP Programmer Socket is an
optional socket that can be used with USB ICSP PIC Programmer to program several types
of 18/28/40 pins PIC microcontroller. Figure 2.7a is showing the graphical diagram of USB
ICSP PIC Programmer & ICSP Programmer Socket.
Figure 2.7a: The graphical diagram of USB ICSP PIC Programmer & ICSP
Programmer Socket.
19
3. Hardware Equipment
3.1. Cables and Connectors
A cable is an assembly of one or more conductors with some flexible. A wire is one of cable
that is a single conductor which may have an outer layer of insulation usually plastic. We
use single core equipment wire to links between points of a circuit board. This is one solid
wire with a plastic coating available in a wide variety of colors. Use it for connection which
will not be disturbed external elements. Figure 3.1a is showing the graphical diagram of
single core equipment wire; figure 3.1b is showing the schematic diagram of single core
equipment wire.
Figure 3.1a: The graphical diagram of
single core equipment wire.
Figure 3.1b: The schematic diagram of single
core equipment wire.
3.2. Heat Sinks
Release heat is produced in transistors and voltage regulator due to current flowing through
it. Transistor and voltage regulators are becoming hot to touch it certainly needs a heat sink!
The heat sink helps to remove the heat by transferring it to surrounding air. Figure 3.2a is
showing the graphical diagram of heat sinks.
20
3.3. Multimeter
Multimeter are very useful test instruments. By operating a multi-position switch on the
meter it can be quickly and easily set to be a voltmeter, an ammeter or an ohmmeter. They
have several settings called range for each type of meter and the choice of AC and DC. This
also have two probes for testing components, it consist of “+” (Red) and “–” (Black). This is
most important to test instrument and component of line follower robot. Figure 3.3a is
showing the graphical diagram of Multimeter.
Figure 3.3a: The graphical diagram of
Multimeter.
Figure 3.2a: The graphical
diagram of heat sinks.
21
3.4. Breadboard
A breadboard is used to build up temporary circuits for testing or try out an idea. No
soldering required so it is easy to change connection and replace components. We used
breadboard to make up some basic circuit to be available re-use afterwards. Figure 3.4a is
showing the graphical diagram of Breadboard.
Figure 3.4a: The graphical diagram of
Breadboard.
3.5. Stripboard
Stripboard is used to hope up permanent, soldered circuits. It is ideal for small circuits with
one or two ICs (chips) but with large number of holes it is very easy to connect a
component in the wrong place. However, it is cheaper than PCB. Figure 3.5a is showing the
graphical diagram of Stripboard.
Figure 3.5a: The graphical diagram of Stripboard. (Left Hand Side = Front
View), (Right Hand Side = Behind View).
22
3.6. Printed Circuit Boards (PCBs)
Printed Circuit Boards have copper tracks connecting the holes where the components are
placed. They are design especially for each circuit and make construction very easy. Figure
3.6a is showing the graphical diagram of Printed Circuit Boards (PCBs).
Figure 3.6a: The graphical diagram of Printed Circuit
Boards (PCBs).
3.7. Soldering Iron Equipments
Soldering Iron Equipment help us to build up a circuit on fixed position. For electronics
work the best type is one powered by mains electricity‟s 230V in the Malaysia, it should be
a heatproof cable for safety. Figure 3.7a is showing the graphical diagram of Soldering Iron.
Figure 3.7a: The graphical diagram of Soldering
Iron.
23
Besides that, soldering iron stand give a safe place to put the iron when not holding it.
Figure 3.7b is showing the graphical diagram of Soldering Iron Stand.
When we are desoldering a joint to correct a mistake or replace a component, must used
a tool for removing solder is called Solder Sucker (Desoldering Pump). Figure 3.7c is
showing the graphical diagram of Solder Sucker (Desoldering Pump).
Figure 3.7c: The graphical diagram of Solder
Sucker (Desoldering Pump).
Reel of solder is the most important to melt into the circuit, make it fixed position. Solder is
allowing of tin and lead, typically 60% tin and 40% lead. It melts at a temperature of about
200°C. ). Figure 3.7d is showing the graphical diagram of Reel of Solder.
Figure 3.7b: The graphical diagram of Soldering
Iron Stand.
24
Figure 24d: The graphical diagram of Reel of
solder.
Solder paste also known as solder cream is used connecting the termination of integrated
chip packages with land patterns on the printed circuit board. Figure 3.7e is showing the
graphical diagram of Solder paste.
Figure 3.7e is showing the graphical diagram of
Solder paste.
3.8. Side Cutter
A side cutter is for trimming component leads close to the circuit board. Figure 3.8a is
showing the graphical diagram of Side Cutters.
25
Figure 3.8a: The graphical diagram of Side
Cutters.
3.9. Small Pliers (Snipe Nose)
A small plier is usually called „snipe nose‟ pliers; those are for bending component leads etc.
Figure 3.9a is showing the graphical diagram of Small Pliers.
Figure 3.9a: The graphical diagram of Small
Pliers.
3.10. Wire Stripper
Besides that, wire strippers are the most designs include a cutter as well, but it‟s not suitable
for trimming component leads. Figure 3.10a is showing the graphical diagram of Wire
Strippers.
26
Figure 3.10a: The graphical diagram of Wire Strippers.
3.12. Slip Knife
Slip knife is useful for cut the wrong connected terminal with each other components on the
PCB and Stripboard. It also can be drilling holes to prevent shock circuit on the Stripboard.
Figure 3.12a is showing the graphical diagram of Slip Knife.
Figure 3.12a: The graphical diagram of
Slip Knife.
3.13. Portable Mini Torque Electric Drill
Portable mini torque electric drill is used to drill holes on Print Circuit Board when want to
insert component on the Print Circuit Board. This is more convenience than small electric
drill machine with stand. Figure 3.13a is showing the graphical diagram of Portable Mini
Torque Electric Drill.
27
Figure 3.13a: The graphical diagram of Portable
Mini Torque Electric Drill.
3.14. Sandpaper
Sandpaper is a form of paper to sharpen materials and fixed to its surface. Purposely, we
have been using sandpaper to remove the mask of PCB. Figure 3.14a is showing the
graphical diagram of Sandpaper.
Figure 3.14a: The graphical diagram of Sandpaper.
3.15. Screw Driver Set
Screw driver set have much type screw driver to help adjust and open something in ours
project. Figure 3.15a is showing the graphical diagram of Screw Driver Set.
28
Figure 3.15a: The graphical diagram of Screw Driver Set.
3.16. Battery
An electrical battery is one or more electrochemical cells that convert stored chemical
energy into electrical energy. It also portable power supplier to the circuit and become
common power source for many household and industrial applications. There have two type
of battery are rechargeable and disposable battery.
The rechargeable battery designed to use repeatedly and to be recharged. However, the
disposable battery is designed to use each time. Figure 3.16a is showing the graphical
diagram of Rechargeable Battery; figure 3.16b is showing the graphical diagram of
Disposable Battery.
Figure 3.16a: The graphical diagram of
Rechargeable Battery
Figure 3.16b: The graphical diagram of
Disposable Battery.
29
3.17. Black Carpet
We are used a black carpet become line follower robot‟s route. Wherefore, the infrared
sensor couldn‟t detect black colour surface, this will cause the line follower robot can‟t turn
to others side and just follow the black line to move. Figure 3.17a is showing the graphical
diagram of Black Carpet.
Figure 3.17a is showing the graphical diagram of
Black Carpet.
3.18. Servo motor
A servo motor is an electromechanical device in which an electrical input determines the
position of the armature of a motor. Servo motor is used to drive the line follower robot
because it can stop immediately without slip. Figure 3.18a is showing the graphical diagram
of Servo Motor.
30
Figure 3.18a: The graphical diagram of Servo
Motor.
3.19. Hot Melt Adhesive
Hot melt adhesive (HMA), also known as hot glue that is melt a solid cylindrical sticks
paste the components on the fixed place. Figure 3.19a is showing the graphical diagram of
Hot Melt Adhesive.
Figure 3.19a: The graphical diagram of Hot Melt
Adhesive.
3.20. Battery Charger
A battery charger is a device used to charge up energy into rechargeable battery by forcing
an electric current flow through it. Figure 3.20a is showing the graphical diagram of Battery
Charger.
31
Figure 3.20a is showing the graphical diagram of
Battery Charger.
3.21. D.I.Y Glue
The D.I.Y Glue is made from potato starch and water, this is for save cost and paste the
route on the Mahjong Paper. Figure 3.21a is showing the graphical diagram of D.I.Y Glue.
Figure 3.21a: The graphical diagram of
D.I.Y Glue.
3.22. Mahjong Paper
Mahjong paper is drawn and designed the specified route on the paper. Figure 3.22a is
showing the graphical diagram of Manjong Paper.
32
Figure 3.22a: The graphical diagram of
Manjong Paper.
3.23. Welding Power Supply
A welding power supply is a device that provides an electric current to perform welding.
Figure 3.23a is showing the graphical diagram of Welding Power Supply.
Figure 3.23a: The graphical diagram of
Welding Power Supply.
3.24. Stick Welding
A stick welding is a manual arc welding process that used a consumable electrode coated in
flux to lay the weld. Figure 3.24a is showing the graphical diagram of Stick Welding.
33
Figure 3.24a is showing the graphical diagram of Stick
Welding.
3.25. Sticker Paper
This is a white matter paper for use paste on the PCB surface. Figure 3.25a is showing the
graphical diagram of Sticker Paper.
Figure 3.25a: The graphical
diagram of Sticker Paper.
3.26. Ironing
Ironing is the work of using a heated tool and used it to heat sticker paper involved route
paste into the PCB surface. Figure 3.26a is showing the graphical diagram of Ironing.
34
Figure 3.26a: The graphical diagram of
Ironing.
3.27. Maker Pen
Maker Pen is used for modify and redesigns the circuit on the Printed Circuit Board surface.
Figure 3.27a is showing the graphical diagram of Maker Pen.
Figure 3.27a: The
graphical diagram
of Maker Pen.
35
3.28. Iron Robot Chasis
Iron Robot Chasis is used to platform of several circuits and protect them from damage.
Figure 3.28a is showing the graphical diagram of Iron Robot Chasis.
Figure 3.28a: The graphical
diagram of Iron Robot Chasis.
3.29. Screw
A screw is type of fastener to fix some component in the fixed place. Figure 3.29a is
showing the graphical diagram of Screw.
Figure 3.29a is showing the
graphical diagram of Screw
36
3.30. Laser Printer
Laser Printer is used to print out the PCB diagram on sticker paper for make the Printed
Circuit Board. Figure 3.30a is showing the graphical diagram of Laser Printer.
Figure 3.30a: The graphical diagram of
Laser Printer.
3.31. Ink-Jet Printer
Ink-Jet Printer is used to print out the Final Year Project Report on A4 paper. Figure 3.31a
is showing the graphical diagram of Ink-Jet Printer.
Figure 3.31a: The graphical diagram of Ink-Jet
Printer.
37
4. Socket
4.1. Molex 2-Pin Power Connector
Molex 2-Pin Power Connector is a battery cable‟s are available at the positive (+) and
negative (-). This is easier to fix the wire of power supply to circuit and no need connected
with many crocodile clip. Figure 4.1a is showing the graphical diagram of Molex 2-Pin
Power Connector.
Figure 4.1a: The graphical diagram of Molex
2-Pin Power Connector.
4.2. 40-Pin Header Single Row
40-pin header single row is using for easy clip between headers and hard to plug off. Figure
4.2a is showing the graphical diagram of 40-Pin Header Single Row.
Figure 4.2a: The graphical diagram of 40-
Pin Header Single Row.
38
4.3. 2-Pin PSU Connector
These connectors are come with set of 40-pin header single row and also clip many wires in
the fixed place. Figure 4.3a is showing the graphical diagram of 2-Pin PSU Connector.
Figure 4.3a: The graphical diagram of
2-Pin PSU Connector.
39
5. Software
We have been using many type of software to design layout our final year project such as Paint,
MPLAB, Eagle Software, Microsoft Word, Microsoft Power Point, PIC Kit. The following
below is shown the table of software used in final year project:
No. Software Description Logo Destination
1. MPLAB Writing and coding
the programming
part
www.microchip.com
2. Eagle Design PCB diagram
www.eagle.com
3. Microsoft
Word
Writing report
4. Microsoft
PowerPoint
Presentation slide
5. PIC Kit Burning conversion
PIC burning set
6. Paint Draw and repair the
circuit diagram
B. Testing assembly component
Testing assembly component is most important to build up the circuit in the line follower robot.
Purposely, it can be learned how to operate for each components and which one have spoiled or not.
The following below is how to test each circuit and what are functions of it.
40
1. LM7805 Voltage Regulator
Firstly, used a wire connection link to 9V power supply to LM7805‟s pin no.01, and then
connected LM7805‟s pin no.02 to ground for activated the LM7805. The pin no.03 has been
connected with ohmmeter red probe on voltage‟s range 10V; the black probe of ohmmeter
connects back to the ground. After that, the ohmmeter will give the stability result is 5V
output voltage. Figure 1a is showing the graphical diagram of LM7805 voltage regulator.
Figure 1b is showing the schematic diagram of LM7805 voltage regulator.
Figure 1a: The graphical diagram of LM7805 voltage regulator.
41
Figure 1b: The schematic diagram of LM7805 voltage regulator.
2. Infrared Sensor
This stage is known as the function of infrared sensor and the way to test it. Firstly, the
infrared sensor connected to one resistor 330Ω for prevent damage by over voltage 5V.
After that, used a digital camera or mobile phone camera to open snap mode of camera
sighted the transmitter. The purple light will come out from the transmitter when camera
sighted it. This is to prove the transmitter functioning. Figure 2a is showing the graphical
diagram of Infrared Sensor Circuit. Figure 2b is showing the schematic diagram of Infrared
Sensor Circuit.
42
Figure 2a: The graphical diagram of Infrared Sensor Circuit.
Figure 2b: The schematic diagram of Infrared Sensor Circuit.
43
3. LM393 Voltage Comparator
LM393 consist of two independent voltage comparators designed to operate from a single
power supply over a wide voltage range. There are two inputs, labelled inverting and non-
inverting because of the phase relation of the input and output signals. So we used inverting
amplifier connected with infrared sensor. When non- touch the infrared sensor the input is 1
(high) then inverting the signal of infrared sensor become 0 (low); the input is 0 (low) when
the infrared sensor is touched, the voltage regulator will invert the signal become 1 (high).
Besides that, there are two type voltage will influence the result of circuit are voltage
reference and voltage in. Figure 3a is showing differential of the input voltage and voltage
reference. When voltage reference is highest than input voltage, the output signal will
become 1 (high). In the opposite case, the voltage reference is lowest than voltage in, the
output signal will become 0 (low).
Figure 3a: Differential of the voltage in and voltage reference.
How to adjust the voltage in and voltage reference by multimeter? Firstly, the
multimeter red probe is connected with variable resistor no.1 10KΩ (VR1) between
infrared sensors – Receiver and the black probe connected to the ground. The
44
multimeter range must be 10Vfor measure value of voltage in. After that, the wiper of
variable resistor no.1 10KΩ (VR1) adjusted to voltage value 3V following by
multimeter. When touched the transmitter will affect the voltage in and the value will be
down depended on sensitive transmitter. Figure 3b is showing the schematic diagram
how to test and adjusted the voltage in.
Figure 3b: The schematic diagram how to test and adjusted the voltage in.
In the same way, the red probe of multimeter connected with LM393 pin no.3 between
the variable resistor no.2 10KΩ (VR2) and black probe connected to the ground. The
value of voltage reference is 2.4V between 2.8V adjusted by variable resistor‟s wiper.
Figure 3c is showing the schematic diagram how to test and adjusted the voltage
reference.
45
Figure 3c: The schematic diagram how to test and adjusted the voltage reference.
4. Relays
A relay is used to isolate one electrical circuit from another. It allows a low current control
circuit to make or break an electrically isolated high current circuit path. The relay used to
control direction turn of the F1 line follower robot. Figure 4a is showing the schematic diagram
of completed circuit of line follower robot using by relay control. In addition, testing relay is
most important and know about how function of them. Firstly, prepare one push-button switch
(NO), L7805 voltage regulator, battery 9V and relays. One of the lead on push-button
connected to 5V power supply, and another lead connected to the relay pin no.1. The relay pin
no.16 connected to the ground. When push down the push-button connected with relay and then
you will hear the voice of “Dip Dap” that means the relay of coil is operated by 5V power
supply; the current will cut off on normally close, then the current will switch on normally open.
When release the push-button, the relay will return back previous condition and will come out
the same voice. Figure 4b is showing schematic diagram of how to test the relay.
46
Figure 4a: The schematic diagram of completed circuit of line follower robot using by relay
control.
Figure 4b: The schematic diagram of how to test the relay.
47
C. Procedures of Assembly Components
1. Making PCB Steps Involved
1.1. Prepare the required circuit diagram.
1.2. List out the components in the eagle software.
1.3. Drawn the connection of circuit diagram in PCB format.
1.4. Finish the drawn connection of circuit diagram then print out the circuit diagram on
sticker paper using by laser printer.
1.5. Cut the board to final size and shape using by handsaw or jet saw.
1.6. Ironing the circuit diagram pasted on the bare board (coated with a thin layer of
copper) from sticker paper and
1.7. Carefully take out the sticker paper from bare board and fixer the back line is not
clear.
1.8. After that, drill holes on the specified places using by Portable Mini Torque Electric
Drill.
1.9. This stage is removing all non-masked copper using by Etching Powder and give
the board a good wash under boiling water to remove all trances of the etchant.
1.10. Carefully scrub off the mask with sandpaper on PCB.
48
1.11. Used soldering iron to solder each component into PCB and test each soldering
point have short the circuit or not using by multimeter.
1.12. Complete the PCB in this stage.
49
RESULTS & DISCUSSION
The result to make the line follower robot have been learned some skill and how to co-operation
with group mate in this project. We have made two type of line follower robot are toy racing car
without remote control and Intelligence Car known as I-Car.
1. Toy Racing Car
Toy racing car have a high speed motion in the specified route. The toy racing car cannot turn to
less than 90º, this make for maintain balance of toy racing car and avoid out of the route. Purposely,
toy racing car is drive in high speed to become fast line traffic in public and can be also extinguish
fire on the path. The robot can be used in the rescue operation. The following below is showing
information about full complete set of toy racing car.
1.1 Components List
No Name of Item Range / Value Quantity
1. Battery 9.6V 1
2. Battery 4.8V 1
3. SPDT Switch PCS 2
4. Voltage Regulator LM7805 1
5. Heat Sink PCS 1
50
No Name of Item Range / Value Quantity
6. Capacitor 0.1µF 2
7. Resistor 330Ω 2
8. Resistor 1KΩ 4
9. Resistor 470Ω 2
10.
Variable Resistor
(Preset)
10KΩ 4
11.
Dual-Voltage
Comparator
LM393 1
12. Relay 5VDC 2
13. Transistor C9013 2
14. Diode IN4001 10
15 DC Motor 5VDC 2
16. IR Sensor Set 2
51
1.2 The schematic diagram of Full Complete Set of Toy Racing Car.
1.3 The PCB diagram of Full Complete Set of Toy Racing Car
52
1.4 The graphical diagram of Full Complete Set of Toy Racing Car (Please Refer to
Appendix No.1.4.)
Bottom View Top View
Front View
Behind View
Left View Right View
53
1.5 Procedures of Operate Toy Racing Car
1. Single pole double throw (SPDT) switch 01 must connect with battery 9V but the SPDT
switch 01 is off (on the left side).
2. Switch on the SPDT switch 01 (turn to the right from left).
3. LM7805 voltage regulator can direct convert 9V became to 5V.
4. However, the whole circuit can support 5V only. (cannot over 5V)
5. The transistor (signal to the base, then the collector connected to emitter) will trigger relay
(from normally close to normally open) when touched the infrared sensor.
6. Touched the left infrared sensor, in the front of a pair wheels will turn to right. In the same
way, touched the right infrared sensor then the pair of wheels will turn to left. When the
infrared sensors detected black surface materials will not reaction. The infrared sensors have
a reaction when detected the non black surface materials. Whenever, the two sensors
detected the non black surface materials at the same time then will dysfunction and forward.
7. Single pole double throw (SPDT) switch 02 must connecting with battery 4.8V but the
SPDT switch 02 is off (on the left side).
8. Switch on the SPDT switch 02 (turn to the right from left).
9. The current will flow through four diodes (for decrease the speed of motor); this will drop
the voltage from 4.8V to 2V.
10. The battery life can consume less than 15 minutes (in the process).
11. The battery to be charged at least 2 hours.
54
2. Intelligence Car (I-Car)
Intelligence car also known as I-Car, this can be turned to any degree point and have some
detectors for automotive drive without any control by human being. The aim of the I-Car is to reduce
accident in the highway because have much detector to sense the surrounding area of barrier and can
help disabled people go to another place with safe.
Besides that, the line follower robot able saves natural resources in our earth such as petrol and
natural gas. In the future, the line follower robot drive in the magnetic technology and the power supply
turn the robot into unlimited.
We made line follower robot have been used PIC16F84 microcontroller to control I-Car. The
PIC16F84 to control whole circuit such as signal light, motor rotate direction, infrared sensor circuit,
and wireless remote control circuit.
2.1 Components List
No. Name of Item Range/ Value Quantity
1. Battery 9.6V 2
2. SPDT Switch PCS 2
3. Voltage Regulator LM7805 2
4. Heat Sink PCS 2
5. Capacitor 0.1µF 4
6. Wireless Remote Control
(Transmitter)
Set 1
7. Wireless Remote Control
(Receiver)
Set 1
55
No. Name of Item Range/ Value Quantity
8. Resistor 330Ω 5
9. Resistor 470 Ω 5
10. Resistor 1K Ω 10
11. Variable Resistor (Preset) 10K Ω 10
12. Dual-Voltage Regulator LM393 3
13. IR Sensor Set 5
14. LED PCS 3
15. Transistor C9013 4
16. Hex Inverter 74LS04 1
17. Quadruple Half-H Driver L-293D 1
18. Diode IN4001 8
19. PIC Microcontroller 16F84A 1
20. Capacitor 104 3
21. Crystal 32KHz 1
22. Relay 5VDC 2
23. LED Arrow Display PCS 1
24. Servo Motor PCS 2
25. Wheels PCS 2
26. Castor PCS 2
27. Printed Circuit Board A4 2
28. Screw & Nut Set 20
56
No. Name of Item Range/ Value Quantity
29. 40-Pin Header Single Row PCS 2
30. 2-Pin PSU Connector PCS 40
31. Molex 2-Pin Power Connector Set 2
32. Socket* PCS 1
33. USB ICSP PIC Programmer &
ICSP Programmer Socket
Set 1
34. Mahjong Paper PCS 10
35. Poster Color Black 1
36. Poster Color White 1
37. Maker Pen Black 1
38. Poster Color Pen* PCS 1
39. Hot Glue PCS 1
40. Iron Robot Chasis PCS 1
41. Sticker Paper A4 10
42. Jumper Wire ( Red, Black,
Yellow, White, Blue, Orange,
Violet, Grey)
3 meter 8
43. 8-pins Socket PCS 3
44. 14-pins Socket PCS 1
45. 16-pins Socket PCS 4
46. 18-pins Socket PCS 1
47. Sand Paper A4 3
57
No. Name of Item Range/ Value Quantity
48. Acid* 3KG 1
49. Breadboard PCS 6
50. Mini Jumper* SET 2
2.2 The Wireless Remote Control (Transmitter)
2.2.1 The schematic diagram of Wireless Remote Control (Transmitter) Circuit
58
2.2.2 The PCB diagram of Wireless Remote Control (Transmitter) Circuit
2.2.3 The graphical diagram of Wireless Remote Control (Transmitter) Circuit
59
2.2.2 The PCB diagram of Wireless Remote Control (Transmitter) Circuit
1. Single pole double throw (SPDT) switch 01 must connect with battery 9V but the SPDT
switch 01 is off (on the left side).
2. Turn on the SPDT switch 01(turn to right from left). The indicate light (green) will light up.
3. Voltage Regulator LM7805 is converted 9V became to 5V.
4. Heat sink is for protect the Voltage Regulator LM7805 and decrease its temperature.
5. Capacitor is used to maintain DC voltage because it is like a filter for current.
6. When press the push-button K1 that signal will sent to Multiplexer IC PT2262 pin no. 7. The
zener diode connected with push-button for amplifier high-speed signal.
8. The signal will come out from Multiplexer IC PT2262 pin no.17 to transmitter module pin
no.03
9. The transmitter module will receive the signal, then the antenna pin .no 01 sent signal to
receiver module.
10. The frequency value of transmitter module is 315MHz.
11. The distance of transmitter module depended on battery life.
12. An address code is a password for the transmitter module.
13. The input signal is pin no.10, pin no.11, pin no.12, and pin no.13.
14. When the both direction signal send frequency it will get the signal output.
60
2.3 The Wireless Remote Control (Receiver)
2.3.1 The schematic diagram of Wireless Remote Control (Receiver) Circuit
2.3.2 The PCB diagram of Wireless Remote Control (Receiver) Circuit
61
2.3.3 The graphical diagram of Wireless Remote Control (Receiver) Circuit
2.3.4 Procedures of Wireless Remote Control (Receiver)
1. A receiver module switches on from PIC microcontroller‟s power supply.
2. The receiver module will receive the signal from the transmitter module (antenna) pin no.04.
3. The receiver module pin no.02 and pin no.03 will sent signal to the De-Multiplexer IC
PT2272 pin no.14.
4. When the receiver module receives the signal that indicates light (yellow) will flash. This
means receiver module is functioning.
5. The output signal are pin no.10, pin no.11, pin no.12, and pin no.13.
6. When the both direction signal send frequency it will get the signal output.
7. An address code is a password for the receiver module.
62
8. The frequency value of receiver module is 315MHz.
9. The distance of receiver module depended on battery life.
2.4. PIC Microcontroller Circuit
2.4.1. The schematic diagram of PIC Microcontroller Circuit
2.4.2. The PCB diagram of PIC Microcontroller Circuit
63
2.4.3. The graphical diagram of PIC Microcontroller Circuit
2.4.4 Procedures of PIC Microcontroller Circuit
1. Single pole double throw (SPDT) switch 01 must connect with battery 9V but the SPDT
switch 01 is off (on the left side).
2. Turn on the SPDT switch 01(turn to right from left). The indicate light (green) will light up.
3. Voltage Regulator LM7805 is converting from 9V to 5V.
4. Heat sink is for protect the Voltage Regulator LM7805 and decrease its temperature.
5. Capacitor is used to maintain DC voltage because it is like a filter for current.
6. PIC16F84A pin no.03 and pin no.04 is a Master Clear that will clear all previously file in the
PIC16F84A while the 5V voltage flow in. (Please refer to appendices about assembly
language)
7. PIC16F84A pin no.15 and pin no.16 is clock pulse for PIC16F84 because a clock frequency
to orchestrate the movement of the data around its electronic circuit.
8. Port of input signals are pin no.01, pin no.02, pin no.17, and pin no.18
64
9. When signal send to PIC16F84A pin no. 01 connected by infrared sensors then the pin no.8
will operated. The motive is sensor barrier.
10. The PIC16F84A pin no. 02 receives the signal from wireless remote control then the
PIC16F84A pin no.09 will operate. This is control by wireless remote control.
11. The PIC16F84A pin no. 18 and pin no.17 link to pin no.06 and pin no.07 for direction of
turning by infrared sensors.
2.5. Sensor Barrier Circuit
2.5.1 The schematic diagram of Sensor Barrier Circuit
65
2.5.2. The PCB diagram of Sensor Barrier Circuit
2.5.3. The graphical diagram of Sensor Barrier Circuit
66
2.5.4. Procedures of Sensor Barrier Circuit
1. The sensor barrier circuit will switch on from 5V power supply.
2. Two of IR sensor (transmitter) will come out the purple beam capture by camera.
3. Used screw driver to adjust the value of voltage in and voltage reference.
4. Voltage in is represented R3 then the value of voltage in between 2.8V and 3V; Voltage
references are R5, so the value of voltage references between 2.4V and 2.6V.
5. IR sensors touched by any non-black materials then will send signal from pin no.05 and pin
no.06 to pin no.07 connected by PIC16F84A pin no.01 and call the function in the I-Car.
6. When IR sensor detect some barrier then will trigger transistor (base) connected by
PIC16F84A pin no.08.
7. The sensitive of IR sensor is depended on value between of input voltage and voltage
reference. If the value of input voltage is far away with voltage reference‟s value then
sensitive of IR sensor will be less. In the opposite case, IR sensor is most sensitive because
nearly value of voltage in between voltage reference.
67
2.6 Infrared Sensor Circuit
2.6.1. The schematic diagram of Infrared Sensor Circuit
2.6.2. The PCB diagram of Infrared Sensor Circuit
2.6.3. The graphical diagram of Infrared Sensor Circuit
68
2.6.4. Procedures of Infrared (IR) Sensor Circuit
1. The infrared sensor circuit will switch on from PIC16F84 for trigger the transistor then the
power supply will flow the circuit.
2. Two of IR sensor (transmitter) will come out the purple beam capture by camera.
3. Used screw driver to adjust the value of input voltage and voltage reference.
4. Voltage in is represented R3 and R7 then the value of voltage in between 2.8V and 3V;
Voltage references are R4 and R8, so the value of voltage references between 2.4V and 2.6V.
5. Two of infrared sensors touched by any non-black materials then will send signal to
PIC16F84A and call the function in the I-Car.
6. When two of the infrared sensors detected black surface materials will forward. Touched the
left infrared sensor, right wheels will operate to anti-clockwise and turn to right. In the same
way, touched the right infrared sensor then the left wheels will operate to anti-clockwise and
turn to right. The infrared sensors have a reaction when detected the non black surface
materials. Whenever, the two sensors detected the non black surface materials at the same
time then turn to behind.
7. The sensitive of IR sensor is depended on value between of voltage in and voltage reference.
If the value of voltage in is far away with voltage reference‟s value then sensitive of IR
sensor will be less. In the opposite case, IR sensor is most sensitive because nearly value of
voltage in between voltage reference.
69
2.7 Motor Drive Circuit
2.7.1 The schematic diagram of Motor Drive Circuit
2.7.2 The PCB diagram of Motor Drive Circuit
70
2.7.3 The graphical diagram of Motor Drive Circuit
2.7.3 Procedures of Motor Drive Circuit
1. The whole circuit will switch on from PIC16F84A transistor T2.
2. LM393 dual voltage comparator pin no.01 connected with 420Ω and to PIC16F84A pin
no.17; pin no.02 is connected with the left motor and IR sensor (receiver); pin no.03
connected with variable resistor 10KΩ pin no.02 and left motor; pin no.04 connected to the
ground; pin no.05 connected to right motor and variable resistor 10KΩ pin no.02; pin no.06
is connected with right motor and IR sensor (receiver); pin no.07 is connected with
PIC16F84A pin no.18 and resistor 420Ω; pin no.08 is connected to 5V power supply.
3. 74LS04 hex inverter pin no.14 is connected to 5V power supply and pin no.07 is connected
to group; pin no.13 is connected with L293D pin no.02 and PIC 16F84A pin no.06; pin no.12
is connected to L293D pin no.07; pin no.11 is connected to L293D pin no.10 and
PIC16F84A pin no.07; pin no.10 is connected to L293D pin no.15;
71
4. L293D Quadruple Half-H Driver pin no.01, pin no.08 and pin no.16 are connected to 5V
power supply; pin no.04, pin no.05, pin no.12 and pin no.13 is connected to the ground; pin
no. 03 and pin no.07 are connected with one motor and between two diode; pin no.11 and pin
no.14 are connected to the one motor and between two diode.
5. Cathode of diode IN4001 is connected to 5V power supply and anode of diode IN4001 is
connected to the ground.
2.8 LED Arrow Display
2.8.1 The schematic diagram of LED Arrow Display
72
2.8.2 The PCB diagram of LED Arrow Display
2.8.3 The graphical diagram of LED Arrow Display
73
2.8.4 Procedures of LED Arrow Display
1. The infrared sensor circuit will switch on using by 5V power supply.
2. Two of IR sensor (transmitter) will come out the purple beam capture by camera.
3. Used screw driver to adjust the value of voltage in and voltage reference.
4. Voltage in is represented R3 and R9 the value of voltage in between 2.8V and 3V; Voltage
references are R6 and R12, so the value of voltage references between 2.4V and 2.6V.
5. Two of infrared sensors touched by any non-black materials will send signal to two piece of
5VDC relay through LM393.
6. The IR sensor will trigger relay, when touched the IR sensor the relay will cut off current of
normally close then current pass to normally open.
7. When two of the infrared sensors detected black surface materials will not show any indicate
light. Touched the left infrared sensor, left indicate light will light up. In the same way,
touched the right position of infrared sensor then the right indicate light will light up.
Whenever, the two sensors detected the non black surface materials at the same time then
two direction of indicated light will light up.
8. The sensitive of IR sensor is depended on value between of input voltage and voltage
reference. If the value of voltage in is far away with voltage reference‟s value then sensitive
of IR sensor will be less. In the opposite case, IR sensor is most sensitive because nearly
value of voltage in between voltage reference.
74
2.9 The graphical diagram of Full Complete Set of Toy Racing Car (Please Refer to
Appendix No. 2.9)
Bottom View
Top View
Front View
Behind View
Left View
Right View
75
2.10 Modified and Added Some Application into I–Car
The application of I–Car is using to transportation something else to another place, and we have
been used iron box to store something link with behind I–Car. Then this will transfer to
specified location and automatically put down the iron box. In addition, we have been adding
some LED into shell of I–Car. The below following is a graphical of application and modified
with I–Car.
Iron Stand
Iron Box
DEE 0508
^U ^
Y S T
K I
76
2.11 Programming Assembly Language into I–Car
We have been using assembly language for coding to control our I–Car and few step to
programming (Please refer appendices No. 2.11). The following below shown assembly
language coding
I–Car Coding
; I–Car Coding
TMR0 EQU 1
STATUS EQU 3
PORTA EQU 5
PORTB EQU 6
TRISA EQU 85H
TRISB EQU 86H
OPTION_R EQU 81H
ZEROBIT EQU 2
COUNT EQU 0CH
;===================================================
LIST P=16F84
ORG 0
GOTO START
__CONFIG H'3FF0'
;===================================================
DELAY5 CLRF TMR0
LOOPA MOVF TMR0,W
SUBLW .1
BTFSS STATUS,ZEROBIT
GOTO LOOPA
RETLW 0
START BSF STATUS,5
MOVLW B'00011111'
MOVWF TRISA
MOVLW B'00000000'
MOVWF TRISB
MOVLW B'00000111'
MOVWF OPTION_R
77
BCF STATUS,5
CLRF PORTA
CLRF PORTB
CLRF COUNT
;===================================================
SW0 BTFSS PORTA,0
GOTO TURNON0
BCF PORTB,0
SW1 BTFSS PORTA,1
GOTO TURNON1
BCF PORTB,1
SW2 BTFSS PORTA,2
GOTO TURNON2
BCF PORTB,2
SW3 BTFSC PORTA,3
GOTO TURNON3
BCF PORTB,3
GOTO SW0
TURNON0 BSF PORTB,0
BSF PORTB,6
GOTO SW1
TURNON1 BSF PORTB,1
BSF PORTB,7
GOTO SW2
TURNON2 BSF PORTB,2
GOTO SW3
TURNON3 BSF PORTB,3
GOTO SW0
END
;===================================================
78
Running Light Coding
; Running Light Coding
TMR0 EQU 1
STATUS EQU 3
PORTA EQU 5
PORTB EQU 6
TRISA EQU 85H
TRISB EQU 86H
OPTION_R EQU 81H
ZEROBIT EQU 2
COUNT EQU 0CH
LIST P=16F84
ORG 0
GOTO START
__CONFIG H'3FF0'
;===================================================
DELAY1 CLRF TMR0
LOOPA MOVF TMR0,W
SUBLW .10
BTFSS STATUS,ZEROBIT
GOTO LOOPA
RETLW 0
START BSF STATUS,5
MOVLW B'00011111'
MOVWF TRISA
MOVLW B'00000000'
MOVWF TRISB
MOVLW B'00000111'
MOVWF OPTION_R
BCF STATUS,5
CLRF PORTA
CLRF PORTB
CLRF COUNT
ON BSF PORTB,0
BSF PORTB,5
79
BSF PORTB,6
CALL DELAY1
BSF PORTB,1
BSF PORTB,2
BCF PORTB,5
BSF PORTB,7
BCF PORTB,6
CALL DELAY1
BSF PORTB,3
BSF PORTB,4
BSF PORTB,5
BSF PORTB,6
BCF PORTB,7
CALL DELAY1
BCF PORTB,0
BCF PORTB,5
BSF PORTB,7
BCF PORTB,6
CALL DELAY1
BSF PORTB,5
BCF PORTB,1
BCF PORTB,2
BSF PORTB,6
BCF PORTB,7
CALL DELAY1
BCF PORTB,5
BCF PORTB,3
BCF PORTB,4
BSF PORTB,7
BCF PORTB,6
CALL DELAY1
BSF PORTB,5
BSF PORTB,4
BSF PORTB,3
BSF PORTB,6
BCF PORTB,7
80
CALL DELAY1
BCF PORTB,5
BSF PORTB,2
BSF PORTB,1
BSF PORTB,7
BCF PORTB,6
CALL DELAY1
BSF PORTB,5
BSF PORTB,0
BSF PORTB,6
BCF PORTB,7
CALL DELAY1
BCF PORTB,5
BCF PORTB,4
BCF PORTB,3
BSF PORTB,7
BCF PORTB,6
CALL DELAY1
BSF PORTB,5
BCF PORTB,2
BCF PORTB,1
BSF PORTB,6
BCF PORTB,7
CALL DELAY1
BCF PORTB,5
BCF PORTB,0
BSF PORTB,7
BCF PORTB,6
CALL DELAY1
GOTO ON
END
81
Alpha Numeric Displays Coding
; Alpha Numeric Displays Coding
TMR0 EQU 1
STATUS EQU 3
PORTA EQU 5
PORTB EQU 6
TRISA EQU 85H
TRISB EQU 86H
OPTION_R EQU 81H
ZEROBIT EQU 2
COUNT EQU 0CH
;******************************************************************
LIST P=16F84 ;we are using the 16F84.
ORG 0 ;the start address in memory is 0
GOTO START ;goto start!
;******************************************************************
__CONFIG H'3FF0';selects LP oscillator, WDT off, PUT on,
;******************************************************************
;
; SUBROUTINE SECTION.
;3 SECOND DELAY
DELAY3 CLRF TMR0 ;Start TMR0
LOOPA MOVF TMR0,W ;Read TMR0 into W
SUBLW .96 ;TIME - W
BTFSS STATUS,ZEROBIT ;Check TIME-W ? 0
GOTO LOOPA
RETLW 0 ;return after TMR0 ? 96
;P1 SECOND DELAY
DELAYP1 CLRF TMR0 ;Start TMR0
LOOPC MOVF TMR0,W ;Read TMR0 into W
SUBLW .3 ;TIME - W
BTFSS STATUS,ZEROBIT ;Check TIME-W ? 0
GOTO LOOPC
RETLW 0 ;return after TMR0 ? 3
CLOCK BSF PORTA,2
NOP
82
BCF PORTA,2
NOP
RETLW 0
;***************************************************************
A MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 1H ;41 is code for A
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
BB MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 2H ;42 is code for B
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
C MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 3H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
D MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 4H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
E MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
83
MOVWF PORTB
CALL CLOCK
MOVLW 5H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
F MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 6H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
G MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 7H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
H MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 8H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
I MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 9H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
84
J MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 0AH
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
K MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 0BH
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
L MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 0CH
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
M MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 0DH
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
N MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
MOVLW 0EH
MOVWF PORTB
85
CALL CLOCK ;clock character onto display.
RETLW 0
O MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 4H
MOVWF PORTB
CALL CLOCK
MOVLW 0FH
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
P MOVLW 2
MOVWF PORTA
MOVLW 5H
MOVWF PORTB
CALL CLOCK
MOVLW 0H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
Q MOVLW 2
MOVWF PORTA
MOVLW 5H
MOVWF PORTB
CALL CLOCK
MOVLW 1H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
R MOVLW 2
MOVWF PORTA
MOVLW 5H
MOVWF PORTB
CALL CLOCK
MOVLW 2H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
S MOVLW 2
MOVWF PORTA
MOVLW 5H
MOVWF PORTB
86
CALL CLOCK
MOVLW 3H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
T MOVLW 2
MOVWF PORTA
MOVLW 5H
MOVWF PORTB
CALL CLOCK
MOVLW 4H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
U MOVLW 2
MOVWF PORTA
MOVLW 5H
MOVWF PORTB
CALL CLOCK
MOVLW 5H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
V MOVLW 2
MOVWF PORTA
MOVLW 5H
MOVWF PORTB
CALL CLOCK
MOVLW 6H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
WW MOVLW 2
MOVWF PORTA
MOVLW 5H
MOVWF PORTB
CALL CLOCK
MOVLW 7H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
X MOVLW 2
87
MOVWF PORTA
MOVLW 5H
MOVWF PORTB
CALL CLOCK
MOVLW 8H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
Y MOVLW 2
MOVWF PORTA
MOVLW 5H
MOVWF PORTB
CALL CLOCK
MOVLW 9H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
Z MOVLW 2
MOVWF PORTA
MOVLW 5H
MOVWF PORTB
CALL CLOCK
MOVLW 0AH
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
NUM0 MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 3H
MOVWF PORTB
CALL CLOCK
MOVLW 0H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
NUM1 MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 3H
MOVWF PORTB
CALL CLOCK
MOVLW 1H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
88
NUM2 MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 3H
MOVWF PORTB
CALL CLOCK
MOVLW 2H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
NUM3 MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 3H
MOVWF PORTB
CALL CLOCK
MOVLW 3H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
NUM4 MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 3H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
MOVLW 4H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
NUM5 MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 3H
MOVWF PORTB
CALL CLOCK
MOVLW 5H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
NUM6 MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 3H
MOVWF PORTB
CALL CLOCK
MOVLW 6H
89
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
NUM7 MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 3H
MOVWF PORTB
CALL CLOCK
MOVLW 7H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
NUM8 MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 3H
MOVWF PORTB
CALL CLOCK
MOVLW 8H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
NUM9 MOVLW 2 ;enables the display
MOVWF PORTA
MOVLW 3H
MOVWF PORTB
CALL CLOCK
MOVLW 9H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
GAP MOVLW 2
MOVWF PORTA
MOVLW 2H
MOVWF PORTB
CALL CLOCK
MOVLW 0H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
DOT MOVLW 2
MOVWF PORTA
MOVLW 2H
90
MOVWF PORTB
CALL CLOCK
MOVLW 0EH
MOVWF PORTB
CALL CLOCK ;clock character onto display.
RETLW 0
CLRDISP CLRF PORTA
MOVLW 0H
MOVWF PORTB
CALL CLOCK ;clock character onto display.
MOVLW 1
MOVWF PORTB
CALL CLOCK
CALL DELAYP1
RETLW 0
;*********************************************************
; CONFIGURATION SECTION.
START BSF STATUS,5 ;Turns to Bank1.
MOVLW B'00000000' ;PORTA is O/P
MOVWF TRISA
MOVLW B'00000000'
MOVWF TRISB ;PORTB is OUTPUT
MOVLW B'00000111' ;Prescaler is /256
MOVWF OPTION_R ;TIMER is 1/32 secs.
BCF STATUS,5 ;Return to Bank0.
CLRF PORTA ;Clears PortA.
CLRF PORTB ;Clears PortB.
;Display Configuration
MOVLW 03H ;FUNCTION SET
MOVWF PORTB ;8bit data (default)
CALL CLOCK
CALL DELAYP1 ;wait for display
MOVLW 02H ;FUNCTION SET
MOVWF PORTB ;change to 4bit
CALL CLOCK ;clock in data
CALL DELAYP1 ;wait for display
MOVLW 02H ;FUNCTION SET
MOVWF PORTB ;must repeat command
CALL CLOCK ;clock in data
CALL DELAYP1 ;wait for display
MOVLW 08H ;4 bit micro
91
MOVWF PORTB ;using 2 line display.
CALL CLOCK ;clock in data
CALL DELAYP1
MOVLW 0H ;Display on, cursor off
MOVWF PORTB ;0CH
CALL CLOCK
MOVLW 0CH
MOVWF PORTB
CALL CLOCK
CALL DELAYP1
MOVLW 0H ;Increment cursor, 06H
MOVWF PORTB
CALL CLOCK
MOVLW 6H
MOVWF PORTB
CALL CLOCK
;********************************************************
BEGIN CALL CLRDISP
CLRF PORTA
MOVLW 8H ;Cursor at top left, 80H
MOVWF PORTB
CALL CLOCK
MOVLW 0H
MOVWF PORTB
CALL CLOCK
CALL GAP
CALL GAP
CALL G;display M
CALL DELAYP1 ;wait 0.1 seconds
CALL O ;display I
CALL DELAYP1 ;wait 0.1 seconds
CALL O ;Etc.
CALL DELAYP1
CALL D
CALL DELAYP1
CALL GAP
CALL DELAYP1
CALL M
CALL DELAYP1
CALL O
CALL DELAYP1
CALL R
CALL DELAYP1
CALL N
92
CALL DELAYP1
CALL I
CALL DELAYP1
CALL N
CALL DELAYP1
CALL G
CALL DELAYP1
CLRF PORTA
MOVLW 0CH ;Cursor on 2nd line
MOVWF PORTB
CALL CLOCK
MOVLW 3H
MOVWF PORTB
CALL CLOCK
CALL GAP
CALL L
CALL DELAYP1
CALL E
CALL DELAYP1
CALL C
CALL DELAYP1
CALL T
CALL DELAYP1
CALL U
CALL DELAYP1
CALL R
CALL DELAYP1
CALL E
CALL DELAYP1
CALL S
CALL DELAY3 ;wait 3 seconds
CALL CLRDISP
MOVLW 8H ;Cursor at top left, 80H
MOVWF PORTB
CALL CLOCK
MOVLW 0H
MOVWF PORTB
CALL CLOCK
CALL P
CALL DELAYP1
CALL R
CALL DELAYP1
93
CALL E
CALL DELAYP1
CALL S
CALL DELAYP1
CALL E
CALL DELAYP1
CALL N
CALL DELAYP1
CALL T
CALL DELAYP1
CALL E
CALL DELAYP1
CALL D
CALL DELAYP1
CALL GAP
CALL GAP
CALL GAP
CALL BB
CALL DELAYP1
CALL Y
CLRF PORTA
MOVLW 0CH ;Cursor on 2nd line
MOVWF PORTB
CALL CLOCK
MOVLW 3H
MOVWF PORTB
CALL CLOCK
CALL GAP
CALL GAP
CALL GAP
CALL S
CALL DELAYP1
CALL GAP
CALL T
CALL DELAYP1
CALL GAP
CALL Y
CALL DELAY3 ;wait 3 seconds
CALL CLRDISP
CLRF PORTA
MOVLW 8H ;Cursor at top left, 80H
MOVWF PORTB
CALL CLOCK
MOVLW 0H
94
MOVWF PORTB
CALL CLOCK
CALL WW
CALL DELAYP1
CALL E
CALL DELAYP1
CALL L
CALL DELAYP1
CALL C
CALL DELAYP1
CALL O
CALL DELAYP1
CALL M
CALL DELAYP1
CALL E
CALL GAP
CALL DELAYP1
CALL GAP
CALL T
CALL DELAYP1
CALL O
CALL DELAYP1
CALL GAP
CALL GAP
CALL O
CALL DELAYP1
CALL U
CALL DELAYP1
CALL R
CALL DELAYP1
CLRF PORTA
MOVLW 0CH ;Cursor on 2nd line
MOVWF PORTB
CALL CLOCK
MOVLW 3H
MOVWF PORTB
CALL CLOCK
CALL GAP
CALL GAP
CALL GAP
CALL T
CALL DELAYP1
CALL A
95
CALL DELAYP1
CALL L
CALL DELAYP1
CALL K
CALL DELAYP1
CALL S
CALL DELAY3 ;wait 3 seconds
CALL CLRDISP
CLRF PORTA
MOVLW 8H ;Cursor at top left, 80H
MOVWF PORTB
CALL CLOCK
MOVLW 0H
MOVWF PORTB
CALL CLOCK
CALL GAP
CALL GAP
CALL L
CALL DELAYP1
CALL I
CALL DELAYP1
CALL N
CALL DELAYP1
CALL E
CALL GAP
CALL DELAYP1
CALL F
CALL DELAYP1
CALL O
CALL DELAYP1
CALL L
CALL DELAYP1
CALL L
CALL DELAYP1
CALL O
CALL DELAYP1
CALL WW
CALL DELAYP1
CALL E
CALL DELAYP1
CALL R
CALL DELAYP1
CLRF PORTA
MOVLW 0CH ;Cursor on 2nd line
96
MOVWF PORTB
CALL CLOCK
MOVLW 3H
MOVWF PORTB
CALL CLOCK
CALL GAP
CALL GAP
CALL R
CALL DELAYP1
CALL O
CALL DELAYP1
CALL BB
CALL DELAYP1
CALL O
CALL DELAYP1
CALL T
CALL DELAYP1
CALL I
CALL DELAYP1
CALL C
CALL DELAY3
GOTO BEGIN
END
97
2.12 Alpha Numeric Displays
We used LCD Display to show greet message and 16F84A Microcontroller control whole the
circuit.
2.12.1 The schematic diagram of Alpha Numeric Display
2.12.2. The graphical diagram of Alpha Numeric Display
98
2.12.2 The graphical diagram of Alpha Numeric Display
99
FINDINGS / PROBLEM
This is intended as a step-by step guide to what to do when things go wrong. One of the projects
successful is debug the solution from failure, for example like line tracking of line follower robot must
know how to calculate the degree of turning, interrupt of infrared sensor circuit, wire socket‟s
connection problem, front motor of racing toy car spoiled and etc. The following below is showing list
of the troubleshooting to build line follower robot.
1. Make sure the voltage regulator LM7805 convert largest voltage like 30V to 5V, and used
the multimeter for measure voltage output of LM7805.
2. Infrared sensor (transmitter and detector) must give some distance and cannot too close
together.
3. Used a black tape put on the infrared sensor – transmitter and detector surface and observed
a LED is lighted or not. (please refer to appendix figure 3c) If the LED is lighted that means
the infrared sensor – transmitter in the bad condition because infrared sensor cannot detect
any black colour surface. In opposite case, the infrared sensor is the good condition when
the LED is lighted up.
4. Used camera and mobile phone camera to capture the infrared sensor, when it connected
with 5V power supply. This is test for infrared sensor functioning or not, if the purple light
will come out from the transmitter when camera sighted it. This is a good condition of
infrared sensor.
100
5. In the sunshine condition, the infrared sensor will be dysfunction because ultraviolet light
affect the infrared sensor and always detected ultraviolet light to make the reflection to
infrared sensor.
6. An infrared sensor place in the correct side, for example such as left infrared sensor detect
the white surface
7. Make sure all IC chip pins not spoiled, this will affect the operated of line follower robot.
Insert and pull out all IC chip from breadboard with carefully to avoid IC chip pin spoiled.
8. Make sure wire connected with the Printed Circuit Board (PCB) are not loose for
dysfunction. The large number of wire connection in the circuit made it too difficult to
solder.
9. Please double check the soldering point in Printed Circuit Board (PCB) for confirm all
soldering point on the Printed Circuit Board (PCB) are corrected and without short circuit.
10. Soldering iron/gun place in the safety area when soldering component into the Printed
Circuit Board (PCB).
11. All wire must keep into fixed place for avoid any blocking example like wheel of racing toy
car, base racing toy car and etc.
12. A variable resistor must connect with one resistor before to 5V power supply because
protection and prevent burn off the variable resistor.
10. A servo motor cannot support over 5V, if not there will be burn off the servo motor.
101
11. Connected the diode with DC Motor (toy racing car) for avoid feedback current spoiled the
whole circuit.
12. Cut the black carpet must careful because route have a turning point, if wrongly cut then
will make racing toy car out of the route.
13. The distance between two pair of infrared sensors is 2cm; the path for line follower robot
must be over 2cm.
14. The surface of route without any white dot or else, this will affect result of operated.
15. Make sure connection of the PIC16F84 in the correct position, if not there will spoil the
microcontroller.
16. The program was difficult to implement as it was our first time encounter with
microcontroller programming in assembly language.
17. Used the screw to fix the position of motor and wheel for prevent the wheel loose and lost
when line follower robot operated.
18. In the model designed to show line follower robot (toy racing car), DC motor should be
decreased high voltage by diode and should draw less current otherwise high motor current
will damage the entire circuit.
19. Wrongly wire connection on PLC to make the project application.
20. Make sure drill holes on strip boards with carefully, because this will make the strip board
shock circuits.
102
SUMMARY
This chapter is introduced what is the line follower robot, explain each circuit how to function
and basic structure. We have been using a lot of components to make a line follower robot, for example
such as LM7805 voltage regulator, Infrared Sensor (IR Sensor), LM393 Dual Differential Comparator,
74LS04 Hex Inverters, Quadruple Half-H driver L-293D and etc.
The result to make the line follower robot have been learned some skill and how to co-operation
with group mate in this project. We have made two type line follower robot are racing toy car without
wireless remote control and Intelligence Car known as I-Car. One of the projects successful is debug
the solution from failure. We have been facing a lot of problem about this project and used what
method solved it.
103
CONCLUSION & RECOMMENDATION
There are a lot of problems met along the whole trimester for this project. Firstly, designing the
schematic of the project is quite time consuming for a beginner who never design one before. A lot of
hard works need to be done to complete the schematic. Besides that, PCB design will wasting a lot of
time for the project. If want to design a good and efficient PCB trace, more time will be spend and
more hard works needed to done the PCB design, if not, poor PCB design will be produced and it will
cause future problems like hardware problems.
Hardware problems are hard to be debugged and solved, which mean it is quite a time
consuming problem that will slow down the whole working process for this project. Some problems
like sensor not functioning and burned of components are met. When stuck on some problems without
solution, helps will be needed among course mate or get advises from lecturer. When hardware part
had no problem, programming part can be done rapidly unless there are fatal bugs that needed to be
solved. To solve programming problems, a lot of tries are needed and it is quite time consuming if
problem cannot be solved after few tries.
Besides that, monetary problem is also main problem occur in this project which it limiting the
growth of the project. Not enough money budget to spend, features of the project will be limited and
sometimes it will make the working process become longer because the lack of money. Some problem
like burned of components that will be let us bought back new one component.
104
After solving all those problems, the line follower robot can work very smoothly. Features like
line tracking and barrier sensing will be progress in smoothly. After the project, research on line
follower robot will be continued to add in more features and making this project to be more advanced.
Further study is needed to improve one‟s knowledge and experiences.
105
REFERENCES
1. Al Williams, 2004, Build Your Own Printed Circuit Board, published by the McGraw-Hill
Companies.
2. D. W. Smith, 2006, PIC in Pratice A Project-Based Approach, published by Newnes.
3. David Cook, 2009, Robot Building for Beginners, published by Apress.
4. Raymond Murphy, 1998, Essential Grammar in Use Second Edition, published by the press
syndicate of the University of Cambridge
5. Welcome to the Electronics Club, 23 August 2010, website:
http://www.kpsec.freeuk.com/index.htm
6. L7800 series Positive Voltage Regulators Datasheet.pdf, November 2004, published by
ST.Mircoelectronics, website:
http://www.datasheetcatalog.org/datasheet2/8/0ishsf7y9sp31h690e60g8gclc3y.pdf
7. LM393 Low Power Low Offset Voltage Dual Comparator Datasheet.pdf, 04 July 2008,
published by Taitron Compenents Incorporated, website:
http://www.taitroncomponents.com/catalog/Datasheet/LM393.pdf
8. LM193/LM293/LM393/LM2903 Low Power Low Offset Voltage Dual Comparator
Datasheet.pdf, published by National Semiconductor Corporation, website:
http://www.national.com/ds/LM/LM193.pdf
106
9. Remote Control Decoded PT2262 Datasheet.pdf, August 1999, published by Princeton
Technology Corp, website: http://www.spelektroniikka.fi/kuvat/PT2262.pdf
10. Remote Control Decoded PT2272 Datasheet.pdf, August 1999, published by Princeton
Technology Corp, website: http://www.spelektroniikka.fi/kuvat/PT2272.pdf
11. L293, L293D Quadruple Half-H Drivers Datasheet.pdf, September 1986, Published by
Texas Instruments, website:
http://www.jvmbots.com/pafiledb/uploads/2094d75f6b33202ecab8d50ccbc2c639.pdf
12. Jaseung Ku, 17 December 2005, A Line Follower Robot.pdf, website:
http://online.physics.uiuc.edu/courses/phys405/P405_Projects/Fall2005/Robot_project_jase
ung_.pdf
13. New Reseach, 01 January 2009, Basic Component Reference Website, website:
http://e3novice.blogspot.com/2009/01/httpacademic.html
14. Mr. Aidil Bin.AB.Gani, March 2010, ** Welcome to Aidil Home Page **, website:
http://aidiel.webs.com/
15. Switch from Wikipedia, the free encyclopedia, website: http://en.wikipedia.org/wiki/Switch
16. Push-button from Wikipedia, the free encyclopedia, website:
http://en.wikipedia.org/wiki/Push-button
17. Liquid Crystal Display from Wikipedia, the free encyclopedia, website:
http://en.wikipedia.org/wiki/Liquid_crystal_display
107
18. Battery from Wikipedia, the free encyclopedia, website:
http://en.wikipedia.org/wiki/Battery_%28electricity%29
19. Sandpaper from Wikipedia, the free encyclopedia, website:
http://en.wikipedia.org/wiki/Sandpaper
20. Eric Seale, 10 July 2003, Make a PCB, website:
http://www.solarbotics.net/library/techniques/buildpcb.html
21. Ayur Veda, 2010, Step In PCB Fabrication Process, Published by HubPages, website:
http://hubpages.com/hub/Steps-In-PCB-Fabrication-Technique
22. Perry Babin, 1998, Basic Car Audio Electronics, website: http://www.bcae1.com
23. Servomotor, website: http://people.ee.duke.edu/~cec/final/node59.html
24. Welcome to Cytron Technologies – Robot. Head To Toe: PIC Training Malaysia, PIC
Microcontroller, 2006, published by Cytron Technologies Sdn. Bhd, website:
http://www.cytron.com.my
108
APPENDICES
METHODOLOGY
1. Procedures of Assembly Components
1.1 Making PCB Steps Involved
1.1. Prepare the required circuit diagram.
1.2. List out the components in the eagle
software.
1.3. Drawn the connection of circuit diagram in PCB
format.
1.4. Finish the drawn connection of circuit
diagram then print out the circuit diagram
on sticker paper using by laser printer.
109
1.5.
Cut
the board to final size and shape using by handsaw or
jet saw.
1.6. Ironing the circuit diagram pasted on
the bare board (coated with a thin layer of
copper) from sticker paper and
1.7. Carefully take out the sticker paper from bare
board and fixer the back line is not clear.
1.8. After that, drill holes on the specified
places using by Portable Mini Torque
Electric Drill.
110
1.9. This stage is removing all non-masked copper
using by Etching Powder and give the board a good
wash under boiling water to remove all trances of the
etchant.
1.10. Carefully scrub off the mask with
sandpaper on PCB.
1.11. Used soldering iron to solder each component
into PCB and test each soldering point have short the
circuit or not using by multimeter.
1.12. Complete the PCB in this stage.
111
RESULTS & DISCUSSION
1. Toy Racing Car
1.1 Components List
No Name of Item Range / Value Quantity
1. Battery 9.6V 1
2. Battery 4.8V 1
3. SPDT Switch PCS 2
4. Voltage Regulator LM7805 1
5. Heat Sink PCS 1
6. Capacitor 0.1µF 2
7. Resistor 330Ω 2
8. Resistor 1KΩ 4
9. Resistor 470Ω 2
10.
Variable Resistor
(Preset)
10KΩ 4
11.
Dual-Voltage
Comparator
LM393 1
12. Relay 5VDC 2
13. Transistor C9013 2
14. Diode IN4001 10
15 DC Motor 5VDC 2
16. IR Sensor Set 2
112
1.3 The PCB diagram of Full Complete Set of Toy Racing Car
1.4 The graphical diagram of Full Complete Set of Toy Racing Car
Bottom View Top View
113
Front View Behind View
Left View Right View
114
2. Intelligence Car (I-Car)
2.1 Components List
No. Name of Item Range/ Value Quantity
1. Battery 9.6V 2
2. SPDT Switch PCS 2
3. Voltage Regulator LM7805 2
4. Heat Sink PCS 2
5. Capacitor 0.1µF 4
6. Wireless Remote Control
(Transmitter)
Set 1
7. Wireless Remote Control
(Receiver)
Set 1
8. Resistor 330Ω 5
9. Resistor 470 Ω 5
10. Resistor 1K Ω 10
11. Variable Resistor (Preset) 10K Ω 10
12. Dual-Voltage Regulator LM393 3
13. IR Sensor Set 5
14. LED PCS 3
15. Transistor C9013 4
16. Hex Inverter 74LS04 1
17. Quadruple Half-H Driver L-293D 1
No. Name of Item Range/ Value Quantity
115
No. Name of Item Range/ Value Quantity
18. Diode IN4001 8
19. PIC Microcontroller 16F84A 1
20. Capacitor 104 3
21. Crystal 32KHz 1
22. Relay 5VDC 2
23. LED Arrow Display PCS 1
24. Servo Motor PCS 2
25. Wheels PCS 2
26. Castor PCS 2
27. Printed Circuit Board A4 2
28. Screw & Nut Set 20
29. 40-Pin Header Single Row PCS 2
30. 2-Pin PSU Connector PCS 40
31. Molex 2-Pin Power Connector Set 2
32. Socket* PCS 1
33. USB ICSP PIC Programmer &
ICSP Programmer Socket
Set 1
34. Mahjong Paper PCS 10
35. Poster Color Black 1
36. Poster Color White 1
37. Maker Pen Black 1
116
No. Name of Item Range/ Value Quantity
38. Poster Color Pen* PCS 1
39. Hot Glue PCS 1
40. Iron Robot Chasis PCS 1
41. Sticker Paper A4 10
42. Jumper Wire ( Red, Black,
Yellow, White, Blue, Orange,
Violet, Grey)
3 meter 8
43. 8-pins Socket PCS 3
44. 14-pins Socket PCS 1
45. 16-pins Socket PCS 4
46. 18-pins Socket PCS 1
47. Sand Paper A4 3
48. Acid* 3KG 1
49. Breadboard PCS 6
50. Mini Jumper* SET 2
117
2.2.2 The PCB diagram of Wireless Remote Control (Transmitter) Circuit
2.3.2 The PCB diagram of Wireless Remote Control (Receiver) Circuit
118
2.4.2. The PCB diagram of PIC Microcontroller Circuit
2.5.2. The PCB diagram of Sensor Barrier Circuit
119
2.6.2. The PCB diagram of Infrared Sensor Circuit
2.7.2 The PCB diagram of Motor Drive Circuit
120
2.8.2 The PCB diagram of LED Arrow Display
121
2.9 The Graphical Diagram of I-Car
Bottom View
Top View
Front View
Behind View
Left View
Right View
122
2.11 Programming Assembly Language into I–Car
1. Press the MPLAB IDE v8.46.
2. When opened the MPLAB v8.46, will
shown below
3. Click a new file.
4. Appear a new page.
5. Type the coding at the page.
6. Click the highlight shown below.