ELEC 101, Spring 2001
Prof. Rich Kozick

Laboratory 8
Digital Logic Circuit Design, Simulation, and Implementation


 

Introduction

Electrical and computer engineering come together in the design, implementation and testing of digital electronics. Digital circuits form the basis for computers, peripheral devices, process controllers and many other devices.

Digital circuits are based on Boolean algebra. In fact, digital electronic components are simply a realization of Boolean algebra functions. A digital circuit constructed by connecting the outputs of digital components to the inputs of other digital components is an implementation of a Boolean function.

In this lab, you will investigate the use of digital electronics in the control of an alarm buzzer in an automobile. Your circuit will use digital signals from sensors that detect when a door is open or the motor is running to determine when to sound the alarm.

The design of a digital circuit involves multiple steps. First, you will develop a written description of the operation of your circuit. Next, you’ll use a simulation program called LogicWorks to model your circuit. Simulations are often used to test circuit designs because (as you will discover) it’s typically much easier to draw the circuit on a computer than it is to build the circuit out of hardware and wires.

In this lab, you will first simulate your circuit design to verify that it is correct, and then you will implement your circuit in hardware and confirm that it functions correctly.

 

The problem

Design and construct a simulation for a digital circuit to control an alarm buzzer in a car. The alarm will warn about driving without buckling seatbelts, leaving the key in the ignition or leaving the lights on. Here is a more detailed description of the operation of your circuit:

The alarm is to sound if the key is in the ignition when the door is open and the engine is not running, or if the lights are on when the key is not in the ignition, or if the driver’s seatbelt is not fastened when the motor is running.

 

Input and output devices

To construct your digital circuit, assume you have five sensors that generate digital signals:

Signal name

Sensor

If signal = 1

If signal = 0

K

key

Key in ignition

Key not in ignition

D

door

Door open

Door closed

M

motor

Motor running

Motor not running

L

lights

Lights on

Lights off

B

seatbelt

Belt buckled

Belt not buckled

Materials

To complete the implementation of your digital circuit, use:

 

Design specifications

  1. Five switches, representing the input from the digital sensors, will provide input to your digital circuit.
  2. The signals from the five switches will be combined with digital logic components (AND, OR, NOT, NAND) into a control circuit.
  3. The digital circuit will have a single output, which will be 1 to sound the alarm and 0 otherwise.

 

Procedure

Record the work from each step below for inclusion in your lab notebook.

  1. Develop a Boolean algebra expression that describes your digital circuit on paper. This expression should describe the three conditions under which the alarm should sound and the logic to cause the alarm to sound if any of the three conditions are true.
  2. Convert the Boolean expression to several logic circuit diagrams, utilizing AND, OR, NOT, NAND gates. Read the section below on hardware implementation, and present at least three designs, using four ICs, three ICs, and two ICs.
  3. Use LogicWorks to develop a simulation of your digital circuit for the case with two ICs (NAND gates). Annotate the components and signals in your digital circuit with brief text descriptions or explanations.
  4. Test your digital circuit in LogicWorks to confirm that the buzzer sounds when (and only when) required by the problem specification. To ensure complete testing, write out the complete truth table for your Boolean expression, and verify that the circuit functions properly for each row. (Note that there will be 32 rows in your truth table!)
  5. After testing, show your instructor your truth table, and give a brief demonstration of your LogicWorks simulation.
  6. Print a copy of your LogicWorks simulation and put it in your lab notebook.

 

Hardware implementation and layout

Decide which integrated circuits (ICs) or "chips" from Figure 1 you will use to implement your circuit. Note that a three-input OR gate is not available.

There is an obvious implementation that uses 4 ICs. Please find a more efficient implementation that uses only 3 ICs. Also, use NAND gates to find an implementation that uses only 2 ICs. We will simulate and implement the 2 IC solution.

  1. Use scissors to cut out the ICs that you will use in your circuit implementation. Decide where you will place each IC on the circuit board in order to simplify and organize the wiring. There is no single right way to place the ICs, but some layouts will be more difficult to wire and debug than others.
  2. Paste the ICs on a piece of paper using the layout that you will use on the circuit board. Draw lines to indicate all of the wires that you will need to connect in order to implement your circuit design. Include wires to Vcc (+5 volts) and GND (ground) to power the ICs, and also show the inputs K, D, M, L, B and the output to the LED.
  3. Five long wires will be used to represent the input from the sensors. Each wire will be labeled with a piece of tape indicating K, D, M, L, B, and you can connect each wire to +5 volts or 0 volts (ground) to indicate various conditions.

Figure 1. Pinouts for Various SSI Chips

 

How to wire an LED

The output of your logic circuit will be an LED, even though your description stated that a buzzer would sound. An LED is used because it is much easier to wire than the circuitry associated with a buzzer. An LED passes current in only one direction, so if it does not light for a logic "1", just turn it around. The resistor is needed to limit the amount of current that flows through the LED and the integrated circuit (IC) chip.

 

 

 

 

 

 

 

 

 

Figure 2. LED Connection

Wiring procedure

  1. Review the circuit layout and wiring diagram that you prepared on paper before arriving at lab today.
  2. Place the ICs on the circuit board according to your wiring diagram.
  3. Using the supplied wires, connect the ICs according to your wiring diagram. Use a color-coding scheme to organize your wiring.
  4. Use five long wires as your sensor inputs. Connect these wires to your logic circuit and to either +5 volts or 0 volts to test the various conditions. You might want to label these wires with K, D, M, L, B to simplify your testing.
  5. Wire a Light-Emitting-Diode (LED) to serve as your buzzer and connect it to the output of your logic circuit.
  6. Verify that the circuit operates as expected by testing all input combinations in the truth table that you completed in the first lab session.
  7. Demonstrate your circuit to the instructor by showing correct operation for several test cases.

 

Results to include in lab notebook

Your Boolean expression for the design, logic circuit diagrams that corresponds to your Boolean expression, the truth table, a printout of your LogicWorks simulation, and your layout/wiring diagram for the design that uses two ICs and NAND gates.