You are on page 1of 115

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T.

Chainani

Resistors
Objectives
(1)

To become familiar with the resistor color code and the use of the digital multimeter (DMM) as an ohmmeter.

(2) To become familiar with a variable resistor (potentiometer). (3) To determine how the resistance of a thermistor varies with temperature.

Components needed:

Assorted 4-band and 5-band resistors Digital Multimeter Potentiometer Thermistor

The Resistor
The resistor is the most common component in electronics. A resistor is a two-terminal electrical or electronic component that opposes an electric current by producing a voltage drop between its terminals in proportion to the current. Resistors measure resistance, the ratio of the degree to which an object opposes an electric current through it. Resistance is measured in units called ohms () to honor Georg Simon Ohm (1787-1854), a German physicist credited for formulating the current-voltage relationship for a resistor (V = IR, Ohms

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Law). According to Ohms Law, the resistance R is equals to the voltage drop V across the resistor divided by the current I through the resistor. The symbols for fixed resistors and variable resistors are shown respectively, followed by a picture of an actual resistor showing the color code (Figure 1):

Figure 1. Resistor symbols and color code.


Fixed resistors usually come in two types: the 4-band resistor and the 5-band resistor. The primary difference the two is the number of color bands appearing in them. Both types, a resistor color code is used to identify the nominal values of the resistance. For 4-band resistors, the resistor color code is given in Table 1 below.

Table 1. 4 Band Resistor color code


Color Black Brown Red Orange Yellow Green Blue Violet Gray White 1st color band (first
digit - a)

(second digit - b)

2nd color band 0 1 2 3 4 5 6 7 8 9

(exponent - c)

3rd color band 0 1 2 3 4 5 6 7 8 9

(tolerance - d)

4th color band

0 1 2 3 4 5 6 7 8 9

1% 2% 3% 4%

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Gold Silver No color

-1 -2

5% 10% 20%

The resistor color code is used to identify the nominal values of the resistance as follows:

4-Band Resistors: The first two colored bands (a & b, closest to the end of the resistor in Figure 1) determine the first two digits of the resistor value. Table 1 shows the listing of the numerical value associated with each color. The third band (c) determines the exponent of the power-of-10 multiplier i.e. the number of zeros following the first 2 digits. The fourth band (d) determines the tolerance of the resistor.

Resistance = (10a + b) x 10c d


For example, a 21 kiloohm 5% resistor has the color bands red, brown, red, and gold. Common prefixes used for resistors are kilo (k) and mega (M). For 5-band resistors, the resistor color code is given in Table 1 below.

Table 2. 5-Band Resistor Color Code


Color 1st color 2nd color band, first band, digit (a) second digit (b) 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 3rd color band, third digit (c) 0 1 2 3 4 5 6 7 8 9 4th color band, exponent (d) 0 1 2 3 4 5 6 7 8 9 -1 5th color band, tolerance (e) 1% 2% 3% 4%

Black Brow Red Orange Yellow Green Blue Violet Gray White Gold

5%

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Silver No Color

-2

10% 20%

5-Band Resistors: The first three colored bands (a, b, and c, first three of the four adjacent color bands), determine the first three digits of the resistor value. The fourth band (d) determines the exponent of the power-of-10 multiplier, i.e., the number of zeros following the first two digits. The fifth band (e), the color band farthest from the four adjacent color bands, determines the tolerance of the resistor. Thus,

Resistance = (100a + 10b + c) x 10d e


For example, an 82.5 kiloohm 1% resistor has the color bands gray, red, green, red, and brown.

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Measuring Technique
Resistance is never measured in a live circuit using a DMM because the resistor might be damaged. The resistor to be measured should be removed from the circuit to ensure that your measurement will not be affected by any other components of the circuit. Make sure also that when you measure the resistor, only the probes of the DMM are touching the resistor. In other words, avoid touching the resistor as much as possible. There is no calibration for the DMM. Short (connect) the leads together and the DMM should display zeros (or less than 0.3 ohms). Any resistance above the maximum for a selected scale will result in the display showing 1 or OL or sometimes constantly fluctuating. Adjust the DMM to the correct scale.

Exercise
A.

Nominal vs. Actual Resistance Get five different resistors from your instructor. Record the nominal resistance of

the resistors (based on Tables 1 or 2, depending on the number of color bands), the actual resistance (based on the DMM reading), and the percent discrepancy between the nominal and actual resistance readings of each resistor. Calculate for the minimum and maximum tolerance resistance by subtracting or adding a specific amount based on the tolerance of the resistor. Actual Tolerance is difference of actual from nominal resistance. Ex: For a 12 kiloohm 5% resistor (brown, red, orange, gold color code) has a maximum tolerance resistance of [12,000 + (12,000 *.05)] kiloohm = 12.6 kiloohm. It has a minimum tolerance of [12,000 - (12,000 *.05)] kiloohm = 11.4 kiloohm.

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Compute % Discrepancy as:

B.

Potentiometer Get a variable resistor / potentiometer from your instructor. The resistance of the

potentiometer varies by twisting its knob. Determine the maximum and minimum resistance values of your potentiometer by twisting the knob to the left and right. To measure, attach the middle wire of the potentiometer to the ground probe (black) of the DMM. After this, attach either left or right wire of the potentiometer to the positive probe (red) of the DMM. Refer to Figure 2 below:

Figure 2: How to Measure Resistance from the Potentiometer

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

C.

Thermistor Get a thermistor from your instructor. The resistance of the thermistor varies with

respect to temperature. First, get the resistance of the thermistor in an air-conditioned room. Record the resistance reading as Raircon. Measure the temperature of the room and record it as Taircon. Second, clamp the thermistor tightly between two fingers. Get the resistance of the thermistor after 5 to 10 minutes. Record the resistance reading as Rbody. Clamp the thermometer between your fingers and measure the temperature and record it as Tbody. Lastly, get the resistance of the thermistor outside of the air-conditioned room. Equilibrate for at least 10 minutes. Record the resistance reading as Routside. Measure the temperature outside the room and record it as Toutside. Using the obtained Raircon, Rbody, Taircon, and Tbody, construct a two-point calibration curve using MS Excel or linear regression from a scientific calculator. From the recorded Routside, solve for Toutside, theoretical using the equation derived from the calibration curve. Compare the computed value to the recorded Toutside and solve for the %difference:

Obtain the slope of the line to solve for R/T which has units of (/C) Sources:
(1) (2)

Oppus, C.M. PS 141 Laboratory Manual. 2nd ed, 2003. Malmstadt, H.V.; Enke, C.G.; Crouch, S.R. Laboratory Electronics for Scientists, 2nd Ed., 1994.

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Resistors
Group Name: ________________________ Name: ______________________________ Section: ________

Raw Data Tables: Resistor Color Code


1

Nominal R

% Tolerance

4 5

Derived Data Tables: Resistor


1 2 3 4 5

Actual Tolerance R

Min. Tolerance R

Max. Tolerance R

Actual R

% Discrepancy

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

B. Maximum Resistance of Potentiometer: ____________________ Minimum Resistance of Potentiometer: ____________________ C. Resistance Air-conditioned room Body Temperature

Toutside, theoretical: ______ Routside: ____________

Toutside, derived:______
R

%difference: __________

/T = _________

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

1. Why is it necessary that only the probes of the DMM are touching the resistor?

2.

How does the thermistor resistance change with temperature? How would you describe its temperature coefficient?

3. (For out-of-classroom research) How is a potentiometer constructed? What are the three terminals of the potentiometer for?

10

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

The Breadboard
Objectives
(1) To become familiar with the uses of a breadboard. (2) To determine the connection arrangement of a breadboard.

Components needed:

Breadboard Digital Multimeter

The Breadboard
The breadboard is used to create a circuit without the need for soldering circuit elements together. The upper and lower halves of the breadboard contain 64 vertical rows of 5 interconnected contacts. There are also 4 long horizontal rows of connectors (5 groups of 5 contacts each) along the upper and lower edges. These long rows of connectors are referred to as power bus strips because they will be connected to the power supplies to provide power connections over the entirety of the breadboard. This breadboard socket is designed to accept integrated circuits, most common wire terminal components, and wire

interconnections.

11

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Exercise
Switch the DMM to measure resistance (any scale will do). Again, keep in mind that a short circuit gives a reading of 0 while an open circuit gives a reading of infinite resistance (1 or 0L). Insert wires into the breadboard holes carefully. Grasp the wire with your hands about inch from the end to be inserted and push into the breadboard until it is firmly in place.

Figure 1. The Breadboard.


Use the DMM to confirm the connection arrangement of the breadboard. Draw the verified connection arrangement of the breadboard given to you in the space below.

12

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Source: (1) Malmstadt, H.V.; Enke, C.G.; Crouch, S.R. Laboratory Electronics for Scientists 2nd Ed. 1994.

