You are on page 1of 34

NY vENT0RE INT0 A0T0NATEB R0B0TICS

By Subhransu Mishra









Dedication








Ok right, we are then ready to start off into the world of robotics. Almost all of us had hardly any
practical experience with simple electronics and now this is ROBOTICS. Huge leap I guess. Well Ill try to
make it as simple as I can. So get ready to soar away
Concept#1
This was never the big Q What is a voltage or a voltage level?, but it always creates doubts. So read
along very carefully. Voltage level could be a wire placed at a particular volt or a path on the circuit
board. There is nothing called an absolute voltage, a voltage /potential is with respect to another point.
When we say This battery is of 12 volts , we mean the battery is of +12 volts with respect to the ve
terminal (Did u get it??).There is always a reference for the measurement of the voltage/potential. That
reference is often called the ground. Now people try to think ground in terms of a pin of an IC
(integrated circuit) or the negative pin of the battery. If you do, then please stop doing that. Ground is a
concept, ground is voltage level with which all the references are made. So we can call any level on our
circuit as ground, all other voltages being measured with respect to it. Our ICs will need 5 volts for
operation, the motors will need 12 Volts, so we will have three voltage levels in our circuit. The voltage
levels are:
a. Gnd (ground) b. 12 Voltage level c. 5
Voltage level
The batterys negative pin is always (almost)
connected to the Gnd (ground) because we get
a +ve voltage with respect to it from the +ve
pin. Well this question can be asked :How can
we obtain +6 and -6 voltage level from two 6-
volts battery








Concept#2
Signal /information/electronics data is almost always in form of Voltage level not as current or
resistance.LDR (a sensor)have change in resistance with the intensity of light, but that is not the signal
for the circuits. So the change in resistance has to be converted (by some circuit) into change in Voltage
to be a data for electronics circuit
Analog electronics deals with analog data (in which the voltage varies to produce the data) e.g. voltage
in speaker, LDR sensor output etc. Anything that happens in real world is analog data like intensity of
light reflected from a wall or loudness of voice
Digital electronics deals with digitalized data( In which there are only 2 voltage level. The higher level
denoted by 1 and lower voltage level denoted by 0.) e.g. All the signals inside computer, microcontroller.
Our circuits will have both analog and digital parts. The analog part will actually be the sensors which
collect physical world data and then convert them to voltage data o be understood by the circuits and
then they are converted to digital data to be understood by microcontroller
Concept#S

Understanding the circuit diagrams and your connections are very
important. Read this very carefully. I hope you have understood the very
concept of ground and voltage level quite well.
We have used and drawn circuits with a battery in it, but from now on we
shall use Voltage level. These two circuits on left are for glowing of led, do
you realize that these two are absolutely the same. I have taken the
negative as Gnd and hence the V voltage level is created at the top. The
different voltage levels are represented by horizontal line with its voltage
mentioned there. And remember any continuous connection without any
resistance will have the same voltage through out
A circuit will constitute of various lesser circuits. In our venture into the
world of robotics we shall learn those lesser circuit (the building blocks of
main circuit). The lesser circuits have a definite function and definite
connection. Now when you have a circuit diagram having a lot wiring and
connections then try to identify the lesser circuits and find their functions independent of others. This
way you will be able to understand the circuits better.

Nulti-metei


With the help of a multi-meter you can measure resistance, current,
voltage & continuity.
Measuring Resistance: Connect the black cable of the multi-meter to the
common socket(COM) & the red cable to the middle socket(V mA).Let us
assume that you are trying to measure 10K (but you dont know for sure)
resistance . Set the knob at the 200, if you get a 1 then the voltage you
are measuring is higher than 200, hence change to 2000, even now you
get 1 it means the resistance is higher than 2000. Similarly continue.

Measuring Voltage: Let us assume you are trying to measure 15 volts from
a source, set knob at 20 V . Now touch the black pin to the reference point and the red pin to the
voltage of the point you want to measure. The voltage 15 will be displayed, if you get a ve value it
means the black pin is at higher potential than the red pin .If you obtain a 1 on the LCD then the
voltage you are measuring is higher than the voltage set (at the knob).If you want to measure the
voltage drop across a resistance or a led connect the pins of multi-meter in parallel. Have a look at the
diagrams. I guess you have understood how and where to connect the multi-meter for voltage
measurement. For voltage drop across the resistance connect the multi-meter to point A and point B .
Measuring Current: Now be careful, first do
some calculations and if the current you are
measuring is less than 200mA, then set the
knob at 200mA. Connect the pins of the multi-
meter in series (when the current mode is set
the multi-meter acts as a wire with little
resistance). If you feel the current is more
than 200mA then change the red terminal to
the upper socket (10A), then change the knob
to 10A mode. Put the terminals of multi-meter
in series and check the current.


