Teaching Pre-Calculus Students Electrical Engineering Principles

advertisement

Session F2E

Teaching Pre-Calculus Students Electrical

Engineering Principles Using Low Cost Hardware

Yongmian Zhang, Dwight Egbert

Abstract— Using low cost hardware and the Visual Basic program- ming language, we have developed teaching modules which can effectively introduce basic science and technology principles at several levels from high school to freshman Electrical Engineering. We have tested these methods in a NSF sponsored course designed to teach high school teachers how to introduce science and technology to their students. To illustrate how the software tool and inexpensive hardware can be used to aid learning and teaching Electrical and Computer Engineering concepts in the classroom we present example experiments.

I. I NTRODUCTION

The need to increase science and technology course content in K-12 classes has resulted from recent legislation designed to strengthen basic science, technology and mathematics education in the United States. We have developed software and teaching modules to operate with a very inexpensive analog to digital (A/D) converter to provide a visually stimulating display of a variety of signals on a personal computer (PC) video display. As part of a NSF sponsored course for high school math and science teachers we had pairs of teachers construct the A/D converter from a kit as an integral part of the learning experience. This hands-on component gave the teachers the experience of knowing that they could work with electronic components that had, in most cases, previously intimidated them. It was clear that a change had occurred in the teachers’ attitudes after they had successfully assembled the A/D kits. They were then confident that they could use the kits and accompanying material.

Once the A/D kits were operating the teachers connected them to a PC and used other readily available electronics training kits to generate input signals for the visual display. Most of the examples also produce audio stimulation that is related to the visual display. The electronics kit used in our course was a Radio Shack 300-in-1 breadboard electronic project kit.

These kits provide a solderless breadboard, electronic parts and instructions for building circuits from simple sound makers to complex digital circuits. Even though the exact models change frequently, equivalent kits have been available for many years for less than sixty dollars.

We feel that our approach has provided a viable solution for a long-standing problem. That is, the fundamental concepts in electrical engineering can be very dry for students to learn and difficult for instructors to teach when presented in the class-

Yongmian Zhang, Electrical Engineering Department (MS 260), University of Nevada, Reno, NV 89557.

Dwight Egbert, Computer Science Department (MS171), University of

Nevada, Reno, NV 89557, egbert@cs.unr.edu

This work was supported in part by NSF grant number DUE 9980687.

room, particularly at the high school or college freshman level of engineering education. It is evident that carefully using educational software and properly designing computer based assignments can enhance the effectiveness of engineering education [1]- [5]. These references describe several applications as identified in their titles. In recent years, the rapid development of personal computers has provided numerous examples of commercial packages for engineering computation and visualization. However, the potential for utilizing these kinds of software for educational purposes has always been limited by hardware specificity, complexity of usage, and the cost of licenses for multiple copies.

In order to assist teaching and learning, our graphics display program has been developed to provide a low cost general experimental tool to aid in understanding and visualization of engineering basics without the need of using complex laboratory equipment. The program can be distributed to students at no cost, and the availability of the source code serves as a framework for expanding the capabilities to a variety of introductory engineering projects by more capable students working on their own or in groups. To be easily accepted by high school and college freshman students, the software must be simple to use and the hardware needs to be inexpensive and readily available. However, it also needs to be sufficiently comprehensive, so as to allow the students to develop and gain hands-on experience into how the basic concepts operate in various applications.

II. B ACKGROUND

The visualization tool described here utilizes a low cost analog to digital converter, a low cost electronics kit and a

PC’s parallel port. The graphics display program modules and design of the hardware tools can also be a part of teaching materials at more advanced levels, since A/D converters and parallel port operation are relevant to Computer Engineering applications. As part of this effort, we selected Microsoft Visual Basic (VB) as the programming language for developing the software tool to interface an ADC0804 converter via the

PC parallel port.