13

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Power Supply
Objectives
To connect a regulated power supply to the breadboard. (2) To differentiate between regulated and unregulated power supplies.
(1)

Components needed:

Breadboard Digital Multimeter Power Sockets (2) Jumper wires 100 1-W resistors (2) 0.1 uF ceramic capacitor 1 uF tantalum capacitor 2.2 or 3.3 uf tantalum or electrolytic capacitors Voltage regulators (7805 and 7905)

Exercise
A. Unregulated Power Supply Install the two power supply sockets into the breadboard as shown below (Figure 1). Also attach the wires as shown in the diagram. The wire colors are not necessary; they are just a useful reminder of what each line is carrying (red = positive, yellow = negative, black = ground/common).

14

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Figure 1. Installing the power supply sockets.


Plug one adapter into one of the sockets. Using the DMM, measure the voltage between the red and black power buses. This should be around 9-12 V. This is the DC output voltage without load. Keep in mind however that the DMM has an internal 10 M resistance. An unregulated power supply will have a fluctuating output voltage depending on the load connected to it. Connect two 100 1-W resistors in series. Connect one end to the power supply and the other end to ground. Again, measure the output voltage. Disconnect the power supply. Are the resistors hot?

B.

Creating a Regulated Power Supply

15

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Figure 2. Schematic diagram for the regulated power supply.

To regulate the voltage output of the unregulated power source, one uses a full-wave rectifier-filter circuit, as shown in Figure 2. In your breadboard, add the circuit elements as shown in Figures 3 and 4. Make sure that you follow the polarities of the capacitors. The longer wire of the capacitor is the positive end. The capacitors are added to prevent noise and oscillation and to increase the stability of the output voltage.

Figure 3

Figure 4

16

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Connect the voltmeter across the red and black power buses. Plug the power supply to the positive power socket. Disconnect immediately if the voltage is not within 5% of +5 V or if the regulator becomes hot. Record the positive regulated voltage without load. Now connect the voltmeter across the yellow and black power buses. Plug the power supply to the negative power socket. Disconnect immediately if the voltage is not within 5% of 5 V or if the regulator becomes hot. Record the negative regulated voltage without load.

Connect two 100 1-W resistors in series. Connect one end to the positive regulated power supply and the other end to ground. Measure the output voltage with load. Compare this to the data you got earlier. The regulators will become hot so do not keep the connections for long periods.

17

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Source: (1) Malmstadt, H.V.; Enke, C.G.; Crouch, S.R. Laboratory Electronics for Scientists 2nd Ed. 1994.

18

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Power Supply
Group Name: _________________ Name: ______________________________

A. Unregulated voltage output without load: __________ Unregulated voltage output with load: B. Regulated voltage output without load: Regulated voltage output with load: __________ __________ __________

1. What is the purpose of regulating the power supply?

2. Explain briefly the process of converting the 220 V AC power supply to the 5 V DC regulated power supply.

19

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Resistors in Series and Parallel


Objective
To become familiar with the different resistive connections particularly parallel and series connections.

Components needed:

Regulated Power Supply from Experiment 3 Digital Multimeter Assorted Resistors (3)

Series and Parallel


Series resistor configuration consists of two or more resistors connected tail to head with the open terminals as the series connection terminals as shown below (Fig. 1):

Figure 1. Resistors in series.

The effective resistance of resistors in series is equal to the sum of their individual resistances:

Requiv = Ri
i =1

Equation 1

20

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Parallel resistor configuration consists of two or more resistors connected tail to tail then head to head with the head connection forming one of the terminals and the tail connection forming the other, as shown below (Figure 2):

Figure 2. Resistors in parallel.

The inverse of the effective resistance of parallel resistors is equal to the sum of the inverses of their individual resistances:

1 Requiv

=
i =1

1 Ri

Equation 2

Exercises
Part A. Get 3 different resistors from your instructor. With the concepts of series and parallel circuits in mind, construct a circuit with your 3 resistors such that the minimum resistance value is obtained. Connect this new resistor to the 5-V regulated power source (with the other end connected to ground).

21

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Also, connect the multimeter in series with the new resistor. Get the value of the current, I (make sure that the DMM is properly configured). Using Ohms law (V = IR), youll be able to get the experimental R. Using the appropriate equation, youll be able to get the nominal R. Determine the % difference of the two values.

Disconnect the multimeter from the circuit but keep the circuit intact. Read the voltage across each resistor by connecting the DMM in parallel across each one (make sure that the DMM is properly configured). Also, read the current flowing through each resistor by connecting the DMM in series to each (again, make sure that the DMM is properly configured). Part B. Using the resistors you used earlier, construct a circuit such that the maximum resistance is obtained. Connect this new resistor to the 5-V regulated power source. Connect the multimeter in series with this new resistor. Get the value of I. With this value, get the experimental value of R. Compare this with the nominal value of R of your circuit. Determine the % difference of the two values. Disconnect the multimeter from the circuit but keep the circuit intact. Get the current through each resistor and the voltage across each resistor using the DMM.

22

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Source: (1) Oppus, C.M. PS 141 Laboratory Manual. 2nd Ed, 2003.

23

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Resistors in Series and Parallel


Group Name: _________________ Name: _______________________________ A. Icicruit:____________

Rnominal :___________ difference_____________ Vequivalent:__________


Resisto r

Rexpt:_____________

Resitance/ Voltage (V) Nomin Actua Calculate Calculat al l d Actual ed

Current (I) Actua Calculat l ed

R1 R2 R3 Total

B. Icicruit:____________

Rnominal :___________ difference_____________ Vequivalent:__________


Resisto r Nomin al R1 R2 R3 Total

Rexpt:_____________

Resitance/ Voltage (V) Actua Calculate Actual Calcula l d ted

Current (I) Actua Calculat l ed

24

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

1. What do you observe about the voltage across each resistor in A? Add up all current values through each resistor. How is this related to I of the whole circuit?

2. What do you observe about the current through each resistor in B? Add up all the voltages of each resistor. How is this related to the V of the whole circuit?

25

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

3. Why is there a discrepancy between the nominal and experimental values of resistances?

26

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Diodes
Objective
To become familiar with the uses of a diode.

Light-emitting diode
A diode is a device which allows the flow of current in a circuit in a single direction. Ideally, the diode is just a conductor, i.e., it has zero resistance. The circuit symbol of a light-emitting diode is shown below (Figure 1):

Figure 1. Circuit symbol of a light-emitting diode.


A light-emitting diode (LED) follows that same principle. However, it utilizes the current that passes through it to give off light.

Exercise
Part A Construct the circuit shown in Figure 2. You may use wires to make the switch, just connect or disconnect the wires as necessary. Check your circuit by turning on the switch and checking the current on the end of the diode connected to ground. If there is no current, invert the position of your diode.

27

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Figure 2. Diode circuit.


What is the current? Is this the current that you expected with the 220 resistor? Part B Replace the diode with a light-emitting diode. If no light is emitted by the LED, invert its position. Add more LEDs in series and in parallel to the original LED in the circuit. What happens to the intensity of the light of the LEDs? Part C Again, construct the circuit shown in Figure 1, but this time, replace the resistor with a potentiometer and the diode with an LED. Make sure you connect the potentiometer correctly, i.e., the resistance varies as the knob is turned. Turn on the switch. What happens to the intensity of the light of the LED when you turn the knob?

28

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Sources:
(1)

http://stage.itp.nyu.edu/~tigoe/pcomp/labs/assign1.shtml accessed March, 2003.

(2)

Horowitz, P.; Hill, W.; The Art of Electronics. 2nd Ed. Cambridge University Press, 1991.

Diodes
Group Name: _________________ Name: ______________________________

A. Theoretical current : __________ Actual current: Diode resistance: __________ __________

1. How does adding more resistors and LEDs to the circuit affect the intensity of the light? Does it matter whether the LEDs are connected in series or in parallel?

29

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

2. How does resistance in series to the LED affect the intensity of the light?

30

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Operational Amplifiers
Objective
To become familiar with the different configurations of an operational amplifier.

Materials
+5V/-5V power supply from Experiment 3 LF353 operational amplifier 1 or 2.5k potentiometer Two 2.2k resistors One 10k resistor One 47k resistor One 22k resistor Digital multimeter Two DC converters Green or yellow LED Dark cover for LED

Operational amplifier
The terminal diagram of an operational amplifier is shown below (Figure 1).

Figure 1. The operational amplifier terminal diagram.


31

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

The operational amplifier amplifies the voltage across its two inputs by a gain factor. The gain to which the input voltage difference is amplified depends on the values of the feedback elements. The operational amplifier that you will use for this exercise is the LF353. The pin configurations are shown in Figure 2.

