Unit 08 - Design of Real World Logic Circuits
Unit 08 - Design of Real World Logic Circuits
8.1 Introduction
In the previous unit we studied about different types of counters and design
of counters. With the advent of large and very-large-scale integration,
systems of reasonable complexity are realized on a single chip. Reductions
in the number of elements required to realize each function makes it
possible to use fewer chips or to do more on a given chip. In high-
performance systems, eliminating redundant gates not only frees up chip
area, but also reduces power dissipation, often the limiting factor. There are
of course factors that were not present in the days of discrete logic
elements, such as the value of regularity in the arrangement of elements on
a chip. But the need of powerful methods for generating efficient logic
circuits has indeed returned. A major consequence of the larger scale of
integration is the enormous size and complexity of our systems, and the
increased importance of testing. In this unit you will study some real world
logic circuits and their design.
Objectives:
By the end of Unit 8 the learners will be able to
explain traffic signal systems
explain the functions of switches
electronic tennis scoring system
discuss on temperature & weather forecast systems
Table 8.2 lists the Boolean functions for all the signal lights, in terms of
Boolean variables X, Y and Z.
Table 8.2: Boolean Functions for All the Signal conditions
From the table 8.2, we can note that both the left and right turn signals have
similar switching pattern and hence they have identical functions. Hence
these signals can be controlled by a single block of control logic.
Figure 8.2 shows the logic diagram that generates all the control signals
which can be used to activate all the signal lights according to the Boolean
functions listed in table 8.2.
The IC1 is a 555 timer and is used to generate the clock signal for the
counter IC2. Note that the timer IC is configured as an astable multivibrator.
The duration T for which the IC1 output (clock to IC2) remains HIGH is
given by,
T = 0.695 C2(R1+R2)
Hence we can vary T by varying the values of R1, R2 or C2.
The 4 bit counter IC2 works like a 3 bit counter. The connection to reset
pin 1 from the output Q3 via inverter N1 achieves this. The remaining
counter outputs Q2, Q1 and Q0 map to the variables X, Y and Z
respectively.
We can check the working of the traffic light controller by connecting the
light control outputs to red, yellow and green LED’s which represent the
actual signal lights. To limit the current through the LED’s, we can connect a
resistor (typical value 470 Ohms) in series with each. As we stated before,
only. If in a particular junction, some direction of movement is restricted,
then signals can be suitably merged with the next state.
Manipal University Jaipur B0948 Page No. 164
Logic Design Unit 8
For the manual control of the traffic lights, one can load the desired binary
state code (indicated by X, Y, Z variable values) into the counter IC. For this
purpose the counter must be wired in a pre-settable mode. We can also
reset the signal lights to the initial state (XYZ = 000), by resetting the
counter. This can be achieved by having an external switch which can feed
a LOW (0) to reset pin (pin 1) of IC2. A computer program in C language
which can simulate the traffic light controller circuit on a PC is shown in
figure 8.3. Table 8.3 shows the results of execution of the program.
(a)
(b)
The most common type of switches is the one that we use to turn our lights
on and off. Depending on the power that is switched, size and physical
nature we have a wide range of switches, ranging from sub-micron
transistors to big switches that can switch megawatts of power. Although
there are many types of switches, we are more accustomed to one-way and
two-way electrical switches. The main difference between them lies in the
number of contacts they have. A one-way switch only has two contacts and
a two-way switch has three.
A one-way switch basically operates as a make or break switch. So when it
is turned on, the two terminals are connected, and when it is turned off, the
contact between the two is broken. In contrast, a two-way switch is basically
two, one-way switches combined into one. Here one of the terminals can be
connected to either of the remaining two but not both at the same time.
When we make a connection with one terminal, the connection with the
other is broken.
A switch can be considered to be a ‘gate’ which either allows or disallows
certain entity. When such a switch can be operated using some logic, then
we can call this switch as a ‘logic gate’. Electronic hardware technology
provides us with miniature logic gates which can be put together in large
numbers (several millions) on a single chip, which can function as a system
of logic. A computer is a classic example of such an electronic system
composed of electronic logic gates.
On the other side we have mechanical arrangements that can switch the
track of a train from one to another.
A regular electric switch that can be used to control power to domestic
appliances has small metallic pieces called contacts. And these contacts
are made to physically touch each other to make a circuit, while separation
between them breaks it. The desirable properties of these metallic contacts
are low resistance, very good electrical conductivity, resistance to corrosion,
mechanical strength to name a few. To achieve the desirable properties,
sometimes the contacts may be plated with metals such a gold, copper etc.
Actuator
The mechanical or electromechanical part which helps the contacts to
physically touch and separate are called actuators. These could be a spring
loaded toggle, a rocker, electrically operated relay, a push-button etc.
Contact arrangements
A switch is said to be ‘closed’ if the contacts of the switch are in physically
touching each other, which allows electric current flow through it. When the
contacts are separated with a gap, current cannot flow through the switch.
Now the switch is said to be ‘open’.
Generally electric switches can be classified according to the number of
contacts and mechanical movements required to operate them. A SPST
switch means, single pole (contact) - single throw (movement). But electrical
power supply industry and wiring technicians also have alternate
nomenclature like ‘one-way’ switch; ‘three-way’ switch etc.
The figure 8.5 shows the some of the types of switches based on their
method of contacts.
(a) (b)
(c) (d)
A normally open (‘NO’) switch has its contacts open by default and the
contacts close only when the switch is operated. Similarly a normally closed
(‘NC’) switch has closed contacts until opened by operating the switch.
These are shown in figure 8.6. The nomenclatures are normally used in
logic and wiring diagrams to enhance the clarity of operation. This helps in
minimizing assembly line errors and troubleshooting faults. A switch with
both types of contacts is called a changeover switch or "make-before-break"
switch contact, whereas most switches have a spring loaded action which
momentarily disconnect the load and so are "break-before-make" types by
contrast.
Figure 8.6: (i) Normally Open (‘NO’) switch (ii) Normally Close (‘NO’) switch
This table 8.4 calculates the station pressure for both the minimum (28.00)
and the maximum (32.00) pressures for altitudes from sea level to 10,000
feet in 1000 foot increments. The station pressure is then converted to
MPX4115A pressure sensor volts. Looking at the table, you can see the
predominant change in altitude in the offset voltage of the pressure sensor.
The OA Offset column is the op amp offset voltage that compensates for
altitude. This will be the only calibration variable. Since the instrumentation
amplifier is a rail-to-rail device, in theory it will operate down to 0 volts.
However, to provide some margin, the offsets were chosen to allow a
minimum of 0 .2 volts at the lowest pressure. The gain of 10 was chosen to
allow maximum output voltage swing for all altitudes. The resulting op amp
output voltages are listed in OA Output column. This is the voltage applied
to the DS2438 Vad input.
Circuit Design:
The following circuit design satisfies requirements (refer figure 8.7). INA122
instrumentation amplifier was selected as it eliminated several external
resistors and it provides a very stable gain over a wide temperature. It also
provides excellent rail-to-rail operation allowing full use of the 10 volt input
range of the DS2438. The 40.2K ohm resistor sets the gain to 10. The
variable resistor allows adjustment of the offset voltage from 2.0v to 4.0v.
Calibration:
Hardware calibration is simply a matter of setting the offset voltage to the
value listed in table 8.4 for your altitude. A jumper on the input of the
DS2438 allows the use of the DS2438 to measure the offset. Put the jumper
in the A-C position and using the iButton Viewer for the DS2438, set the
voltage to the table value using the 25-turn pot. Once it is set, put the
jumper in the A-B position to read pressure.
For altitudes in between the values listed in the table, simple interpolation
will give accurate results. An Excel spreadsheet can be used to calculate
intermediate values.
Routines currently exist to measure the DS2438s Vad voltage. Once this
voltage is measured, the pressure is calculated using:
Press = slope * Vad + intercept
Where the slope and intercept are the values listed in table 8.1 for your
altitude. The prototype code had an external text file to store the slope and
intercept values. This allows the user to edit the file to fine-tune the
calibration if desired.
Fine-tuning can be accomplished by monitoring the pressure and comparing
it with a known reference source, such as a nearby airport or national
weather service. Start by adjusting the intercept. When the reference station
indicates a pressure near mid-scale (30.00 inHg), adjust the software
intercept value until your weather station matches. Now monitor the
pressure extremes to determine if the slope needs adjustment.
Future Options:
A fixed resistor could replace the variable resistor. This would eliminate any
hardware adjustments. The value would have to be calculated for a given
altitude. Another possibility is to use several DS2406 1-wire switches or a
programmable potentiometer to set the offset programmatically.
8.6 Summary
In this unit some example of real world electronic design were presented. All
the designs require clear understanding of application requirements, and
accordingly design decisions are taken. While the traffic light controller was
purely digital, temperature and weather forecast system design included use
of sensors and analog components. We also learnt about various types of
switches and the terminology associated with them.
8.8 Answers
Self-Assessment Questions
1. Actuators
2. Boolean
3. Gate
4. True
5. Motorola MPX4115A
Terminal Questions
1. Refer Section 8.2
2. Refer Section 8.3
3. Refer Section 8.4