Warning: Dont use the multi-meter to measure current in parallel, it will get damaged because one
terminal will be connected to ground and the other to Gnd . Because in current mode the multi-meter
has low resistance so high current flows through it damaging it.
Checking for continuity: After actual connection of your circuit on bread board or PCB, we check for
continuity. It means checking if there is a connection where it must be or has the connection broken
somewhere in middle. Set the multi-meter in the continuity mode, join the two terminals (red n black)
together, if you hear a sound it means your multi-meter is working. Now whichever connection you
want to check touch the red terminal at one end and the black terminal at the other, If you hear the
sound then that connection is ok. It actually works by checking the resistance in that path.


















Bieauboaiu


Do you see the dark lines drawn over the photo of the breadboard? Well those lines represent the
internal connections of the breadboard. As you can see the two outer rows on either side are
connected horizontally (internally).Please note that there is a GAP between the two outer rows. The
five holes inside (marked A, B, C, D, and E) are vertically connected. You can even see each of those
columns are numbered from 1-60.
ICs are connected across the rift (shown in photo). A, B, C, D, E are connected, hence when a pin is
connected, it has four other holes for connection.
All the ground should be connected (as mentioned there is a gap so you have to manually connect
them). I have marked the Vcc 1, Vcc 2, Vcc 3, and Vcc 4. It means you can keep those rows at different
Voltage levels with respect to the common ground. If you dont need so many different levels then
connect those together, if you need two voltage levels, lets say 5volts for ICs and 12 volts for Motors
then you may keep Vcc 3 & Vcc 4 at 5Volts and Vcc 1 and Vcc 2 at 12 Volts or any combination that you
wish.
Power supply is to be taken from Gnd (ground) & Vcc
Wiring on the bread board is not permanent (like soldering) connection, so we need to have a good
wiring practice for breadboard otherwise our circuits may not work most of the time. I have given a few
diagrams for your reference.


Have a look at the bad wiring practices (Which newbie generally do)

Resistois
Resistors offer a resistance to the flow of current. Resistors are mainly classified according to their
resistance values and their power ratings. The ones that are available in the shops are of 1/4W which
we mainly use. P=I
2
R, P=Power consumed/Heat produced, I=Current through the resistor, R=value of
resistance
We generally use them as: 1. Voltage divider 2. Current limiter 3.Current sensor
Voltage divider:
The figure at the left shows the diagram of a potential/voltage divider.
A potential/voltage is connected to ground at one end and the voltage V
(which we want to divide) at the other. The divided voltage V
d
is obtained in
between the two resistances. Let us analyze
The total resistance between Gnd and V is (R
1
+R
2
), so current through the
resistors is | =
F
(R1+R2)
the current "|" flows from V to Gnd
Now the drop across the resistor R
1
is |R
1
i.e.
FR
1
(R1+R2)

So the voltage at middle point I
d
= (F - |R
1
) = [F -
FR
1
(R1+R2)
=
FR
2
(R1+R2)

Voltage divider
Now this is also a voltage divider, find out the voltages at A, B, C & D

Current limiter:
We know V= IR . Say in a circuit say a torch bulb is connected
to a 5-volt battery and it is consuming 500mA. We now put a
10 ohm resistance in series, so guess what happens to the
current(Current will decrease to 250mA). We shall use this
very often to control the brightness of LED.
LED generally works at 3-4 Volts, so if we give it a direct power
supply of 5Volts then it will burn off as lot of current passes
through the LED and it BOOMS (nah it doesnt make a sound).
If we put
decreases
working v
Current
You might
deal is tha
motor con
inside a m
For sensin
Put this re
flow, but
drop can
idea in the


There are

a resistance i
s. Since curre
voltage for LE
t sensor:
t say whats
at all the ICs n
nsumes then
multimeter to
ng current (le
esistance in s
due to the cu
be measured
e chopper cir
e two types of
n series then
nt decreases
D)
the big deal,
need Voltage
you must use
measure cur
ts say, by tha
eries with the
urrent some p
. Hence we g
rcuit using (L2
f resistors - fix
n the total res
the voltage a
I can measur
to process (n
e the resistor
rrent)
at of a motor
e motor . Sinc
potential drop
get the curren
298 & L297 co
xed and varia
Fix
Varia
sistance in ser
across the LED

re current wit
not current).If
rs as current s
r) we take res
ce the resista
p will take pla
nt, . You
ombination) t
able
xed resistor
able resistors