Figure 2. LF353 op-amp pin configuration Exercise


A. Inverting amplifier Construct the variable-voltage source using a 1 or 2.5k potentiometer placed between two 2.2k resistors. One end of both

32

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

resistors are then connected to the +5V/-5V power supply from Experiment 3 as shown in Figure 3.

Figure 3. Op-amp Inverting Amplifier Test that the variable voltage source can go from -1 to +1V as the potentiometer knob is turned. This can be done by using a digital multimeter. Connect one probe of the multimeter on the center terminal of the potentiometer and the other one will be on one end of the potentiometer. The variable-voltage source will serve as the input for the op-amp inverting amplifier. This will also be the voltage input, Vin, which will be recorded. On the breadboard, insert the op-amp integrated circuit (IC) across the center channel as shown in Figure 4. Consult Figure 3 to construct the remaining parts of the circuit.

33

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Figure 4. Placing the op-amp onto the breadboard. Vary Vin by turning the potentiometer knob from the maximum allowable voltage to approximately 0.50V, 0.25V, 0.00V, -0.25V, -0.50V, and the minimum allowable voltage. Record the voltage output, Vout, together with the actual Vin. Vout can be acquired from the digital multimeter readout.

B.

LED as a light detector Use an LED as a light detector together with an op-amp current-to-

voltage converter. Normally, an LED is used to emit light when current is passed through it. However, when the LED is illuminated, it creates a small current and can be used as a photodiode light detector. Construct the circuit shown in Figure 5. Use only a yellow (preferred) or a green LED. Do not use a red LED. You need to use only one op-amp in the IC. NOTE: You must ensure that the LED is reverse-based. If the LED lights up, reverse it.

34

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Figure 5. LED circuit diagram. With the LED covered, measure the voltage output. Remove the cover of the LED, exposing it to light. Again, measure the voltage output of the operational amplifier.

Use an LED as a light detector together with an op-amp current-tovoltage converter. Normally, an LED is used to emit light when current is passed through it. However, when the LED is illuminated, it creates a small current and can be used as a photodiode light detector.

35

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Source: (1) Malmstadt H.V.; Enke, C.G.; Crouch, S.R. Laboratory Electronics for Scientists 2nd Ed. 1994.

36

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Operational Amplifiers
Group Name: _________________ ______________________________ Part 1. R1 (input): ____________ ohms ___________ohms R2 (feedback resistor): Name:

Vin (nominal )
-1.00 -0.50 -0.25 0.00 0.25 0.50 1.00

Vin (expt.)

Vout (theoret .)

Vout (expt. )

Gain (Vout / Vin)

1.

What is the value of gain and how does it relate to the values of R1 and R2?

2. The gain decreases as the op-amp output voltage approaches the supply voltages. This is called saturation. What is the approximate positive saturation voltage?__________ Negative saturation voltage? ________________.

37

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Part 2. Compute the current through the LED by dividing the voltage output by the value of the resistor used. The voltages are in the milli-volts and may fluctuate, so just use the average.

Range of V output with covered LED: __________ mV ____________

Current:

Range of V output with uncovered LED: _________ mV Current: ____________

1. The circuit you designed has the basis for photodetection, with the LED as a primitive detector. Which instruments find use for a photo-detector?

2.

Was the output steady? Noise is a major issue in signal amplification. How come

38

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

39

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

RC Filters
Objective
To introduce students to the different types of filters, specifically the RC filter circuit.

RC Circuit
A capacitor can store an electric charge while a resistor dissipates the flow of charges as heat. A fully charged capacitor, when connected across a resistive element, will lose its charge as current flows across the resistor. Connecting a voltage source across a series R-C circuit will cause a charging current to flow. This current changes with time as the voltages across the resistor and capacitor changes. By changing the source to a sine source, the frequency dependent voltage and current relationship in a capacitor can be exploited. The capacitor has a frequency-dependent resistance referred to as capacitive reactance. By combining resistors and capacitors in RC circuits, a frequency-dependent voltage divider circuit is realized. Thus is created a circuit in which the input and output relationships are frequency-dependent. These circuits form the basis of filters.

Filters
Fundamentally, all periodic fluctuations can be by a reduced to combination of sine waves of different frequencies. Electrical signals are no exception, and thus have their signature frequencies. In most cases, the
40

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

frequency of the desired signal is known. Stray signals of different frequencies, or noise, interfere with the transmission of signals. Most of the time, these stray signals are unavoidably combined with the desired signal. However, there are ways to remove the noise from signal transmissions. Filters are used to weed out the unwanted signal frequencies. There are four basic types of filters. A low-pass filter only lets lower frequencies pass through. A high-pass filter lets higher frequencies pass through. A band-select filter only lets a certain range of frequencies to pass through. A band-reject filter lets all frequencies pass through except for a certain range of frequencies. In this lab, a simple RC filters characteristics are demonstrated.

Exercise
Filter Circuit Construct the filter circuit shown below using CircuitMaker. The devices and elements to be used can be found under .General in the Major Device Class.

41

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Figure 1 RC filter circuit


Access the Device Selection window (Figure 2) by clicking Devices>Browse

Figure 2 Device Selection window with listed devices

42

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Under Major Device Class, select and place the following circuit components in your circuit setup Circuit Component Signal Generator Directory .General>Instruments>Signal Generator

Multimeter Resistor Capacitor Ground

.General>Instruments>Multimeter .General>Resistors>Resistor .General>Capacitors>Capacitor .General>Sources>Ground

Set parameters of the devices and elements in the experiment by double-clicking on devices and making the following changes to the device parameters: Circuit Component Signal Generator New Parameter Peak amplitude = 1.41 V Frequency = 1.000 kHz Measure AC RMS Resistance = 10k ohms Capacitance = 0.1 uF
Figure 3 (Right) Editing parameters of the signal generator

Multimeters Resistor Capacitor

43

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Click on the Running Man icon to run the analysis. The oscilloscope window should appear and the cursor should become a probe.

Select the voltage input and output nodes by holding the SHIFT key and selecting the areas highlighted in Figure 4. If done correctly, then waves similar to those in Figure 5 will appear on the oscilloscope window.

Figure 3 Select the highlighted areas to measure voltage input and output using the probe tool.

Figure 5 Waves generated in the oscilloscope window. Plot markers measure the phase shift at the amplitude of each wave
44

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Measure the phase shift between output and input by dragging plot markers a and b to the amplitudes of each wave (as shown in Figure 4). Measure the amplitudes by dragging plot markers c and d along the right edge of the oscilloscope. List the measurements in Data Table 1. To stop the simulation, click on the stop icon measure the phase shifts and amplitudes. Repeat this procedure for 10 Hz, 100 Hz, 160 Hz, 1kHz and 10 kHz frequencies. Record the data in Data Table 1. NOTE: For low-frequency setups (i.e. 100 Hz and below), open the Analyses Setup window by clicking Simulation>Analyses Setup. Click on the Transient/Fourier button. Change the Step Time to 10.00 uS, Max Step to 10.00 uS and Stop Time to 100.00 mS. Confirm the changes. For frequencies above 1 KHz, adjust the Step Time to 1.00 uS and Max Step to 1.00 uS. Bode Plot Disassemble the filter circuit. Construct the new circuit as shown in Figure 6 below. . Once the analysis

has stopped, adjust the signal generator frequency to 100 Hz and

45

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Figure 7

New circuit setup with capacitor as test point

Select voltage across the capacitor with the probe tool To set up and run an AC analysis, connect a signal generator to the circuit. Double-click on the signal generator to open the window in Figure 8a. Click on Wave to access the window in Figure 8b. Check Source under AC Analysis.

Figure 8 window.

a) Left. Edit Sine Wave window. b) Edit signal generator

Go to Simulation>Analyses Setup and disable all options except AC (as in Figure 9)

46

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Figure 9 Uncheck all options in Analyses Setup window except for AC In the same window, click on AC and check Enabled. Change the Start Frequency to 10. 00 Hz, the Stop Frequency to 10.00 kHz, the number of test points to 10 and then select Decade Sweep (as in Figure 10)

Figure 10 AC Analysis Setup window Run the simulation. Open the Graph Settings window (Figure 11) by clicking on the Graph Settings icon . Use this window to make

adjustments to the oscilloscope graph settings. Adjust and view the following graph settings in the oscillograph. Observe how the graphs are able to quickly perform and plot the phase shift measurements in Part A. X-grid Functio n Y-Grid Functio n

47

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Magnitud e Magnitud e Magnitud e

Log X Log X Log X

Magnitude Magnitude Phase in degrees

Linear Y Log Y Linear Y

Figure 11

Graph Settings window. Parameters for the x and y-axes as well as the function can be changed in this window

