Title: Electronics
1Electronics
Shatin Tsung Tsin Secondary School
By Mr. C.K. Yu
2Learning Approach (????)
- A black box approach (????)
- We dont care what happens inside the box and
how it works, we do know the behaviour of the box
and know when and how to use it. - (e.g. we dont know how the refrigerator works,
but we know the behaviour of the refrigerator and
we do know when and how to use it.)
3Learning Approach
- Things to do when we have a new electronic
device - 1) Find out how it works, but not what happens
inside. - 2) Think how we may use this device.
4Electronics(???)
Electronic device Light Emitting diode (LED)
Current can flow in correct connection. At high
voltage (e.g. 5V), the LED comes on. We use
to represent this high voltage.
1
At low voltage (e.g. 0V), the LED comes off. We
use to represent this low voltage.
0
Remember voltage represents p.d.
5Electronics(???)
Electronic device Light Emitting diode (LED)
LED can be used to test whether the voltage is
high (5V) or low (0V) if one end is connected to
0V
6Digital Electronics
- Basic digital devices, logic gates, have two
operation states, - high state (or logic level 1) and
- low state (or logic level 0).
- We shall use 1 and 0 to represent the two
logic states.
7NOT gate
- Logically, NOT means opposite.
- e.g, not True is False.
- b. The symbol of a NOT gate is .
c. The output, O, of a NOT gate is 1 (High) when
its input, A, is 0 (Low), and vice versa. d.
The rule of the logic operation can be found as
O
8NOT gate
A (input) O (output)
0
1
1
0
9OR gate
- The output, O, of an OR gate is 1 (High) if any
of its input (A/B) is/are 1 (high). - The rule of the logic operation of OR can be
found as O A B (Note Result bigger than 1
is still 1, high is still high)
10OR gate
c. Truth table
O A B
A(input) B (input) O (output)
0
0
0
1
0
1
1
0
1
1
1
1
There are four combinations for two inputs
11AND gate
- The output ,O, of an AND gate is 1 (High) only if
both inputs (A/B) are 1 (high). - The rule of the logic operation of AND can be
found as O A x B (Note Result bigger than 0
is 1)
12AND gate
c. Truth table
O A x B
A (input) B (input) O (output)
0
0
0
0
0
1
1
0
0
1
1
1
13NOR gate
- The output ,O, of an NOR gate is 0 (High) if
any of its input (A/B) is/are 1 (high). - The rule of the logic operation of OR can be
found as O A B (Note Result bigger than 0
is 1)
14NOR gate
c. Truth table
O A B
A(input) B (input) O (output)
0
1
0
0
0
1
1
0
0
1
1
0
15NAND gate
- The output ,O, of an NAND gate is 0 (High) if
its two inputs (A/B) are 1 (high). - The rule of the logic operation of AND can be
found as O A x B (Note Result bigger than 0
is 1)
16NAND gate
c. Truth table
O A x B
A (input) B (input) O (output)
0
1
0
1
0
1
1
0
1
1
1
0
17Use of Logic Gates
In the circuit of logic gate, connections to the
supply rails (dashed lines) are usually omitted.
18Use of Logic Gates
What will the output of the diagram be if the
input is connected to the supply rail of high
voltage, 5V?
LOW
0
Ans The output is _____voltage, ___V, or
logic state of ___ .
0
19Example
Connect the positive and negative supply rails to
5 V and 0 V respectively. Connect the output O of
the gate to an LED and plug a flying lead into
the input.
20Example
- Result
- Observation
- If the flying lead is not connected to anything,
is the LED on? __________
21Example
2. What is the input of the NOT gate when the
flying lead is not connected to anything?
High/Low
22Example
3. While connecting the flying lead to the 5 V
supply rail to make the input high, the LED is
not lit. The output is HIGH/LOW or the output
state is ____ .
1
23Example
4. While connecting the flying lead to the 0 V
supply rail to make the input high, the LED is
lit. The output is HIGH/LOW or the output state
is ____ .
0
24Experiment session
P. 59 P. 60 and P.61 P.62
25Application of Logic Gates
Simple burglar alarm and Simple water heater
26Simple burglar alarm
LDR
What gate is being used?
NAND gate
27Simple burglar alarm
The buzzer sounds when the output of the logic
gate is ___ V or ___ (state).
5
1
28Simple burglar alarm
Under which situations will the output of the
logic gate is 5 V or 1?
29Simple burglar alarm
If the switch is not pressed, input A is a flying
lead. Its state is high (1).
If no light shines on the LDR, input B is also a
flying lead. its state is also high (1).
Then the output is __.
0
The buzzer will not/will sound.
30Simple burglar alarm
Under which situations will the output of the
logic gate is 5 V or 1?
Either input is LOW
31Simple water heater
If covered by water, input B becomes high
low resistance
low resistance
Thermistor
Resistance becomes high at low temperature, and
input A becomes high
32Simple water heater
The heater is on when water covers the contacts
and is at low temperature.
1
1
1
33Simple water heater
D
When water is at low temperature. VDE VEF
5V I (RDE REF) 5V If REFgtgtRDE then VEF
5V e.g. if REF1000 O, RDE5 O Then I
5V/1005O0.00498 A VEF I x REF 4.98 V The
potential at A is 4.98 V and A is at high (1)
state
E
F
34Simple water heater
D
When water covers the contacts, the resistance is
0 O. The input B is connected to the 5V supply
directly. The potential at B is 5 V and B is at
high (1) state
E
F
35Future thinking
- Should we add a switch to make sure that the
water heater only works when the switch is also
on? - How should we design the logic circuit for this
purpose? - This question will not be tested in the final
examination.
36The End