To provide the background necessary for us to introduce the development of the teaching modules, we first briefly review the basics of interfacing the ADC0804 to the PC’s parallel port in the following section. Complete details of the interface and software design are beyond the scope of this paper, but are available, together with the software source and executable files, via a link from the author’s web page

0-7803-6669-7/01/$10.00 2001 IEEE

October 10 - 13, 1999 Reno, NV

31st ASEE/IEEE Frontiers in Education Conference

F2E-23

Session F2E

(www.cs.unr.edu/˜egbert). The applications of the interface which are of major interest and also serve as a part of the class projects are illustrated in section III.

The ADC0804 chip manufactured by National Semiconductor and other components necessary for an analog circuit interface can be packaged in a DB-25 extended case and plugged into the computer’s parallel port. Complete interface kits based on a 1996 article [6] are currently available

½

. With a maximum sampling rate of 10kHz, low-frequency audio signals up to about 2KHz can be displayed with reasonable resolution. The only disadvantage of this system is that its nibble based parallel port interface is relatively slow and requires several instructions to read one byte. It is nevertheless an excellent kit for educational projects and our experience is that it will work without modification on any PC parallel port no matter how old, or new.

A. ADC0804 Interface Circuit

A PC’s printer port provides eight TTL outputs on the data port ( through ), five inputs on the status port ( through ) and four additional outputs on the control port

( through ). Each printer port is accessed via three I/O port addresses: data, status and control [7].

Figure 1 shows the schematic of the basic circuit for the ation of the that interfaces it to the PC parallel port. The opersimply acts as a multiplexer or switch.

When the input is low, the A input which is the low nibble of of the A/D output are selected, i.e., to , inputs are selected and 4 high bits from passes through to , etc. When passes through to is high, the sent out to corresponding pins from to . The outputs are connected to the status register of the parallel port as shown in Figure 1, where Select, Paper Out, Ack, Busy, represent through .

The Analog to digital conversion process starts when a low to high transition is made on the input (which is connected to ). As soon as the processes a conversion of the signal on its analog input the (connected to

) goes active low and 8 bits of data are latched and drive the inputs to the multiplexer. The is also used to read one nibble of data at a time at the PC parallel port, and when the input is switched alternate high/low nibbles are read. The software is used to read each nibble from the status port and then concatenate the two nibbles into a byte.

B. Data Acquisition and Visualization

Figure 2 is an overview of the various pieces of the simple laboratory tool. The software tool functions to (1) acquire data from the hardware; (2) ship data to the graphics display driver; and (3) process events from the user input.

½

Kit K112 Pocket Data Logger/Sampler 8-bit A/D converter is available from DIY Electronics at www.kitsrus.com, Carl’s Electronics at www.electronickits.com, or a web search on ”electronic kits” will yield multiple sources.

D Pin PC Port

11

10

12

13

Busy

Ack

Paper Out

Select

1 Strobe

Analog

Signal

0 − 5V

+5V

1Y

2Y

3Y

4Y

VCC

1A

2A

3A

4A

1B

2B

3B

4B

A/B

G GND

+5V

Vin +

VCC

CS

INTR

RD

WR

Vin −

Clk

R

Clk in

D7

D6

D5

D4

D3

D2

D1

D0

An

GND

Dig

GND

Fig. 1. The connection of the A/D converter to the PC parallel port. Adapted from [6].

PC Port

D7

D6

D5

D4

D3

D2

D1

D0

PC Port D Pin

AutoLF 14

Error 15

Init

Strobe

16

1

Raw data

Displayer

Read Status

Software

Write Control

AD

Converter

Input signals

Ctrl signal

Fig. 2. Functional diagram of the system.

0-7803-6669-7/01/$10.00 2001 IEEE

31st ASEE/IEEE Frontiers in Education Conference

F2E-24

October 10 - 13, 1999 Reno, NV

Session F2E

