Sei sulla pagina 1di 37

Contents

Page Title Page Title


2) Contents Page
Electronics 4.4: Digital Processes

3) Header Page 3) Clocks


4) Learning Outcomes 4) A Simple Oscillator Circuit
5) How an Oscillator Circuit Works
6) Introducing Transistors 6) How an Oscillator Circuit Works (Alternative)
7) Transistor Terminals 7) How to Change a Clock’s Frequency
8) Transistor as a Switch
9) How Transistors Work 9) Counters
10) Transistor Switching Example 10) Counting in Decimal
11) Transistor Circuit #1: Temperature-Controlled Circuit 11) Devices Using Counters
12) Transistor Circuit #2: Light-Controlled Circuit
13) Transistor Circuit #3: Time-Controlled Circuit
14) Summary of Transistor Switching Circuits

16) Logic
17) Revision: Digital Signals
18) Introduction to Logic
19) Logic: Switches in Series
20) Logic: Switches in Parallel
21) Logic: Opposites!
22) Truth Tables
23) Logic Gates: AND
24) Logic Gates: OR
25) Logic Gates: NOT
26) Summary of Logic Gates and Truth Tables

28) Combinational Logic Circuits


29) Logic Circuit #1: Car’s Hot Engine
30) Logic Circuit #2: Central Heating Pump
31) Logic Circuit #3: Greenhouse Heater
32) Summary of Combinational Logic Circuits
Electronics 4.4: Digital Processes Electronics 4.4: Digital Processes

Electronics Section 4.4


Digital Processes
4.4 Digital Processes: Learning Outcomes
Transistor as a Switch
• (G) State that a transistor can be used as a switch.
Electronics 4.4: Digital Processes

• (G) State that a transistor may be conducting or nonconducting, ie on or off.

Simple Switching Systems


• (G) Draw and identify the circuit symbol for an NPN transistor.
• (G) Identify from a circuit diagram the purpose of a simple transistor switching circuit.
• (C) Explain the operation of a simple transistor switching circuit.

Digital Logic Gates


• (G) Draw and identify the symbols for two-input AND, OR and NOT gates.
• (G) State that logic gates may have one or more inputs and that a truth table shows the
output for all possible input combinations.
• (G) State that high voltage = logic 1, low voltage = logic 0.
• (G) Draw the truth tables for AND OR and NOT gates.
• (C) Identify the following gates from truth tables: AND, OR, NOT.

Combinational Logic Circuits


• (G) Explain how to use combinations of digital logic gates for control in simple situations.
• (C) Complete a truth table for a simple combinational logic circuit.

Clock Signals
• (G) State that a digital circuit can produce a series of clock pulses.
• (C) Explain how a simple oscillator built from a Resistor, Capacitor and Inverter operates.
• (C) Describe how to change the frequency of a clock.

Counters
• (G) Give an example of a device containing a counter circuit.
• (G) State that there are circuits which can count digital pulses.
• (G) State that the output of the counter circuit is in binary.
• (G) State that the output of a binary counter can be converted to decimal.
Introducing Transistors

• Transistors are process devices.


Electronics 4.4: Digital Processes

• This is the symbol for an NPN transistor.3


Electronics 4.4: Digital Processes Transistor Terminals

• Transistors have three terminals:

Collector

Base

Emitter
Transistor as a Switch
• Transistors can be used as switches.1
Electronics 4.4: Digital Processes

Transistor Switch

• Transistors can either


conduct or not conduct current.2
• ie, transistors can either be on or off.
off 2
How Transistors Work
Collector
Electronics 4.4: Digital Processes

• Switching is
controlled by
the voltage
between the
Base Base and the
Emitter.
Emitter

• When VBE < 0.7V the transistor switches off and


no current flows between the Collector and the Emitter.

• When VBE ≥ 0.7V the transistor switches on and


current flows between the Collector and the Emitter.
Electronics 4.4: Digital Processes Transistor Switching Example15

X
12V

Variable
Voltage
Supply

• When VBE is less than 0.7V the transistor is off


and the lamp does not light.

• When VBE is greater than 0.7V the transistor is on


and the lamp lights.
Transistor Circuit #1: Temperature-Controlled Circuit
• This transistor circuit contains
Electronics 4.4: Digital Processes

a Thermistor.

• Because of the thermistor, this


circuit is dependent on
temperature.

• The purpose of this circuit is to


turn on the LED when the
temperature reaches . . .

• LED = Off.
• Heat the Thermistor.
• RThermistor ↓.
Input = Voltage Divider
• VThermistor ↓.
Process = Transistor
Output = LED • Voltage across 10kΩ resistor ↑.
• Transistor switches on.
• LED = On.
Transistor Circuit #2: Light-Controlled Circuit
• This transistor circuit contains
Electronics 4.4: Digital Processes

a Light-Dependent Resistor.

• Because of the LDR, this circuit


is dependent on light.

• The purpose of this circuit is to


turn on the LED when the light
reaches a certain intensity.

• LED = Off.
• Cover LDR.
• RLDR ↑.
• VLDR ↑.
Input = Voltage Divider
• Transistor switches on.
Process = Transistor
• LED = On.
Output = LED

