Electronics Shatin Tsung Tsin Secondary School By Mr. C.K. Yu.

Post on 01-Apr-2015

238 views 1 download

Transcript of Electronics Shatin Tsung Tsin Secondary School By Mr. C.K. Yu.

ElectronicsElectronics

Shatin Tsung Tsin Secondary SchoolShatin Tsung Tsin Secondary School

By Mr. C.K. YuBy Mr. C.K. Yu

Learning Approach (學習方式 )

A black box approach (黑盒方式 )We don’t 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 don’t know how the refrigerator works, but we know the behaviour of the refrigerator and we do know when and how to use it.)

Learning 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.

Electronics(電子學 )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

0At low voltage (e.g. 0V), the LED comes off. We use ‘ ’ to represent this low voltage.

Remember: voltage represents p.d.

Electronics(電子學 )Electronic device :

Light Emitting diode (LED)

LED can be used to test whether the LED can be used to test whether the voltage is high (5V) or low (0V) if one end voltage is high (5V) or low (0V) if one end is connected to 0Vis connected to 0V

Digital Electronics Basic digital devices, logic gates, have two

operation states, a)high state (or logic level ‘1’) and b)low state (or logic level ‘0’).

We shall use ‘1’ and ‘0’ to represent the two logic states.

NOT gate

a. 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 = A

A O

NOT gate

Truth table

A (input) O (output)

0 1

1 0

OR gate

O

A

B

a.The output, O, of an OR gate is 1 (High) if any of its input (A/B) is/are 1 (high).

b.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)

OR gate

O

A

B

c. Truth table

A(input) B (input) O (output)

00

11

11

00

11

11

00

00

00

11

11

11

There are four combinations for two inputs

O = A ++ B

AND gate

a.The output ,O, of an AND gate is 1 (High) onlyonly if both inputs (A/B) are 1 (high).

b.The rule of the logic operation of AND can be found as: O = A xx B (Note : Result bigger than 0 is 1)

O A

B

AND gate

c. Truth table

A (input) B (input) O (output)

00

11

11

00

11

11

00

00

00

00

00

11

O = A xx B

NOR gate

a.The output ,‘O’, of an NOR gate is 0 (High) if any of its input (‘A’/’B’) is/are 1 (high).

b.The rule of the logic operation of OR can be found as: O = A ++ B (Note : Result bigger than 0 is 1)

O A

B

NOR gate

c. Truth table

A(input) B (input) O (output)

00

11

11

00

11

11

00

00

11

00

00

00

O = A ++ B

NAND gate

a.The output ,‘O’, of an NAND gate is 0 (High) if its two inputs (‘A’/’B’) are 1 (high).

b.The rule of the logic operation of AND can be found as: O = A xx B (Note : Result bigger than 0 is 1)

O A

B

NAND gate

c. Truth table

A (input) B (input) O (output)

00

11

11

00

11

11

00

00

11

11

11

00

O = A xx B

Use of Logic Gates

input output

0 V

5V

To be omitted

input output

0 V

5V

In the circuit of logic gate, connections to the supply rails (dashed lines) are usually omitted.

Use of Logic Gates

input output

0 V

5V What will the output of the diagram be if the input is connected to the supply rail of high voltage, 5V?

Ans : The output is _____voltage, ___V, or logic state of ___ .

LOWLOW 00‘‘0’0’

ExampleConnect 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.

Flying lead

O

0 V

5V supply rail

supply rail

Example

Flying lead

O

0 V

5V supply rail

supply rail

Result:1.Observation :

If the flying lead is not connected to anything, is the LED on? __________

Example

Flying lead

O

0 V

5V supply rail

supply rail

2. What is the input of the NOT gate when the flying lead is not connected to anything? High/Low===

Example

Flying lead

O

0 V

5V supply rail

supply rail

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

Example

Flying lead

O

0 V

5V supply rail

supply rail

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

Experiment session

P. 59 – P. 60

and

P.61 – P.62

Application of Logic Gates

Simple burglar alarm and

Simple water heater

Simple burglar alarm

O

0 V

5V

A

B

What gate is being used? NAND gateNAND gate

LDR

Simple burglar alarm

O

0 V

5V

A

B

The buzzer sounds when the output of the logic gate is ___ V or ___ (state).55 ‘‘1’1’

Simple burglar alarm

O

0 V

5V

A

B

Under which situations will the output of the logic gate is 5 V or ‘1’?

Simple burglar alarm

O

0 V

5V

A

B

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’0’The buzzer will not/will sound. ======

Simple burglar alarm

O

0 V

5V

A

B

Under which situations will the output of the logic gate is 5 V or ‘1’? Either input is LOWEither input is LOW

Simple water heater

O

0 V

5V

A

B

heater

contacts

low resistance

low resistance

Thermistor

If covered by water, input B becomes high

Resistance becomes high at low temperature, and input A becomes high

Simple water heater

O

0 V

5V

A

B

heater

contacts

11

11

11

The heater is on whenThe heater is on whenwater covers the contacts water covers the contacts andand is at low temperature. is at low temperature.

Simple water heater

0 V

5V

A

When water is at low temperature.VDE + VEF = 5VI (RDE + REF)= 5V

If RIf REFEF>>R>>RDEDE then V then VEFEF ≈ ≈ 5V5Ve.g. if REF=1000 Ω, RDE=5 ΩThen I = 5V/1005Ω=0.00498 AVVEFEF = = I I x R x REFEF = 4.98 V = 4.98 V

The potential at A is 4.98 V aThe potential at A is 4.98 V and A is at high (‘1’) statend A is at high (‘1’) state

D

E

F

Simple water heater

0 V

5V

B

contacts

When water covers the contacts, the resistance is 0 Ω.The input B is connected to the 5V supply directly.

The potential at B is 5 V aThe potential at B is 5 V and B is at high (‘1’) statend B is at high (‘1’) state

D

E

F

Future thinking

Should we add a switch to make sure Should we add a switch to make sure that the water heater only works when that the water heater only works when the switch is also on?the switch is also on?

How should we design the logic circuit How should we design the logic circuit for this purpose? for this purpose?

This question will not be tested in the This question will not be tested in the final examination.final examination.

The EndThe End

Thank you very much