Swap the positions of the resistor and capacitor. Again obtain the amplitudes and phase shifts of the signals at 10 Hz, 100 Hz, 160 Hz, 1kHz and 10kHz. Also obtain the Bode plots as in the previous number.

48

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Source:
(1)

Boylestad, R.L.; Nashelsky, L. Electronic Devices and Circuit Theory, 8th Ed., Prentice Hall, 2002

(2)

Modifications from Electronics Class 2009.

49

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

RC Filters
Group Name: _________________ Name: ______________________________

DATA Note: Report all data (voltage, frequency and phase shift) up to 4 significant figures

Table 1
Frequenc Vin (V) Vout (V) Vout/ Vin * t [a-b] (s) Phase Shift ()

y 10 Hz 100 Hz 160 Hz 1 kHz 10 kHz *time delay between input and output waveform 1. Compute the phase shift as follows: (degrees) = t x f x 360 where f = frequency

2. Using the data above, plot the frequency response in the graphs provided. What type of filter is this? _____________________

50

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

51

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

3. Using the data above, find the frequency where Vout = 0.707Vin. Frequency = ___________ Hz Compare this with fc = 1/ (2RC) where R= resistance, C= capacitance. 4. What is the phase shift at this frequency? Phase shift = ___________ degrees (indicate sign) 5. Encircle your answer: In this circuit, Vout lags/leads Vin Table 2 (after swapping R and C) Frequenc y (f) 10 Hz 100 Hz 160 Hz 1 kHz 10 kHz 6. Compute the phase shift as follows: (degrees) = t x f x 360 7. Using the data above, plot the frequency response in the graphs provided. What type of filter is this? _____________________ Vin (V) Vout (V) Vout/ Vin t (a-b) (s) Phase Shift ()

52

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

53

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

8. Using the data above, find the frequency where Vout = 0.707Vin. Frequency = ___________ Hz Compare this with fc = 1/ (2RC) 9. What is the phase shift at this frequency? Phase shift = ___________ degrees (indicate sign) 10. Encircle your answer: In this circuit, Vout lags/leads Vin

54

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Digital Electronics

Objectives The experiment aims to: to familiarize the students with the use of TTL ICs and the truth table. to be able to construct circuits using the AND, OR, NAND and NOR TTL ICs to solve logic problems using the different logic gate combinations.

Material 7408 7432 7402 7400 Digital Multimeter (DMM) Power Supply with 5 V regulator Wires

Theories and Concepts: Logical Operations Aside from arithmetic operations and binary numbers, the basis of digital electronics includes logical operations. The most common logic operations are NOT, OR and AND operations. Each logic operations are used differently from each and used in different logic problems.

55

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

COMMON LOGIC OPERATIONS NOT operation This logic operation produces an output that is the compliment of the operand or the input. For example, if your input is equal to 1, then using the NOT operation would result to an output equal to 0. In some notations, stating this would be: NOT 1=0. The symbol for NOT is - or by putting a bar above the operand. Example: -(10010) = 01101 100101 = 011010 OR operation This logic operation produces an output equal to 1 if there is at least one operand or input that is equal to 1. For example, given the inputs 1010, using the OR operation would result to an output equal to 1 since there is at least one operand equal to 1. In some notations, we could state this example as 1 OR 0 OR 1 OR 0 = 1. The symbol for OR is +. Example: 1 + 0 = 1, 0 + 0 = 0 10001 + 01010 = 11011 AND operation This logic operation produces an output that is equal to 1 if all the inputs are equal to 1. If at least one of the operand is equal
56

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

to 0, the output will be 0. For example, given the inputs 1011, using the AND operation would result to an output equal to 0 since there is an input equal to 0 in the given (can also be stated as: 1 AND 0 AND 1 AND 1 = 0). Given the inputs 1111, using the same operation would give an output reading equal to 1 since all inputs in the given is equal to 1 (can also be stated as: 1 AND 1 AND 1 AND 1 = 1). The symbol for AND is &. Example: 11111 & 10001 = 10001 00000 & 11111 = 00000 Other operations: The NOR and NAND operations are basically the OR and AND operations with their inputs negated (NOT-OR AND NOTAND). Example: 10100 NOR 11010 = 00001 00101 = 11010 00001 NOR 10001 = 01110 10101 = 01011 Logic Gates The logic gates that are used today in integrated chips (ICs) use transistors to simulate logical operations, thus they are called transistortransistor logic (TTL) ICs. The ICs that will be used in the experiment are quad 2-input logic gates. The quad term refers to the number of logic gates in the IC and the 2-input means that each logic gates requires 2 inputs to operate. In other words, there are four logical operating units in each IC taking in two separate inputs each.
57

10111 11100

NAND NAND

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Logic gate operations can be used in combination with each other in order to produce a desired set of output values as written in your truth table. TTL ICs can be used with each other to make circuits with the desired output value. Examples of Possible Ways of Combining Logic Gate Operations are shown in Figure 2.

Figure 2. Possible Ways of Combining Logic Gates Truth Tables The truth table is an easy way of determining how a logical operation proceeds given the different possibilities of inputs. In this table, all possible input combinations are listed. Using a specific logic operation, the output is also tabulated at the last column of the table. Example: Using the AND logic gate and a 2-input system: Figure 3: AND Truth Table A 0 0 1 1 Exercise A. Basic Logic Gates B 0 1 0 1 Y(output) 0 0 0 1

58

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Each student will be provided with two of the following ICs: 7400, 7402, 7408, and 7432. These are the AND, OR, NAND and NOR quad gates. The pin assignments are shown below:

7400

7402

Connect

7408

the Vcc to

7432

+5 V

and the ground pin to ground. Five volts applied to an input of the IC is considered a signal high (1). This voltage requirement is for TTL but for other low-powered ICs like CMOS, the voltage requirements for a signal high may be lower. Connecting the input to ground is considered a signal low (0). Using the DMM connected to the output and to the ground, construct the truth table for each of your ICs as shown below:

59

Electronics Laboratory for the Physical Sciences I.M.S. De Vera, M.J. M. Garrovillas and E.T. Chainani

Exhaust all possible combinations of inputs and check the outputs of each. Any voltage read from the output of the IC is considered a signal high. A 0-V output is a signal low. AND Gate B 0 1 0 1 OR B 0 1 0 1 NAND B 0 1 0 1 NOR B 0 1 0 1

A 0 0 1 1 A 0 0 1 1 A 0 0 1 1 A 0 0 1 1

60

B. The XOR operation Another important logical operation is the exclusive OR or XOR (F = x y). This is important in applications where only a single high input generates an output high. The XOR truth table is shown below: Table 1. XOR Truth Table x 0 0 1 1 y 0 1 0 1 F 0 1 1 0

Using the two ICs you have, construct an XOR circuit. Draw the schematic diagram of the circuit; draw the pertinent logic gates and show how they are connected. Hint: If you need to negate an input, you may use the NAND or NOR gates. Any signal applied to both inputs of one of those gates will generate the complement in the output.

C. Application A certain instrument has three sensors for pressure, temperature, and humidity. Abnormal conditions (high

temperature, low pressure, high humidity, etc.) cause the sensor to generate a signal high. The instrument is designed to continue operating even if abnormal pressure or humidity is detected, but

not both at the same time. The instrument is not allowed to operate at abnormal temperatures. Construct a truth table for the sensing mechanism of this instrument. Using the ICs provided, construct such a mechanism. You may ask for additional ICs from your instructor. Since this is a 3 input instrument, there will be 8 possible input combinations (23=8). T 0 0 0 0 1 1 1 1 Truth Table for the Instrument P H 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 Y

Source: (1) Mano, M.M. Digital Design, 2nd Ed., Pearson Education, Asia Pte. Ltd., 2001.

Digital Electronics
Group Name: _________________ Name: _________________________________
A.

Identify the ICs given to you: Ex. 343 Dual operational amplifier

B. Draw the circuit diagram of the XOR gate you designed.

C. Draw the truth table of the circuit and the schematic diagram.

RC Filters
Objective
To introduce students to the different types of filters, specifically the RC filter circuit.

RC Circuit
A capacitor can store an electric charge while a resistor dissipates the flow of charges as heat. A fully charged capacitor, when connected across a resistive element, will lose its charge as current flows across the resistor. Connecting a voltage source across a series R-C circuit will cause a charging current to flow. This current changes with time as the voltages across the resistor and capacitor changes. By changing the source to a sine source, the frequency dependent voltage and current relationship in a capacitor can be exploited. The capacitor has a frequencydependent resistance referred to as capacitive reactance. By combining resistors and capacitors in RC circuits, a frequency-dependent voltage divider circuit is realized. Thus is created a circuit in which the input and output relationships are frequency-dependent. These circuits form the basis of filters.