The heart of the software tool is a main sampling loop which controls the Communication with the A/D Converter and continuously transfers data to the graphic window. The infinite main loop is implemented by a VB timer controller, and the timer can be set from 0 to several minutes for varying the sampling rate. To add graphical elements to the program, a little development effort was needed with the VB graphic facilities, but this work eventually produced nice results. The display data are always organized in one window for the convenience of reading the value from the display as shown in

Figure 3.

music or student voice inputs, a properly designed experiment and utilization of the software tool can improve class interest.

Microphone

R

3

2

+

386

4

6

+12

5

C

V out

Or using

Music CD

Fig. 4. An op-amp circuit used to demonstrate speech and music signals as well as the behavior of op-amp circuits.

Fig. 3. The graphical user interface without using deeply nested user menus.

Little code was needed for the user interface, since VB provides pre-built graphic user interface components which can be used to easily manipulate layout and component properties. The interface provides immediately available guidance and explanations without deeply nested pull-down or pop-up menus. The software tool is simple to use and requires no specialized knowledge for operating it.

III. A PPLICATION E XAMPLES

Since one of the objectives of a high school or college freshman course is to give students a preview of the fundamentals of electronics and to some extent computer engineering, it is critical to involve the students in the experiments. To accommodate student diverse backgrounds, the projects are designed to be easily accessible to each student, but also address the essential engineering concepts. In this section, we illustrate how the software tool together with inexpensive hardware can be utilized to aid learning fundamental electrical engineering concepts.

A. Example 1: Basic Signal Displays (Introductory)

Figure 4 is an easily understandable example used to test the performance of an op-amp circuit. A microphone, a 10 variable resistor, a 386 audio op-amp, and 220 capacity are needed. The input signal may come from a radio or stereo speakers, tape recorder, or music from a computer CD ROM.

A snapshot of a music signal which was output from the computer CD ROM is illustrated in Figure 5. Using contemporary

Fig. 5. A snapshot of the output signal from Jazz music. The vertical axis represents amplitude(voltage) and the horizontal axis represents time(sample index).

B. Example 2: Basic Circuit Modeling

During this experiment, students learn the basic concepts of the electronic components which are the most commonly used in engineering applications, and gain qualitative knowledge of the functionality of common circuits.

To study simple circuits such as RC, RL, RLC, transistor and op-amp circuits, the best way is to observe circuit behavior in real time. The use of a standard oscilloscope for displaying and measuring the performance of basic network circuits is usually not quite illustrative. Take the RC circuit for example, the exponential trends of capacitive charging and discharging can not be easily caught by our eyes from an oscilloscope. However, the software tool has the ability to provide graphical and analytical presentations equivalent to storage oscilloscopes for the circuit dynamic behavior by simply setting up the appropriate sampling rate. Following is an example of using the software tool that is especially valuable to help students investigate and analyze the performance of simple network circuits. Using the software tool for finding

, given that is a 2 volt step function, is shown in Figure 6. The exponential curves displayed by the software tool in Figure 7 show the behavior of the circuit when a capacitor charges or discharges. From Figure 7 we can see that, using the software tools, students can visually inspect the response

0-7803-6669-7/01/$10.00 2001 IEEE

31st ASEE/IEEE Frontiers in Education Conference

F2E-25

October 10 - 13, 1999 Reno, NV

Session F2E of a basic RC circuit by varying the values of capacitance and resistance in the circuit. This allows students to better understand the meanings of theoretical concepts and how they can be applied in practice. The time-constant of the RC circuit charge or discharge can also be determined graphically. Insight into the behavior of circuits is thus gained without the need for calculus. Indeed, the experiment can be used to explain why the students will need calculus for quantitative circuit analysis.

t = 0 R = 100K tors , , and ; a constant capacitor able capacitor . Capacitor and a varicombined with resistors and forms the basic feedback timer. Resistors and control the duration of the pulses. The pulses are symmetrical when resistor R1 and R2 are equal. Changing the value of variable capacitor (e.g. 0.01, 0.047 and 0.1) will produce different frequencies of the square wave. The values of other circuit components are , , ,