ries increases
D also decrea
th the help of
f you want to
sensors (And
istance of ve
nce is very le
ace across tha
u wont need
to run steppe
s
s and hence th
ases to 3-4 Vo
f a multimete
o measure the
this is the tec
ry little value
ess it wont af
at resistance.
this now but
er motors
he current
olts (the safe
er. Well the b
e current that
chnique used
(less than 1
ffect the curre
This potentia
t will require


big
t a

).
ent
al
this
Dont worry about the five and six band codes because the commonly available resistances have four
band codes.
Remember that all the values of fixed resistances are not available. Suppose if you want a 2K resistor
in your circuit, you can use a variable resistor (potentiometer) or two 1K resistors in series. However,
only the following resistances are available in the market.
1R0 10R 100R 1K0 10K 100K 1M0
1R2 12R 120R 1K2 12K 120K 1M2
1R5 15R 150R 1K5 15K 150K 1M5
1R8 18R 180R 1K8 18K 180K 1M8
2R2 22R 220R 2K2 22K 220K 2M2
2R7 27R 270R 2K7 27K 270K 2M7
3R3 33R 330R 3K3 33K 330K 3M3
3R9 39R 390R 3K9 39K 390K 3M9
4R7 47R 470R 4K7 47K 470K 4M7
5R6 56R 560R 5K6 56K 560K 5M6
6R8 68R 680R 6K8 68K 680K 6M8
8R2 82R 820R 8K2 82K 820K 8M2

NOTE: Whenever resistors are used, it should be kept in mind that the power dissipation in resistors
should not more than the rated value.

Potentiometeis (P0T ')
A Potentiometer has three terminals. As you can see down below this is the internal construction of the
potentiometer. Do you see the dark 270
o
curve, which is a curved strip of resistive material? Now you
all know the resistance increases with
length, this is how a potentiometer
works. There is a definite stretch of
resistive material between A and B, so
the resistance between the points A and
B is constant. This value of resistance
specifies the value of potentiometer; if
the resistance between point A and B is
100K then we call it a 100K
Potentiometer. Now let us come to the
point w. The point w is connected to the
wiper. This wiper touches the resistive
material and moves along curve. As it
moves along the curve, the length of resistive path between A and W changes, hence the resistance.
Now, did you note that the length of the resistive path also changes between W and B? So when we
turn the dial of the potentiometer clockwise
The resistance between A and B remains constant
The resistance between A and W remains increases
The resistance between W and B remains decreases

Potentiometers are used as:
1. Voltage divider
2. Variable resistor

The standard symbol for a potentiometer
The above figure shows the different types of potentiometers available in the market. The first
potentiometer is mainly used when you want to change the value of resistance rarely and the second
one used when you had to vary resistance frequently. The resistors of the first type are easy to be
inserted in the breadboard and they remain fixed.
Make this completely clear to yourself, that a Potentiometer as a variable resistor and a Potentiometer
as a voltage divider are completely different from each other. Please never, never confuse both of
them.
Potentiometer as a variable resistance: You now understand how the resistance changes (between A
and W / W and B) as we turn the dial/wiper. This is how it is used as a variable resistor. We only take
two varying points, either (A and W) or (W and B), and on turning the knob/wiper we obtain a variable
resistance.
NOTE: While using a potentiometer as a variable resistor
leave the third pin open.




Potentiometer as a potential divider: Now we know what a potential divider is. But still, Id like to
remind you of it again. A potential has two resistances connected between GROUND and V (voltage you
want to divide). So one end is GROUND and other is V. So at the centre you get the
voltage.
The divided voltage is :
I
d
=
IR
2
(R
1
+ R
2
)

Now let us have a look at the potentiometer and think how
it can be used as a voltage/potential divider. As we move
the wiper the value of R
1
and R
2
changes and hence we get
the divided voltage, V
d
at W (the middle pin of
potentiometer)


A voltage divider A potentiometer as a voltage divider
Capacitois
A capacitor is used to store charge. Like resistors there are fixed as well as variable capacitors also. But
we use fixed capacitor in robotics most of the time; variable capacitors often find their application in
analog communication. There are capacitors with no polarity and polarity. Ceramic and Mica capacitors
available have no-polarity, but electrolytic capacitors have a polarity. Their symbols also differ.
On the body of the electrolytic capacitor -ve symbol is shown. Be careful about electrolytic capacitor
because inverting polarity can cause the capacitor to explode. Every capacitor has two factors - value of
its capacitance and the other, the maximum voltage rating. Capacitances vary from 22pF to about
15000uF. Values <.1uF are mainly mica and ceramic capacitors and C>=1uF are electrolytic capacitors.
See the maximum voltage ratings of capacitor when you select electrolytic capacitors

Capacitors, as we all know stores charge or that it acts as a small reservoir of charge. This property is
used chiefly( in robotics) to filter out spikes( sudden change in voltage). This spikes may cause the ICs to
behave abnormally or maybe the microcontroller to restart. Whenever there is a sudden drop in
voltage, charge flows from the capacitor n hence reduces the spike








Filteis
Purpose of the filters:
Where do we use filters:
Types of filters :
Applications:

















Bioues
Diodes are two terminal devices which conduct electricity in one direction. Current flows from the
anode to the cathode when the diode is forward biased. In a normal forward biased diode, energy is
dissipated as heat in the junction, but in LEDs energy is dissipated as visible light. In robotics we use
normal diodes as freewheeling /protection diode (you will come to know of it in relays) or to make a
power supply (rectification circuit). LED's are of two types - IR LED and normal LED. IR LED emits Infra
Red radiations while normal LED emits visible light. So lets first talk about a normal diode. The diodes
mostly used as freewheeling diodes for motors and relays are 1N4001 or 1N4007. These also find
application in the H-bridge also.

Circuit symbol


Actual picture

Current direction

The drop across a Diode is very less, it ranges from 0.68 0 .8 Volts








LIuBT ENITTINu BI0BE (LEB)
In practice we glow the LED by giving it a supply of 5-volts with a resistance in series. From my
experience the value of resistance should not be less than 50 . For normal brightness of color LED we
use resistance of 100 -500
Use this circuit on breadboard to determine the
resistance in series (for a particular Vcc) which you must use with the led for proper working and life of
the LED. Usually for medium light series resistance=330 (for Vcc=5V). The maximum value of 470 can
be inserted for a small light.
NOTE: Always try to experiment; you dont have to follow everything I say. Whats the fun in learning
robotics without making a single mistake?


Infiaieu LEB
The main difference between LED and IR LED is that IR LED emits Infrared Radiations, which we cannot
see by our visible eye(Its visible through cell phone and digital cameras). The second difference is that
IR LED consumes a lot of current and gets damaged faster than LED's. The (IR sensor, IR LED pair) is less
prone to external light effects compared to LDR+LED combination.
For obstacle detection purpose we supply it with 5-Volts and a resistance in series of 50 -300 . More
the resistance less the range
For making sensor for line follower we need very little brightness. There we can use resistance as high as
500 -900 .
The above values may not always be valid , do a little test to determine the proper value of resistance
NOTE: IR LED gets heated fast. Remember that IR LED always creates too many problems. It puts a lot
of pressure on the battery and the voltage regulators. Make sure that the voltage across the IR LED
doesnt exceed 1.4 volts. If possible obtain the data sheet of the IR LED and check the specifications of
the working voltage and the current.
Sensoi
Sensors are the circuit components which aid the robots in interacting with the outside world. Various
types of the sensors that we commonly use in robotics are:
LDR-Light Dependent Resistor
Infrared (IR) sensor
TSOP 1738
GP2D120
Temperature sensor LM35
Acceleration sensors
Condenser mic
In all the sensors some electrical property changes, be it the output voltage or resistance. As a
microcontroller accepts voltages only, all the information from the sensor should be in the form of
voltage. So we have to convert the output into voltage for those sensors whose output is not in the form
of a voltage.
The output of TSOP 1738, LM35, GP2D120 & Acceleration sensors is a voltage. So we can directly feed
them into microcontroller (C).
The resistance of LDR, IR Sensor & Condenser mic changes with the visible light, Infrared light & sound
respectively. So we have to convert this change in resistance into change of voltage. This can be done by
the use of Voltage/Potential divider (Etch this into your mind)
Dont proceed further if you havent understood how the Potential/Voltage divider functions. Go to the
potentiometer page and understand the concept of potentiometer
completely.
The figure on the left represents a voltage divider. A
voltage divider requires a minimum of two resistances
(here R
1
& R
2
) and two voltage levels (here Gnd & V).
The voltage produced is
F
d
=
FR
2
(R
1
+ R
2
)

So if we replace one of the resistances by LDR, it will
still be a Voltage divider and still produce F
d
. Hence,
when the intensity of light varies, the resistance of the
LDR (R
LR
) varies and so does F
d
. This is how we
convert a resistance change into a voltage change

Now lets analyze the sensors. You now know how to convert the resistance into voltage, but have you
given a thought, what is the difference if LDR is placed in place of R
1
& R
2
.Do you realize why I have
placed a potentiometer( as a variable resistance) in place of R
2
. What should be the value of that
variable resistance? Could it be replaced by a fixed resistance? What should be its value?
Well to explain all that here is insensible so we will know and understand these questions as we read
along.





















volt
Voltage re
can also b
get 5V fro
1. Fixed v
In fixed vo
1. +ve vol
NOTE: W
Heat pro
POSITI
This includ
used ones
give less t
heated up
1
The above
capacitors
these cap
transform
tage R
egulators pro
be used in circ
om 12V). Ther
oltage regula
oltage regulat
tage regulato
When the re
oduced
VE VOLTA
des 78xx volt
s are 7805 an
than 6 volts, i
p and will bur

2 3
e diagram sho
s are used for
pacitors).But y
mer, because u
Regula
oduce a fixed
cuits to get a
re are two typ
tors (78xx, 79
tors there is a
ors
egulators re
AGE REG
age regulator
nd 7812. An in
t wont produ
rn off.
ows how to u
r good regula
you must use
unlike battery
atois
DC output vo
low DC volta
pes of voltage
9xx) 2. v
another class
2. -
educe the vo
.
GULATORS
rs. The xx rep
nput voltage o
uce 5Volts an
use 7805 volta
ation. But the
high value of
y the DC from
oltage from va
ge from a hig
e regulators
variable voltag
ification
ve voltage re
oltage some
S
presents the v
of 6 14 volt
nd if you give
age regulator
re is no need
f the capacito
m a transform
ariable DC (a
gh DC voltage
ge regulators
gulators
heat is prod
voltage they p
s is given to a
more than 14
r. In this you c
for it in norm
ors, if you are
mer has ripple
small amoun
e (for example
(LM317)
duced.
produce. The
a 7805 to obt
4 volts, then t
can see that c
mal case (I hav
e taking the in
s in it. These
t of AC on it)
e we use 7805

e most comm
ain 5Volts. If
the IC will get

coupling
ve never used
nput from a
ripples have
. It
5 to

only
you
t
d
led
to the restarting of my microcontroller many times. The mainly available 78xx IC's are 7805,
7809,7812,7815,7824
NOTE: Removing the capacitor doesnt mean you replace it with a wire. Capacitors are used
for storing charges, they are not conductors. So please dont replace the capacitors by wire.
VARIABLE VOLTAGE REGULATORS
Most commonly variable voltage regulator is LM317 although other variable voltage regulators are
available. The advantage of variable voltage regulator is that you can get a variable voltage supply by
just varying the resistance only. The minimum voltage produced by LM317 is 1.2 volts. You may not get
240 resistance, so use any value that you can find nearer to it like 220, 270. The Adj pin is the
adjust pin

Note:
This is a LM317, dont confuse its pin settings with that of 7805
Here the R
2
is the variable resistor (hence use a potentiometer as a variable resistor)
When removing the capacitors, dont replace it with a wire, simply remove the
capacitors.
The pin#1 is not grounded, so dont connect Adj to ground, connect the potentiometer
(as variable resistor) between ground and the Adj.



SWITCB
We all know what a switch is and what it does. Well simply put, it turns devices on and off. Things that
we dont know is the types of the switches available, what the concept of poles is, throws of the
switches and what are the various manual and electronically controlled switches. Lets bask in some
light.

The two figures on the left show two simple switches in open
and closed configuration. It is a single pole single throw
switch.



Poles of a switch refer to how many circuits a switch
can simultaneously operate on. The switch above
operates on one circuit only. You can see the circuit on
the right is a triple pole single throw switch





Throws of a switch are the number of connections
that each pole can have. The figure on the left shows
the Dual pole Dual throw switch, commonly called
the DPDT switch




Now that was all about poles and throws of switches, but we still do not know how to connect a switch
so as to control a LED/motor. The figure on the left hand side
shows how to connect a LED with a switch (to switch it on and
off). A resistance has been given so as to limit the current
flowing through the LED. And you must understand that both
the circuits are identical, one has been shown with a battery
and the other has been shown with Voltage levels.

We all know the switches are operated manually, but what if you need your microcontroller to switch on
and off a street light or a water pump. Do you put the output of the microcontroller into them (dont
even think about it). Well we need switches controlled electrically or electronically (do you understand
the difference). A relay is an example of electrically controlled switch while a transistor used in its cutoff
& saturation region is an electronically controlled switch















RELAY
The figure down below shows the schematics of a SPDT relay (I am sure you now understand what a
SPDT is).Lets say this is a 4.5Volts relay. The input is given at the V1 & V
2
and I guess you have
understood what I mean by that (if you havent then read
along). Do you see the electromagnet connected between V1 &
V
2
? To activate the electromagnet we need 4.5 volts. Now
connect one end to ground and the other to 4.5Volts (this
4.5Volts could be produced by microcontroller or an IC, or even
you could connect a batter to supply that).
When the electromagnet is not activated in the default position
A and C are connected (B and C are disconnected) but when the
relay is activated B and C get connected (A and C are
disconnected
presently).

The diagram on the left gives you an idea how to run a
220Volts motor with a relay. In the figure the relay is not
active now.

Can you draw the circuit controlled by a relay, in which lets say LED A is on and LED B is off when the
relay is not activated & the LED A is off and the LED B is on when the relay has been activated ???
NOTE:
The use of the diode is to prevent a back emf when the electromagnet is switched off
You must use a voltage equal to or higher than the rated voltage of the relay





TRA
When we
course yo
When the
in the cut
region in
Well for s
my transi
divider w
The right
when


ANSIS
talk of transi
ou study trans
e V
be
(The vol
toff region. W
between (0.4
some of us w
stor page firs
hich produce
box represen
Volts
ST0R
istor in robot
sistor in active
tage at the b
When V
be
is g
4 0.8) volts
who dont rea
st.
es the voltage
nts the switch
then emitter
tics, we talk a
e region. So h
base with resp
greater than
is called activ
lly know wha
e (for the
h part of the c
r & collector
bout the cut
here Ill talk a
pect to the em
0.8Volts, the
ve region. Let
at a cutoff, sa

To rem
as a s
what i
switch
Have
box r
(reme
debug

The le
base with re
circuit (you ca
get connecte

off and satur
bout a transi
mitter) is less
e transistor is
t's start with t
aturation & a
mind you aga
switch. We a
it does. If we
h, how do we
a look at the
represents t
mber that?
gging section)
eft box repr
spect to the G
an try to und
ed completing
ration region
stor as a swit
s than 0.4Volt
s in the satur
transistor to g
active region
ain, we are us
all know wha
e want to con
connect it?
e circuit on th
the differen
We had dis
). We treat th
resents the
Gnd).
erstand it in t
g the circuit)
only, while in
tch.
ts, the transis
ration region
glow an LED.
is, please re
sing the tran
at a switch i
nnect a LED w
he left, the da
nt lesser ci
scussed it in
em separate
Voltage/pote
this way, that
n your
stor is
n. The
fer to
sistor
s and
with a
ashed
rcuits
n the
ly.
ential
t
Note:
You can use any value of potentiometer( for voltage divider) just make sure very little
current flows through it (we dont want to waste our battery power on heat), so you
can use any value above 1K
Always use a 10K resistance with the base to increase the base resistance, R
Baxe
.
Whenever a voltage F
BF
is applied then a current starts to flow from the base to the
emitter. Hence, the R
Baxe
increases to reduce the current, otherwise the transistor
will get heated up.
Connect the circuit. Measure the base voltage, I
BL
by connecting the multimeter to the Gnd and I
BL
the
base. Vary the potentiometer to make F
BF
= . 4 , you can see that LED starts glowing (but its
brightness is very less). Vary the potentiometer to make F
BF
= . 8 , you can see that the LEDs
brightness increases. This is because when F
BF
= . 5 V it starts with cut off and when . 4 < F
BF
<
u.7 transistor is in active region and when F
he
= . 8 its in the saturation region. Transistor is a
current controlled device. In the active region I
C
= heI
B
and in saturation region, I
C
> bcI
B
. That
is why the brightness of the LED changes.














LIuB
With our
Recollect
potential
1. C
so
2. N
3. U
ac
4. Yo
co
5. Fo
6. U
7. N
V
va
NOTE: T

If you wou
when it is
is because
put this w

BT SW
knowledge o
what all was
divider to ob
heck with the
omewhere.
ow have an i
nderstand th
ction. Just thi
ou know it we
ollector will g
orm a potent
se the poten
ow before pe
oltage divide
alue of variab
The use of th
uld like to hav
s morning the
e your circuits
way your bulb
WITCB
f transistor as
discussed in
tain voltage v
e multimeter
dea of what y
hat the voltag
ink and figure
ell that when
get joined)
tial divider wit
tial divider v
erforming the
r(i.e. whethe
ble resistance
he variable r
ve your hous
en you have to
s dont work
wont work a
B (us
s a switch and
the sensor. A
varying with
the resistanc
you want the
ge varying wit
e out how you
n V
th a LDR & va
oltage at
e steps 5 & 6
r the LDR wil
e you would u
resistance is
e lamp switch
o use a relay,
at 220 Volts A
at 5Volts D/C
ing L
d with the ide
A light switch
light. Follow
ce of the LDR
switch to do
th light is to b
u are going to
Volts, the tra
ariable resista
t the base of
use step 2 to
l be in place o
use.
s to make pr

I have g
suppose
for R. Yo
of conn
resistan
happen
h off
that
AC or
C
BR &
ea of sensors
will require a
these steps
when its dar
( switch on /s
be used to dr
o do it)
nsistor will sw
ance
the transisto
determine th
of R
1
or R
2
) a
roper adjust
given you a cir
ed to find out
ou also have
ecting the LD
nce above wil
if they are in
& Tian
lets make a
a light sensor
rk and when i
switch off wh
ive the transi
witch on( the
r
he position of
nd step 1 to d
tment
rcuit with no
t the possible
to determine
DR below and
l be. Also find
nterchanged.
nsistoi
light switch
(LDR). Use a
its lighted. N
hen its dark)
istors switch
emitter and
f the LDR in t
determine th
values; you a
e range of val
e what the eff
the fixed
d out what wi

i)
ote it
ing
the
he
e
are
ues
fect
ill

The purpose of the protection diode is to protect the transistor from burning because relay is a coil, i.e.
an inductor; the property of the inductor is to oppose its cause. So when you switch off the circuit, the
discharging of the inductor occurs in opposite direction (remember the properties of inductors), so if
you use a protection diode, then it will discharge through the relay plus diode circuit, otherwise
transistor will get damaged.
The maximum Ic of the transistors, D880 = 3A and BC548=0.1A. A normal DC motor has a current rating
of 250 mA. So if I connect a motor to the collector of BC548 then it will not able to drive the motor
because the maximum Ic of BC548 is 100mA and during starting a motor takes a lot of current, so a
BC548 wont give the motor a head start.


















0PANPS (IC741, LNS24)
The most commonly used OPAMPS are 741 and LM324. IC741 is used in close loop configuration and
LM324 in open loop configuration. i.e. LM324 mainly used as comparator while 741 for amplification,
addition etc...
COMPARATOR (LM324)
As the name suggests it compares, now what? Well you can see two inputs (+) and () (Known as
noninverting and inverting inputs).So the difference between Voltage(+) and Voltage() is amplified
infinitely (theoretically). But since an infinite volt is not supplied so output is the maximum or minimum
voltage supplied to it.
Taking an example lets Voltage(+) /V1= 4 Volts and Voltage() /V2=2.7 Volts, then the difference is (V2-
V1) =1.3 so output is Vout=1.3 = but the maximum value available is +VCC .So Vout=+VCC
Taking an example lets Voltage(+) /V1= 2.1 Volts and Voltage(-) /V2=2.7 Volts, then the difference is
(V2-V1) =0.6 so output is Vout=0.6 = but the minimum value available is VCC .So Vout=VCC
Usually we give +VCC=5Volts and VCC=GND, So output is either 5 Volts or 0 Volts else we could say
LOGIC 1 or LOGIC 0
NOTE: LOGIC HIGH for a digital circuit is a voltage greater than 1.5V and LOGIC LOW is a voltage less
than 0.5V
Operational amplifier has a gain of 10^6 hence only 2 states.
LOGIC1/LOGIC0. Opamp are chiefly used to produce LOGIC 1 /
LOGIC 0 from the sensors, so that this LOGIC 1 / LOGIC 0 can be
directly sent to the microcontroller input







Normally VCC+=5V, VCC=0V LM324 (Quad Opamp)
NOTE: You should remember that while using multiple voltages, VCC should be greater than all the
input voltages (that is at the input+, input- pins). Otherwise you will end up with wrong results.
Try this circuit:

Vary the voltage V1 & V2.Check the voltage at the ve and the +ve of the Opamp and verify the result
that you get. You can try this too
The circuit on the left produces
digital output from the analog
data from the sensor




N0T0R BRIvERS
What are they? and the answer comes SWITCHES. Well switches but not just switches, they are formed
from combination of various switching arrangement which makes it very easy to control the direction
and the speeds of motor.
ULN2803

Actually this IC is used to drive two
unipolar stepper motor .We shall see
that later. As of now we can use them to
drive DC motors or even LEDs . When
we apply LOGIC 1 at a(PIN1) then due to
the not gate present a GND appears at
PIN 18. Now look at the LED on one side
VC and on other GND, so the LED glows.
But if we apply LOGIC 0at a (PIN1) then
VC appears at PIN 18, now on both the
sides the LED has VC so the LED wont
glow. The same is for a, b, c., h or
1, 2, 3.., 8











If we connect a motor between Output of ULN2803 and VC all we can do is just stop or run the motor,
but if we want to reverse the direction then we have to go for H-Bridge drivers\
Figure shows the representation of a DC motor. If you apply VCC to A and
GND to B then motor will rotate in clockwise direction (assume the
direction as clockwise). If you apply VCC to B and GND to A then motor will
rotate in anticlockwise direction. If you apply GND to A and B then motor
will stop, but some movement is there due to inertia. If you apply VCC to
both A and B then motor will break suddenly, only very small movement
due to inertia. That is why if A, B=VCC it is called breaking. Here VCC refers
to the voltage applied to the motor and it should not be greater than
maximum voltage rating of motor. We normally apply 12V to the motor,
VCC=12V.It all depends on the rating of the motors. The gear boxes of the
toy crane just need 5 Volts.



The circuit which makes
this possible is called
about H-bridge circuit. If
you want to know more
about it refer to the h-
Bridge document or search
the net





L293D
One of the popular H-Bridge drivers is L293D


On giving a LOGIC 1 at INPUT 1, INPUT 2, INPUT 3, INPUT 4 we obtain VC at OUTPUT 1, OUTPUT 2,
OUTPUT 3, OUTPUT 4.
On giving a LOGIC 0 at INPUT 1, INPUT 2, INPUT 3, INPUT 4 we obtain GND at OUTPUT 1, OUTPUT 2,
OUTPUT 3, OUTPUT 4.
So using various combination of (INPUT 1 and INPUT 2) or (INPUT 3 and INPUT 4) we do different
operation on the motor.
When we give CHIP INHIBIT 1 LOGIC 1 then the CHANNEL 1 produces output if LOGIC 0 is given it doesnt
produce any output, same goes for CHANNEL 2. So when connecting the circuit connect pin 1 and pin 9
to VSS. We shall find more application of this when learning speed control of DC motor

Debugging

Life is a hell for robotics hobbyist if we dont have a multimeter. It is rare never to have problems with
the circuits you try out and for newbie success: failure is 1:9. So get ready to DEBUG/TROUBLESHOOT
Follow the following steps:
1. Check (specially for the ICs) if anything is getting heated up abnormally if yes then cutoff the
power supply and check the connections again
2. Never use loose or unsoldered parts(like loose wire dangling from potentiometer),temporary
connection are quick but the problem they create are hellish
3. Check if the battery is charged and can produce the required voltage (with a multimeter).In case
you are using a transformer do the same checks.
4. Make sure all the wiring of the breadboard is tight. Use continuity tester to make sure of the
connections
5. If you are using a breadboard, check if the input(+ve & -ve from battery) reaches the Voltage
regulator IC(like 7805/LM317).Check if the voltage levels(output of regulators) are at the
required voltage(5Volts, 3.7Volts & whatever)
6. Remember all the checks are done with the help of a multimeter. Connect the black pin to the
Gnd(ground) and check all other voltage with the red pin( taking Gnd as the reference)
7. Break the main circuit into the lesser circuits(of course in your mind) and analyze them
separately
8. Check if the ICs(like LM324, ic555,ULN2803) are receiving the Vcc and Gnd at Correct pins(dont
interchange Gnd and Vcc)
9. Check if all the voltage/Potential dividers produce the required voltage.
10. Check if the ICs are getting the proper inputs( lets take the case of the +ve & -ve inputs of
LM324 )
11. Ask your friends if you are not able to sort out the problem
All that I have said in the debugging part may not make sense at this time but dont worry, go ahead .
Things will clear themselves up.

You might also like