Filters
Fundamentally, all periodic fluctuations can be by a reduced to combination of sine waves of different frequencies. Electrical signals are no exception, and thus have their signature frequencies. In most cases, the frequency of the desired signal is known. Stray signals of different frequencies, or noise, interfere with the transmission of signals. Most of

the time, these stray signals are unavoidably combined with the desired signal. However, there are ways to remove the noise from signal transmissions. Filters are used to weed out the unwanted signal frequencies. There are four basic types of filters. A low-pass filter only lets lower frequencies pass through. A high-pass filter lets higher frequencies pass through. A band-select filter only lets a certain range of frequencies to pass through. A band-reject filter lets all frequencies pass through except for a certain range of frequencies. In this lab, a simple RC filters characteristics are demonstrated.

Exercise
A. Construct the filter circuit shown below using CircuitMaker (Figure 1). The devices used are all under the .General Major Device Class: Signal Generator (.GeneralInstrumentsSignal Gen) Multimeter (.GeneralInstrumentsMultimeter) Note: Set to Measure AC RMS Resistor (.GeneralResistorResistor) Capacitor (.GeneralCapacitorsCapacitor) Ground (.GeneralSourcesGround)

999.8mV AC V V1 -1.41/1.41V R1 10k C1 0.1uF 163.2mV AC V

1kHz

Figure 1. Filter circuit


Double-click on the signal generator and set the Peak Amplitude to 1.414 V and the Frequency 1.000 kHz. Click the running man icon to run the analysis. When

computation is finished the oscilloscope window appears. The cursor now becomes the oscilloscope probe. Shift-click to select the voltage input and voltage output nodes as indicated by the arrows on the following figure. If you do not press SHIFT while selecting, only the last selection will be plotted.

V out

V in

Figure 2. Multimeter Device

Click and drag marker Marker measurements are displayed here

Figure 3. Oscilloscope window


On the oscilloscope window, use the plot cursors to select specific points on the waves (Figure 3). The RMS amplitudes of the two test points are also given by the multimeters. Also, measure the phase shift between output and input. Adjust markers a and b (horizontally), and also c and d (vertically) to measure amplitudes and times, respectively. Write these data down. Click STOP to end simulation. Adjust the function generator frequency to 100 Hz. Again, turn the analysis on then measure the amplitudes and phase shifts of the two signals as before. Do the procedure for 10 Hz, 100 Hz, 160 Hz, 1kHz and 10 kHz frequencies. You can change the function generator frequency by double-clicking function generator and setting the variables as follows (Figure 4):

Figure 4. Editing function generator variables.


You must also setup analysis parameters as follows (Figure 5):

Figure 5. Set-up analysis parameters.


For Low frequency (100Hz and below), use the following set up (Figure 6):

Figure 6. Low-frequency set-up


The following settings might be better for f 1 KHz (Figure 7):

Figure 7. Settings for frequency more than 1 kHz Bode Plot


Edit the circuit to remove the multimeters. Select the voltage across the capacitor as a test point to display on the scope as shown below (Figure 8).

V1 -1.41/1.41V

R1 10k

V(3) C1 0.1uF

1kHz

Figure 8. Configuration for capacitor as test point.


To set up and run an AC Analysis: 1. Connect at least one Signal Generator to the circuit and enable it as an AC Analysis source. Do this by double-clicking the Signal Generator, clicking Wave, and setting up the AC Analysis Source options. Disable the other options (e.g. DC, Transient/Fourier, Multimeter) 2. Choose Simulation > Analyses Setup > AC. 3. Enter the AC Analysis settings (see the following figure), select the Enabled check box, and then choose OK. Sweep Option: What it Means Linear: Total number of Test Points in the sweep. Decade: Number of Test Points per decade in the sweep. Octave : Number of Test Points per octave in the sweep.

Analysis setup:

Figure 9. Analysis set-up.


AC Analysis Setup:

Figure 10. AC analysis set-up


5. Run the simulation. Graph settings (click on the icon to edit graph settings). You should view:

Magnitude (Linear Y Grid, Log X Grid and also Log X, Log Y) Phase in degrees (Linear Y Grid, Log X Grid)

Figure 11. Graph settings.


Note how the AC Analysis rapidly confirms the step-by-step determinations that you did earlier. B. Swap the positions of the resistor and capacitor. Again, get the amplitudes and

phase shifts of the signals at 10 Hz, 100 Hz, 160 Hz, 1kHz and 10 kHz. Also obtain the Bode plot as above.

Source: (1) Boylestad, R.L.; Nashelsky, L. Electronic Devices and Circuit Theory, 8th Ed., Prentice Hall, 2002.

RC Filters
Group Name: _________________ Name: ______________________________ A. Frequency 10 Hz 100 Hz 160 Hz 1 kHz 10 kHz
1.

Vin

Vout

Vout / Vin

Phase shift

Using the data above, plot the frequency response in the graphs provided.

2.

What type of filter is this? ____________________

3.

In the Bode plot window, use the markers to find the frequency where Vout = 0.707 Vin. Frequency = _______Hz. Compare this with fc =1/(2RC).

4.

In the Bode plot of phase versus frequency, what is the phase shift at this frequency? Phase shift = ______________ degrees (indicate sign)*.

5.

Encircle your answer: In this circuit, Vout lags/leads Vin .

B. (after swapping R and C)

Frequency 10 Hz 100 Hz 160 Hz 1 kHz 10 kHz


6.

Vin

Vout

Vout / Vin

Phase shift

Using the data above, plot the frequency response in the graphs provided.

7.

What type of filter is this? ____________________

8.

In the Bode plot window, use the markers to find the frequency where Vout = 0.707 Vin. Frequency = _______Hz. Compare this with fc =1/(2RC).

9.

In the Bode plot of phase versus frequency, what is the phase shift at this frequency? Phase shift = ______________ degrees (indicate sign)*.

10. Encircle your answer: In this circuit, Vout lags/leads Vin .

*Compute phase shift as follows: (degrees) = t * f / 360 Where: t = time delay between input and output waveform in seconds f = frequency in Hz

A. Graphs of frequency response:

Magnitude (Vout/Vin)

B. Graphs of frequency response: 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 10

Frequency response of RC filter: Magnitude Type: _____ - pass

100 Frequency (Hz)

1000

10000

Frequency response of RC filter: Phase Type: _____ - pass


Phase (degrees) 90 45 0 -45 -90 10 100 Frequency (Hz) 1000 10000

B. Graphs of frequency response.

Frequency response of RC filter: Magnitude Type: _____ - pass


Magnitude (Vout/Vin) 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 10 100 Frequency (Hz) 1000 10000

Frequency response of RC filter: Phase Type: _____ - pass


Phase (degrees) 90 45 0 -45 -90 10 100 Frequency (Hz) 1000 10000

Microcontroller I: ADC
Objectives
(1) To introduce students to data acquisition using a microcontroller. (2) To familiarize students on microcontroller peripherals, particularly the analog-todigital converter (ADC).

The Zilog Encore!TM Miniboard


Encore PLCC Mini Board (Figure 1) is a module that utilizes the on-chip peripherals of the Z8F6401 Flash Microcontroller, like the eight-channel Analog-to-Digital Converter (ADC) and the Universal Asynchronous Receiver/Transmitter. The board has a 64-K flash memory and is powered using a 9VDC adapter. This module uses pin headers to access the input/output pins of Z8F6401.

Figure 1. PLCC Miniboard

The ZDS II Encore Software


The Zilog Development Studio II has an integrated development environment and has a built-in C compiler, assembler, linker and project manager. A debugger allows single-stepping, viewing of variables, register files, code/data memory, ports and timers. The ZDS II connects to the microcontroller (uC) via serial port communications. When programming in the ZDS II environment, the user should know these ZDS II basics:
A.

Creating a New Project

To start a new project (Figure 2) in ZDS II environment, click File and choose, New Project.

Figure 2. New Project Window


Select target, CPU and Project Type as shown above. After that, select the location for the new folder and write the folder name for the new project. Finally, type the filename for the new project (Figure 3).

Figure 3. New folder for new project


In the New Project window, click continue and wait for the Configure New Project window to appear (Figure 4). Make sure that C Runtime Library and Floating Point library are selected. After that, select startup module, dynamic frames and large memory model.

Figure 4. Configure New Project Dialog Box


Click next, then review target memory configuration. Make sure that the settings are the same as that shown in Figure 5, then click Finish.

Figure 5. Configuring New Project


To check target system settings, click on Project then Settings and select the Debugger tab (Figure 6). Make sure that the Z8 Encore! OCD Driver is selected. Else, click on Configure Driver and change to the appropriate setting. Click on the C tab and make sure the appropriate settings are made in the General category, particularly disable optimizations. (Figure 7)

Figure 6. Debugger Tab in Project Setting Dialog Box.