, , is fixed at 0.1

. The output signal can be displayed by using the software tool as show in

Figure 9.

+

+12v

R3

C2 R1

E = 4V

C =

4.7

µ

F

V(t)

+

741

V out

C1

Fig. 6.

An RC network that is modeled by the software tool to determine

V(t).

R2

R4

Fig. 8. A simplified circuit of a square wave generator.

Fig. 7. Demonstration of capacitance charging and discharging curve. Note:

First peak shows the partial charge and discharge, the second peak shows the capacitor fully charged and discharged when C is and the third peak when C is .

In addition to being graphically displayed, capacitance charge and discharge data with time-constant interval can also be saved to a target file in tabular numerical form. Through the use of these data with other modeling software, such as

Microsoft Excel, students can easily figure out the solution of

.

C. Example 3: Waveform Generator

It is the purpose of this experiment to help students learn the basics of implementing the technological concepts learned in the classroom through assembling a waveform generator circuit. Also student understanding of the concepts of some of the most common and fundamental types of periodic waveform generators are enhanced through the hands-on experience.

The circuit as shown in Figure 8 is a simplified square wave generator. The circuit consists of a DC supply , four resis-

Fig. 9. The square wave generated by Figure 8 when capacitor

A sinusoid waveform can be generated by using the circuit shown in Figure 10 and its output sinusoid waveform is shown in Figure 11. In Figure 10, , , are ,

, , ,

. Different frequencies of sinusoid waves can be obtained by varying the value of the resistors and capacitors in the twin-T circuit. Students may optionally extend this circuit by adding more basic electronic components, such as an opamp or transistors, and analyze the behavior resulting from a specific change in the circuit.

Instead of using a commercial digitizing oscilloscope to take snapshots of the output signal, the display can be accomplished through the use of the software tool we developed.

The digitized signal is continually displayed and refreshed on the computer monitor or it can be saved to a text file for

.

0-7803-6669-7/01/$10.00 2001 IEEE

31st ASEE/IEEE Frontiers in Education Conference

F2E-26

October 10 - 13, 1999 Reno, NV

R1

R3

R2

+12

+

741

−12

R4

Vout

C1

R5

C3

C2

Fig. 10. A simplified circuit of a sinusoid waveform generator.

Session F2E wards from the junction. The current from junction 1 follows

, and the current from junction 2

¼ ½ ¼

, and so on. Thus the difference between quantization levels is volts, where is the number of binary bits used for the analog to digital conversion, and is the maximum analog voltage.

V out

R = 2K

1K

1K

6

−12V

4

741

+

+12V

7

2 3

R

I

0

R

R/2

I

1

R

R/2

I

2

R

R/2

I

3

R

R/2

I

4

R

R/2

I

5

R

R/2 R/2

R

I

6

I

7

R

D0 D1 D2 D3 D4

PC Parallel Port

D5 D6 D7

Fig. 12. R-2R resistor network implementation of a D/A converter and the connection to the data register of a PC parallel port.

Fig. 11. The sinusoid waveform generated by Figure 10.

later analysis. While the techniques developed were designed to aid student learning efficiency, they are also useful for instructor use to demonstrate basic circuit operations in the traditional classroom. Unlike the oscilloscope, the output signal displayed on the computer monitor can be easily sent either to a large screen projector or a set of distributed TV’s to increase the visibility of experimental results.

D. Example 4: Digital to Analog and Analog to Digital Converter (Advanced)

Data acquisition and signal processing are gaining immense importance as a basically analog world is treated more and more as a source for digital, data. Computer engineers need to have the knowledge to deal with a wide variety of analog and digital signals. Introducing the concepts of digital signals in engineering instruction is therefore a beneficial topic.

