ENG H192: Hands on Labs Lab 2: Digital Electronics Introduction

advertisement

ENG H192: Hands on Labs

Lab 2: Digital Electronics

Engineering Disciplines

Explored: Electrical

Introduction

Background

Purpose

Digital electronics have found their way into areas thought unthinkable thirty years ago. Even many simple coffee makers are controlled by digital computers. A compact disc player attributes its quality to digital recording and play back. Digital clocks far outperform typical analog clocks in reliability and cost. DVDs present movies in higher resolution and with multiple language tracks all at better quality than the analog VHS videotapes introduced in 1976.

There is not a field in engineering or commerce in the world that has not been affected by digital electronics. Computers are controlling the world of the future and understanding the basic methodology of computers is essential to putting them to use.

The purpose of this lab is to expose the students to operation of the fundamental components of integrated circuits.

Basic Principles In this lab write-up will cover the following basic principles:

1.

Digital vs. Analog signals

2.

Building blocks of digital electronics

3.

Basic logic gates

4.

Boolean algebra

5.

Advantages of digital logic

6.

LED’s

7.

Power MOSFET’s

Lab Experience In the lab experience you will experiment with:

1.

Basic logic gates

2.

Building digital circuits using transistors

Fundamentals

Digital Vs

Analog

A digital signal is either on or off whereas an analog signal may take on infinite values. If an analog signal source fades over time, information gets lost to the noise background just as videotape loses definition over multiple viewings. A digital signal is more robust as its discrete levels can be discerned reliably from even poor sources.

Analog information is by no means extinct, but it is certainly declining in use.

CRT-based televisions, AM/FM radios, and 35mm film all carry analog information. Even now, though, liquid crystal displays, satellite radio, and digital cameras are increasing in use.

Sound is heard through the vibrations of air molecules. These vibrations are easily converted into electrical signals, which can be transmitted to in an FM broadcast. Since audio signals are inherently analog it is efficient to transmit them in the same form. There is noise introduced with every analog device

(amplifiers, modulators, transmitters, receivers, antennas) that the signal goes through. If the signal was digitally sampled and then converted back to analog at the user end, there could be a lot less noise introduced to the signal.

Building Blocks of Digital

Electronics

All computers are built upon the most basic element of digital electronics: the transistor. A transistor can be thought of as a valve, when it is open (or gated) electricity can flow, when it is closed, no electricity can flow.

For the circuit shown, if no current were supplied at the base then the 'gate' would remain closed and no current would flow from 5 volts to ground through the transistor. Since no current could flow through the transistor, no current would be flowing through the resistor and so the output voltage would be equal to 5 volts (binary 1). If current was supplied at the base then the transistor would 'open' and current could flow from 5 volts down to ground through the transistor. This would connect the output line directly to ground

(through the transistor) and make the output voltage equal to zero (binary 0).

This electrically controlled switch is the basic building block of all digital electronics. Simple digital electronic components carry out the functions of

Boolean algebra. Boolean algebra is the manipulation of logical statements to determine truth or false.

Basic Logic

Gates

When a signal, or set of signals enter these gates the output is set according to the logical truth of the signals.

AND OR

NOT

An AND gate takes in multiple pieces of information and passes on the value true only if all of its inputs were true. The statement Donald Trump is rich

AND he is a male is true, however the statement Ohio State University is huge AND worms have sharp fangs is false. An OR gate will act just as expected: it will set its output as true (binary 1) if either of its inputs are true.

The statement ice cream is sweet OR gymnasts have no balance is true because at least one of the statements is true. A NOT gate simply inverts the truth of the input. NAND and NOR gates act just as like AND and OR gates with a NOT gate attached to the output. NAND gates are especially significant because in most processes they are the simplest two-input gate to construct.

NAND NOR

Truthtables for each are as follows:

Inputs

AND

A B

0 0

1 0

0

1

1

1

0

1

NAND

Inputs

A B

0 0

1 0

1

1

Input

NOT

0

1

Output

0

0

0

1

Output

1

1

1

0

Output

1

0

0

1

0

1

1

0

1

OR

Inputs

A B

0

0

1

1

NOR

Inputs

A B

0 0

0

1

1

Output

Output

0

0

1

0

0

1

1

1

Boolean

Algebra

Simple digital electronic components carry out the functions of Boolean algebra. Boolean algebra is the manipulation of logical statements to determine truth or false.

Used in Boolean algebra, are the following three basic symbols:

+ Represents an OR

 Represents an AND

To overbar an equation means to NOT it.

The Boolean algebraic formula for the basic logic gates are as follows:

AND:

OR:

Y

Y

A

A

B

B

or Y

AB

NOT:

NAND:

NOR:

Y

A

Y

Y

 

A

B

Example Turn on the hydraulic pump if and only if the system is enabled, the operator is pressing both palm buttons, the emergency stop button is not pressed and the proximity sensor does not sense probable interference with any moving parts. The pump will also turn on if an override switch is on (unless the emergency stop is made).