Figure 7. C Tab in Project Setting Dialog Box.


In the Preprocessor category, add __Z8F640 in the preprocessor definitions (Figure 8).

Figure 8. Preprocessor Definitions.


B. Creating a New Source Code File To create a source code file, click File then select New File (Figure 9). After coding in C, click File then select Save As and write the filename with a .c extension. Make sure that the file is saved in the folder for the project. To create source code file, choose Project Files then right click. Select Add Files to Project. Choose the .c file of choice (Figure 10).

Figure 9. New Source Code File

Figure 10. Add Files to Project


Figure 11 shows some of the shortcuts worth mentioning. Compile means

converting source code into op-codes / object code / machine code. Link, on the other hand pertains to combining all these object codes. Build is tantamount to compiling followed by linking. Syntax errors appear in the output window (Figure 12). Double-clicking on an error message takes the programmer to the offending line.

Figure 11. Shortcut Icons

Figure 12. Output Window Exercise


In this exercise, you will input varying voltage into one of the analog inputs of the Miniboard and obtain the digital output using Hyperterminal serial communications program. This output is compared to the voltage input measured by a multimeter. In interfacing the Encore PLCC Mini Board to a PC, RS-232 or serial communication is used. A program (adc.c) written in C can be downloaded into the 64-K flash memory via a serial cable from COM 1 (9-pin) to Debugger UART. To output data generated by the Z8F6401, it is necessary to connect the Console UART to COM 2 (9 or 25-pin). In case COM 2 is 25-pin, a 9-to-25 serial cable should be employed. IMPORTANT NOTE: Ask the instructor to interface the Miniboard to the PC and to provide the text file of adc.c. Copy-paste this code to the New Source Code File window.

A. Potentiometer-potential divider circuit design An external voltage reference will be used in this exercise (set to 3.3 V). Design a potentimeter-potential divider circuit (refer to experiment 4) such that the input voltage can be varied from 0 to around 3 V. Use a variable voltage supply as your power source (set to 3.0 V).

B. Analog-to-digital converter Connect the output of the circuit in part A to ANA0 of the Miniboard (refer to Figure 1 for the pin assignment). Adjust the potentiometer so that the input voltage to ANA0 is around 1-V. Measure and record the actual input voltage via a digital multimeter. Open Hyperterminal and ZDS Encore II software. Open the file adc.c using ZDS II. Click the following icons in succession: CompileBuildConnect to TargetDownloadGo. Record the voltage equivalent of the digital output as it appears in Hyperterminal.

Follow the same process for 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75 and 3.00-V input. Also, make voltage inputs ranging from 25 mV to 100 mV at 25 mV increments and 100 to 500 mV at 100 mV increments.

Sources:
(1)

De Vera, I.M.S. Laboratory Data Acquisition System Based on the Z8 Encore!TM Microcontroller. 2006.

(2)

De Vera, I.M.S.; Chainani, E.T. Low Cost Laboratory Data Acquisition System Based on the Z8 Encore!TM Microcontroller for pH Measurement. Kimika, 22, 2, 9783, 2006.

(3)

Sison, L.G.; Burgos, O.T. Control. 2005.

Microcontroller for Data Acquisition and Motor

Microcontroller I: ADC
Group Name: _________________

Name: _________________________________ A. Draw your potentiometer-potential divider circuit design here.

B. Comparison of Analog input and ADC output Nominal Analog Input (V) 0.025 0.050 0.075 0.100 0.200 0.300 0.400 0.500 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 3.00 Actual Analog Input (V) ADC Output from Hyperterminal (V) % Difference

1.

How is analog-to-digital conversion performed?

Focus your research on the

algorithm used by sigma-delta ADCs (the ADC used by the Z8F6401 microcontroller).

2.

Plot decimal equivalent of the ADC output vs. voltage input for two voltage ranges: 0.025 to 0.500-V and 1.00 to 3.00-V. Take note of the linearity coefficient and the slope of the plots (submit worksheet and graph separately). What can you say about the sensitivity of the ADC as the analog input increment becomes smaller? Comment on the accuracy of ADC conversion as the input approaches zero (i.e. 100 mV down to 25 mV).

3.

Determine the step-size of the ADC (voltage change needed for ADC value to change by one unit).

Microcontroller II: Sensor


Objective
To create a Z8 Encore!TM based pH measurement system using a glass electrode.

pH Measurements using a Glass Electrode


The glass electrode is undisputedly the most important indicator electrode for hydrogen ion. It is convenient to use and subject to few of the interferences that affect other pH-sensing electrodes. One of the most important developments in chemical

instrumentation over the past three decades has been the advent of compact, inexpensive, versatile integrated-circuit amplifiers (op-amps). These devices allow us to make potential measurements on high-resistance cells, such as those that contain a glass electrode, without drawing appreciable current. Even a small current (10-7 to 10-10 A) in a glass electrode produces a large error in the measured voltage due to loading and electrode polarization.

Framework
This experiment can be more understood by looking at the block diagram in Figure 1.

ADC

Z8F6401 uC

Host PC or PDA

pH Sensor
Level Shifter Amplifier Circuit

Chemical Reagent

Figure 1. Block diagram of the pH measurement system


The pH sensor (glass electrode) is in close proximity to a chemical reagent. The signal from the sensor is fed to a signal-conditioning block composed of an amplifier and a level shifter. The conditioned signal will serve as the analog input to the ADC (i.e. ANA0). The digitized signal will then be sent to a host PC via RS232 (serial port) and displayed through Hyperterminal, a serial communications software. A program written in C (pHmeter.c) will prompt the user to present standard buffer solutions (pH 4.00, 7.00 and 10.00) to the electrode. After the calibration phase, the user will be asked to present the sample. The pH of the solution will be displayed in Hyperterminal window along with its voltage equivalent.

Exercise
A. Constructing the Signal Conditioning Block A.1 Power Supply Use the same power supply (+5 and -5 V) you constructed in Experiment 3.

A.2 Amplifier Circuit

Design an amplifier circuit using op-amp A in LF353N (see Figure 2, Expt. 6), which can amplify the incoming analog signal from the glass electrode by a factor of 8.3. Put a 0.1 uF non-polarized capacitor between the output and the inverting input of the amplifier. Using a BNC connector, connect the glass electrode to the non-inverting input of this op-amp. Make the necessary tests if the amplifier circuit is working. A.3 Level Shifter Figure 2 shows the level shifter circuit. Implement this circuit on your bread board. If one measures the amplified voltage (output of A.2), negative values above pH 7 will be obtained. This signal is not fit as an ADC input. (Why?). Thus, the amplified analog signal needs to be level-shifted to positive voltage values. A voltage-follower is implemented via op-amp B in LF353N. Consequently, Vshift is equal to VCC. An external voltage reference set to 3.3 V (designated as VCC in Fig. 2 , see also Fig. 1, Expt. 9) is employed. Note of the label amplifier output in figure 2. This is where you connect the amplifier output. VDD in the same figure is pin 21 of the Miniboard. Inspect Figure 2 thoroughly. Justify that the signal is indeed level-shifted to

positive values and that the following equation can be derived from your amplifier circuit design and the level shifter:

Vout =

[(Vin * 8.27) + 3.30] Equation 1 2

Moreover, test your circuit if the output abides Equation 1. The level-shifted signal (Vout) will now serve as the input to ANA0 of the ADC.

Vcc (3.30 V)

Vshift

VDD

Vout

Figure 2. Level Shifter


B.

Interfacing the Miniboard and Loading the software As before, ask the instructor to interface the PLCC miniboard to the PC. Open the file pHmeter.c using ZDS II (refer to Experiment 9 for procedures). Click the following icons in succession: CompileBuildConnect to TargetDownloadGo. Make sure that Hyperterminal is on-line.

C.

Making pH measurements

The groups will share the standard buffer solutions for the calibration phase. Each group will receive three unknowns. Your task is to get the pH of the unknown solutions using your groups pH meter and compare this to the pH measurement obtained by using a commercial pH meter (i.e. Sartorius).

Sources:
(1)

De Vera, I.M.S. Laboratory Data Acquisition System Based on the Z8 Encore!


TM

Microcontroller. 2006.

(2)

De Vera, I.M.S.; Chainani, E.T. Low Cost Laboratory Data Acquisition System Based on the Z8 Encore!TM Microcontroller for pH Measurement. Kimika, 22, 2, 97-83, 2006.

(3)

Sison, L.G.; Burgos, O.T. Microcontroller for Data Acquisition and Motor Control. 2005.

Microcontroller II: Sensor


Group Name: _________________ Name: _________________________________

Calibration Phase pH Standard Buffer 4.00 7.00 10.00 pH Measurements Unknown 1 2 3 1. Draw your amplifier circuit design here. pH Miniboard pH Sartorius % difference Decimal Value of ADC Output Voltage Equivalent