This experiment is to provide students the basic concepts of digital to analog and analog to digital conversion which are commonly used in engineering applications. The cost is low enough so that each student can build a D/A converter and implement simple digital signal generator routines using Visual Basic. Figure 12 shows the R-2R resister network that connects to the data pins of a PC parallel port with a resolution of 8 bits. The weighting of current is achieved by a current division in each junction. Looking right from every junction, a resulting resistance is found which is equal to the resistance in the vertical direction down-

Following is the VB program code for generating a periodic signal and writing to the data register of the PC parallel port.

Sub StartConverting()

Dim x As Integer

Dim y As Integer x = 0

While (1) y = ((Sin((x / 1024) * _

Wend

End Sub

(2 * 3.14159)) + 1) / 2) * 255

Outp DataAddr, y x = x + 1 x = x Mod 1024

Using the Visual Basic environment, students are able to easily create a simple user interface form with only start converter and stop converter buttons on it, as shown in Figure 13.

Alternatively, students can also add the control button directly on the main form of the software tool. The procedure code for the start button can use the above program code. Two computers may be needed to setup this experiment. One runs the software tool to display the output signal and the other executes the program code described above to produce the D/A signal.

IV. C ONCLUSION

In this paper, we have presented an educational tool written in Microsoft Visual Basic along with inexpensive hardware

0-7803-6669-7/01/$10.00 2001 IEEE

31st ASEE/IEEE Frontiers in Education Conference

F2E-27

October 10 - 13, 1999 Reno, NV

Session F2E

Fig. 13. A simple form can be created for controlling the D/A converter.

for teaching basic concepts at an introductory level of electrical and computer engineering. Since most of the students at this level usually do not yet have knowledge of the C programming language, we use Visual Basic as the programming language to develop our educational tool. This significantly reduces the time and effort for advanced students to understand sample source code, and hence it becomes possible to get the students directly involved in the development of some peripheral interface modules as class projects. This enhances student understanding about how the computer controls the real world peripherals in engineering applications. The essential features of an educational computer program are considered, and almost no time investment is necessary to start using the features of our software tool. Additionally, the hardware used for class projects is available through many electronics parts outlets at very modest prices. The entire hardware cost per student would be well below even if each student built and kept his or her own D/A and A/D converters for use in later courses.

It should be noted that the software tool developed for our engineering education course is to supplement, not replace, the role of the traditional oscilloscope to present experimental results. While the performance of this tool is far from that of commercial digitizing oscilloscopes, for educational purposes it not only helps students learn the basic engineering concepts and improves class interest, but also facilitates the instructor’s ability to demonstrate experimental results in the traditional classroom.

R EFERENCES

[1] S. L. Wood, “A new approach to interactive tutorial software for engineering education,” IEEE Transaction On Education, vol. 39, no. 3, pp. 399–408, 1996.

[2] A. Spanias, “A software tool for introducing speech coding fundamental in a dsp course,” IEEE Transaction On Education, vol. 39, no. 2, pp. 143–152, 1996.

[3] H. A. Smolleck, D. S. Dwyer, and L. M. Rust, “On-screen synthesis and analysis of harmonics: a student-oriented package,” IEEE Transaction

On Education, vol. 38, no. 3, pp. 243–250, 1995.

[4] W. D. Richard, “An educational image processing/machine vision system,” IEEE Transaction On Education, vol. 34, no. 1, pp. 129–191,

1991.

[5] L. P. Huelsman, “Personal computers in electrical and computer engineering,” IEEE Transaction On Education, vol. 34, no. 1, pp. 175–178,

1991.

[6] G. Cattley, “Low cost pocket sampler,” Electronics Australia, pp. 56–

59, August 1996.

[7] J. Axelson, Parallel Port Complete, Lakeview Research, Madison, WI,

1996.

0-7803-6669-7/01/$10.00 2001 IEEE

31st ASEE/IEEE Frontiers in Education Conference

F2E-28

October 10 - 13, 1999 Reno, NV

Download