This safety circuit could be realized with relay logic, but a more energy efficient and portable method would be to use digital electronics.

The Boolean expression for the circuit is:

Output

(( Enable

( Palm

1

Palm

2

)

Pr ox )

Override )

Estop

The circuit shown above will control the hydraulic pump as described. In the state shown the E-Stop is not made, both palm buttons are made and the proximity sensor does not sense anything. In this state the hydraulic pump is turned on. The 1 at the output shows this. The building blocks for this circuit are AND, OR and NOT gates.

Hydraulic

Pump Circuit

Another state of the hydraulic pump circuit is as follows:

Notice the logical value of each of the branches. Only one of the palm switches is made so 1 AND 0 = 0. The output of the 3 input AND gate is 0 because 1 AND 0 AND 1 = 0. The or gate shows a 1 as an output because 0

OR 1 = 1. The final control signal is a zero because 1 AND 0 = 0. Notice also how the NOT gate changed the E-Stop signal of 1 to a 0.

There are several other types of gates such as NOR, NAND and XOR but all of these and any other gate can be broken down to simple AND, OR, NOT logic.

Advantages of

Digital Logic

Digital electronic devices are much more popular than traditional analog devices because of the added versatility. Digital devices can easily interface with computers, which not only simplifies data manipulation, but also storage and analysis of data. When selected correctly digital devices offer the same precision as an analog counterpart typically with greater reliability and almost always a smaller package

LEDs

Power

MOSFETs

An LED is a polar device that has a preferred orientation (unlike a resistor).

An LED will illuminate when current flows through it in the proper direction.

The Cathode of the LED is the negative side (the side that should be connected to the lower voltage level- ground in our case), the Anode should be connected to the output signal we wish to represent. When the control signal is at 5 volts (logic 1) current will flow through the LED and it will illuminate. When the signal is a logic 0, no current will flow and the LED will not illuminate. One caution with the LEDs is that they can withstand only a limited amount of current, for this reason a resistor must be put in series with the LED, a value of 270 ohms or more is recommended. NOTE: The longer end of an LED device is the anode.

A power MOSFET (metal oxide semiconductor field effect transistor) is a device which is used to switch on and off high current, higher DC voltage level loads using simple 5 volt, low current digital signals. It is very simply an electrically controlled switch. When a logical 1 is at its input, current can flow through the device. When a logic zero is at its input, no current can flow.

It is important to note that that since no current flows in from the switching source, a logic chip with low output capacity can be used to control a

MOSFET.

LAB EXPERIENCE

Part A: Logic

Gates

Inputs and Outputs

1.

The inputs will be controlled by using switches. The output of the switches can be either 0 or 5 volts to represent logic 0 or 1. Wire up a

1kohm pull up resistor to make the output signal +5 volts when the switch is open. The condition of the output can be determined using a light emitting diode (LED). (See Figure 1).

Simple Logic Circuits

NOTE: An unpressed switch corresponds to logic value 1.

2.

Use a transistor to implement a NOT logic gate and apply the output to an LED. Use switches to control the inputs and current limiting resistors for the LEDs in the output. Use always +5 volts unless otherwise specified. (See Figure 2)

3.

Implement the circuits shown in Figure 6, Figure 7, and Figure 8.

Derive the truth table from experimentation and determine which of the basic logic gates each circuit represents.

4.

There is an unknown circuit at the front of the classroom. This circuit has two inputs and one output. Derive the truth table for the given circuit. Use that table to determine the logic formula and the logic circuit. Draw the logic circuit using only AND, OR, and NOT gates.

Part B: Digital

Controllers

Control of DC Motors

5.

Use a power MOSFET as a switch to control a 5 V DC motor. The circuit diagram is given in Figure 9. Use the data sheet to verify the pin outs of the power MOSFET.

6.

How could a 5-volt logic circuit control a 12-volt motor? Explain why. With your explanation include a circuit diagram clearly showing the 5-volt and 12-volt parts of the circuit.

Figure 1: Pull-Up resistor

Figure 2: NOT logic gate using transistor

Figure 3: Bottom View of Transistor

Figure 4: NAND gate Integrated Circuit

Figure 5: Power MOSFET

Figure 6

Figure 7

Figure 8

Figure 9: Motor Control using MOSFET

LAB REPORT

Guidelines 1.

Develop parts A and B in the order given. Explain how the circuits operate using the given schematics.

2.

Answer the questions in the order given.

3.

Draw the logic circuits to implement the following expressions. Use

AND, OR, and NOT gates only. Do not worry about resistors or the output LED. a) Y

( A

B )

( A

B ) b) c)

Y

Y

( A

B )

C

( B

C )

( A

B ) d) Y

( A

B )

(( A

B )

( B

C ))

Format Follow report format announced in class.

Nominally 4-5 pages (including figures and tables)

Download