2. (a) The 0.1 uF capacitor in the amplifier circuit acts as what type of filter? Calculate the cut-off frequency.

(b) The 10 uF capacitor parallel to the output of the level shifter is similar to the filter in (a). Calculate its cut-off frequency.

3. Prove Equation 1.

4.

Plot the pH calibration curve (decimal equivalent of ADC output vs. voltage in V) in Excel or simply determine the linearity coefficient using your calculator. Which is better, a three-point or a two-point calibration? Why?

5.

Account for the difference between the pH measurements made using the microcontroller-based pH meter and the commercial pH meter (Sartorius). Evaluate the accuracy and precision of measurements using the microcontrollerbased pH meter.

6.

What are the factors that may lead to errors in pH measurements?

Appendix A: Soldering

Soldering is accomplished by quickly heating the metal parts to be joined, and then applying a flux and a solder to the mating surfaces. The finished solder joint metallurgically bonds the parts forming an excellent electrical connection between wires and a strong mechanical joint between the metal parts. Heat is supplied with a soldering iron or other means. The flux is a chemical cleaner which prepares the hot surfaces for the molten solder. The solder is a low melting point alloy of non-ferrous metals. Soldering gun or iron A soldering iron is an electric hand tool that joins two pieces of metals by fusing their surfaces together using a metal alloy known as solder. Usually, for electronics, the solder used is an alloy composed primarily of lead. A soldering iron will melt the lead by applying constant heat to it. This melted lead, once it dries, joins the two metal surfaces together. A soldering gun operates with the same principle as a soldering iron, but pressing its trigger can increase its heat. Be careful in using a soldering tool, since it operates at high temperatures. Do not play around with it. Also, do not inhale the smoke coming from soldering action, as it contains irritants to mucous membranes.

Soldering lead

Solder is a metal or metallic alloy used, when melted, to join metallic surfaces together. The most common alloy is some combination of tin and lead. Certain tin-lead alloys have a lower melting point than the parent metals by themselves. The most common alloys used for electronics work are 60/40 and 63/37. The chart below shows the differences in melting points of some common solder alloys.

Tin/Lead 40/60 50/50 418 degrees F 60/40 374 degrees F 63/37 364 degrees F 95/5 434 degrees F

Melting Point 460 degrees F (230 degrees C) (214 degrees C) (190 degrees C) (183 degrees C) (224 degrees C)

The eutecticum is the point where the melting point and solid point is the same and the melting point is lower then the melting point of the individual metals used in the alloy. The eutectic point in tin/lead alloy is 61.9% tin and 38.1% lead (if metals are 100% pure). 60/40 solder is commercially available and is recommended for solder work. With non-eutectic alloys a paste-phase develops in the zone between the liquid and solid line. In theory this could result in soldering failures if the solder joint in this paste-phase undergoes mechanical stress or gets serious vibration. Small tolerances from the eutectic point have little influence in the soldering process because of fast cooling.

Most soldering jobs can be done with flux-cored solder (solder wire with the flux in the center) when the surfaces to be joined are already clean or can be cleaned of rust, dirt and grease. Flux can also be applied by other means (it is also sold separately in tin cans). Flux only cleans oxides off the surfaces to be soldered. It does not remove dirt, soot, oils, silicone, etc.

Base Material
The base material in a solder connection consists of the component lead and the plated circuit traces on the printed circuit board. The mass, composition, and cleanliness of the base material all determine the ability of the solder to flow and adhere properly (wet) and provide a reliable connection. If the base material has surface contamination, this action prevents the solder from wetting along the surface of the lead or board material. A surface finish usually protects component leads. The surface finishes can vary from plated tin to a solder - dipped coating. Plating does not provide the same protection that solder-coating does because of the porosity of the plated finish, thus the component wire may develop oxides.

The Correct Way to Solder


Some Reasons for Unwettability
1. The component lead has developed an oxide. Normally this can be removed by the flux, but a thick layer of oxidation requires removal by sandpaper or other mechanical means. 2. The selected temperature is too high. The tin coating is burnt off rapidly and oxidation occurs. 3. Oxidation may occur because of wrong or imperfect cleaning of the tip: when other material is used for tip cleaning instead of the original damp Weller sponge. A damp cellulose sponge is recommended; other sponges, rags or cloth will melt or burn. 4. Use of impure solder or solder with flux interruptions in the flux core. 5. Insufficient tinning when working with high temperatures over 665 degrees F (350 degrees C) and after work interruptions of more than one hour. 6. A "dry" tip, i.e. the tip is allowed to sit without a thin coating of solder oxidation occurs rapidly. 7. Use of fluxes that are highly corrosive and cause rapid oxidation of the tip (e.g. water soluble flux). 8. Use of mild flux that does not remove normal oxides off the tip (e.g. no-clean flux).

The Soldering Iron Tip


The soldering iron tip transfers thermal energy from the heater to the solder connection. In most soldering iron tips, the base metal is copper or some copper alloy because of its excellent thermal conductivity. A tip's conductivity determines how fast thermal energy can be sent from the heater to the connection.

Both geometric shape and size (mass) of the soldering iron tip affect the tip's performance. The tip's characteristics and the heating capability of the heater determines the efficiency of the soldering system. The length and size of the tip determines heat flow capability while the actual shape establishes how well heat is transferred from the tip to the connection. There are various plating processes used in making soldering iron tips. These plating operations increase the life of the tip. The figure below illustrates the two types of plating techniques used for soldering iron tips. One technique uses a nickel plate over the

copper. Then, an iron electroplate goes over the nickel. The iron and the nickel create a barrier between the copper base material and tin used in the solder alloy. The barrier material prevents the copper and tin from mixing together. Nickel-chrome plating on the rear of the tip prevents solder from adhering to the back portion of the tip (which could cause difficulty in tip removal) and provides a controlled wetted area on the iron tip. Another plating technique is similar but omits the nickel electroless plating, leaving the iron to act as the barrier metal.

How to Care For Your Tip


Because of the electro-plating Weller tips should never be filed or ground. Weller offers a large range of tips and there should be no need for individual shaping by the operator. Although Weller tips have a standard pre-tinning (solder coating) and are ready for use, it is recommended that you pre-tin the tip with fresh solder when heating it up the first time. Any oxide covering will then disappear. Tip life is prolonged when mildly activated rosin fluxes are selected rather than water soluble or no-clean chemistries. When soldering with temperatures over 665 degrees F (350 degrees C) and after long work pauses (more than 1 hour) the tip should be cleaned and tinned often, otherwise the solder on the tip could oxidize causing unwettability of the tip. To clean the tip use the original synthetic wet sponges from Weller (no rags or cloths). When doing rework, special care should be taken for good pre-tinning. Usually there are only small amounts of solder used and the tip has to be cleaned often. The tin

coating on the tip could disappear rapidly and the tip may become unwettable. To avoid this the tip should be re-tinned frequently.

Additional Tip and Tiplet Care Techniques


Listed below are suggestions and preventative maintenance techniques to extend life and wettability of tips and desoldering tiplets. 1. Keep working surfaces tinned, wipe only before using, and return immediately. Care should be taken when using small diameter solder to assure that there is enough tin coverage on the tip working surface. 2. If using highly activated rosin fluxes or acid type fluxes, tip life will be reduced. Using iron plated tips will increase service life. 3. If tips become unwettable, alternate applying flux and wiping to clean the surface. Smaller diameter solders may not contain enough flux to adequately clean the tips. In this case, larger diameter solder or liquid fluxes may be needed for cleaning. Periodically remove the tip from your tool and clean with a suitable cleaner for the flux being used. The frequency of cleaning will depend on the frequency and type of usage. 4. Filing tips will remove the protective plating and reduce tip life. If heavy cleaning is required, use a Polishing Bar available from your distributor. 5. Do not remove excess solder from a heated tip before turning off the iron. The excess solder will prevent oxidation of the wettable surface when the tip is reheated.

6. Anti-seize compounds should be avoided (except when using threaded tips) since they may affect the function of the iron. If seizing occurs, try removing the tip while the tool is heated. If this fails, it may be necessary to return the tool to Weller for service. Removing the tip from the tool on a regular basis will also help in preventing the tip from seizing. 7. We recommend using distilled water when wetting the cleaning sponge. The mineral content in most tap water may contaminate your soldering tips.
8.

Storing tips after production use: -- Clean hot tip thoroughly with damp sponge. -- Apply coating of solder to tip. -- Turn unit off to allow tip to cool. -- Put tip away in proper storage or in iron holder

How to "Renew" Your Tip


Emery cloth may be carefully used to wipe away oxidation when the tip is hot. The tip should then be immediately retinned to prevent further oxidation. In extreme cases of tip oxidation or "tip burnout" they may be cleaned using a soft steel brush along with an active flux. Once again, retinning the tip immediately is important.