1
Transistor Circuit #3: Time-Controlled Circuit
• This transistor circuit contains
Electronics 4.4: Digital Processes

a Capacitor.

• Because of the capacitor, this


circuit is dependent on the time
taken to charge and discharge
of the capacitor.

• The purpose of this circuit is to


turn on the LED a short time
after the switch is opened.
Input = Voltage Divider • Where would this circuit be
Process = Transistor found in a car?
Output = LED

• Switch closed. • Open Switch.


• VC = 0V. • VC ↑.
• Transistor switches off. • Transistor switches on after
• LED = Off. a short delay.
5) LED = On. 1
Summary of Transistor Switching Circuits
• You are expected to know the purpose of a transistor switching
Electronics 4.4: Digital Processes

circuit: the last three pages should help.4

• In each of the three circuits the input device is:

• A Voltage Divider using a

Thermistor
LDR
Capacitor

• In each of the three circuits the output device is: an LED

1
Electronics 4.4: Digital Processes Logic

1
Electronics 4.4: Digital Processes Revision: Digital Signals

• From Section 4.2 Output Devices, remember


that digital signals have only two values,7
• “1” and “_”, or
• “High Voltage” and “___ _______”, or
• “On” and “___”, or
• “True” and “_____”.

High Voltage
On 1

Off 0 Low Voltage


1
Introduction to Logic

• Many digital electronic processes are


Electronics 4.4: Digital Processes

designed around “logic” circuits.

• The Inputs and Outputs in logic have only two values:


• 0 & 1;
• High & Low;
• On & Off;
• True and False.

• Logic is ideally suited to help design


digital electronic circuits because of its binary nature.

• We will look at some fundamental logic circuits.

1
Logic: Switches in Series
S1 S2 Lit
Electronics 4.4: Digital Processes

0 0 0
0 1 0
1 0 0
1 1 1
S1 S2

• The bulb will light only under certain conditions: what?

Complete the following:


• The bulb will turn on only when switches S1 ___ S2 are
closed, for all other combinations the bulb is off.

1
Logic: Switches in Parallel

S1 S2 Lit
Electronics 4.4: Digital Processes

0 0 0
0 1 1
1 0 1
1 1 1
S1

S2
• The bulb will light under certain conditions: what?

Complete the following:


• The bulb will turn on when switches S1 ___ S2 are
closed, for all other combinations the bulb is off.
1
Logic: Opposites!

S Lit
Electronics 4.4: Digital Processes

S 0 1
1 0

• The bulb will light under certain conditions: what?

Complete the following:


• The bulb will turn on when switch S is ____, and turn
off when switch S is ______.

• This circuit is for illustration only!


• If this was a real circuit, what would happen to the battery
when switch S was closed?
1
Truth Tables

• The tables on the previous pages are truth tables.


Electronics 4.4: Digital Processes

Truth Tables list:


• All combinations of all possible inputs,
• Every Output for each combination of inputs.

• There are special circuits called logic gates which


can be used in control situations.

S1 S2 Lit S1 S2 Lit S1 Lit

0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
1
Logic Gates: AND

AND
Electronics 4.4: Digital Processes

Truth Table8,16

A B Q

0 0 0
0 1 0
Two-Input AND Gate5 1 0 0
1 1 1

The output of an AND gate is 1 only when all inputs are 1.

Only when Input A AND Input B are 1, the output is 1.


• See page “Logic: Switches in Series”.
2
Logic Gates: OR

OR
Electronics 4.4: Digital Processes

Truth Table8,16

A B Q

0 0 0
0 1 1
Two-Input OR Gate5 1 0 1
1 1 1

The output of an OR gate is 1 when any input is 1.

When Input A OR Input B is 1, the output is 1.


• See page “Logic: Switches in Parallel”.
2
Logic Gates: NOT

NOT
Electronics 4.4: Digital Processes

Truth Table8,16

A Q

0 1
1 0
NOT Gate5
Note that NOT gates have only one input.

The output of a NOT gate is the opposite of the input.

When Input A is 0, the output is 1.


When Input A is 1, the output is 0
• See page “Logic: Opposites!”.
2
Summary of Logic Gates and Truth Tables
• Logic gates may have one or more inputs.6
Electronics 4.4: Digital Processes

AND Gate OR Gate NOT Gate


A B Q A B Q A Q

0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1

Truth Tables list:6


• Every Output for every combination of inputs.
2
Combinational Logic Circuits9,17
• Combinational Logic Circuits are simply circuits using a
Electronics 4.4: Digital Processes

combination of AND, OR and NOT gates.

• You are expected to design Logic Circuits and


Truth Tables of simple combinational logic circuits.
2
Logic Circuit #1: Car’s Hot Engine
• When a car’s engine becomes too hot an LED should light
Electronics 4.4: Digital Processes

but only when the ignition is switched on.

Ignition
Switch 1

LED
Temperature 1
Sensor

Truth Table • Here, the truth table is simply


