Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
university:courses:alm1k:alm-lab-4s [22 May 2016 20:25] – [Switches in Series:] Doug Merceruniversity:courses:alm1k:alm-lab-4s [03 Nov 2021 20:32] (current) – [Activity: BJT device as a switch] Doug Mercer
Line 1: Line 1:
-======Activity 4S: BJT device as a switch======+======Activity: BJT device as a switch, For ADALM1000======
  
 =====Objective:===== =====Objective:=====
Line 76: Line 76:
 Calculate the ß when Q<sub>1</sub> is saturated. How does this value compare to the spec listed in the datasheet? Calculate the ß when Q<sub>1</sub> is saturated. How does this value compare to the spec listed in the datasheet?
  
-=====Switches in Parallel:=====+====Switches in Parallel:====
  
-Two NPN transistors can be connected with their collectors and emitters in parallel, figure3, which provides a way to switch on the load from two different signals. Either input can turn on the load but both need to be off for the load to be off. This is referred to as an “OR” function.+Two NPN transistors can be connected with their collectors and emitters in parallel, figure3, which provides a way to switch on the load from two different signals. Either input can turn on the load but both need to be off for the load to be off. This is referred to as an “OR” logic function.
  
 {{ :university:courses:alm1k:alm_lab4s_f3.png?600 |}} {{ :university:courses:alm1k:alm_lab4s_f3.png?600 |}}
Line 86: Line 86:
 Modify the circuit on your breadboard to look like figure 3. Add a second NPN transistor, Q<sub>2</sub>, and second base resistor, R<sub>B2</sub>, as shown. Now connect the other ends of R<sub>B1</sub> and R<sub>B2</sub> to the digital I/O port pins PIO 0 and PIO 1 respectively. Open the digital control window and set PIO 0 and PIO 1 to all four combinations of logic 0 and 1. Note which combinations turn on the LED. The voltage on the LED and collector resistor can be monitored with the CHB scope input as before. Modify the circuit on your breadboard to look like figure 3. Add a second NPN transistor, Q<sub>2</sub>, and second base resistor, R<sub>B2</sub>, as shown. Now connect the other ends of R<sub>B1</sub> and R<sub>B2</sub> to the digital I/O port pins PIO 0 and PIO 1 respectively. Open the digital control window and set PIO 0 and PIO 1 to all four combinations of logic 0 and 1. Note which combinations turn on the LED. The voltage on the LED and collector resistor can be monitored with the CHB scope input as before.
  
-=====Switches in Series:=====+====Switches in Series:====
  
-Two NPN transistors can be connected in series with the collector of the lower transistor connected to the emitter of the upper transistor, figure 4, which provides a way to switch off the load from two different signals. Either input can turn off the load but both need to be on for the load to be on. This is referred to as an “AND” function.+Two NPN transistors can be connected in series with the collector of the lower transistor connected to the emitter of the upper transistor, figure 4, which provides a way to switch off the load from two different signals. Either input can turn off the load but both need to be on for the load to be on. This is referred to as an “AND” logic function.
  
 {{ :university:courses:alm1k:alm_lab4s_f4.png?500 |}} {{ :university:courses:alm1k:alm_lab4s_f4.png?500 |}}
Line 95: Line 95:
  
 Modify the circuit on your breadboard to look like figure 4. Now the second NPN transistor is in series with the emitter of Q<sub>1</sub>. Again the other ends of R<sub>B1</sub> and R<sub>B2</sub> are connected to the digital I/O port pins PIO 0 and PIO 1 respectively. Again, set PIO 0 and PIO 1 to all four combinations of logic 0 and 1. Note which combinations turn on the LED. The voltage on the LED and collector resistor can be monitored with the CHB scope input as before. You should also measure the voltage at the connection between the emitter of Q<sub>1</sub> and the collector of Q<sub>2</sub> for each of the four conditions. Comment on the voltages seen at the collector of Q<sub>2</sub> in your lab report and why. Modify the circuit on your breadboard to look like figure 4. Now the second NPN transistor is in series with the emitter of Q<sub>1</sub>. Again the other ends of R<sub>B1</sub> and R<sub>B2</sub> are connected to the digital I/O port pins PIO 0 and PIO 1 respectively. Again, set PIO 0 and PIO 1 to all four combinations of logic 0 and 1. Note which combinations turn on the LED. The voltage on the LED and collector resistor can be monitored with the CHB scope input as before. You should also measure the voltage at the connection between the emitter of Q<sub>1</sub> and the collector of Q<sub>2</sub> for each of the four conditions. Comment on the voltages seen at the collector of Q<sub>2</sub> in your lab report and why.
 +
 +====BJT Transistor Realization of an XNOR gate====
 +
 +The single transistor inverter stage along with multiple input resistors can be combined to create more complex logic functions. The configuration shown in figure 5 realizes a two input exclusive NOR (XNOR) logic function. You will need a total of 5 NPN transistors, 13 resistors and one LED.
 + 
 +The resistors used as inputs at the bases of the 5 NPN transistors are not all the same value and they in theory should all be the same value. But a range of values will still work given the relatively high beta of the 2N3904 transistors and the values shown were chosen so as to not need more than the 5 of any one value supplied in the Analog Parts Kit. You can experiment with other resistor values to find what the range of minimum and maximum values is.
 +
 +{{ :university:courses:alm1k:alm_lab4s_f5.png?600 |}}
 +
 +<WRAP centeralign>Figure 5, Resistor and NPN transistor XNOR gate.</WRAP>
 +
 +Again, set PIO 0 and PIO 1 to all four combinations of logic 0 and 1. Note which combinations turn on the LED. The voltage at the LED and Q<sub>5</sub> collector resistor can be monitored with the CH-B scope input as before. You can also use the CH-B ( and / or CH-A ) input to monitor the voltages at the collectors of Q<sub>1</sub> – Q<sub>4</sub> as you change PIO 0 and 1.
 +
 +**Resources:**
 +
 +  * LTSpice files: [[downgit>education_tools/tree/master/m1k/ltspice/bjt_as_switch_ltspice | bjt_as_switch_ltspice ]]
 +  * Fritzing files: [[downgit>education_tools/tree/master/m1k/fritzing/bjt_as_switch_bb | bjt_as_switch_bb]]
  
 **For Further Reading:** **For Further Reading:**
  
-http://en.wikipedia.org/wiki/Transistor\\ +[[wp>Transistor|Transistor]]\\ 
-https://en.wikipedia.org/wiki/Light-emitting_diode\\ +[[wp>Light-emitting_diode|Light- emitting diode]]\\ 
-https://en.wikipedia.org/wiki/LED_circuit+[[wp>LED_circuit|LED circuit]]
  
-**Return to ALM Lab Activity [[university:courses:alm1k:alm-labs-list|Table of Contents]].**+**Return to [[university:labs:intro_ee|Introduction to Electrical Engineering]] Lab Activity Table of Contents**\\ 
 +**Return to [[university:courses:alm1k:alm_circuits_lab_outline|Circuits]] Lab Activity Table of Contents**\\ 
 +**Return to Electronics Lab Activity [[university:courses:alm1k:alm-labs-list|Table of Contents]].**
  
university/courses/alm1k/alm-lab-4s.1463941518.txt.gz · Last modified: 22 May 2016 20:25 by Doug Mercer