Soldering Iron Temperature Settings


In order to raise the temperature of solder above it's melting point, soldering tip temperatures are usually set between 700 degrees F and 800 degrees F. Why such a high

temperature when the most commonly used solders have a melting point under 400 degrees F. Using a higher temperature stores heat in the tip, which speeds up the melting process. The operator can then complete the solder connection without applying too much pressure on the joint. This practice also allows a proper formation of an intermetallic layer of the parts and solder. This is critical for reliable electrical and mechanical solder joints.

The Operator's Effect on the Process


The operator has a definite effect on the manual soldering process. The operator controls the factors during soldering that determine how much of the soldering iron's heat finally goes to the connection. Besides the soldering iron configuration and the shape of the iron's tip, the operator also affects the flow of heat from the tip to the connection. The operator can vary the iron's position and the time on the connection, and pressure of the tool against the pad and lead of the connection. When the tip of the iron contacts the solder connection, the tip temperature decreases as thermal energy transfers from the tip to the connection. The ability of the soldering iron to maintain a consistent soldering temperature from connection to connection depends on the iron's overall ability to transfer heat as well as the operator's ability to repeat proper technique.

The Reliable Solder Connection

Two connection elements must properly function for a solder joint to be reliable. The solder within the connection must mechanically bond the component to the PCB. The connection must also provide electrical continuity between the device and board. The proper intermetallic layer assures both.

Mechanical
In surface mount and nonclinched through-hole technology, the solder provides the mechanical strength within the connection. Important factors for mechanical strength include the wetting action of the solder with the component and board materials, physical shape and composition of the connection, and the materials' temperature within the connection during the process. The connection temperature should not be too high, causing embrittlement, or too low, resulting in poor wetting action.

Electrical
If a solder connection is mechanically intact, it is considered to be electrically continuous. Electrical continuity is easily measured and quantified.

Testing Reliability
Two easily measured indicators in the soldering process that can determine the reliability of the solder connection are the soldering iron's tip temperature and the solder's wetting characteristics. The tip's temperature during the soldering process is an indicator of

the amount of heat being transferred from the tip to the connection. The optimum rate of heat transfer occurs if the soldering iron tip temperature remains constant during the soldering process. Another indicator for determining reliability is the solder's wetting action with the lead and board materials. As operators transfer heat to the connection, this wetting characteristic can be seen visually. If the molten solder quickly wicks up the sides of the component on contact, the wetting characteristic is considered good. If the operator sees the solder is flowing or spreading quickly through or along the surface of the printed circuit assembly, the wetting is also characterized as good.

Right Amount of Solder


a) Minimum amount of solder b) Optimal c) Excessive solder

Solderability

a) Bad solderability of terminal wire b) Bad soldering of PCB c) Bad soldering of terminal wire and PCB Key Points to Remember

1. Always keep the tip coated with a thin layer of solder. 2. Use fluxes that are as mild as possible but still provide a strong solder joint. 3. Keep temperature as low as possible while maintaining enough temperature to quickly solder a joint (2 to 3 seconds maximum for electronic soldering). 4. Match the tips size to the work. 5. Use a tip with the shortest reach possible for maximum efficiency. Sources: (1) http://www.cooperhandtools.com/brands/weller/index.htm, accessed March, 2004. (2) www.kester.com, accessed March, 2004 (3) http://www.interfluxusa.com/Technical/Sixsigma.htm, Accessed May, 2004.

Appendix B: Reading and Drawing a Schematic Diagram


Learning to read a schematic diagram, is similar to map reading. You need to know which wires connect to which component and where each wire starts and finishes. With a map book this would be equivalent to knowing your origin and destination points and which roads connect to the motorway network, etc. However, schematics are a little more

complicated as components need to be identified and some are polarity conscious (must be wired up in the circuit the correct way round) in order to work. You do not need to understand what the circuit does, or how it works, in order to read it, but you do need to correctly interpret the schematic. Here are some basic rules that will help with reading a diagram. Look at the circuit diagram shown below:

The blue lines represent wires and for simplicity simplicity has been labelled as A,B,C. There are just three components here and it is easy to see where each wire starts and ends, and which components a wire is connected to. As long as the wire labelled A connects to the switch and negative terminal of the battery, wire B connects to the switch and lamp, and C connects to the lamp and the battery positive terminal then this circuit should work.

Before moving on, it is important to realise that any schematic may be drawn in a number of different ways. The two figures below are electrically equivalent lamp dimmer circuits, they may look very different, but in fact, properly labelled traced you will see that in both diagrams each wire starts and finishes at the same components on both diagrams. The components have been labelled and so have the three terminals of the transistor.

Drawing a Schematic Diagram A well-drawn schematic makes it easy to understand how a circuit works and aids in troubleshooting; a poor schematic only creates confusion. By keeping a few rules and suggestions in mind, one can draw a good schematic in no more time than it takes to draw a poor one. General Principles 1. Schematics should be unambiguous. Therefore, pin numbers, parts values, polarities, etc., should be clearly labelled to avoid confusion. 2. A good schematic makes circuit functions clear. Therefore, keep functional areas distinct; don't be afraid to leave blank areas on the page, and don't try to fill the page. There are conventional ways to draw functional subunits; for instance, don't draw a differential amplifier as in Figure 1, because the function won't be easily recognized. Likewise, flip-flops are usually drawn with clock and inputs on the left, set and clear on top and bottom, and outputs on the right.

Figure 1. Placement of power rails and conventions for device alignment (examples of what not to do) Rules 1. Wires connecting are indicated by a heavy black dot; wires crossing, but not connecting, have no dot (don't use a little half-circular ``jog''; it went out in the 1950s).
2.

Four wires must not connect at a point; i.e., wires must not cross and connect.

3. Always use the same symbol for the same device; e.g., don't draw flip-flops in two different ways (exception: assertion-level logic symbols show each gate in two possible ways). 4. Wires and components are aligned horizontally or vertically, unless there's a good reason to do otherwise. 5. Label pin numbers on the outside of a symbol, signal names on the inside.

6.

All parts should have values or types indicated; it's best to give all parts a label, too, e.g., R7 or IC3.

Hints 1. Identify parts immediately adjacent to the symbol, forming a distinct group giving symbol, label, and type or value. 2. In general, signals go from left to right; don't be dogmatic about this, though, if clarity is sacrificed.
3.

Put positive supply voltages at the top of the page, negative at the bottom. Thus, npn transistors will usually have their emitter at the bottom, whereas pnp's will have their emitter topmost.

4. Don't attempt to bring all wires around to the supply rails, or to a common ground wire. Instead, use the ground symbol(s) and labels like +Vcc to indicate those voltages where needed. 5. It is helpful to label signals and functional blocks and show waveforms; in logic diagrams it is especially important to label signal lines, e.g., RESET' or CLK. 6. It is helpful to bring leads away from components a short distance before making connections or jogs. For example, draw transistors as in Figure 2.

Figure 2. Component leads. What to do and not to do. 7. Leave some space around circuit symbols; e.g., don't draw components or wires too close to an op-amp symbol. This keeps the drawing uncluttered and leaves room for labels, pin numbers, etc. 8. Label all boxes that aren't obvious: comparator versus op-amp, shift register versus counter, etc. Don't be afraid to invent a new symbol. 9. Use small rectangles, ovals, or circles to indicate card-edge connections, connector pins, etc. Be consistent. 10. The signal path through switches should be clear. Don't force the reader to follow wires all over the page to find out how a signal is switched. 11. Power-supply connections are normally assumed for op-amps and logic devices. However, show any unusual connections (e.g., an op-amp run from a single supply, where V- = ground) and the disposition of unused inputs. 12. It is very helpful to include a small table of IC numbers, types, and power-supply connections (pin numbers for Vcc and ground, for instance).

13. Include a title area near the bottom of the page, with name of circuit, name of instrument, by whom drawn, by whom designed or checked, date, and assembly number. Also include a revision area, with columns for revision number, date, and subject. 14. We recommend drawing schematics freehand on coarse graph paper (nonreproducing blue, 4 to 8 lines per inch) or on plain paper on top of graph paper. This is fast, and it gives very pleasing results. Use dark pencil or ink; avoid ballpoint pen. As an illustration, we've drawn a humble example (Figures 3 and 4) showing awful'' and good'' schematics of the same circuit; the former violates nearly every rule and is almost impossible to understand. See how many bad habits you can find illustrated. We've seen all of them in professionally drawn schematics!

Figure 3. An awful schematic.

Figure 4. A good schematic.

Source: (1) Horowitz, P.; Hill, W.; The Art of Electronics. 2nd Ed. Cambridge University Press, 1991.

You might also like