Ignition Temperature Output that for an AND Gate.
Switch Sensor LED
• For the LED to light, the
Off Cold Off Ignition Switch must be on and
Off Hot Off the Temperature Sensor must
On Cold Off be “hot”.
On Hot On
2
Logic Circuit #2: Central Heating Pump
• Derive a logic circuit that will turn on a Central Heating System’s
Electronics 4.4: Digital Processes

pump when the house is cold and the Central Heating System is
turned on.

This time let’s find the truth table first: Truth Table
• House is Cold = 0 ; House is Hot = 1 House CHS Pump
• CHS is Off = 0; CHS is On = 1
Cold Off Off
Cold On On
Hot Off Off
Central Hot On Off
Heating
1
House CHS Pump
Pump
0 1 0 0 0
0 1 1
Temperature 1 0 0
Sensor
1 1 0

2
Logic Circuit #3: Greenhouse Heater
• Derive a logic circuit that will turn on a heater in a greenhouse only
Electronics 4.4: Digital Processes

when it gets cold at night.

Truth Table: Truth Table


• Greenhouse Cold = 0 ; Hot = 1 Green Day/ Heater
• Dark = 0; Light = 1 house Night

Cold Night On
Cold Day Off
Hot Night Off
Light Hot Day Off
Sensor
0 1
Green D/N Heater

0 1 Heater 0 0 1
0 1 0
Temperature 1 0 0
Sensor
1 1 0

2
Summary of Combinational Logic Circuits
• Combinational Logic Circuits are simply combinations
Electronics 4.4: Digital Processes

of AND, OR and NOT gates.

Constructing Logic Circuits


2) Make a Truth Table.
3) Get the logic circuit from the Truth Table.

• Tip: If the circuit has only one “high” output


then the circuit will probably use an AND Gate.

• Tip: If the circuit has more than one “high” output


then the circuit will probably use an OR Gate.

• Tip: Note how useful NOT gates are!


2
Clocks
• Clocks are regular waves of pulses,
Electronics 4.4: Digital Processes

just like the ticking of a conventional clock:

• Digital circuits can be used to produce


a series of clock pulses.10

• Clocks are normally square waves.

• The circuits which produce clock pulses are sometimes


called oscillators because they constantly oscillate
between “on” and “off”.
2
A Simple Oscillator Circuit
• Oscillator Circuits change between two values
in a regular cyclical pattern: a clock output.
Electronics 4.4: Digital Processes

• Supply Voltage VS = V1 +V2

• When the NOT-Gate outputs a 0, • When the NOT-Gate outputs a 1,


V2=0V and V1=5V: V2=5V and V1=0V:
the LED lights. the LED does not light.
3
How an Oscillator Circuit Works18
• Capacitor C charges and discharges through Resistor R.
Electronics 4.4: Digital Processes

•Start:
ASSUME THE
CAPACITOR IS
FULLY CHARGED.

• The Invertor’s Input is 1, so its Output = 0:


the Capacitor starts to discharge through the Resistor.
• As the Capacitor discharges the Invertor’s Input eventually falls to
0, so its Output becomes 1:
the Capacitor starts to charge through the Resistor.
• As the Capacitor charges the Invertor’s Input eventually rises to 1,
so its output becomes 0: the Capacitor discharges again.
1) This sequence of charging and discharging continues ad infinitum
to produce a series of clock pulses.
3
Electronics 4.4: Digital Processes How an Oscillator Circuit Works (Alternative)

Capacitor NOT NOT V2 V1 LED


Input Output
Charged 1 0 0V 5V On
Discharged 0 1 5V 0V Off
Charged 1 0 0V 5V On
Discharged 0 1 5V 0V Off
3
How to Change a Clock’s Frequency19
• The frequency of clock pulses can be altered:
Electronics 4.4: Digital Processes

High Frequency Low Frequency

• If the value of the Capacitor is increased,


charging and discharging takes longer so C↑ then f↓
the clock frequency is decreased.

• If the value of the Resistor is increased,


charging and discharging takes longer so R↑ then f↓
the clock frequency is decreased.
3
Counters
• Counters are electronic circuits which
Electronics 4.4: Digital Processes

can count digital pulses from a clock.12

1 2 3 4

• Counters count the clock pulses in binary.13

3
Counting in Decimal
• Circuits called Binary-to-Decimal Convertors
Electronics 4.4: Digital Processes

convert a counter’s binary output into decimal.14

Binary Decimal

0000
0001
0010

etc etc

0111
1000
1001

3
Devices using Counters
• You will be expected to name a device
Electronics 4.4: Digital Processes

which uses a counter.

• The most common device to use


a counting circuit is an electronic clock or watch.11

• Electronic timing devices work


with great accuracy.
• An electronic watch’s “clock circuit”
generates regular pulses and a
Counter simply counts these.

• The watch’s microprocessor is programmed to know how


many clock pulses correspond to a second (and minute,
hour etc) and will update the 7-segment display
accordingly: thus displaying the time!
3
Future Improvements
• Clip Art
• Imagination
Electronics 4.4: Digital Processes

• Summarise

Potrebbero piacerti anche