Discover University Presentation

Download Report

Transcript Discover University Presentation

Good morning!
Welcome to…
Discover University
…and Discovering
Electronics!
When we talk about electronics most
people think of computers, mobiles, robots
and all sorts of complex equipment and
gadgets!
...but have you ever stopped to think that
even the most complicated gadgets
depend on the principles of Ohm’s Law?
All electronic products depend on
transistors, capacitors and,
….yes, the humble resistor! ... and that
goes for the coolest mobile phone
around or any other device.
Of course mobiles, laptops etc. don’t just
use resistors, transistors etc. but they
use a number of ICs, (Integrated Circuits),
or as they are commonly called – chips.
These chips would
have quite a few
transistors inside..
… well actually more than
a few!
As of 2015, the highest transistor count in
a commercially available CPU, (in one
chip), is over 5.5 billion transistors, in
Intel's ‘Haswell-EP’ chip.
Well, today we’re not going to build a
laptop or a mobile …
…and maybe we will be using a little less
than a billion transistors!!
Today we’re going to see how - with
barely a handful of components … and a
little imagination…
We can still have loads of fun and
laughs!
So - what’s the project ?
Let’s design and build a backpack alarm!!
… have you ever been a in a
situation where you were
sure that you had thrown in
your favourite snack in your
backpack and it mysteriously
went missing while you
weren’t looking??!!
… well here’s your chance to use some
electronics to catch this prowler!!
To start with we have to come
up with a plan!
So let’s rebuild the scene of the crime!
You have carefully put in everything in
your back pack ….even grabbed a KitKat
from the fridge and threw that in too.
… and the whole time
during those long lessons at
school, …that seem to go
on forever, you’re thinking –
of that Kitkat!
The bell rings - FINALLY! “Time for my
KitKat !”
…and you almost get a heart attack when
you find it’s gone!! ..so let’s do some
detective work!
Crime Scene Investigation!
1.The back pack was zipped up and securely
closed – so the Kitkat couldn’t have fallen out.
Conclusion:
2. Someone must have sneaked up
to my backpack:
a. Opened the back pack
b. Snatched my KitKat and carefully closed
the backpack again ..so I wouldn’t notice.
c. Prime Suspect: My younger brother ! :-(
Ok - so let’s see how we can design our
backpack alarm!
Well what happens inside the backpack when
we zip up our back pack?
…well everything goes dark inside!
What happens when we unzip our backpack?
- that’s right - light falls inside and we can see
the things we have inside.
…mmm interesting …
…so there are two different conditions we
can use as parameters for our design.
A dark condition – bag closed
A light condition – bag opened
Now there’s something else…
… we don’t want everyone to know, (especially
our dear brother!), that we’ve installed this
ingenious device in our backpack!
So we need some kind
of time delay to give us
enough time to switch
off the alarm.
….otherwise it will go off if you open
your own backpack – and that will give
the game away!
So let’s get our thoughts together and
write them down in what we call a Flow
Chart.
Flow charts are great stuff because they help
us think things through logically and
sequentially.
In flow charts, mostly, we use a rectangle for a
statement and a diamond shape for a
question. So let’s do our flow chart!
Is bag open?
(Light inside)
No
Device still
Switched ON
?
Yes
Yes
Start time-out
Set-off Alarm
Time-out over?
Yes
No
No
End
(Don’t do anything
else)
So the first thing we need is some device that
is sensitive to light.
.. and here’s just the thing – an LDR
….sounds impressive! Anyone heard of an
LDR or what it is ?
Well, an LDR is an acronym for
Light Dependent Resistor
Most of you know what a resistor is …yes?
… remember Ohm’s law and
all that physics stuff?
Well an LDR is also a
resistor but..
an LDR’s resistance changes according to
the amount of light that falls on it.
In direct sunlight, an LDR’s
resistance goes down to a
few hundred ohms or so,
while in pitch darkness it
can go up to a few million
ohms!
…. mmm perfect for our
purposes!
So our LDR will be our sensing device that
will tell our circuit whether the backpack is
open, (light coming inside the backpack) or
closed (dark inside the back pack).
The first thing that comes to mind is to get a
buzzer and hook it up to our LDR.
So how should this thing
work?
Well, when light falls on the
LDR, its resistance goes low,
so current should pass
through the LDR - and
therefore through the buzzer,
and it should sound.
LDR
+
9V
Buzzer
… but we have a problem! :-(
Even in a well-lit room, the resistance of the
LDR still does not go down low enough to
allow enough current through, for the buzzer
to sound. Remember I = V/R so the higher
the resistance the smaller the current.
In fact, in a normally lit room, the LED
resistance may still be more than 5,000Ω or
so (a room has much less light than direct
sunlight).
Now what if we could find a device that
would still be able to work with this sort of
>5k, (>5,000 Ω), resistance?
Well, there are plenty of devices that will do
the job and one basic device is the transistor.
In very simple terms, a transistor has three
wires, (or leads), and a small current or
voltage change at one of its terminals, can
provide us with a much larger current or
voltage change between its other two
terminals.
In our project, we will be using a special type
of transistor called a Field Effect Transistor or
as it is popularly known an FET.
D
The basic electrical symbol
for the FET we will be using
is shown here.
G
As we said, there are three terminals:
S
One is called the Gate - which is a good
name, because it acts like a gate for current
to flow from D to S.
The other two terminals are called the:
Drain (D) – which for this type of transistor
goes to the positive.
Source (S) – which will then go the 0V.
There is quite a bit of electronics
theory that needs to be learnt in
order to really understand how an
FET works.
D
G
…but for today it is enough if we
understand that we can use our
FET as a switch that will turn our
buzzer on or off.
S
D
…let’s see how we can wire
up our FET.
G
S
Well, if we want to do things right we
would need to look up the data sheet for
our FET.
A data sheet provides us with loads of
information about the device.
D
The FET we’ll be using is
the BS170.
G
S
It would take us forever to describe all
that’s in the data sheet but let’s look
at just two very useful pieces of
information.
On the first page
of the data sheet,
(only an extract is
shown here), we
have a picture of
the transistor, and
from there, we
can find out which
lead is what.
On the second page, we have a very
important piece of information.
The datasheet tells us that for the transistor
to conduct, we need a Vgs of ≈ 2V
OK ! .. Time for a Google
translation!!! 
G
D
+
9V
S
2V
Current
flows!
All this means is that if we apply something
like 2 to 3V (Vgs ), between the Gate and the
Source, (the minus), of the battery, the
transistor will allow current to pass between
its Drain and Source terminals.
if VGS goes down to
less than 1V, the
drain and source
terminals will not
allow current to
pass between them.
D
G
<1 V
S
+
NO
Current
flow
9V
The beauty of this device is that it will work
with even the tiniest currents so it is no
problem at all that our LDR will give us a
few thousand ohms in light conditions!
…and here’s a graphical presentation.
10
0
Buzzer
D
G
<1V
No
Current
flows
Current
flows!
Buzzer
Sounds!!
+
9V
+
D
G
S
>2V
S
9V
So all we have to do now is
add a resistor to our LDR so
that we will have a voltage
divider.
LDR
+
9V
R1
Let’s play extra safe and design our circuit to
work even if it is a cloudy day and the room is
not that well lit. So let’s make the circuit work
even if the resistance of the LDR is as high as
50kΩ (50,000Ω) in reduced daylight conditions.
So if 3V, (VGS), are to appear
across R1, then 9-3V = 6V
will appear across the LDR.
So the current through the
LDR will be 6V/50,000Ω =
1.2 x 10-4A or 0.12mA
LDR
3V
+
9V
R1
From R=V/I
R1 = 3V/1.2x10-4A = 2.5 x 104 Ω
= 25,000Ω or 25k.
An exact 25k resistor will be hard to find - but
an easily available value is 22k and that will do.
So we can now modify
our original circuit
from this…
LDR
+
9V
Buzzer
To this…
Buzzer
LDR
BS170
G
22k
+
D
S
9V
Buzzer
D
LDR
+
G
VGS >2V
22k
9V
S
Current
flows!
When light falls on our LDR
…we will easily have a Vgs of 2 to 3V
so current will flow from drain to source and
the buzzer will sound.
Buzzer
D
LDR
BS170
G
S
+
9V
22k
What happens when it goes dark?
Well, let’s say the LDR resistance goes up
to 1,000,000Ω. (1MΩ)
So from I=V/R, the
current through
the LDR and the
22k resistor will be
will be..
Buzzer
D
LDR
BS170
G
R1 = 22k
9V/1,022,000Ω ≈ 8.8 x 10-6A.
Since V = IR,
the voltage across R1 will be just
8.8 x 10-6A x 2,2 x 104Ω
= 19.36 x 10-2V ≈ 0.2V
S
+
9V
Buzzer
D
LDR
106Ω
BS170
G
S
+
9V
22k
0.2V
So our Vgs will go down to ≈0.2V and no
current will flow from Drain to Source and
the buzzer will not sound.
Buzzer
+
LDR
9V
D
BS170
G
S
22k
Well, finally we have a circuit that can work
with our LDR!!
Well, we’re almost ready!
Anyone remembers
what we need more?
Our circuit so far does work but immediately
we open the back pack, the alarm goes off!
So, we need to introduce some form of
delay that will give us a few seconds to
switch off our circuit so nobody will know
we have an alarm in our bag!
Luckily this is not hard to do!
Ever heard of a
component called a
capacitor?
Well a capacitor is a little like a tiny
rechargeable battery because we can charge
it up to a voltage, use up the energy stored,
and recharge it as often as we wish.
With the bigger capacitors, (called
Electrolytic Capacitors), like the
one we’re about to use, we need
to watch out for polarity i.e. they
have a + and a – terminal.
The electrical symbol for an
electrolytic capacitor is
shown on the right.
+
+
+
If we connect a capacitor
directly to our battery it will
charge up almost instantly
because there is practically no
resistance to the path of
current to charge up the
capacitor.
9V
The higher the
resistance, the
longer it will take for
the capacitor to
charge up.
+
R1
+
However, if we
introduce a resistance
(R1), in series with the
capacitor, current flow
will be restricted:
9V
+
In the next slide, we
will therefore add a
capacitor across the
Gate and Source of the
transistor.
+
9V
Buzzer
D
LDR
BS170
+
G
S
+
9V
22k
Without the capacitor, when light falls on the LDR,
the voltage across VGS immediately rises to about 3V
…but with the capacitor in place,
…the voltage VGS rises slowly so there is
a delay of a few seconds before the buzzer sounds.
10k
Buzzer
+
D
LDR
BS170
+
22k
G
9V
S
220uF
Just what we need! 
I just added one small 10k resistor on top of the LDR, to
extend the charging time of the capacitor. It’s value is
relatively quite small, so it has no significant effect on the
calculations we made earlier.
Buzzer
+
D
LDR
BS170
+
So..
finally we can
actually go ahead
and build this
circuit!
10k
22k
G
S
220uF
Anyone knows what we use to build our
circuits on?
Well there are quite a few possibilities
such as a Breadboard, Veroboard or a PCB.
9V
If we’re still trying out our circuit to see how
it works, then we will need to use a
breadboard.
This is a special board that
allows us to pop
components in and out
without any soldering.
However it takes a bit of
time to get familiar with
using it, so we’ll leave that
for today.
Veroboard is another
product that’s great
for building one-offs or
prototypes. It consists
of parallel strips of
copper mounted on a
fibre board.
Components are
soldered on to the
Veroboard as shown
here.
A more
professional
method of
assembly is a PCB
(Printed Circuit
Board) as shown
on the right.
However, both the Veroboard and the PCB
require soldering and once again, it is not
possible to do that in this very short session.
Buzzer
10k
+
D (Red
sleeve)
LDR
+
To keep things
really simple,
since we have a
very simple
circuit, a small
strip of china
connectors will
do the job just
fine!
220uF
22k
BS170
G
(Green
sleeve)
S (Black
sleeve)
9V
Identifying our components - Resistors!
Have you ever noticed those colourful bands
around resistors?
Those bands actually tell
us the value in ohms of
the resistor!
Unfortunately we don’t have time to explain this in
detail, but if you’re interested, you can do a google
search – like, type in – ‘resistor colour code’ and
you will find everything you need!
10k (10,000Ω)
22k (22,000Ω)
Here’s what
we will be
using...
FET - BS 170
Red sleeve – Drain
Green Sleeve – Gate
Black Sleeve - Source
Capacitor 220uF
Black Sleeve Red sleeve +
(longer lead is positive)
G
D S
Wiring details
These two wires
go to the buzzer:
Red +
Black -
Wiring details
Why not try to build this circuit at home?
The list in the next slide
is complete with part
numbers - as available
from Fabian (Gzira), but
there are a number of
other shops which you
can try.
You can access this presentation at: ……
Parts List
(You will also need a 9V battery)
That’s basically it !
One last word of caution!
Note carefully that we have used nothing
more than a 9V battery here!
As long as you work with a small battery,
nothing much can go wrong …beyond
frying a few components – which is part of
the learning process!
However, never mess around with mains
electricity!
…or it may be you that get’s fried!
In this session you got to know about
• Flow charts
• Resistors
• Capacitors
• Transistors
• Data Sheets
• Breadboards, Veroboard & PCBs
• Designing a simple circuit
• Building the circuit
… not bad for an hour’s work! 
The session should help
you realise that after all,
there is a very good
reason for learning all
that math and physics else it would be
impossible to design
anything properly!
So hang on in there it’s well worth it!
Thank you and hope to see you soon !