Int Project Coding
Int Project Coding
PROJECT/TRAINI
NG
REPORT
ON EMBEDDED
SYSTEM
POOJA
ROLL NO: 16257551
SSIET,JALANDHAR
A PROJECT REPORT
On
EMBEDDED SYSTEM
At
INFOWIZ
Chandigarh
2
ACKNOWLEDGEMENT
This project bears on imprint of many people. I sincerely thank my project guide Er.
Amit Solanki from INFOWIZ for guidance and encouragement in carrying out this
project work.
Place: Chandigarh
Date: ,2019
3
EMBEDDED SYSTEMS
TABLE OF CONTENTS
1.3 Capacitor..........................................................................23-24
1.3.6 Current..........................................................................28
1.3.7 Voltage..........................................................................28
1.3.8 Resistance.....................................................................28
1.4.1 Voltmeter......................................................................29-30
1.4.2 Ammeter.......................................................................30-31
1.4.3 Ohmmeter.....................................................................31-32
1.4.4 Diodes...........................................................................32-34
4
1.5 Light Emitting Diode......................................................34-35
1.6 Relay................................................................................40
1.6.1 Operation....................................................................40-41
1.6.2 Application.................................................................41-42
4.1 Kiel..................................................................................55-55
5
4.1.1 p Vision 3 IDE..............................................................55-56
4.2.2 Executing......................................................................59-59
(5) ABOUT C 61
5.7 3D Verification................................................................73-74
6.1 Definition.........................................................................77-78
6.2 Objective..........................................................................78-78
6
7.1 Block diagram & Components........................................79-79
8.3 Conclusion.......................................................................92-93
8.5 References........................................................................93-94
7
Content of Figures
1.4 Capacitor 19
1.7 Diodes 32
8
2.1 AND Gate 47
2.2 OR Gate 48
(4) About C 61
5.3 IR Sensor 81
5.4 LEDs 82
5.6 Resistance 84
9
5.8 Jumper Wire 87
Content of Table
10
Introduction
About ‘INFOWIZ ’
INFOWIZ was formed in 2009 with the mission to provide Industrial training to
aspiring Engineers and technical support to industries. Within a short span of 9
years “INFOWIZ” has become one of the leading organizations which offer state of
art professional IT solutions, Industrial trainings, technical support and consultancy
to software companies in India and abroad. Due to quality assurance and high level
of commitments in our services, we have won quite a few accolades and are
associated with reputed universities and popular corporates, in the field. We strive
to impart personalized, professional and contemporary experiential trainings on all
the engineering streams that are necessary for the career, success and growth for
both students & industry respectively.
Business Overview
Company Strategy
11
Vision:
• To provide unique & high quality trainings that exceeds the expectations
of our esteemed Students and Clients.
Purpose:
• To be a leader in the Industrial training industry by providing enhanced
relationship and profitability .
Mission statement:
• To build long term relationships with our students and clients and provide
exceptional customer services by pursuing business through innovation
and advanced technology.
Core values:
• We believe in treating our students & customers with respect and faith,
• We grow through creativity, research and innovation,
• We integrate honesty, integrity and business ethics into all aspects of our
business functioning
Goals:
• Regional & National expansion in the field of trainings/software consultancy
and develop a strong base of students & corporates.
• Increase the assets and investments of the company to support the
development of services.
• To build good reputation in the field of Industrial trainings & software
consultancy and become a key player in the industry.
Accolade
INFOWIZ won the NATIONAL AWARD for 3 consecutive years 2014-
2015,2015-2016 & 2016-2017 for BEST Industrial Training
• Best Education Provider Award 2017 from Punjab Education Minister
S Dalijit Singh Cheema.
• Best Industrial Training Award 2016 from Honorable GOVERNER of
Punjab & Haryana.
12
• Best Industrial Training Award 2015 from Dr .Udit Raj (MP) & Mrs.
Vimla Mehra (IPS Delhi)
Product Portfolio
• CCDP certification
• Robotics
• MATLAB
• C/C++/Data structure
13
Business Information
Business Type: Industrial Training on Engineering courses, IT Solutions,
Implementation
State: Chandigarh (UT) Location(s): Chandigarh, Bhatinda Country:
India
Employee Count: 50 (Including CEO & MD)
Delivery Lead-time: depend on the type of course and training
Business Name:INFOWIZ
Business Address: SCO 118-120, Basement, Sector 34A, Chandigarh
Business Email: info@HYPERLINK "mailto:info@INFOWIZ
.co.in"INFOWIZ.HYPERLINK "mailto:info@infowiz .co.in"co.HYPERLINK
"mailto:info@infowiz.co.in"in
Business Tel: +91172-4567-88HYPERLINK "tel:172-4567-888" +91 9888-
500-888 +91 9888-600-888
Principal Customers
Sno URL's
Projects Country
.
1 Viva Sales www.INFOWIZ .in/viva sales UK
2 Mds Creative www.mdscreative.com Germany
3 Liddle TV www.filmon.com UK
Paradigms(Androi Ongoing
4
d) Australia
5 Print cost www.popgraphics.net UK
6 PSTDO Bootstrap www.bootstrap.achieversperfect.com USA
7 Essence software www.essencesoftwares.com Australia
Dashboard Ongoing
8
(WordPress) USA
9 Real state www.realstate.INFOWIZ .in Russia
Deal www.dealpartners.co.uk.gridhosted.c
10 partners(Word o.uk
Press) UK
14
Management & leadership
INFOWIZ is led by a team of professionals and technicians who are honest,
committed and always ready to accept contemporary challenges. The leadership
roles are
Mr . Kamaljot kansal(CEO).1
Mr. Kansal has been turning ideas into realities ever since he has taken up the
task of promoting INFOWIZ. In his own words “I never dreamt about success I
worked for It.” reflects that he believes in talk less and work more theory. No
doubt under his leadership INFOWIZ has become one of strongest companies in
the field of IT solutions in less than a decade. His management fundamental is
“team work” as he takes along, talks along all his team members and appreciates
and attributes their contribution to the success of INFOWIZ. He is determined
to bring INFOWIZ in the top 5 companies in the country
Dr. Seema has with more than 9 years of practical experience in the field is one of
the strongest pillars of INFOWIZ. Her management style is unique and well
accepted by the students and associates. She believes in taking new challenges and
.implementing rational strategies for the benefit of organization
ROADMAP OF FUTURE
IFOWIZ future plans include regional and national expansion through both
COCO and FOFO business models. Our 1st COCO branch is already operational
at Bhatinda. Being an ISO certified company and member of CII we have
attained very high level of accomplishments in the Industrial training business
that we would want to take to masses. INFOWIZ is committed to develop its
strengths & core competencies with continues research & technical excellence. It
would never cease to embrace and add latest technological advancements in the
field of trainings and pass the same to the students as and when demand will
arise, creating the best and most modern atmosphere for learning.
15
16
17
1.1 ELECTRONIC DEVICES
Figure 1.1.1
R=V / I
where
R is the resistance of the object, usually measured in ohms, equivalent to
J.s/C2
18
Resistors are two-terminal devices that restrict, or resist, the flow of current. The
larger the resistor, the less current can flow through it for a given voltage (an
equation known as Ohm's law, V=113, relates current, resistance, and voltage).
Electrical resistance within the resistor body is caused by the collisions of electrons
in motion through the resistor. Such collisions cause energy to be dissipated in the
form of heat or light (as in a toaster or light bulb). Resistance is measured in Ohms
- a 1 Ohm resistor is relatively small, and a 100KOhm resistor is relatively large.
Resistors find many uses in electronic systems, On the Digital board, resistors are
used to limit the current that flows into an output LED (so they don't burn too
bright and destroy themselves) and to limit the current that flows in response to a
button or switch input being activated. The Digital board uses several different
resistor values. Of course, the correct resistor must be loaded in the correct place
on the PCB.
Resistors come in many shapes and sizes, and depending on their size and
construction technology, they can dissipate differing amounts of power (the
amount of power dissipated in a resistor can be calculated using the equation P=I 2
R, where I is the current flowing through the resistor and R is the resistance).
Typically, resistors used in digital systems encounter relatively low voltages and
currents, and therefore, they can be relatively small. The Digital resistors are rated
to dissipate 250mW of power, or 1/4 Watt. Resistors that can dissipate more than
1/4 Watt are physically larger. For example, power resistors that can dissipate
several Watts or more can be cigar-sized or even larger. For small resistors, resistor
values are "encoded" as a series of coloured bands on the resistor body.
To determine the value of a small resistor (i.e., 1/8 Watt or 1/4 Watt), first locate
the tolerance band on one end of the resistor - it will typically be either gold (59%
tolerance) or silver (10% tolerance). The colour band at the other end of the
resistor is band1. Use the table below to find the two-digit number associated with
the colours of bands 1 and 2. The band nearest the tolerance band is the multiplier
(or exponent) band - the digits associated with the first two colour bands are
19
multiplied by 10 raised to the power indicated by the colour of the multiplier band.
The following table associates band colours to digits and multiplier factors. Simply
multiply the two-digit value by the multiplier, and you’ve got the resistor value.
Table 1.1.1
Resistors are manufactured with many body colours, with tan or light brown being
the most typical. The only significant resistor body colours are white and blue;
these colours signify a non flammable or fusible resistor. Such resistors are used in
circuits where overheating might pose a safety risk. In circuit schematics and in
parts lists, resistor reference designators always begin with an "R". You can see
several rectangular white boxes with "R-" on the Digital board silk-screen. The
schematic symbol for a resistor is shown above. Resistors are non-polarised, so
they can be placed in a PCB in any orientation.
20
For a wide variety of materials and conditions, the electrical resistance does not
depend on the amount of current flowing or the amount of applied voltage. V can
either be measured directly across the object or calculated from a subtraction of
voltages relative to a reference point. The former method is simpler for a single
object and is likely to be more accurate. There may also be problems with the
latter method if the voltage supply is AC and the two measurements from the
reference point are not in phase with each other.
A series circuit is a circuit in which resistors are arranged in a chain, so the current
has only one path to take. The current is the same through each resistor. The total
resistance of the circuit is found by simply adding up the resistance values of the
individual resistors:
Figure 1.3.1
21
1.2.3 PARALLEL CIRCUITS
A parallel circuit is a circuit in which the resistors are arranged with their heads
connected together, and their tails connected together. The current in a parallel
circuit breaks up, with some flowing along each parallel branch and re-combining
when the branches meet again. The voltage across each resistor in parallel is the
same.
Figure 1.3.2
A parallel circuit is shown in the diagram above. In this case the current supplied by
the battery splits up, and the amount going through each resistor depends on the
resistance. If the values of the three resistors are:
The individual currents can also be found using I = V / R. The voltage across each
resistor is 10 V, so:
22
I1 = 10 / 8 = 1.25 A
I2 = 10 / 8 = 1.25 A
I3=10 / 4 = 2.5 A
Note that the currents add together to 5A, the total current.
If the resistors in parallel are identical, it can be very easy to work out the
equivalent resistance. In this case the equivalent resistance of N identical resistors
is the resistance of one resistor divided by N, the number of resistors. So, two 40-
ohm resistors in parallel are equivalent to one 20-ohm resistor; five 50-ohm
resistors in parallel are equivalent to one 10-ohm resistor, etc.
You have three resistors in parallel, with values 6 ohms, 9 ohms, and 18 ohms. The
smallest resistance is 6 ohms, so the equivalent resistance must be between 2
ohms and 6 ohms (2 = 6 /3, where 3 is the number of resistors).
Doing the calculation gives 1/6 + 1/12 + 1/18 = 6/18. Flipping this upside down
gives 18/6 = 3 ohms, which is certainly between 2 and 6.
1.3 CAPACITORS
23
A capacitor is an electrical device that can store energy in the electric field between
a pair of closely-spaced conductors (called 'plates). When voltage is applied to the
capacitor, electric charges of equal magnitude, but opposite polarity, build up on
each plate.
A capacitor is a two-terminal device that can store electric energy in the form of
charged particles. You can think of a capacitor as a reservoir of charge that takes
time to fill or empty. The voltage across a capacitor is proportional to the amount
of charge it is storing - since it is not possible to instantaneously move charge to or
from a capacitor, it is not possible to instantaneously change the voltage across a
capacitor. It is this property that makes capacitors useful on the Digital board.
Figure 1.3.1
Capacitance is measured in Farads - a one Farad capacitor can store one Coloumb
of charge at one volt. For engineering on a small scale (i.e., hand-held or desk-top
devices), a one Farad capacitor stores far too much charge to be of general use (it
would be like a car having a 1000 gallon gas tank). More useful capacitors are
measured in micro-farads (uF) or pico-farads (pF). The terms "milli-farad" and
"nano-farad" are rarely used. Large capacitors often have their value printed
plainly on them, such as "10 uF (for 10 microfards). Smaller capacitors, appearing
24
as small disks or wafers, often have their values printed on them in an encoded
manner (similar to the resistor packs discussed above). For these capacitors, a
three digit number indicates the capacitor value in Pico farads. The first two digits
provides the "base" number, and the third digit provides an exponent of 10 (so, for
example, "104" printed on a capacitor indicates a capacitance value of 10 x 10 4 or
100000 pF). Occasionally, a capacitor will only show a two digit number, in which
case that number is simply the capacitor value in pF. (To be complete, if a capacitor
shows a three digit number and the third digit is 8 or 9, then the first two digits are
multiplied by .01 and .1 respectively). Often, a single letter is appended to the
capacitance value -this letter indicates the quality of the capacitor.
Capacitors are used on the Digital board to keep the voltage supplies and some
signals stable regardless of circuit activity, and to store charge when inputs are
activated in order to slow their assertion times. Twenty-seven capacitors of three
different types and values are used on the Digital board. The majority of the
capacitors (24 out of 27) are used to decouple Digitals integrated circuits from the
power supply. These 24 bypass capacitors are placed on the board very close to the
Vdd pins of all chips, where they can supply the short-term electrical current needs
of the chips. Without such bypass capacitors, individual chips could cause the Vdd
supply across the entire Digital board to dip below 5V during times of heavy
current demand. Nearly every chip in every digital system uses bypass capacitors.
Bypass capacitor value can be determined if the worst-case current requirements
are known (by using the formula I = C dv/dt), but more typically, capacitors in the
range 0.01uF to 0.1uF are used without regard to the actual current requirements.
The Digital board uses 0.047uF bypass capacitors. The board also uses a bulk
bypass capacitor (C27) to provide charge storage for the entire circuit board - this
large 47uF capacitor can supply the individual bypass capacitors during times of
exceptional need.
25
A capacitor can store electric energy when disconnected from its charging circuit,
so it can be used like a temporary battery. Capacitors are common used in
electronic devices to maintain power supply while batteries are being changed.
(This prevents loss of information in volatile memory.)
Capacitors are used in power supplies where they smooth the output of a full or
half wave rectifier. They can also be used in charge pump circuits as the energy
storage element in the generation of higher voltages than the input voltage,
Capacitors are connected in parallel with the power circuits of most electronic
devices and larger systems (such as factories) to shunt away and conceal current
fluctuations from the primary power source to provide a "clean" power supply for
signal or control circuits. Audio equipment, for example, uses several capacitors in
this way, to shunt away power line hum before it gets into the signal circuitry. The
capacitors act as a local reserve for the DC power source, and bypass AC currents
from the power supply. This is used in car audio applications, when a stiffening
capacitor compensates for the inductance and resistance of the leads to the
lead-acid car battery.
1 1 1 1
......
Ceq C1 C2 Cn
26
Figure 1.3.1
Ceq = C1 + C2 + ….. + Cn
Metal film: Made from high quality polymer foil (usually polycarbonate,
polystyrene, polypropylene, polyester (Mylar), and for high quality
capacitors polysulfone), with a layer of metal deposited on surface. They
have good quality and stability, and are suitable for timer circuits. Suitable
for high frequencies.
Mica: Similar to metal film. Often high voltage. Suitable for high
frequencies. Expensive.
27
factor, high frequency coefficient of dissipation, their capacity depends on
applied voltage, and their capacity changes with aging. However they find
massive use in common low-precision coupling and filtering applications.
Suitable for high frequencies.
Timing - for example with a 555 timer IC controlling the charging and
discharging.
28
Coupling - for example between stages of an audio system and to connect
aloud speaker.
1.3.6 CURRENT
Electric current Is by definition the flow of electric charge. The Sl unit of electric
current Is the ampere (A), which Is equal to a flow of one coulomb of charge per
second.
1.3.7 VOLTAGE
1.3.8 RESISTANCE
29
Ohm's law predicts the current in an (ideal) resistor (or other ohmic device) to be
applied voltage divided by resistance:
I=V/R
Where
1.4.1 VOLTMETER
30
design objectives of the instrument is to disturb the circuit as little as possible and
hence the instrument should draw a minimum of electric current to operate. This is
achieved by using a sensitive ammeter or micrometer in series with a high
resistance.
The moving coil galvanometer is one example of this type of voltmeter. It employs
a small coil of fine wire suspended in a strong magnetic field. When an electrical
current is applied, the galvanometer's indicator rotates and compresses a small
spring. The angular rotation is proportional to the current that is flowing through
the coil For use as a voltmeter, a series resistance is added so that the angular
rotation becomes proportional to the applied voltage
1.4.2 AMMETER
Moving iron ammeters use a piece or pieces of iron which move when acted upon
by the electromagnetic force of a fixed coil of (usually heavy gauge) wire. This type
of meter responds to both direct and alternating currents (as opposed to the
moving coil ammeter, which works on direct current only).
To measure larger currents, a resistor called a shunt is placed in parallel with the
meter. Most of the current flows through the shunt, and only a small fraction flow
through the meter. With this solution, arbitrarily large currents can be measured
with a single meter. Traditionally, the meter used with a shunt reaches full-scale
31
deflection when a voltage of 50mV is placed across its coil, so shunts are typically
designed to produce a voltage drop of 50mV when carrying their full rated current.
More modern ammeter designs are non-mechanical, or digital, and use an analog
to digital converter to measure the voltage across the shunt resistor. The ADC is
read by a microcomputer that performs the calculations to display the current
through the resistor.
One problem with the use of an ammeter is the need for the meter to be inserted
into the circuit and become part of it. Mistakenly placing the ammeter in parallel
with a circuit will blow the fuse, possibly damaging the meter and causing injury. In
AC circuits, an inductive coupling adapter converts the magnetic field around a
conductor into a small AC current that can be easily read by a meter. See clamp
meter. In a similar way, accurate DC non-contact arnmeters have been constructed
using Hall effect magnetic field sensors
1.4.3 OHMMETER
A more accurate type of ohmmeter has an electronic circuit that passes a constant
current I through the resistance, and another circuit that measures the voltage V
across the resistance. According to the following equation, derived from Ohm's
Law, the value of the resistance R is given by:
32
R= V/1
For high-precision measurements the above types of meter are inadequate, This is
because the meter's reading is the sum of the resistance of the measuring leads,
the contact resistances and the resistance being measured. To reduce this effect, a
precision ohmmeter has four terminals, called Kelvin contacts. Two terminals carry
the current from the meter, while the other two allow the meter to measure the
voltage across the resistor. With this type of meter, any current drop due to the
resistance of the first pair of leads and their contact resistances is ignored by the
meter. This four terminal measurement technique is called Kelvin sensing, after
William Thomson, Lord Kelvin, who invented the Kelvin bridge in 1861 to measure
very low resistances.
1.4.4 DIODES
Diodes are constructed from the same type of silicon as transistors, but they are
simpler devices that have only two terminals. Called the anode and cathode, the
two ends of the diode are constructed of positively doped silicon (the anode)
joined directly to negatively doped silicon (the cathode). This pn junction exhibits
the unique characteristic of allowing current to flow in only one direction (from the
anode to the cathode). Diodes have a minimum threshold voltage (or Vth, usually
around 0.7V) that must be present between the anode and cathode in order for
current to flow. If the anode voltage is not at least Vth greater than the cathode
voltage, no current will flow. Likewise, if the cathode voltage is greater than the
anode voltage, the diode is said to be reverse-biased and no current will flow. In an
ideal diode, if the diode voltage equals the threshold voltage (plus a small
amount), then unlimited current can flow without causing the voltage across the
diode to increase. And, if the diode is reversed-biased, no current will flow
regardless of reverse-voltage magnitude.
33
Figure 1.4.1
Diodes
Diodes have many uses in electronic circuits. As examples, they are frequently
employed in power supply circuits to turn alternating current (AC) into direct
current (DC), they are used to limit the amount of over-voltage that can be applied
to a given circuit node, and they are used to force given circuit nodes to remain at
or below a certain voltage. On the Digital board, three individual diodes are used
to limit the voltages applied to the Red, Blue, and Green pins of the VGA connector
(M) to 0.7VDC or less.
Note the identification methods used to mark a diode's cathode -terminal: the
schematic symbol has a line at the point of the triangle; the physical diode has a
dark line on the plastic component housing; and the silk-screen pattern has both a
line at the cathode end and a square pad for the cathode lead. When loading a
diode into a circuit board, make sure that the dark line on the diode matches the
line in the silk-screen pattern. Remember that since diodes allow current to flow in
only one direction, a backwards diode will cause the circuit to malfunction.
34
LED SCHEMATIC SYMBOL
Figure 1.4.2
Diodes locations on the circuit board are typically denoted with a "D-" reference
designator
LEDs are available in a wide variety of sizes and shapes. The 'standard' LED has a
round cross-section of 5mm diameter and this is probably the best type for general
use, but 3mm round LEDs are also popular.
Round cross-section LEDs are frequently used and they are very easy to install on
boxes by drilling a hole of the LED diameter, adding a spot of glue will help to hold
the LED if necessary. LED clips are also available to secure LEDs in holes. Other
cross-section shapes include square, rectangular and triangular.
35
As well as a variety of colours, sizes and shapes, LEDs also vary in their viewing
angle. This tells you how much the beam of light spreads out. Standard LEDs have a
viewing angle of 600 but others have a narrow beam of 300 or less.
Rapid Electronics stock a wide selection of LEDs and their catalogue is a good guide
to the range available.
LEDs produce more light per Watt than do incandescent bulbs; this is useful
in battery powered devices.
LEDs can emit light of an intended colour without the use of colour filters
that traditional lighting methods require. This is more efficient and can
lower initial costs.
The solid package of an LED can be designed to focus its light. Incandescent
and fluorescent sources often require an external reflector to collect light
and direct it in a usable manner.
When used in applications where dimming is required, LEDs do not change
their colour tint as the current passing through them is lowered, unlike
incandescent lamps, which yellow.
LEDs are built i1nside solid cases that protect them, unlike incandescent
and discharge sources, making them extremely durable.
LEDs have an extremely long life span: upwards of 100,000 hours, twice as
long as the best fluorescent bulbs and twenty times longer than the best
incandescent bulbs. (Incandescent bulbs can also be made to last an
extremely long time by running at lower than normal voltage, but only at a
huge cost in efficiency; LEDs have a long life when operated at their rated
power.)
Further, LEDs mostly fail by dimming over time, rather than the abrupt
burn-out of incandescent bulbs,
36
LEDs light up very quickly. A typical red indicator LED will achieve full
brightness in microseconds; LEDs used in communications devices can have
even faster response times.
LEDs can be very small and are easily populated onto printed circuit boards.
If you wish to have several LEDs on at the same time it may be possible to connect
them in series. This prolongs battery life by lighting several LEDs with the same
current as just one LED.
Figure 1.5.1
All the LEDs connected in series pass the same current so it is best if they are all the
same type. The power supply must have sufficient voltage to provide about 2V for
each LED (4V for blue and white) plus at least another 2V for the resistor. To work
out a value for the resistor you must add up all the LED voltages
37
1.5.3 SIZE AND SHAPES
Figure 1.5.2
LEDs are produced in a staggering array of shapes and sizes, The 5 mm cylindrical
package (red, fifth from the left) is the most common, estimated at 80% of world
production. The colour of the plastic lens is often the same as the actual colour of
light emitted, but not always. For instance, purple plastic is often used for infrared
LEDs, and most blue devices have clear housings. There are also LEDs in extremely
tiny packages, such as those found on blinking.
LEDs are available in red, orange, amber, yellow, green, blue and white. Blue and
white LEDs are much more expensive than the other colours.
Figure 1.5.3
38
The colour of an LED is determined by the semiconductor material, not by the
colouring of the 'package' (the plastic body). LEDs of all colours are available in
uncoloured packages which may be diffused (milky) or clear (often described as I
water clear'). The coloured packages are also available as diffused (the standard
type) or transparent
Some of these applications are further elaborated upon in the following text.
Architectural lighting.
Status indicators on all sorts of equipment.
Traffic lights and signals.
Exit signs.
Motorcycle and Bicycle lights.
Toys and recreational sporting goods.
Railroad crossing signals.
Light bars on emergency vehicles.
Elevator Push Button Lighting.
Red, yellow, green, and blue LEDs can be used for model railroading
applications.
39
Remote controls, such as for TVs and VCRs, often use infrared LEDs.
Glow lights, as a more expensive but longer lasting and reusable alternative
to Glow sticks.
Because of their long life and fast switching times, LEDs have been used for
automotive high-mounted brake lights and truck and bus brake lights and
turn signals for some time, but many high-end vehicles are now starting to
use LEDs for their entire rear light clusters. Besides the gain in reliability,
this has styling advantages because LEDs are capable of forming much
thinner lights than incandescent lamps with parabolic reflectors. The
significant improvement in the time taken to light up (perhaps 0.5s faster
than an incandescent bulb) improves safety by giving drivers more time to
react.
LED phototherapy for acne using blue or red LEDs has been proven to
significantly reduce acne over a 3 month period.
40
As Voltage Reference in electronic circuits. The constant voltage drop (e.g.
1.7 V for a normal red LED) can be used instead of a Zener diode in
low-voltage regulators. Zener diodes are not available below voltages of
about 3 V.
1.6 RELAY
A relay is an electrical switch that opens and closes under control of another
electrical circuit. In the original form, the switch is operated by an electromagnet
to open or close one or many sets of contacts. It was invented by Joseph Henry in
1835. Because a relay is able to control an output circuit of higher power than the
input circuit, it can be considered, in a broad sense, to be a form of electrical
amplifier
1.6.1 OPERATION
When a current flows through the coil, the resulting magnetic field attracts an
armature that is mechanically linked to a moving contact. The movement either
makes or breaks a connection with a fixed contact. When the current to the coil is
switched off, the armature is returned by a force approximately half as strong as
the magnetic force to its relaxed position. Usually this is a spring, but gravity is also
used commonly in industrial motor starters. Most relays are manufactured to
operate quickly. In a low voltage application, this is to reduce noise. In a high
voltage or high current application, this is to reduce arcing.
If the coil is energized with DC, a diode is frequently installed across the coil, to
dissipate the energy from the collapsing magnetic field at deactivation, which
would otherwise generate a spike of voltage and might cause damage to circuit
components. If the coil is designed to be energized with AC, a small copper ring
can be crimped to the end of the solenoid. This "shading ring" creates a small out-
41
of-phase current, which increases the minimum pull on the armature during the
AC cycle. [1]
1.6.2 APPLICATIONS
to isolate the controlling circuit from the controlled circuit when the two
are at different potentials, for example when controlling a mains-powered
device from a low-voltage switch. The latter is often applied to control
office lighting as the low voltage wires are easily installed in partitions,
which may be often moved as needs change. They may also be controlled
by room occupancy detectors in an effort to conserve energy,
42
NOR are accomplished using NC contacts. Due to the failure modes of a
relay compared with a semiconductor, they are widely used in safety critical
logic, such as the control panels of radioactive waste handling machinery.
43
1.7.2 ALTERNATING VS DIRECT CURRENT
So far we have been talking about a constant supply of voltage - one that doesn't
change over time, such as a battery before it starts to run down. This is what is
commonly know of as direct current or DC which is to say that there is no change in
voltage over a period of time. This is not the kind of electricity found coming out of
the sockets in your wall at home. The electricity supplied by the hydro company
changes over short periods of time (it changes over long periods of time as well,
but that's an entirely different story...) Every second, the voltage difference
between the two terminals in your wall socket fluctuates between about -170 V
and 170 V sixty times a second (if you live in North America, at least ...). This brings
up two important points to discuss.
Firstly, the negative voltage... All a negative voltage means is that the electrons are
flowing in a direction opposite to that being measured. There are more electrons in
the tested point in the circuit than there are in the reference point, therefore more
negative charge. If you think of this in terms of the two tanks of water - if we're
sitting at the bottom of the empty tank, and we measure the relative pressure of
the full one, its pressure will be more, and therefore positive relative to your
reference. If you're at the bottom of the full tank and you measure the pressure at
the bottom of the empty one, you'll find that it's less than your reference and
therefore negative. (Two other analogies to completely confuse you.., it's like
describing someone by their height. It doesn't matter how tall or short someone is
- if you say they're tall, it probably means that they're taller than you.
Secondly, the idea that the voltage is fluctuating. When you plug your coffee maker
into the wall, you'll notice that the plug has two terminals. One is a reference
voltage which stays constant (normally called a "cold" wire in this case ...) and one
is the "hot" wire which changes in voltage realtive to the cold wire. The device in
the coffee maker which is doing the work is connected with each of these two
wires. When the voltage in the hot wire is positive in comparison to the cold wire,
44
the current flows from hot through the coffee maker to cold. One one-hundred and
twentieth of a second later the hot wire is negative compared to the cold, the
current flows from cold to hot. This is commonly known as alternating current or
AC.
So remember, alternating current means that both the voltage and the current are
changing in time.
45
46
2.1 DIGITAL ELECTRONICS
Digital electronics are those electronics systems that use a digital signal instead of
an analog signal. Digital electronics are the most common representation of
Boolean algebra and are the basis of all digital circuits for computers, mobile
phones, and numerous other consumer products.
The most common "fundamental unit" of digital electronics is the logic gate. By
combining numerous logic gates (from tens to hundreds of thousands) more
complex systems can be created. The complex system of digital electronics is
collectively referred to as a digital circuit.
To most electronic engineers, the terms "digital circuit", "digital system" and
"logic" are interchangeable in the context of digital circuits
2.1.1 ADVANTAGES
The usual advantages of digital circuits when compared to analog circuits are,
Digital systems interface well with computers and are easy to control with
software. It is often possible to add new features to a digital system without
changing hardware, and to do this remotely, just by uploading new
software. Design errors or bugs can be worked-around with a software
upgrade, after the product is in customer hands.
47
2.2 LOGIC LEVELS
A Boolean logical input or output always takes one of two logic levels, These logic
levels can go by many names Including: on / off, high (H) / low (L), one (1) / zero
(0), true (T) / false (F), positive / negative, positive / ground, open circuit / close
circuit, potential difference I no difference, yes / no. For consistency, the names 1
and 0 will be used below
A logic gate performs a logical operation on one or more logic inputs and produces
a single logic output. The logic normally performed is Boolean logic and is most
commonly found in digital circuits. Logic gates are primarily implemented
electronically using diodes or transistors, but can also be constructed using
electromagnetic relays, fluidics, optical or even mechanical elements.
A logic gate is an elementary building block of a digital circuit. Most logic gates
have two inputs and one output. At any given moment, every terminal is in one of
the two binary conditions low (0) or high (1), represented by different voltage
levels. The logic state of a terminal can, and generally does, change often, as the
circuit processes data. In most logic gates, the low state is approximately zero volts
(0 V), while the high state is approximately five volts positive (+5 V).There are
seven basic logic gates: AND, OR, XDR, NOT, NAND, NOR, and XNOR.
AND GATE
The AND gate is so named because, if 0 is called "false" and 1 is called "true," the
gate acts in the same way as the logical "and" operator. The following illustration
and table show the circuit symbol and logic combinations for an AND gate. (In the
48
symbol, the input terminals are at left and the output terminal is at right.) The
output is "true" when both inputs are "true." Otherwise, the output is "false."
Symbol
Figure 2.2.1
Table 2.2.1
OR GATE
The OR gate gets its name from the fact that it behaves after the fashion of the
logical inclusive "or." The output is "true" if either or both of the inputs are "true."
If both inputs are "false," then the output is "false."
Symbol
49
Figure 2.2.2
Table 2.2.2
NOT GATE
The NOT gate or inverter is a digital logic gate that implements logical negation. It
behaves according to the truth table to the right. A HIGH output (1) results if the
inputs is LOW (0). If the input is HIGH (1), a LOW output (0) results.
Symbol
Figure 2.2.3
Input Input
1 0
0 1
Table 2.2.3
NAND GATE
50
The NAND gate operates as an AND gate followed by a NOT gate. It acts in the
manner of the logical operation "and" followed by negation. The output "false" if
both inputs are "true." Otherwise, the output is "true."
Symbol
Figure 2.2.4
Table 2.2.4
NOR GATE
The NOR gate is a combination OR gate followed by an inverter, its output is “true”
if both inputs are “false”. Otherwise, the output is “false.”
Symbol
51
Figure 2.2.5
Table 2.2.5
XNOR GATE
Figure 2.2.6
52
Table 2.2.6
53
54
3.1 INTRODUCTION TO EMBEDDED SYSTEM
55
An embedded system is some combination of computer hardware and
software, either fixed in capability or programmable, that is specifically
designed for a particular kind of application device. Industrial machines,
automobiles, medical equipment, cameras, household appliances,
airplanes, vending machines, and toys (as well as the more obvious cellular
phone and PDA) are among the myriad possible hosts of an embedded
system.
56
57
Keil
4.1 keil
Keil don’t make a compiler for every different microcontroller architecture. They
concentrate on just a few chip families that they can support very well. That's why
most of Keil customers will agree that they have the best development tools for
ARM, XC1 6x/C1 6x/ST1 0, 251 and 8051 microcontroller families. Since they have
fewer product lines to support, Keil can dedicate more time to better supporting
each tool chain. That allows them to improve their tools and product support
faster than other vendors.
pVision3, the new IDE from Keil Software, combines project management, make
facilities, source code editing, program debugging, and complete simulation in one
powerful environment, pVision3 helps you get programs working faster than ever
while providing an easy-to-use development platform. The editor and debugger are
integrated into a single application and provide a seamless embedded project
development environment.
58
The Device Database which automatically sets the assembler, compiler, and
linker options for the chip you select. This prevents you from wasting your
time configuring the tools and helps you get started writing code faster.
59
4.2 Keil Software
Figure 4.2.1
The pVision Debugger from Keil supports simulation using only your PC or laptop,
and debugging using your target system and a debugger interface. pVision includes
traditional features like simple and complex breakpoints, watch windows, and
execution control as well as sophisticated features like trace capture, execution
profiler, code coverage, and logic analyzer. Viewing Code & Data
The pVision Debugger provides a number of ways to display variables and program
objects.
60
Source Code Windows display your high-level language and assembly
program source code.
4.2.2 Executing
pVision offers several ways you can control and manipulate program execution.
61
Execution Trace - Execution trace information for each executed instruction
is stored by pVision.
Advanced analysis' tools are available to help you test and debug your embedded
applications.
Code Coverage helps you determine how much of your program has been
tested.
The Performance Analyser shows how functions and code blocks in your
program perform.
The Execution Profiler shows execution counts and time for each line of
code or instruction.
The Logic Analyser shows how various signals and variables in your program
change over time.
4.2.4 Simulation
Simulation capabilities make it possible to test your target system without target
hardware.
62
Instruction Simulation simulates the exact effects and timing of each IVICU
instruction.
Interrupt Simulation simulates the cause and effect of a system or
peripheral interrupt.
Peripheral Simulation simulates the effects of on-chip peripherals including
special function registers.
Debugger Functions allow you to expand the command scope of the
debugger and create and respond to stimuli.
Toolbox Buttons are a convenient way for you to connect debugger
functions buttons on the user-interface.
Target debug drivers allow you to test programs running on target hardware.
63
ABOUT C
Of the three languages, C allows the most precise control of input and output. C is
also rather more terse than Fortran or Pascal. This can result in short efficient
programs, where the programmer has made wise use of C's range of powerful'
operators. It also allows the programmer to produce programs, which are
impossible to understand.
Programmers who are familiar with the use of pointers (or indirect addressing, to
use the correct term) will welcome the ease of use compared with some other
languages. Undisciplined use of pointers can lead to errors, which are very hard to
trace. This course only deals with the simplest applications of pointers.
It is hoped that newcomers will find C a useful and friendly language. Care must be
taken in using C. Many of the extra facilities, which it offers, can lead to extra types
of programming error. You will have to learn to deal with these to successfully
make the transition to being a C programmer.
It was designed and written by a man named Dennis Ritche. In late seventies C
begin to replace the more familiar languages of that time like ALGOL etc. Ritche
seems to have been rather surprised that so many programmers preferred C to
64
older languages like FORTRAN or PL/I or the newer like Pascal and APL. But, that's
what happened.
Alphabets, Constants,
digits, special variables, Instructions Program
symbols keywords
Figure 5.1.1
5.1.1 USAGE
One consequence of C's wide acceptance and efficiency is that the compilers,
libraries, and interpreters of other higher-level languages are often implemented in
C.
65
The following simple application appeared in the first edition of K&R, and has
become the model for an introductory program in most programming textbooks,
regardless of programming language. The program prints out "hello, world" to the
standard output, which is usually a terminal or screen display. Standard output
might also be a file or some other- hardware device, depending on how standard
output is mapped at the time the program is executed.
Main()
{
printf(“hello, world\n”);
}
The above program will compile on most modern compilers that are not in
compliance mode, but does not meet the requirements of either C89 or C99.
Compiling this program in C99 compliance mode will result in warning or error
messages. 151 A compliant version of the above program follows:
#include <stdio.h>
int main(void)
{
printf(“hello, world\n”);
return 0;
}
This program which will print out the message This is a C program
#include <stdio.h>
main()
{
66
printf(“This is a C program\n”);
}
Though the program is very simple, a few points are worthy of note.
Every C program contains a function called main. This is the start point of the
program.
#include <stdio.h> allows the program to interact with the screen, keyboard and
file system of your computer. You will find it at the beginning of almost every C
program.
Main() declares the start of the function, while the two curly brackets show the
start and finish of the function. Curly brackets in C are used to group statements
together as in a function, or in the body of a loop. Such a grouping is known as a
compound statement or a block.
printf("This is a C program\n");
prints the words on the screen. The text to be printed is enclosed in double quotes.
The \n at the end of the text tells the program to print a newline as part of the
output.
One reason for the power of C is its wide range of useful operators. An operator is
a function which is applied to values to give a result. You should be familiar with
operators such as+,-,/.
Arithmetic operators are the most common. Other operators are used for
comparison of values, combination of logical states, and manipulation of individual
binary digits. The binary operators are rather low level for so are not covered here,
67
Operators and values are combined to form expressions. The values produced by
these expressions can be stored in variables, or used as a part of even larger
expressions.
y = (m* X) + C
This assignment will save the value of the expression in variable y.
Arithmetic operators
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulo Reduction (Remainder from integer division)
68
divide a number by zero, this will cause an error, usually causing the program to
crash.
count = count + 1;
C has some operators which allow abbreviation of certain types of arithmetic
assignment statements.
Shorthand Equivalent
i++; or ++i; i = i + 1;
i--; or --i; I = I – 1;
These operations are usually very efficient. They can be combined with another
expression.
X = a * b++; is equivalent to x = a * b;
x = b+ 1;
Versions where the operator occurs before the variable name change the value of
the variable before evaluating the expression, so
x = --i * (a + b) ; is equivalent to i = i – 1;
x = I * (a + b);
69
These can cause confusion if you try to do too many things on one command line.
You are recommended to restrict your use of ++ and - to ensure that your programs
stay readable.
Shorthand Equivalent
i+ = 10; i = i + 10;
i -= 10; i = i - 10;
i *= 10; i = i * 10;
i /= 10; i = i / 10;
Logical Connectors
Symbol Meaning
&& And
II Or
! Not
70
Not operates on a single logical value, its effect is to reverse its state. Here is an
example of its use.
if ( ! acceptable)
printf(“Not Acceptable !!\n”);
C code Meaning
Table 5.1.1
1. SWITCH-CASE STATEMANT:
71
The control statement that allows us to make a decision from the number of
choices is called a switch, or switch case - default. Since these three keywords go
together to make up the control statement
2. FOR LOOP:
For is the most popular looping instruction. It allows us to specify three things in a
single line.
3. WHILE:
A while loop is ideally suited for cases where we want to do something a fixed no.
of times.
4. BREAK:
We often come across situations where we want to jump out of a loop instantly,
without waiting to get back to conditional test. The keyword break allows us to do
this. When break is encountered inside any loop, control automatically passes to
the first statement after the loop,
5. INPORT:
Inport reads a word from a hardware port
Inportb reads a byte from a hardware port
6. OUTPORT:
Outport outputs a word to a hardware port
72
Outportb outputs a byte to a hardware port
Figure 5.1.1
Licence Proprietary
Website www.labcenter.com
73
Table 5.1.1
The Proteus Design Suite is a proprietary software tool suite used primarily for
electronic design automation. The software is used mainly by electronic design
engineers and technicians to create schematics and electronic prints for
manufacturing printed circuit boards.
It was developed in Yorkshire, England by Lab center Electronics Ltd and is available
in English, French, Spanish and Chinese languages.
5.5.1 History
The first version of what is now the Proteus Design Suite was called PC-B and was
written by the company chairman, John Jameson, for DOS in 1988. Schematic
Capture support followed in 1990, with a port to the Windows environment shortly
thereafter. Mixed mode SPICE Simulation was first integrated into Proteus in 1996
and microcontroller simulation then arrived in Proteus in 1998. Shape based auto-
routing was added in 2002 and 2006 saw another major product update with 3D
Board Visualisation. More recently, a dedicated IDE for simulation was added in
2011 and MCAD import/export was included in 2015. Support for high speed
design was added in 2017.Feature led product releases are typically biannual,
while maintenance based service packs are released as required.
5.5.2 Product Modules
The Proteus Design Suite is a Windows application for schematic capture,
simulation, and PCB (Printed Circuit Board) layout design. It can be purchased in
many configurations, depending on the size of designs being produced and the
requirements for microcontroller simulation. All PCB Design products include an
auto router and basic mixed mode SPICE simulation capabilities.
5.5.3 Schematic Capture
Schematic capture in the Proteus Design Suite is used for both the simulation of
designs and as the design phase of a PCB layout project. It is therefore a core
component and is included with all product configurations.
5.5.4 Microcontroller Simulation
The micro-controller simulation in Proteus works by applying either a hex file or a
debug file to the microcontroller part on the schematic. It is then co-simulated
along with any analog and digital electronics connected to it. This enables its use in
a broad spectrum of project prototyping in areas such as motor control
temperature control and user interface design. It also finds use in the general
hobbyist community and, since no hardware is required, is convenient to use as a
training or teaching tool Support is available for co-simulation of:
• Microchip Technologies PIC10, PIC12, PIC16 ,PIC18, PIC24,dsPIC33
Microcontrollers.
• Atmel AVR (and Arduino), 8051 and ARM Cortex-M3 Microcontrollers
74
• NXP 8051, ARM7, ARM Cortex-M0 and ARM Cortex-M3 Microcontrollers.
• Texas Instruments MSP430, PICCOLO DSP and ARM Cortex-M3
Microcontrollers.
• Parallax Basic Stamp, Free scale HC11, 8086 Microcontrollers.
5.5.6 PCB Design
The PCB Layout module is automatically given connectivity information in the form
of a netlist from the schematic capture module. It applies this information,
together with the user specified design rules and various design automation tools,
to assist with error free board design. PCB's of up to 16 copper layers can be
produced with design size limited by product configuration.
5.5.7 3D Verification
The 3D Viewer module allows the board under development to be viewed in 3D
together with a semi-transparent height plane that represents the board enclosure.
STEP output can then be used to transfer to mechanical CAD software such as Solid
works or Autodesk for accurate mounting and positioning of the board.
75
Figure 5.8.1
76
Operating system Windows, macOS, Linux
Website www.arduino.cc/en/Main/Software
Table 5.8.1
77
amount of accessible knowledge that can be of great help to novices and experts
alike.
Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and
programming. As soon as it reached a wider community, the Arduino board started
changing to adapt to new needs and challenges, differentiating its offer from
simple 8-bit boards to products for IoT applications, wearable, 3D printing, and
embedded environments. All Arduino boards are completely open-source,
empowering users to build them independently and eventually adapt them to their
particular needs. The software, too, is open-source, and it is growing through the
contributions of users worldwide.
5.10 Why Arduino?
Thanks to its simple and accessible user experience, Arduino has been used in
thousands of different projects and applications. The Arduino software is easy-to-
use for beginners, yet flexible enough for advanced users. It runs on Mac,
Windows, and Linux. Teachers and students use it to build low cost scientific
instruments, to prove chemistry and physics principles, or to get started with
programming and robotics. Designers and architects build interactive prototypes,
musicians and artists use it for installations and to experiment with new musical
instruments. Makers, of course, use it to build many of the projects exhibited at
the Maker Faire, for example. Arduino is a key tool to learn new things. Anyone -
children, hobbyists, artists, programmers - can start tinkering just following the
step by step instructions of a kit, or sharing ideas online with other members of the
Arduino community.
There are many other microcontrollers and microcontroller platforms available for
physical computing. Parallax Basic Stamp, Net media's BX-24, Phid gets, MIT's
Handy board, and many others offer similar functionality. All of these tools take
the messy details of microcontroller programming and wrap it up in an easy-to-use
package. Arduino also simplifies the process of working with microcontrollers, but
it offers some advantage for teachers, students, and interested amateurs over
other systems:
Inexpensive - Arduino boards are relatively inexpensive compared to other
microcontroller platforms. The least expensive version of the Arduino module
can be assembled by hand, and even the pre-assembled Arduino modules cost
less than $50
Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX,
and Linux operating systems. Most microcontroller systems are limited to
Windows.
Simple, clear programming environment - The Arduino Software (IDE) is easy-
to-use for beginners, yet flexible enough for advanced users to take advantage
of as well. For teachers, it's conveniently based on the Processing programming
environment, so students learning to program in that environment will be
familiar with how the Arduino IDE works.
78
Open source and extensible software - The Arduino software is published as
open source tools, available for extension by experienced programmers. The
language can be expanded through C++ libraries, and people wanting to
understand the technical details can make the leap from Arduino to the AVR C
programming language on which it's based. Similarly, you can add AVR-C code
directly into your Arduino programs if you want to.
Open source and extensible hardware - The plans of the Arduino boards are
published under a Creative Commons license, so experienced circuit designers
can make their own version of the module, extending it and improving it. Even
relatively inexperienced users can build the breadboard version of the
module in order to understand how it works and save money.
Introduction
Robots are always a fancy topic for students, hobbyists and DIYers. If
you are beginner, then building a robot (like a car or an arm) is probably
one of the important projects to do after learning about the basics.
79
As a continuation to that project, I will be implementing Bluetooth
Controlled Robot using Arduino and a few other components and build
a simple robotic car that can be controlled using an Android Phone
(through an App) over Bluetooth Communication.
Apart from Arduino, which is the main controlling module of the project,
there are two other important modules that you have to be familiar with
in order to implement the Bluetooth Controlled Robot project.
They are the HC-05 Bluetooth Module and the L298N Motor Driver
Module
Hardware Requirement
The list of components mentioned here are specifically for controlling 4 different
loads
80
Components Required
Arduino UNO
L298N Motor Driver Module
HC-05 Bluetooth Module
Robot Chassis
4 x 5V Geared Motors
Connecting Wires
Battery Holder
Power Supply
Android Phone
Bluetooth Controller
Figure
Code
The Arduino code for Bluetooth Controlled Robot project is given below.
void setup()
{
pinMode(13,OUTPUT);
pinMode(12,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
Serial.begin(9600);
Serial.println("enter f to Forward and r to Reverse");
81
}
void loop()
{
while(Serial.available())
{
//wait until user enters the data
}
if(Serial.available())
{
if(Serial.available())
{
char input = Serial.read();
switch(input)
{
case'f':
Serial.println("Forward");
digitalWrite(13,HIGH);
digitalWrite(9,HIGH);
digitalWrite(12,LOW);
digitalWrite(10,LOW);
break;
case 'r':
Serial.println("Reverse");
digitalWrite(12,HIGH);
digitalWrite(10,HIGH);
digitalWrite(13,LOW);
digitalWrite(9,LOW);
break;
Serial.println("Forward");
digitalWrite(13,HIGH);
digitalWrite(9,HIGH);
digitalWrite(12,LOW);
digitalWrite(10,LOW);
break;
Serial.println("Reverse");
digitalWrite(12,HIGH);
digitalWrite(10,HIGH);
digitalWrite(13,LOW);
digitalWrite(9,LOW);
break;
default:
Serial.println("you entered wrong character");
}//end of switch
}//end of lf
}//end of loop
82
}
Arduino uno R3
83
releases. The Uno board is the first in a series of USB Arduino boards, and the
reference model for the Arduino platform. The ATmega328 on the Arduino Uno
comes pre-programmed with a bootloader that allows uploading new code to it
without the use of an external hardware programmer. t communicates using the
original STK500 protocol. The Uno also differs from all preceding boards in that it
does not use the FTDI USB-to-serial driver chip. Instead, it uses the Atmega16U2
(Atmega8U2 up to version R2) programmed as a USB-to-serial converter.
The Motor Driver is a module for motors that allows you to control the working
speed and direction of two motors simultaneously .This Motor Driver is designed and
developed based on L293D IC.
L293D is a 16 Pin Motor Driver IC. This is designed to provide bidirectional drive
currents at voltages from 5 V to 36 V.
The L293D is a 16 pin IC, with eight pins, on each side, to controlling of two DC motor
simultaneously. There are 4 INPUT pins, 4 OUTPUT pins and 2 ENABLE pin for each
motor.
84
Pin 1: When Enable1/2 is HIGH, Left part of IC will work, i.e motor connected with
pin 3 and pin 6 will rotate.
Pin 2: Input 1, when this pin is HIGH the current will flow though output 1.
Pin 7: Input 2, when this pin is HIGH the current will flow though output 2.
Pin 8: VSS, this pin is used to give power supply to connected motors from 5V to 36V
maximum depends on Motor connected.
Pin 9: When Enable 3/4 is HIGH, Right part of IC will work, motor connected with pin
11 and pin 14 will rotate.
Pin 10: Input 4, when this pin is HIGH the current will flow though output 4.
Pin 11: Output 4, this pin is connected with one terminal of motor.
Pin 14: Output 3, this pin is connected with one terminal of motor.
Pin 15: Input 3, when this pin is HIGH the current will flow though output 3.
85
Figure
86
HC-05 Bluetooth Module
Pin Description
Bluetooth serial modules allow all serial enabled devices to communicate with each
other using Bluetooth.
It has 6 pins,
87
3. GND: Ground Pin of module.
Robot Chassis
Two Wheel Drive Robot Chassis is the perfect mechanical platform for your robotics
projects. This kit includes all the hardware and mechanical components required to
build your robot, including motors, wheels, chassis, nut and bolts, etc. Just add your
electronics - Arduino/Raspberry Pi and Motor Driver and you can start programming
your robot. It offers a large space with predrilled holes for mounting sensors and
electronics as per your requirement. This robot chassis lets you get your mechanical
platform ready in minutes and quick start your robot building process. Allows you to
spend your time and effort on programming your robot rather than designing and
fabricating your own custom platform.
Wheeled Robots are most popular robot platforms and are easy to run, maintain and
use. Simple to build and program, this kit is the simplest robot platform. Highly
recommended for beginners and novice users. Building robots using this wheeled kit
is fun and a great learning experience too. This 2WD Robot Kit costs less, is simple to
88
build, maintain and program. Our 4WD Kit lets you go faster, carry more weight, and
carry bigger load compared to the 2WD Kit. You can build line following robots,
obstacle avoiding robots, maze solvers, and other robots using this kit.
We have carefully selected the high quality motor, wheel and platform combination
for the best performance. All 2 Motors come with matching wheels and mounting
hardware. The motors also include encoder discs to measure speed and the distance
traveled by the robot. Since this is a very popular robot kit, numerous assembly and
usage instructions are available on the internet. Assembly manual is included in the
kit too.
89
Solder two wires to each DC motor. Then fix two motors to the chassis using
the screws. If you need any clarification, please watch this and it will show you
how to assemble the Smart 2WD Robot car chassis.
90
Connecting Wires
A jump wire (also known as jumper wire, or jumper) is an electrical wire, or group of
them in a cable, with a connector or pin at each end (or sometimes without them –
simply "tinned"), which is normally used to interconnect the components of
a breadboard or other prototype or test circuit, internally or with other equipment
or components, without soldering.
Individual jump wires are fitted by inserting their "end connectors" into the slots
provided in a breadboard, the header connector of a circuit board, or a piece of test
equipment.
Power supply
Power supply is an electrical device that supplies to an electrica powerl load. The
primary function of a power supply is to convert electric current from a source to the
correct voltage, current, and frequency to power the load. As a result, power
supplies are sometimes referred to as electric power converters. Some power
supplies are separate standalone pieces of equipment, while others are built into the
load appliances that they power. Examples of the latter include power supplies found
in desktop computers and consumer electronics devices. Other functions that power
supplies may perform include limiting the current drawn by the load to safe levels,
shutting off the current in the event of an electrical fault, power conditioning to
prevent electronic noise or voltage surges on the input from reaching the
load, power-factor correction, and storing energy so it can continue to power the
load in the event of a temporary interruption in the source power (uninterruptible
power supply).
All power supplies have a power input connection, which receives energy in the form
of electric current from a source, and one or more power output connections that
deliver current to the load. The source power may come from the electric power
grid, such as an electrical outlet, energy storage devices such as batteries or fuel
cells, generators or alternators, solar power converters, or another power supply.
The input and output are usually hardwired circuit connections, though some power
91
supplies employ wireless energy transfer to power their loads without wired
connections. Some power supplies have other types of inputs and outputs as well,
for functions such as external monitoring and control.
92
1. Download Smart car on your android mobile
4. At the beginning, the app will show "Disconnected" and the HC-06 Bluetooth
7. Now the app will show connected and the LED in the HC-06 Bluetooth module
Working
Assemble the robot, make the necessary connections and upload the code to
Arduino. If you understood the HC-05 Bluetooth Module tutorial, then understanding
the Bluetooth Controlled Robot project is very easy.
93
First, in the Android App, I have used 5 keys as Forward, Reverse, Left, Right and
Stop. The corresponding data associated with each key is as follows:
Forward – 1
Reverse – 2
Left – 3
Right – 4
Stop – 5
In the Arduino code, the Arduino UNO receives any of this data from the Bluetooth
Module (as per the key pressed) and performs a simple switch case operation, where
each case associated with appropriate instructions to the Motor Driver Input Pins.
For example, if ‘Forward’ key is pressed in the Android Phone, then ‘1’ is transmitted.
Arduino will then make IN1 and IN3 as HIGH and IN2 and IN4 as LOW to achieve a
forward motion.
Limitations
Applications
94
95
Thank you
96