* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Laboratory Exercices for Analog and Digital Circuits
Integrated circuit wikipedia , lookup
Spark-gap transmitter wikipedia , lookup
Tektronix analog oscilloscopes wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Radio transmitter design wikipedia , lookup
Oscilloscope types wikipedia , lookup
Josephson voltage standard wikipedia , lookup
Regenerative circuit wikipedia , lookup
Integrating ADC wikipedia , lookup
Index of electronics articles wikipedia , lookup
Analog-to-digital converter wikipedia , lookup
Oscilloscope history wikipedia , lookup
Transistor–transistor logic wikipedia , lookup
Two-port network wikipedia , lookup
Electrical ballast wikipedia , lookup
Power electronics wikipedia , lookup
Schmitt trigger wikipedia , lookup
Operational amplifier wikipedia , lookup
Valve RF amplifier wikipedia , lookup
Voltage regulator wikipedia , lookup
RLC circuit wikipedia , lookup
Surge protector wikipedia , lookup
Current source wikipedia , lookup
Power MOSFET wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Opto-isolator wikipedia , lookup
Current mirror wikipedia , lookup
Laboratory Exercises for Analog and Digital Courses using NI ELVIS II and NI Multisim Teaching material produced in cooperation with the "Don Bosco" CEDES and the help of professors: Luis Carballo David Ulloa Fabián Garro Table of Contents DC Electric Circuits 1. 2. 3. 4. 5. 6. Ohm's Law Kirchhoff's Voltage Law Kirchhoff's Current Law Thevenin and Norton Equivalent Circuits Voltage Divider and Resistance Bridge Series and Parallel Capacitors AC Electric Circuits 7. RC Circuits 8. RLC Circuits 9. Transformers and Turn Relationship Analog Electronics 10. Diodes 11. Bipolar Transistors 12. Transistors Used as Interrupters 13. Transistors Used as Amplifiers Digital Electronics 14. Logic Gates 15. Karnaugh Maps 16. Flip Flops 17. Multivibrator Circuits (555) 18. Analog-to-Digital Converter (ADC) 19.Digital-to-Analog Converter (DAC) DC Electric Circuits Exercise 1 Ohm's Law Introduction One of the first people to research electricity was Gorge Simon Ohm, a German physicist who taught mathematics. His experiments showed that a current is directly proportional to the applied voltage and inversely proportional to the circuit's resistance. Based on his studies, Ohm proposed an equation linking voltage, current and resistance, known as Ohm's law, where: "I" is the current's intensity in Amperes (A) "V"is the voltage in Volts (V) "R" is the resistance in Ohms (Ω) It can be said that if the voltage of a resistance increases or decreases, the current going through the resistance will increase or decrease proportionally. Using algebra, Ohm's law can be expressed in two additional ways: Another fundamental law of electricity is Watt's law, named in honor of the Scottish inventor James Watt, which defines power in terms of voltage and current, as follows: Where "P" is power in Watts (W) "I" is the current's intensity in Amperes (A) "V" is the voltage in Volts (V). Objective Verify the three ways in which Ohm's law can be used to calculate voltage, current and resistance. Parts List - 1 330 Ω resistor 1 1kΩ resistor 1 3.3 kΩ resistor 1. Using the following circuit, calculate the current flowing through the resistor for an R1 value equal to 330 Ω, 1 kΩ, 3.3 kΩ, for different voltage supply (Vs) values, as shown in Table 1-1. Write the resulting values in Table 1-1 Table 1-1. Current calculated for different resistance values Vs (V) 1 2 3 4 5 6 7 8 9 10 R= 330 Ω Measured I Calculated I (mA) (mA) R= 1 kΩ Calculated I (mA) Measured I (mA) R= 3.3 kΩ Measured I Calculated I (mA) (mA) 2. Use the NI ELVIS II to set up the previous circuit as illustrated above. 3. Turn the NI ELVIS II on using the switch located at the rear of its base. 4. If the NI ELVIS II is properly plugged in and connected both to the power supply and a PC, the PC should recognize the device and display a dialog box asking which action you would like to perform. Select NI ELVISmx Instrument Launcher. 5. If the circuit is properly set up, turn on the prototype board's switch: **For your own safety, turn this switch off every time you make wiring changes. After turning the switch on, the LEDs indicating the + 15, -15 and +5 V fixed voltage supply will also come on. ** Should any of these sources have a short circuit, you will hear a "click" and the LED corresponding to the shorted supply circuit will turn off. Turn off the prototype board switch, fix the short circuit and turn the prototype board back on. 6. Using the NI ELVISmx Instrument Launcher, activate the following measuring instruments: - DMM (Digital multimeter) - VPS (Variable Power Supply 0-12 V DC) DMM (Multimeter) VPS (Variable Power Supply) 7. Set the positive variable power supply at approximately 1 V. ** The voltage of the variable power supply can be controlled from the PC using the knob or the numeric pad, or manually using the knobs located on the baseof the NI ELVIS II. 8. Now we will measure the voltage. Since voltage is measured in parallel, the ends of the multimeter will be placed on the resistor's terminals. The ends of the multimeter are connected to the banana jacks located on one side of the ELVIS. The red end (positive) will be connected to the terminal labeled V, and the black end (negative) will be connected to the terminal labeled COM. 9. Using the multimeter, check that the measured voltage is equal to the voltage value provided by the variable supply. To carry out this measurement, you must select the direct current voltage and press the "Run" button. Now we will measure the current. Since currents are measured in series, it will be necessary to open the circuit and make the current flow through the multimeter. The circuit can be opened between one of the resistor's terminals and ground. The red end must be connected to the resistor's terminal and the black end to ground. The red end must be unplugged from the banana jack labeled V in ELVIS and plugged in to the terminal labeled A. 10. Using the multimeter, measure the current and write the data in Table 1-1. The multimeter must be set to measure direct current. Do not forget to press the Run button. 11. Repeat the step above for all voltage values (from 1 V to 10 V), changing the value at the variable power supply, and write down the current values in Table 1-1. 12. Repeat the above process, setting up a 1 kΩ resistor. Write the values down in Table 1-1 13. Repeat the above process, setting up a 3.3 kΩ resistor. Write the values down in Table 1-1 Chart the Voltage vs. Current curves for the 330 Ω, 1 kΩ and 3.3 kΩ resistors. Questions 1. These V - I curves can be used to determine the approximate current passing through a given component, given a known voltage value. For a 330-Ω resistor, what would be the approximate current value if Vs = 5.5 V? 2. Another use for the V - I curves is to determine the approximate voltage of a component when a known current value flows through it. For a 3.3-kΩ resistor, what would be the approximate voltage value if current I = 3 mA? Exercise 2 Kirchhoff's Voltage Law Introduction There are several ways to connect electric components in a circuit: in series, in parallel or a combination of the two. A connection in series is when there is only one route for current to flow through between two points. Two elements are in series when: 1. They have only one common terminal. (An element's terminal is connected only to the terminal of the other element.) 2. The common point between those two elements is not connected to another element transporting a current. Since there is only one route for the current to flow, the current flowing through every component connected in series is the same. If the current of a component in a series circuit is 20 mA, the current of all the other elements connected in series will be 20 mA. In addition, if a component opens for any reason (resistance approaches infinity), no current will flow through the circuit. Kirchhoff's Voltage Law This law indicates that the algebraic sum of voltages in a closed circuit equals zero. Another way to express this law is that the sum of voltage drops of components connected in series is equal to the circuit's voltage supply. Objective - Verify that the total resistance of a circuit in series is the individual sum of the resistors. Check Kirchhoff's voltage law for circuits connected in series. Parts List - 1 100 Ω resistor 1 430 Ω resistor 1 1kΩ resistor 1 500 Ω resistor 1 700 Ω resistor Part 1 1. For the following circuit, calculate total resistance and the voltage value at each of the resistors, given a power supply of 6 and 12 Volts. Use Kirchhoff's voltage law. Write the calculated values in Table 2-1 Table 2-1. Current calculated for different resistance values Total Resistance (Ω): Vs (V) 6 12 Total Current (mA) Calc I Meas I (mA) (mA) R Voltage = 100 Ω Calc V Meas V (V) (V) R Voltage = 430 Ω Calc V Meas V (V) (V) R Voltage = 1 kΩ Calc V Meas V (V) (V) R Voltage = 500 Ω Calc V Meas V (V) (V) R Voltage = 700 Ω Calc V Meas V (V) (V) 2. Use the NI ELVIS II to set up the circuit illustrated above. Remember to turn the NI ELVIS II protoboard off whenever you make any connections, and turn it back on when you are ready to measure data. 3. 4. Turn the ELVIS II on, open the NI ELVISmx Instrument Launcher and use the following instruments: - DMM (Digital multimeter) - VPS (Variable Power Supply 0-12 V DC) Total Circuit Resistance Measurement With the voltage supply off, measure the total circuit resistance as shown in the illustration. Note that the multimeter terminals are parallel to the variable power supply (VPS). The multimeter must be set to measure resistance (Ω). 5. Total Circuit Voltage Measurement 5.1 Increase the value of the variable power supply to 6 V. Press the Run button to start applying voltage. 5.2 Use the multimeter to verify that the correct voltage is being applied to the circuit. The Banana Jack Connections window displays how the ends should be connected. 6. Circuit Total Current Measurement 6.1 With the voltage power supply at zero volts, place the multimeter terminals as shown in the illustration. Remember that current is measured in series, so the circuit must be open and the multimeter ends must be placed between the open circuit terminals. The multimeter must be set to measure direct current. 6.2 Write the total current value displayed in the multimeter in Table 2-1 6.3 Repeat the previous step, setting the variable power supply to 12 V. 7 Resistor Voltage Measurement 7.1 Make sure that the variable power supply has been set to 6 V and is on. 7.2 Place the multimeter terminals as shown in the illustration. Note that the multimeter terminals are parallel to the resistor (R1). To ensure that the multimeter is properly connected, always connect the positive and negative ends of the multimeter clockwise throughout the resistors. The multimeter must be set to measure direct current voltage. 7.3 Write the R1 voltage value displayed in the multimeter in Table 2-1 7.4 Now, place the multimeter terminals parallel to R2 and write the value displayed in the multimeter in Table 2-1. 7.5 Repeat the previous step for R3, R4 and R5. 7.6 Repeat the previous procedure, setting the variable power supply (Vs) to 12 V. Questions 1. Will changing the resistor order alter the total resistance or current values? Why? 2. If the circuit resistance values are changed, will that affect the circuit voltage? 3. Why does polarity need to be taken into account for voltage measurement whenever Kirchhoff's voltage law is applied? Exercise 3 Kirchhoff's Current Law Introduction A parallel connection is one where there is more than one route for a current to flow. Two elements are said to be parallel if they have two common points. A parallel circuit has two or more components set up parallel to a voltage power supply. Since each component has the same connection points, the component voltage will be the same. If the measured voltage of a component connected in parallel is 12 V, the voltage of any other component connected in parallel will also be 12 V. The total resistance of a parallel circuit is calculated as follows: Kirchhoff's Current Law This law indicates that the algebraic sum of currents in a node (a joining point for two or more components) equals zero. Another version of this law indicates that the current flowing into a node is equal to the sum of the currents exiting said node. Objectives - Recognize the features of parallel resistive circuits. Check Kirchhoff's current law. Parts List - 2 3.3 kΩ resistors 2 1 kΩ resistors Part 1 1. For the following circuit, calculate total resistance for two parallel 3.3 kΩ resistors, the total current of the circuit and the current at each resistor. Write the calculated values in Tables 3-1 and 3-2 Circuit 1 2. Add another parallel 3.3 kΩ resistor to the circuit above and recalculate total current, total resistance and current at each resistor. Write the calculated values in Tables 3-1 and 3-2 Circuit 2 3. Add two parallel 1 kΩ resistors to the circuit above and recalculate total current, total resistance and current at each resistor. Write the calculated values in Tables 31 and 3-2 Circuit 3 Table 3-1. Calculated and measured (total) current and resistance for different resistance values Circuit Total Current (mA) Calc I (mA) Meas I (mA) Total R (Ω) Calc RT (Ω) Meas RT (Ω) 1 2 3 Table 3-2. Calculated and measured current at each circuit resistor Circuit R1 current = 3.3 kΩ Calc I Meas I (mA) (mA) R2 current = 3.3 kΩ Calc I Meas I (mA) (mA) R3 current = 3.3 kΩ Calc I Meas I (mA) (mA) R4 current = 1 kΩ Calc I Meas I (mA) (mA) R5 current = 1 kΩ Calc I Meas I (mA) (mA) 1 2 3 4. Use the NI ELVIS II to set up the circuit illustrated above. Remember to turn the NI ELVIS II protoboard off whenever you make any connections, and turn it back on when you are ready to measure data. 5. 6. Turn the ELVIS II on, open the NI ELVISmx Instrument Launcher and use the following instruments: - DMM (Digital multimeter) - VPS (Variable Power Supply 0-12 V DC) Set the positive variable power supply at approximately 12 V. 7. Total Resistance Measurement 7.1 With the voltage supply off, measure the total circuit resistance as shown in the illustration. Note that the multimeter terminals are parallel to the variable power supply (VPS). The multimeter must be set to measure resistance (Ω). Write the calculated values in Tables 3-1 and 3-2 7.2 Add another parallel 3.3 kΩ resistor to the circuit above and measure total resistance again. Write the calculated values in Tables 3-1 and 3-2 7.3 Add two parallel 1 kΩ resistors to the circuit above and measure total resistance again. Write the calculated values in Tables 3-1 and 3-2 8 Measuring Total Current and Current at Parallel Resistors 8.1 For the following circuit, measure the total circuit current and current at each resistor. Remember that the multimeter must be connected to the tested element in series in order to measure currents. Write the calculated values in Tables 3-1 and 32 8.2 Add another parallel 3.3 kΩ resistor to the circuit above and recalculate total current and current at each resistor. Write the calculated values in Tables 3-1 and 3-2 8.3 Add two parallel 1 kΩ resistors to the circuit above and recalculate total current and current at each resistor. Write the calculated values in Tables 3-1 and 3-2 Questions 1. What happens to total current when more parallel resistors are added to the circuit? 2. What happens to total resistance when more parallel resistors are added to the circuit? 3. How does total resistance compare to that of the lowest value parallel resistor? Exercise 4 Thevenin and Norton Equivalent Circuits Introduction Thevenin's Theorem. "Any two-terminal, linear bilateral DC network can be replaced by an equivalent circuit consisting of a voltage source and a series resistor." This means that a circuit such as the one in the diagram can be replaced by a power supply and a series resistor, allowing for a quicker analysis of RL resistance changes. Some of the advantages offered by this theorem are: - It allows the determination of any given voltage or current in a linear network with one, two or any number of power supplies. It allows the analysis of a specific part of a network, substituting the remaining network with an equivalent circuit. Procedure for theorem application. Remove the part of the network through which the equivalent Thevenin's circuit will be analyzed (in the illustration above, it would be RL), and tag the network terminals where the removed element was located. Calculate Thevenin's Resistance RTh , substituting all supplies by zero (power supply sources are replaced by open circuits and voltage supply sources are replaced by short circuits) and find the resulting resistance between the two tagged terminals. Calculate Thevenin's voltage ETh , returning all power supply sources to their original settings and finding the voltage of the open circuit between the tagged terminals. Draw Thevenin's equivalent circuit, adding the circuit part removed before. This step is indicated by placing the RL resistor between the Thevenin equivalent circuit terminals. Norton's Theorem "Any two-terminal linear bilateral DC network can be replaced by an equivalent circuit consisting of a current source and a parallel resistor." Analyzing Norton's theorem brings up some similarities with Thevenin's theorem, given that a part of the circuit must be removed for its analysis in both cases, and in the case of Norton's theorem, use a current power supply in parallel with an RN resistor, and have it in parallel with the RL part of the circuit to be analyzed. RL. Procedure for theorem application. Remove the part of the network through which the equivalent Norton's circuit will be analyzed. (in the illustration above, it would be RL), and tag the network terminals where the removed element was located. Calculate Norton's resistance "RN," substituting all supplies by zero (current power supplies are replaced by open circuits and voltage supplies are replaced by short circuits) and find the resulting resistance between the two tagged terminals. Calculate Norton's current "IN," returning all power supply sources to their original settings and finding the short circuit current between the tagged terminals (cause a short on both terminals.) (In all cases, keep in mind that the current has to be measured using an ammeter between the pair of terminals tagged in step one.) Draw Norton's equivalent circuit, adding the circuit part removed before. This step is indicated by placing the RL resistor between the Norton equivalent circuit terminals. Parts List - 2 3.3 kΩ resistors 1 1kΩ resistor 1 10 kΩ potentiometer Part 1 1. For the following circuit, use Ohm's law to calculate the current flowing through potentiometer RL for an RL value equal to 1 kΩ, 5 kΩ and 10 kΩ. Write the calculated values in Table 4-1 2. Now, using Thevenin's theorem, calculate the current flowing through potentiometer RL for an RL value equal to 1 kΩ, 5 kΩ and 10 kΩ. Write the resistance values and Thevenin voltage. Table 4-1. Calculated and measured current for different RL resistance values RL RL Current Calc I (mA) Meas I (mA) Thevenin meas. I (mA) 1 kΩ 5 kΩ 10 kΩ 3. Use the NI ELVIS II to set up the circuit above, as shown in the illustration. Turn off the protoboard while you wire the circuit. 4. Turn the NI ELVIS II on, open the NI ELVISmx Instrument Launcher and use the following instruments: DMM (Digital multimeter) VPS (Variable power supply) 5. First, use the multimeter to make sure that potentiometer RL shows a value of 1 kΩ 6. Set the positive variable power supply at approximately 12 V. 7. Using the multimeter, check that the voltage equals that provided by the power supply. 8. Measure the current flowing through RL. Remember that the multimeter must be connected in series to the potentiometer in order to measure currents. Write the resulting values in Table 4-1 9. Change the RL value to 5 kΩ and measure the current flowing through the potentiometer again. Write the resulting values in Table 4-1 10. Change the RL value to 10 kΩ and measure the current flowing through the potentiometer again. Write the resulting values in Table 4-1 11. Use the NI ELVIS II to set up the following circuit, using the calculated voltage values and Thevenin resistance values. Set the variable power source (VPS) voltage value to the desired value (VTh) and use a potentiometer set at the calculated Thevenin resistance value (RTh). 12. Measure the current flowing through RL. Remember that the multimeter must be connected in series to the potentiometer in order to measure currents. Write the resulting values in Table 4-1 13. Change the RL value to 5 kΩ and measure the current flowing through the potentiometer again. Write the resulting values in Table 4-1 14. Change the RL value to 10 kΩ and measure the current flowing through the potentiometer again. Write the resulting values in Table 4-1 Part 2 1. For the following circuit, use Ohm's law to calculate the current flowing through potentiometer RL, for an RL value equal to 1 kΩ, 5 kΩ and 10 kΩ. Write the calculated values in Table 4-1 2. Now, using Norton's theorem, calculate the current flowing through potentiometer RL for an RL value equal to 1 kΩ, 5 kΩ, and 10 kΩ. Write the resistance and Norton current values. Table 4-2. Calculated and measured current for different RL resistance values RL RL Current Calc I (mA) Meas I (mA) Norton meas. I (mA) 1 kΩ 5 kΩ 10 kΩ 3. Use the NI ELVIS II to set up the circuit above, as shown in the illustration. Turn off the protoboard while you wire the circuit. 4. Turn the NI ELVIS II on, open the NI ELVISmx Instrument Launcher and use the following instruments: DMM (Digital multimeter) VPS (Variable Power Supply 0-12 V DC) 5. First, use the multimeter to make sure that potentiometer RL shows a value of 1 kΩ. 6. Set the positive variable power supply at approximately 12 V. 7. Using the multimeter, verify that the voltage equals that provided by the power supply. 8. Measure the current flowing through RL. Remember that the multimeter must be connected in series to the potentiometer in order to measure currents. Write the resulting values in Table 4-1 9. Change the RL value to 5 kΩ and measure the current flowing through the potentiometer again. Write the resulting values in Table 4-1 10. Change the RL value to 10 kΩ and measure the current flowing through the potentiometer again. Write the resulting values in Table 4-1 11. Use the ELVIS II to set up the following circuit, using the calculated Norton current and resistance values. Transform the Norton's power supply value to a Thevenin voltage supply value using this formula: VTh= IN * RNWhere IN is Norton's current, RN is Norton's resistance. Change the variable power supply's voltage value (Vs) to the desired value (VTh) and use a potentiometer with the value calculated for Norton's resistance (RN). 12. Measure the current flowing through RL. Remember that the multimeter must be connected in series to the potentiometer in order to measure currents. Write the resulting values in Table 4-2 13. Change the RL value to 5 kΩ and measure the current flowing through the potentiometer again. Write the resulting values in Table 4-1 14. Change the RL value to 10 kΩ and measure the current flowing through the potentiometer again. Write the resulting values in Table 4-1 Questions 1. When the two circuit analysis methods are compared, in what cases would we use Ohm's law and in which would we use Thevenin's theorem? 2. When the two circuit analysis methods are compared, in what cases would we use Ohm's law and in which would we use Norton's theorem? 3. How are Norton's theorem and Thevenin's theorem related? Exercise 5 Voltage Divider and Resistance Bridge Introduction A voltage divider is made up of at least two resistors in series with a voltage power supply. For two resistors, the voltage is divided as follows: Sometimes the voltage divider is used to supply a voltage other than that coming from the battery or the power supply. When applied, the output voltage depends on the resistance of the load it supplies. A rule of thumb is that a large R2 value in relation to R1will yield a larger output voltage. However, if its load resistance RL is lower than R2, the output voltage will decrease and more current and total power will be needed from the power supply. Resistance Bridge This is a measuring instrument that can work with direct and alternate currents, and allows us to test resistors and their equivalents in alternate current circuits containing other elements such as coils or condensers. In order to determine the value of an electrical resistor, there must be a potential difference between each end and then measure the current going through, as indicated by Ohm's law. It is made up of four resistors, a power supply and a current sensor such as a galvanometer. For the current between points b and c to equal zero, the relation between all four resistors must follow the equation below: If the resistors fall within the prescribed ratio, the bridge is deemed to be balanced. If three resistors have known values, the fourth resistor can be found using the previous equation. If R4 is unknown, its Rx value can be calculated as follows: Objective - Understand the operation of a voltage divider. - Understand the behavior of a resistance bridge. Parts List - 2 2 kΩ resistors 1 4 kΩ resistor 1 3 kΩ resistor 1 4.7 kΩ resistor 1 470 Ω resistor 1 3.3 kΩ resistor 1 330 Ω resistor Part 1 For circuit A, calculate the voltage of the 4 kΩ R2 resistor. Write the value in Table 5-1. Now, recalculate the voltage value at the R2 resistor, after adding a parallel 2 kΩ resistor (circuit B). Write the value in Table 5-1. Recalculate the voltage value at the R2 resistor, after adding an additional parallel 3 kΩ resistor (circuit C). Write the value in Table 5-1. Table 5-1. Calculated and measured voltage drop at R2 RL Voltage at R2 Calc V (V) Meas V (V) Circuit A Circuit B Circuit C 1. Use the NI ELVIS II to set up the circuit above, as shown in the illustration. Turn off the protoboard while you wire the circuit. 2. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following instruments: DMM (Digital multimeter) VPS (Variable Power Supply) 3. First, use the multimeter to make sure that potentiometer RL shows a value of 1 kΩ. 4. Set the positive variable power supply at approximately 12 V. 5. Using the multimeter, verify that the voltage equals that provided by the power supply. 6. Measure voltage at the 4 kΩ R2 resistor. Write the value in Table 5-1. 7. Now recalculate the voltage value at the R2 resistor, after adding a parallel 2 kΩ resistor. Write the value in Table 5-1. 8. Recalculate the voltage value at the R2 resistor, after adding an additional parallel 3 kΩ resistor. Write the value in Table 5-1. Questions 1. What happens at the voltage divider when it is put under load, in contrast with an open circuit? 2. What is the effect of the load resistance value on the divider's output voltage? 3. Why does voltage change at the output terminals? Part 2 1. For the illustrated circuit, calculate the voltage at all resistors and between points A and B. 2. Add a 2 kΩ resistor between points A and B and calculate the voltage of all resistors and between points A and B. Write the value in Table 5-2. Table 5-2. Calculated resistor voltage drop Voltage at R1 Voltage at R2 Voltage at R3 Voltage at R4 Voltage at AB Calc V (V) Calc V (V) Calc V (V) Calc V (V) Calc V (V) Circuit Circuit A Circuit B Table 5-3. Measured resistor voltage drop Circuit Voltage at R1 Voltage at R2 Voltage at R3 Voltage at R4 Voltage at AB Meas V (V) Meas V (V) Meas V (V) Meas V (V) Meas V (V) Circuit A Circuit B Circuit C Circuit D 3. Recalculate voltage at all resistors and between points A and B. Write the values in Table 5-3. 4. Add a 2 kΩ resistor between points A and B and recalculate the voltage of all resistors and between points A and B. Write the values in Table 5-3. 5. Remove the 2 kΩ resistor between points A and B and place a 1 kΩ resistor in parallel with the 4.7 kΩ R1 resistor. Recalculate voltage at all resistors and between points A and B. Write the values in Table 5-3. 6. Now, connect the 1 kΩ resistor in parallel with the 470 Ω R2 resistor. Recalculate voltage at all resistors and between points A and B. Write the values in Table 5-3. Questions 1. Why does the voltage value at points A and B equal zero at certain times during the exercise? 2. Why does the voltage value at points A and B become positive or negative at certain times during the exercise? 3. What happens if the system goes out of balance? Exercise 6 Series and Parallel Capacitors Introduction A capacitor is a device that stores an electric charge. This device is built by placing two parallel metallic plates close to one another, with the same surface and separated by a layer of dielectric material. The way in which the plates and the dielectric material are arranged in a capacitor allows each plate to have the same amount of electric charge but with different polarity. When one of these plates is connected to a voltage power supply, the plate is charged and triggers a charge of the opposite polarity on the other plate. If one plate has a negative charge (Q-) and the other has a positive charge (Q+), with the same charge magnitude at each plate, the net system charge becomes 0. However, it is said that the capacitor is under a Q charge. Series and Parallel Capacitors Capacitors and resistors behave in opposing ways. The calculation of parallel capacitors is equal to the calculation of series resistors, while the calculation of series capacitors is equal to the calculation of parallel resistors. The calculation of capacitors connected in series is described with the following expression: The calculation of capacitors connected in parallel is described with the following expression: Objective Verify the capacitance behavior of capacitors connected in series and in parallel. Parts List - 5 1 µF capacitors Part 1. Series Capacitors 1. Calculate the equivalent capacitance of the following circuit and write the value in Table 12-1. Table 12-1 Series and Parallel Capacitors Circuit Theoretical Series Theoretical Parallel Actual Series Actual Parallel C EQ (µF) C EQ (µF) C EQ (µF) C EQ (µF) Circuit 1 Circuit 2 Circuit 3 2. Set up the circuit illustrated above on the NI ELVIS II. 3. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following instruments: DMM (Digital multimeter) 4. Adjust the multimeter to measure capacitance and make sure that the circuit is connected to terminals DUT+ and DUT-. Measure the equivalent capacitance. 5. Add a series capacitor, calculate the equivalent capacitance and write the value in Table 12-1. 6. Measure the equivalent capacitance and write the value in Table 12-1. 7. Add a series capacitor and repeat steps 5 and 6. 8. Calculate the equivalent capacitance of the following circuit and write the value in Table 12-1. 9. Measure the equivalent capacitance and write the value in Table 12-1. 10. Add a parallel capacitor, calculate the equivalent capacitance and write the value in Table 12-1. 11. Measure the equivalent capacitance and write the value in Table 12-1. 12. Add a parallel capacitor and repeat steps 10 and 11. AC Electric Circuits Exercise 7 RC Circuits Introduction Capacitors and inducers are devices that store energy. Capacitors store electric charge (shown as voltage) and inducers store magnetic fields (shown as current). Usually, capacitors and inducers are combined with resistors to create RC, RL and RLC circuits. When capacitors are subjected to power, they take some time to charge and to lose their charge. This period is known as time constant and, in an RC circuit, it is proportional to the result of multiplying resistance and capacitance. The capacitor's voltage charges and discharges exponentially as time goes by. The voltage of a capacitor is calculated as follows: Objective Understand the principle of operation of an RC circuit and observe a capacitor's charge and discharge curves. Parts List - 1 100 Ω resistor 1 1 µF capacitor 2 2 µF capacitors Part 1 13. Calculate the time constant for the circuit shown in the illustration. Calculate the capacitor's voltage from time t = 0 to time t = 0.001 s when a 1 V step is applied to V0 (use the VI “RC.vi Voltage Calculator” found in the folder for Exercise 6, in the Answers folder.) For these R and C values, the capacitor's voltage should reach 1 V in 1 ms. 14. Use the NI ELVIS II to set up the circuit above, as shown in the illustration. 15. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following instruments: DMM (Digital multimeter) FGEN (Function Generator) SCOPE (Oscilloscope) DMM (Multimeter) FGEN (Function Generator) SCOPE (Oscilloscope) Before taking any readings on the RC circuit, test the Function Generator and the Oscilloscope. Function Generator This instrument can generate sinusoid, triangular and square wave signals at different frequencies ranging from 200 MHz to 5 MHz, at a peak-to-peak voltage amplitude ranging between 0 V and 10 V. 1- Choose a square signal 2- Set a 100-Hz frequency 3- Set a 1-V amplitude Oscilloscope The oscilloscope has two reading channels: CH0 and CH1. In addition, the voltage scale and the time lapse can be modified in order to adjust the display of the voltage signal on the screen at a given frequency. 1- Screen showing the shape of the signal measured by the oscilloscope. 2- The signal to be displayed on screen is selected, either channel 1, channel 2 or both. In that case, enable both channels so that their signals are displayed on screen. 3- Define the voltage value of each division on the Y axis or the vertical axis on screen. It goes from 10 mV to 20 V per division. Refer to the voltage scale shown on the screen. Set both channels to a 1 V/Div scale. 4- Define the time value of each division on the X axis or the horizontal axis on screen. It goes from 5 µs to 200 ms per division. Refer to the time scale shown on the screen. Set a time scale of 5 ms/Div If you have an oscilloscope probe, you can connect it to the BNC connectors corresponding to the function generator and the two oscilloscope channels. In that case, adjust the function generator and the oscilloscope as follows: Function Generator Oscilloscope ** The black alligator clip of the oscilloscope probe must be connected to ground. Verify that the probe attenuation is 1X. If you do not have an oscilloscope probe, you can use the instruments on the protoboard. In that case, adjust the function generator and the oscilloscope as follows: Function Generator Oscilloscope 16. Whether using probes or making a direct connection on the protoboard, connect the function generator's signal to the oscilloscope and press Run on both instruments. Verify that the signal displayed on the oscilloscope is the same as the signal being generated. ** If the signal moves in a horizontal direction, you can freeze it by applying a trigger. Select an "Edge" trigger. This trigger will synchronize the signal to its zero cross-point. 17. Try it out using sinusoid, square and triangular waves. Modify the amplitude, frequency and offset at the function generator and notice the changes in the oscilloscope. ** The function generator can be operated from the PC or using the NI ELVIS II knobs in manual operation. ** The oscilloscope's Autoscale button allows the voltage and time scales to be automatically adjusted, so the display can be adjusted quickly. 18. Once the function generator and the oscilloscope are tested, we will apply a signal and measure it at the RC circuit. On the function generator, apply a square 100 Hz signal with a peak-to-peak voltage of 1 V and a 0.5 V offset. 19. Adjust the oscilloscope as shown in the following illustration. ** If nothing shows on the oscilloscope and the graph shows a warning that reads "Waiting on Trigger," change the trigger back to Immediate. Stop the oscilloscope and rerun it. The square signal must go through 0.01 V for the Trigger Edge to operate. ** Use the cursors to find the charging time. 20. Change the time interval to 1 ms so you can see the capacitor's charge and discharge. 21. See the effect of changing the resistance in the "RC Voltage Calculator." Test the 1 kΩ and 10 kΩ values. What Total Time values should be set so the capacitor's full charge can be displayed in each case? 22. Try making those changes in the circuit and observe the oscilloscopic behavior. What frequency must the function generator's square signal use in order to see the capacitor's full charge and discharge? Questions 1. If the resistance of the RC circuit increases, will the capacitor take more or less time to charge and discharge? 2. If the RC circuit capacitance is increased, will the capacitor take more or less time to charge and discharge? Exercise 8 RLC Circuits Introduction An RLC circuit is made up of a resistor (R), an inductor (L) and a capacitor (C). An RLC circuit can be configured in series or parallel. An RLC circuit is described by a second-order equation, and can describe attenuated, over-attenuated and subattenuated oscilloscopic behaviors. They are generally used to design oscillators or as part of a modulation or demodulation circuit. This second-order system will have a frequency with a gain peak. This frequency is known as a resonating frequency. The circuit's resonating frequency can be determined applying the following expression: Objective - Observe the attenuated response of an RLC circuit. Observe and analyze the frequency response of the RLC circuit in order to find its resonating frequency. Parts List - 1 20 mH inductor 1 10 Ω resistor 1 50 µF capacitor Part 1 1. Use the NI ELVIS II to set up the circuit shown in the following illustration. 2. Calculate the resonating frequency of the circuit and write it in Table 8-1. Table 8-1. Amplifier Gain Data Resonating Frequency Theoretical Bode 3. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following instruments: - 4. Function Generator (FGEN) Oscilloscope (SCOPE) Set the Function Generator so that it generates a square signal with an amplitude of 1 Vpp and a frequency of 20 Hz. 5. Connect the function generator's signal to the first channel in the oscilloscope, and the RLC circuit output (voltage in the capacitor) to the second channel. 6. Set the oscilloscope's Volt/Div scale to 200 mV for both channels and the Time/Div time base to 10 ms. 7. Observe the circuit's attenuated response. 8. Stop the function generator and the oscilloscope. Open the NI ELVISmx Instrument Launcher and use the Bode Analyzer. 9. Adjust the instrument to the parameters indicated in the following illustration: 10. Press Run to perform the reading. Use the cursors to find the frequency at which the system's gain is higher (resonating frequency) and write it in Table 8-1. Does the actual resonating frequency match the theoretical frequency? Exercise 9 Transformers and Turn Relationship Introduction A transformer is an electrical device that allows us to amplify or reduce the voltage of an alternate current signal. Transformers operate according to a principle known as electromagnetic induction. This principle generally states that when an object is exposed to a variable electromagnetic field, it will generate an induced voltage. If said object is a conductor, it will also produce an induced current. Therefore, a transformer is made up of two coils wound around a closed ferromagnetic core, but each coil is electrically separated from the other. One coil is connected to a variable power supply (alternate current). Whe n that variable voltage signal flows through the first coil, it generates a variable magnetic field. The second coil is sufficiently close to the first coil to experience the effects of that variable magnetic field, and it then generates voltage. Given that the second coil is also a conductor, that generated voltage creates a current. Therefore, we have two fully insulated circuits (Circuit P and Circuit S) which transfer energy between themselves by means of electromagnetic fields. The voltage induced in circuit S depends on the turn relationship between coils. If both coils have the same number of turns, VP will be equal to VS. If coil P has twice the number of turns of coil S, VP will be the double of VS. Objective - Understand the principle of electromagnetic induction and how it applies to electric circuits by means of transformers. Part 1 1. Use the NI ELVIS II to set up the following circuit, as shown in the illustration. 2. Using the PC's NI ELVISmx Instrument Launcher, activate the following measuring instruments: - FGEN (Function Generator) - SCOPE (Oscilloscope) Set the Function Generator so that it generates a sinusoid signal with an amplitude of 10 Vpp and a frequency of 60 Hz. 3. Open the Transformadores1.vi file which simulates a transformer, where the number of turns of the primary and secondary coils can be changed. Press Run. . 4. Change the number of turns of the primary and secondary coils to observe their effect on the voltage signal. 5. Complete Table 9-1 using the data obtained in the program. Table 9-1. Transformers and Turn Relationship Np 100 100 100 500 500 500 Ns 100 300 500 500 300 100 Vp Vs Turn Relationship Questions 1. Using the data in Table 10-1, what happens when the turn relationship is greater than 1? 2. Using the data in Table 10-1, what happens when the turn relationship is less than 1? 3. Using the data in Table 10-1, what happens when the turn relationship is equal to 1? Challenge Find a commercial 120 V AC to 12 V AC transformer and set up the following circuit on the NI ELVIS II in order to measure the voltage of a single-phase power outlet. ** Take into account the voltage divider being used with the two 1 kΩ resistors. The transformer output voltage exceeds the oscilloscope's limits. Use the DMM to measure the transformer output RMS voltage and the current at both coils. Analog Electronics Exercise 10 Diodes Introduction A diode is an active two-terminal component that conducts current whenever it is subjected to sufficient voltage of the proper polarity. This also means that a diode conducts a current in only one direction. That is why it tends to be used in safety circuits. Current increases slowly as voltage in the correct polarity is applied to the diode's terminals. Once it passes a given voltage, known as "Barrier Voltage" (typically 0.7 V), current conduction is triggered. There are different types of diodes with different barrier voltages, but the behavior will always be the same. In order to characterize the behavior of a diode we generally create a Voltage - Current graph such as the one pictured below. When the diode receives an inverse polarity, no current is transmitted until it reaches a specific voltage known as "Zener Voltage." Once the inverse voltage reaches this point, an avalanche current is produced, which could potentially damage the component. There are diodes designed to operate under this effect, known as Zener diodes. Objectives Determine the behavior of the diodes using the Voltage-Current curves and understand their operation and applications. Parts List - 1 1N 4005 diode 1 50 Ω resistor Part 1 1. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following: Two-Wire Current-Voltage Analyzer (Two-wire curve generator) 2. Place the diode with the correct polarity between the DUT+ and DUT- terminals in NI ELVIS II. 3. Set the instrument to voltage increments of 0.05 V, ending on 0.75 V. 4. Press Run to start measuring. The instrument will provide voltage and then measure current. It will increase the voltage and repeat the procedure until it reaches the user-defined voltage limit. The graph clearly displays how the current rises when it reaches a given voltage value. 5. Try it again, starting the measurement at – 10 V (inverse voltage), in 0.1 V increments. Part 2 The next part of the exercise is to generate the curve manually using the power supply and the multimeter. 6. Use the NI ELVIS II to set up the following circuit, as shown in the illustration. 7. Using the PC's NI ELVISmx Instrument Launcher, activate the following instruments: - DMM (Digital multimeter) VPS (Variable Power Supply 0-12 V DC) 8. Use the VPS to apply a 100-mV voltage. Measure the diode's voltage drop and write it in Table 10-1. Change the DMM's reading to current. Change the DMM's probes to measure current, open the circuit and measure the current. Repeat this operation in 100-mV increments until you reach 1 V. Table 10-1. Diodes Vs (V) Diode Voltage Total Current VD (V) Calculated I (mA) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 9. Generate a Diode Voltage (VD) vs. Diode Current (I) Graph to obtain its typical curve. Voltage will appear in the X-axis and current in the Y-axis. Compare that curve with the one obtained from the Two-Wire Current-Voltage Analyzer. Are they different? If so, why? Part 3. Reverse Polarity of the Diode 10. Change the polarity of the circuit above to 1 MΩ and invert the diode's polarity as shown in the illustration. Use the VPS to send 10 V to the circuit. What is its current? What is the diode's voltage drop? Questions 1. Using the data in Table 10-1, what is the maximum power dissipated by the diode? 2. How did the diode behave when its polarity was reversed? Exercise 11 Bipolar Transistors Introduction A BJT (Bipolar Junction Transistor) is a device with three terminals capable of amplifying an alternate current signal. It is made up of three layers of N-type and Ptype doped semi-conducting material. The terminals are known as base, collector and emitter. A small current at the base is amplified to a larger current in the collectoremitter circuit. An important feature is the gain current under direct current, beta , which is the relationship between the current at the collector and that at the base. Another parameter is beta under alternate current collector current divided by the change in base current. , which is the change in Objectives Understand the principle of operation of a transistor, using its characteristic curves. Parts List - 1 NPN BF422 transistor 1 2N3904 transistor 1 33 kΩ resistor 1 330 Ω resistor Part 1 11. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following: - Two-Wire Current-Voltage Analyzer (Two-wire curve generator) 12. Place the transistor in the Base, DUT+ and DUT- terminals in NI ELVIS II, as indicated in the instrument's window. 13. Set the instrument as illustrated below. 14. Analyze the results. The graph shows 5 curves, each corresponding to the relationship between the Collector Emitter Voltage (VCE) and the Collector Current (IC) for different Base Currents (IB). Using these characteristic curves, we can define 3 transistor regions: - Cutoff region: In this region, the transistor does not conduct current from the collector to the emitter (open interrupter). - Saturation region: The transistor has a maximum VCE known as VCE sat. When VCE drops below VCEsat., the transistor will conduct the maximum possible Imax current, given the actual base current defined by the circuit's polarization. In practical terms, when the transistor operates under saturation, it will behave almost like a cable (closed interrupter). - Active region: In this region, the collector current IC behaves like a linear function of the base current defined by the β constant (depending on the type of transistor). Likewise, the emitter current is defined by the following function. For practical purposes, if we need the transistor to act like an interrupter, we will work in the cutoff and saturation regions. If on the other hand we need to use the transistor as an amplifier, we need to work in the active region. Part 2 The next part of the exercise is to obtain these curves manually using the power supply and the multimeter. 15. Use the NI ELVIS II to set up the circuit above, as shown in the illustration. 16. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following: - DMM (Digital multimeter) - VPS (Variable Power Supply 0-12 V DC) 17. Using the VPS, apply a 2.38 V voltage to the base (VB). Use the potentiometer to make the necessary adjustments so that the collector receives 5 V (VC). 18. Using the DMM set up to read DC currents, verify that the transistor's base current is 50 µ. 19. Change the reading type to DC voltage and read the collector-emitter voltage (VCE), as well as the collector's current (IC), and write the data in Table 11-1. 20. Change the voltage VC using the data in Table 11-1, and repeat the VCE and IC readings, and write the data in Table 11-1. 21. Repeat steps 7 to 10 for base currents of 100 µA and 150 µA, until you complete Table 11-1. Table 11-1 Typical Transistor Curves V2 IB=50 µA (V1=2.38 V) VCE IC IB=100 µA (V1=4.08 V) VCE IC IB=150 µA (V1=5.76 V) VCE IC 5V 6V 7V 8V 9V 10 V 11 V 12 V Using the data in Table 11-1, generate a Collector Current vs. Collector-Emitter Voltage graph. Questions 1. When you examine the graph, can you tell whether β is constant on all points? 2. When you examine the graph, what is the transistor's approximate β? Use a base current IB = 100 µA at VCE = 8 V 3. When you examine the graph, what would be the collector's IC current if VCE = 9V @ IB= 75 µA? Exercise 12 Transistors Used as Interrupters Introduction To make a transistor work as an interrupter, we need to regulate the base current so that the transistor operates both in the cutoff and the saturation regions. For the transistor to work in the cutoff region, the base current must be zero or close to zero, while for it to work in the saturation region, the base current will depend on the charge it is subjected to between the on and off states. If the charge current is known, that will be the current transmitted by the transistor when it reaches saturation, and the transistor's charge line can be deduced using the power supply value. Remember that a transistor in the cutoff state has a minimal collector current (IC) and a maximum collector-emitter current (VCEmax) close to the supply voltage, and when it is under reverse saturation, it has a maximum collector current (ICmax) and an almost null VCE . Objectives Analyze the behavior of a transistor set up to work as an interrupter. Parts List - 1 kΩ resistor 1 10 kΩ resistor 1 1 kΩ potentiometer 1 LED 1 2N3904 transistor Part 1 1. For the illustration below, calculate the cutoff voltage VCE , saturation voltage VCE , VRC and saturation current at collector IC , and write the data in Table 12-1 Assume that the LED voltage for cutoff and saturation purposes is 1.7 V. During the saturation stage, the transistor will be in full operation. Assume that VCE is 0.1 V (typical value). 2. Calculate VRC applying Kirchhoff's voltage law to the transistor's collector, using a VCE equal to 0.1 and a LED voltage equal to 1.7 V. 3. Calculate saturation IC using Ohm's law in VRC Table 12-1. Transistor as Interrupter Data Calculated Value Measured Value VCE (cutoff) VCE (saturation) VRC (saturation) I (saturation) 4. Use the NI ELVIS II to set up the circuit shown in the following illustration. 5. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following: - DMM (Digital multimeter) 6. Adjust the potentiometer and make sure the LED is turned off. Measure voltage VCE and write the result in Table 12-1. 7. Adjust the potentiometer slowly until the LED turns on. Measure voltage VCE, voltage VRC and saturation current ISAT and write the values in Table 12-1. Questions 1. What is the base current IB required to make the transistor work in the saturation region? Exercise 13 Transistors Used as Amplifiers Introduction When operating in the active region, a transistor can be used as an AC signal amplifier. There are different configurations. One of the most common is that of a Common Emitter. In this configuration the AC signal enters through VB = Vin and leaves amplified through VC = Vout. The emitter and the AC signal supply are grounded. In the active region, the transistor behaves in a linear manner, so the following formula applies: It is necessary to polarize the transistor correctly for it to amplify properly. A transistor's polarization consists in the application of a base voltage that ensures it will operate in the active region. A voltage divider connected to the power supply VCC is usually installed to guarantee that voltage. To find the base voltage, Thevenin's equivalent is applied to calculate Thevenin's voltage (VTh).VTh). In this case, VTh is only the voltage divider of VCC between resistors R1 and R2. Thevenin's resistance (RTh) for this circuit is the parallel of Resistors R1 and R2. If we have RTh we can calculate the emitter current IE using the following expression: Taking IE ≈ IC we can say that IE is βIB. If we replace IE in the formula above, and use 0.7 V as VBE, we get the following expression: All these equations are used to design a circuit that works within the linear operation limits of an amplifier and allow us to select the proper resistor and capacitor values. Voltage Gain Voltage gain is the relationship between the output and input voltages. For an amplifying circuit to work properly, it must operate in the linear region without saturating the transistor. Gain is also expressed in dB. It is important to remember that we are working with AC signals and that the amplifier gain changes based on the frequency. A Bode graph is used to find the gain variation. Objective - Learn to polarize a transistor correctly so it can be used to amplify an AC voltage signal. Learn to use the Bode Analyzer to find the amplifier gain. Parts List - 1 560 Ω resistor 1 1 kΩ resistor 1 8.2 kΩ resistor 1 18 kΩ resistor 2 25 µF capacitors 1 100 µF capacitor 1 NPN 2N3904 transistor (or its equivalent) Part 1 1. Use the NI ELVIS II to set up the circuit shown in the following illustration. 2. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following instruments: DMM (Digital multimeter) FGEN (Function Generator) SCOPE (Oscilloscope) 3. Start the Function Generator and generate a 0.2 Vpp, 100 Hz signal. 4. Given a β of 100 and VBE of 0.7, calculate IB and IE , and write the result in Table 131. Table 13-1. Transistor Polarization Data Calculated Value Measured Value IB IE 5. Use the DMM to measure IB and measure IE. Write the values down in Table 13-1. Are the measured values equal to the calculated values? If not, what could be the reason for the variation? 6. Use the oscilloscope to measure the function generator's signal at one channel, and the amplifier output on the other channel. Adjust the horizontal and vertical scales to see both signals. 7. Calculate linear gain, dividing Output Vpp by Input Vpp. Use the linear gain to calculate gain in dB and write the result in Table 13-2. Table 13-2. Amplifier Gain Data Oscilloscope Bode Gain dB 8. Stop the function generator and the oscilloscope. Open the NI ELVISmx Instrument Launcher and use the Bode Analyzer. 9. Adjust the instrument to the parameters indicated in the following illustration: 10. Press Run to perform the reading. Use the cursors to find the gain at 100 Hz and write it down in Table 13-2. Does it coincide with the gain calculated using the oscilloscope? Questions 1. What happens to the amplified signal if we increase the input signal amplitude? 2. What does the output signal look like when the input is a triangular or square signal? Why is the input waveform not similar to the output waveform? 3. Would it be possible to amplify a square or triangular waveform without altering its shape? What parameter would we have to adjust in the function generator? Digital Electronics Exercise 14 Logic Gates Introduction In order to understand digital electronics, we need to know AND, OR and NOT logic operations, which can be applied using logic gates. Understanding how these gates work and how they combine to create logic statements is important for the design of our own digital circuits used to solve problems, or to understand combinational logic. Objectives Verify the operation of AND, OR, NOT, NAND, NOR, XOR logic gates. Parts List - 1 74LS08D AND gate IC (integrated circuit) 1 74LS32D OR gate IC 1 74LS04D NOT gate IC 1 74LS00D NAND gate IC 1 74LS02D NOR gate IC 1 74LS86D XOR gate IC Part 1 1. Use the NI ELVIS II to set up the circuit above, as shown in the illustration. Make sure that the integrated circuits receive their power from the +5 V power supply (pin 54). 2. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following instruments: - DigIn (Digital reader) - DigOut (Digital writer) DigOut (Digital writer) DigIn (Digital reader) 3. AND Gate (7408) The AND Gate's two inputs are connected to lines 0 and 1 of the DigOut (Digital writer) and its output is connected to line 8 of the DigIn (Digital reader). On the DigOut (Digital writer), when the switches are moved to HI, this gives a logic 1, and when they are moved to LO, this gives a logic 0. Check the True/False Table for the AND gate and write the results in Table 14-1. Table 14-1. AND-Gate Behavior Inputs Output A (INT 0) B (INT 1) 0 0 0 1 1 0 1 1 X (LINE 8) 4. OR Gate (7432) The OR Gate's two inputs are connected to lines 2 and 3 of the DigOut (Digital writer) and its output is connected to line 9 of the DigIn (Digital reader). On the DigOut (Digital writer), when the switches are moved to HI, this gives a logic 1, and when they are moved to LO, this gives a logic 0. Check the True/False Table for the OR gate and write the results in Table 14-2. Table 14-2. OR-Gate Behavior Inputs Output A (INT 2) B (INT 3) 0 0 0 1 1 0 1 1 X (LINE 9) 5. NOT Gate (7404) The NOT Gate's input is connected to line 4 of the DigOut (Digital writer) and its output is connected to line 10 of the DigIn (Digital reader). On the DigOut (Digital writer), when the switches are moved to HI, this gives a logic 1, and when they are moved to LO, this gives a logic 0. Check the True/False Table for the OR gate and write the results in Table 14-3. Table 14-3. NOT-Gate Behavior Inputs Output A (INT 2) X (LINE 9) 0 1 Part 2 6. Use the NI ELVIS II to set up the circuit above, as shown in the illustration. 7. NAND Gate (7400) Make sure that the integrated circuits receive their power from the +5 V power supply (pin 54). The NAND Gate's two inputs are connected to lines 0 and 1 of the DigOut (Digital writer) and its output is connected to line 8 of the DigIn (Digital reader). On the DigOut (Digital writer), when the switches are moved to HI, this gives a logic 1, and when they are moved to LO, this gives a logic 0. Check the True/False Table for the OR gate and write the results in Table 14-4. Table 14-4. NAND-Gate Behavior Inputs Output A (INT 0) B (INT 1) 0 0 0 1 1 0 1 1 X (LINE 8) 8. NOR Gate The NOR Gate's two inputs are connected to lines 2 and 3 of the DigOut (Digital writer) and its output is connected to line 9 of the DigIn (Digital reader). On the DigOut (Digital writer), when the switches are moved to HI, this gives a logic 1, and when they are moved to LO, this gives a logic 0. Check the True/False Table for the OR gate and write the results in Table 14-5. Table 14-5. NOR-Gate Behavior Inputs Output A (INT 2) B (INT 3) 0 0 0 1 1 0 1 1 X (LINE 9) 9. XOR Gate The XOR Gate's two inputs are connected to lines 4 and 5 of the DigOut (Digital writer) and its output is connected to line 10 of the DigIn (Digital reader). On the DigOut (Digital writer), when the switches are moved to HI, this gives a logic 1, and when they are moved to LO, this gives a logic 0. Check the True/False Table for the OR gate and write the results in Table 14-6. Table 14-6. XOR-Gate Behavior Inputs Output A (INT 4) B (INT 5) 0 0 0 1 1 0 1 1 X (LINE 10) Exercise 15 Karnaugh Maps Introduction Karnaugh maps are used to simplify Boolean expressions. Their main advantage is that an expression can always be reduced to its simplest form. Their main drawback is that they are limited to simplifying expressions with five or less input variables. Objectives Learn to simplify a Boolean expression using the Karnaugh maps, and verify it with the NI ELVIS II. Parts List - 4 74LS08D AND gate IC 3 74LS32D OR gate IC 3 74LS04D NOT gate IC Part 1 1. Table 15-1 corresponds to the True/False table of a given logic circuit. Using the data in that Table to fill in all the blank cells in the Karnaugh map with an output “X” that corresponds to the combination of input variables represented by that cell. Table 15-1. True/False Table A B C X 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 2. Use the following rules to group all cells containing a "1": - Each cell with "1" must form part of at least one group. Cells with "1" can appear in more than one group. - The cells in each group must be either horizontally or vertically next to each other (they cannot be grouped along diagonal lines). - The shape of a group must be basically rectangular. - The number of cells in each group must be a value to the power of 2, so that each group can contain 1 cell, 2 cells, 4 cells, etc. - Each group should have the largest number of "1" cells possible. - In order to obtain the final simplified expression, copy the variables that do not cancel each other out for each group. The variable groups will be added in a Boolean expression. - For this example, the final expression will be the following: Part 2 3. Use the NI ELVIS II to set up the illustrated circuit with logic gates. A, B and C inputs will be connected to the DigOut (Digital writer) on lines 2, 1 and 0, respectively. Output X will be connected to line 8 on the DigIn (Digital reader). On the DigOut (Digital writer), when the switches are moved to HI, this gives a logic 1, and when they are moved to LO, this gives a logic 0. Activate the DigOut (Digital writer) switches following the True/False Table shown in Table 15-2 and write the results in that same table. Table 15-2. True/False Table for Output X Inputs Output A (INT 2) B (INT 1) C (INT 0) 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 X (LINE 8) 4. Obtain the resulting "X" expression using Boolean algebra. 5. Simplify expression "X" using Karnaugh maps. 6. Set up the simplified expression "X" on the NI ELVIS II. 7. Activate the DigOut (Digital writer) switches following the True/False Table shown in Table 15-3 and write the results in that same table. Table 15-3. True/False Table for Output X Inputs Output A (INT 2) B (INT 1) C (INT 0) 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 X (LINE 8) Questions 1. Are Tables 15-2 and 15-3 equal? Explain. 2. Which of the two circuits previously assembled uses fewer resources? Exercise 16 Flip Flops Introduction A Flip-Flop is a digital circuit that can store data (memory). It is made up of a set of logic gates in which the outputs provide a feedback to the inputs in order to maintain a given state. A Flip-Flop has two outputs, generally known as . These outputs are inverse to each other, therefore it has two permissible states of operation. In addition, it may have one or more inputs, used to allow the Flip-Flop to perform forward or backward transitions between its two possible output modes. Its inputs only need to receive a momentary pulse to change the output state and then they will remain set in the new mode. There are several types of Flip-Flops, such as: - S-R (Set-Reset) Clock-synchronized J-K Clock-synchronized D T Objectives Understand the principles of operation of Flip-Flops Parts List - 2 74LS00D NAND gate IC 2 74LS02D NOR gate IC 1 7404N NOT gate IC 2 7476N Flip-Flop IC Part 1. S-R Flip-Flop 1. Use the NI ELVIS II to set up the circuit shown in the following illustration. This circuit corresponds to two S-R Flip-Flops: one with NAND gates and the other with NOR gates. 2. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following instruments: - DigIn (Digital reader) - DigOut (Digital writer) The Flip-Flop with NAND gates has its two inputs connected to lines 0 (SET) and 1 (RESET) of the DigOut (Digital writer) and its two outputs are connected to lines 8 (Q) and 9 (Ǭ) of the DigIn (Digital reader). The Flip-Flop with NOR gates has its two inputs connected to lines 2 (SET) and 3 (RESET) of the DigOut (Digital writer) and its two outputs are connected to lines 10 (Q) and 11 (Ǭ) of the DigIn (Digital reader). On the DigOut (Digital writer), when the switches are moved to HI, this gives a logic 1, and when they are moved to LO, this gives a logic 0. 3. Check the Flip-Flop's True/False Table and write the results in Tables 16-1 and 162. Table 16-1. S-R (NAND) Flip-Flop Behavior Inputs Outputs SET (INT 0) RESET (INT 1) 0 0 0 1 1 0 1 1 Q (LINE 8) Ǭ (LINE 9) Table 16-2. S-R (NOR) Flip-Flop Behavior Inputs Outputs SET (INT 2) RESET (INT 3) 0 0 0 1 1 0 1 1 Q (LINE 10) Ǭ (LINE 11) Part 2. J-K Flip-Flop 4. Use the NI ELVIS II to set up the circuit shown in the following illustration. The J-K Flip-Flop has its five inputs connected to lines 0 (PRE), 1 (CLR), 2 (J), 3 (K) and 4 (CLK) of the DigOut (Digital writer) and its two outputs are connected to lines 8 (Q) and 9 (Ǭ) of the DigIn (Digital reader). 5. Check the True/False Table for this Flip-Flop and write the results in Table 16-3. Table 16-3. J-K Flip-Flop Behavior (X = disregard) PRE CLR J K CLK 1 0 X X X 0 1 X X X 1 1 0 0 ↓ 1 1 0 1 ↓ 1 1 1 0 ↓ 1 1 1 1 ↓ Q Ǭ Description Part 3. D Flip-Flop 6. Use the NI ELVIS II to set up the circuit shown in the following illustration. The D Flip-Flop has four inputs connected to lines 0 (PRE), 1 (CLR), 2 (J) and 4 (CLK) of the DigOut (Digital writer) and its two outputs are connected to lines 8 (Q) and 9 (Ǭ) of the DigIn (Digital reader). 7. Check the True/False Table for this Flip-Flop and write the results in Table 16-3. Table 16-3. D Flip-Flop Behavior (X = disregard) PRE CLR D CLK 1 0 X X 0 1 X X 1 1 0 ↓ 1 1 1 ↓ Q Ǭ Description Exercise 17 Multivibrator Circuits (555) Introduction Circuits capable of generating a square wave are known as Multivibrator circuits. Depending on their operation characteristics, they can be divided into three classes: 1. Astable This is a circuit capable of changing from a lower to a higher state and vice versa, without external intervention. When connected, it automatically starts its cycle, staying in a low state for a given time, then changing to a higher state, where it stays also for a given time. It has an active cycle of approximately 50%. 2. Bistable This circuit requires an external pulse to change states and it can remain in a given state indefinitely, until it receives that external pulse. Flip-Flops are an example, given that they need the application of an external pulse to their inputs in order to change state. 3. Monostable This circuit requires an external pulse to change state. After some time, it returns to its original state. This circuit is generally known as a "Timer." Objectives Verify the 555 timer operation as an astable and monostable multivibrator. Parts List - LM555 IC 2 1 kΩ resistors 1 2.7 kΩ resistor 1 10 kΩ resistor 1 100 kΩ resistor 8. Part 1. Astable Multivibrator 9. Use the Astable Multivibrator formulas to calculate the values of TH, TL, T and f for the following circuit. 10. Set up the circuit illustrated above on the NI ELVIS II. 11. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following instruments: - SCOPE (Oscilloscope) 12. Using the oscilloscope cursors, measure the TH, TL, T and f parameters. 13. Complete Table 17-1 Table 17-1 TH TL T f Theoretical Actual 14. Verify how the frequency and the work cycle change when R1 is replaced by 10 kΩ and by 100 kΩ, and then complete the following Table. Table 17-2 R1 1k 10 k 100 k TH TL T f 10. Use the cursors to verify that the TH and TL periods coincide with the periods 15. Change the 1000-µF C1 capacitor for a 47 µF capacitor and calculate TL and TH times, period (T) and frequency (F). Write the results in Table 17-3 16. Change the 47-µF C1 capacitor for a 1 µF capacitor and calculate TL and TH times, period (T) and frequency (F). Write the results in Table 17-3 17. Change the 1-kΩ R1 resistor for a 2.74 kΩ resistor; change the 1-kΩ R2 resistor for a 2.74 kΩ resistor and calculate TL and TH times, period (T) and frequency (F). Write the results in Table 17-4 18. Change the 2.74-kΩ R2 resistor for a 4.7 kΩ resistor and calculate TL and TH times, period (T) and frequency (F). Write the results in Table 17-4 19. Change the 2.74-kΩ R2 resistor for a 10 kΩ resistor and calculate TL and TH times, period (T) and frequency (F). Write the results in Table 17-4 20. Change the 10-kΩ R2 resistor for a 47 kΩ resistor and calculate TL and TH times, period (T) and frequency (F). Write the results in Table 17-4 21. Change the 47-kΩ R2 resistor for a 100 kΩ resistor and calculate TL and TH times, period (T) and frequency (F). Write the results in Table 17-4 Table 17-3. Period and frequency calculated for different capacitor values Capacitor (µF) C1 (µF) 1000 47 1 Resistors R1 (Ω) R2 (Ω) Times TL (ms) TH (ms) Period Frequency T (ms) F (Hz) Table 17-4. Period and frequency calculated for different resistance values Measured times Resistors R2 (kΩ) R1 (kΩ) 2.74 4.7 10 47 100 2.74 2.74 2.74 2.74 2.74 TL (ms) TH (ms) Period Frequency T (ms) F (Hz) Part 2. Monostable Multivibrator 18. Calculate time TH for the illustrated circuit. Write the results in Table 17-4 19. Change the 1000-µF C1 capacitor for a 47 µF capacitor and calculate time TH. Write the results in Table 17-4 20. Change the 47-µF C1 capacitor for a 1 µF capacitor and calculate time TH. Write the results in Table 17-4 21. Change the 1-µF capacitor for a 1000-µF capacitor and change the 1-kΩ R 1 resistor for a 2.74-kΩ resistor, and calculate time TH. Write the results in Table 17-4 22. Change the 2.74-kΩ R2 resistor for a 4.7-kΩ resistor, and calculate time TH. Write the results in Table 17-4 23. Change the 4.7-kΩ R2 resistor for a 10-kΩ resistor, and calculate time TH. Write the results in Table 17-4 Table 17-5. Time (TH) calculated and measured for different capacitor values Capacitor (µF) Calculated Time Measured Time C1 (µF) TH (ms) TH (ms) 1000 47 1 Table 17-6. Time (TH) calculated and measured for different resistor (R1) values Resistors R1 (kΩ) Measured resistance R2 (kΩ) R1 (kΩ) Calculated Time Measured Time TH (ms) TH (ms) 2.74 4.7 10 Use the NI ELVIS II to set up the circuit above, as shown in the illustration. 24. Turn the ELVIS II on. Using the PC's NI ELVISmx Instrument Launcher, activate the following instrument: - SCOPE (Oscilloscope) 25. Use the oscilloscope to measure the time taken by the pulse (TH) and write it in Table 17-5 26. Change the 1000-µF C1 capacitor for a 47 µF capacitor and measure time TH with the oscilloscope. Write the results in Table 17-5 27. Change the 47-µF C1 capacitor for a 1 µF capacitor and measure time TH with the oscilloscope. Write the results in Table 17-5 28. Change the 1-µF capacitor for a 1000-µF capacitor and change the 1-kΩ R1 resistor for a 2.74-kΩ resistor, and use the oscilloscope to measure time TH. Write the results in Table 17-6 29. Change the 2.74-kΩ R2 resistor for a 4.7-kΩ resistor, and use the oscilloscope to measure time TH. Write the results in Table 17-6 30. Change the 4.7-kΩ R2 resistor for a 10-kΩ resistor, and use the oscilloscope to measure time TH. Write the results in Table 17-6 Questions 1. How does the output (PIN 3) behave capacitance is increased or decreased in an astable multivibrator circuit? 2. How does the output (PIN 3) behave when resistance (R2) is increased or decreased in an astable multivibrator circuit? 3. How does the output (PIN 3) behave when capacitance is increased or decreased in a monostable multivibrator circuit? 4. How does the output (PIN 3) behave when resistance (R1) is increased or decreased in a monostable multivibrator circuit? Exercise 18 Analog-to-Digital Converter (ADC) Introduction An analog to digital converter is a circuit designed to take an analog voltage signal and turn it to a digital signal which will then be sent to be processed by a micro-controller or microprocessor. Analog signal An analog signal is a continuous signal over time; that is, it has a value at every moment in time. Any physical variable may be considered an analog signal, such as: - Voltage Current Position Temperature Pressure Speed Acceleration... In order to process an analog signal, it has to be converted into voltage, then be separated into discrete units and finally digitized. Transducer A transducer is essentially a device that converts any analog signal (temperature, pressure, speed, etc.) into an electric signal (voltage or current). "Transducer" can be used interchangeably with "sensor." Discrete signal A computer cannot process all the possible values of a signal in a given time interval. However, it can take a given number of samples that allow it to represent the signal in a reliable manner. When a signal is only represented by means of a finite amount of samples from an analog signal, it is said to be a discrete signal. To convert a signal into a discrete signal, the signal's voltage range must be divided into quantifiable levels. These quantifiable levels represent the possible voltage levels that the signal might reach after flowing through the ADC. The number of quantifiable levels depends on the resolution of the analog to digital converter, given in bits. In the previous illustration, we can see that the 3-bit ADC has 8 quantifiable levels (red signal). That means that the analog signal can only assume 8 possible values. For example, if the ADC's input signal is 0.5, the output would be 0. If the ADC's input signal was 2.1, the output signal would be 2.5. In that case, any value between 0 and 2.5 would only be represented by these two values. Then, we can say that 2.5 is the minimum detectable change. This minimum detectable change is generally known as LSB (Less Significant Bit). The ADC's minimum detectable change can be calculated using the following formula: Where - Vref+ is the maximum voltage value received by the ADC Vref- is the minimum voltage value received by the ADC n is the resolution, given in a number of bits If we put the 3-bit ADC's values in this formula, we will find that the minimum detectable change is 2.5 V, while for a 6-bit ADC, that value is 312.5 mV Ramp-type A//D Converter The A/D uses a binary counter for the application of digital values to a D/A (calculated D/A) and an operational amplifier that compares the D/A analogue output to the input voltage. When the D/A output is lower than the input voltage, the comparer's output is low. This allows the counter to operate. As soon as the D/A's output is higher than the input voltage, the comparer's output is switched to HIGH and it stops the circuit counter, thus ending the conversion process. Objectives Verify the operation of A/D converters. Parts List - ADC0801 1 10 kΩ potentiometer 1 100 Ω resistor Part 1 1. Use the NI ELVIS II to set up the circuit above, as shown in the illustration. 2. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following instruments: - FGEN (Function Generator) - DMM (Digital multimeter) 3. The ADC uses a clock signal that will be generated using the NI ELVIS II Function Generator. Configure the Function Generator as shown below: 4. A potentiometer between Vref+ and Vref- will be used to regulate the voltage entering the ADC through the Vin terminal. The DMM will be used to measure the DC voltage entering through Vin. A 100-Ω series resistor will be used to prevent short-circuiting the power supply with the potentiometer. 5. When the input voltage value is adjusted using the potentiometer, and checked with the multimeter, the ADC output on the NI ELVIS II LEDs can be observed. Make a – 10 V to 10 V sweep with the potentiometer and complete the following Table. Table 18-1: ADC Behavior 1 Vin [V] -10 -8 -6 -4 -2 0 2 4 6 8 10 Binary ADC Output (LEDs) Decimal Representation Questions 1. Could you say that the ADC shows a linear response? 2. What is the maximum error found in the decimal values of the experiment? Exercise 19 Digital-to-Analog Converter (DAC) Introduction Calculated Digital/Analog (D/A) Converter The calculated binary D/A uses an adding circuit to develop an analog output proportional to the digital input. The output of an operational amplifier with adding circuit can be expressed as: Where V1, V2, V3 and V4 are the values of the four digital input voltages. R1, R2, R3 and R4 are the values of the input resistors subjected to voltage. Rf is the value of the feedback resistance. Given that the adding amplifier's output is negative when the input voltage is positive, an inverter amplifier that changes the negative voltage to a positive voltage is added. Objectives Understand and verify the principles of operation of D/A converters. Parts List - 2 741 operational amplifiers 1 270 kΩ resistor 1 560 kΩ resistor 1 1 MΩ resistor 1 2.2 MΩ resistor ** The listed values are commercial resistors. Ideal values would be 250 kΩ, 500 kΩ, 1 MΩ and 2 MΩ. If desired, combinations of resistors can be used to reach more precise values. Part 1 1. Use the NI ELVIS II to set up the circuit shown in the illustration. Make sure that the integrated circuits receive their power from the +15 V and -15 V power supply. 2. Turn on the NI ELVIS II, open the NI ELVISmx Instrument Launcher and use the following instruments: DMM (Digital multimeter) DigOut (Digital writer) The circuit's inputs are DIO 1, DIO 2, DIO 3, DIO4 (MSB) of the DigOut (Digital writer) and its output is connected to the DMM (Digital multimeter). When the switches on the DigOut (Digital writer) are moved to HI, this gives a logic 1 (5 V), and when they are moved to LO, this gives a logic 0 (0 V). Check the True/False Table for the D/A converter and write the DMM results in Table 27-1 below. Table 19-1. D/A Converter Behavior DIO4 DIO 3 DIO 2 DIO 0 (LSB) 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 DMM Voltage 3. Stop the process and change the pattern of the DigOut (Digital reader) to Ramp (0255). 4. Check the signal with the oscilloscope. Questions 1. What is the resolution of the D/A circuit used in the previous exercise? 2. How does the output behave when we use the combination ramp on the digital outputs? 3. What other types of D/A are there? Bibliography [1] BOYLESTAD, Robert L. "Teoría de Circuitos y Dispositivos Electrónicos". Edit. PEARSON EDUCACIÓN, Mexico 2003