What goes Bump in the Night?? Nothing...after we build our own night light! (We will set up power supply with banana plugged jumpers coming out of the power supply – they will need to adjust and connect) Materials & Equipment LDR – Light Detecting Resistor Red LEDs, Jumpers, Wire, Wire Cutters, Breadboard Op-Amp – LM741 – Operational Amplifier, resistors. Digital Multimeter (Metex Universal System MS-9150) Dual DC Power Supply (Shenzhen Mastech DC Power Supply HY3003-3) 1 Lyles College of Engineering, California State University, Fresno Introduction Sensors allow us to interact with the world around us and use the measured physical quantity to our benefit (i.e., digital thermometers, touch screen, voice activated calls, etc.). Today, we will use a sensor that detects light intensity to build a circuit that mimics the night light (i.e., once it gets dark in the room the light will automatically turn on and if the room is well lit the light will go off. The complete circuit that we are going to build is shown in Figure 1 below. Figure 1. Circuit diagram that uses light dependant resistor (sensor) to control the light in the room. Before we attempt to construct the circuit in Figure 1, we should first learn about the basic building blocks that allow us to sense the light and turn on a lamp (or in our case a light emitting diode). Circuit Components: 1. Resistor – a. The night light circuit contains in total five resistors. The symbol for the resistor and the actual component are shown below. Your kit should contain two resistors. Symbol 2 Component Lyles College of Engineering, California State University, Fresno b. The purpose of a resistor is to control the current flow. It turns out that larger the resistance less current will flow and vice versa. c. If you take a look at two resistors that came in your kit, you will notice that they have four distinct color bands. The first three color bands determine the value of the resistor and the fourth band (which can be either silver or gold) determines the tolerance of the resistor. d. In your case, the two resistors will have the same value because both have the same color code. The YELLOW-PURPLE-BROWN color band corresponds to a 470 Ohm resistor and the gold band corresponds to a 5% tolerance. This means that given a box full of 470 Ohm resistors, if you randomly pick one the resistor can range anywhere from 446.5 Ohms to 493.5 Ohms. e. Another way to find a resistor value is to use a Digital Multimeter with the settings set to Ohms (Ω). 2. Light Dependent Resistor (LDR) – has the ability to change the resistance as the light intensity changes (i.e., it is sensing the light). Once part of a complete circuit, the change in the resistance will cause the change in the current flow through the circuit. The change in current flow will allow us to make an action of turning the LIGHT ON/OFF. a. The circuit symbol for the LDR and the actual component are shown below. (Locate the LDR in your kit.) LDR symbol 3 Component Lyles College of Engineering, California State University, Fresno 3. Operational Amplifier (OPAMP) – is the device that can do mathematical operations (add, subtract, multiply, etc.) with electrical signals (currents and voltages). Besides math operations, the amplifier can be also used as a comparator. The circuit symbol and the actual component are shown below. (Locate the OPAMP in you kit.) Circuit symbol Component a. The OPAMP that we will use is LM741. The LM741 amplifier is contained in an 8-pin package. The dot in the left hand corner designates pin 1. (Locate pin 1 on your LM741 amplifier.) b. Pins that we are going to use are pins 2 and 3 (input pins), pins 4 and 7 (power supply pins), and pin 6 (the output pin). c. IMPORTANT! – Pins 4 and 7 are important pins. The amplifier is useless unless it is powered up. Pin 4 connects to a negative DC power supply and Pin 7 connects to a positive DC power supply. 4. Light Emitting Diode (LED) – is going to serve as a light source for our night light circuit. In our circuit we will use two LEDs, yellow and red. The yellow LED will be on during the day time (light intensity is high) and the red LED will turn on when the light intensity drops. a. The circuit symbol for an LED and the actual LED are shown below. + - Circuit symbol 4 + - Component Lyles College of Engineering, California State University, Fresno b. Locate the two LEDs in your kit. You will notice that on lead is longer than the other. This means the placement of an LED in your circuit is important. c. The +/- symbol placements establish the connection between the symbol and the component. This will help you correctly place an LED in your circuit. Finally we are done with the introduction…Let’s build some circuits!!! Test the LDR’s 1. Set Digital Multimeter to read (Ohms). 2. Use banana clip wires to connect one side of the LDR to the black lead of the multimeter and the other side of the LDR to the red lead of the multimeter. There is no directional preference here. 5 Lyles College of Engineering, California State University, Fresno Units 3. Record the resistance (pay attention to the units… ohms (), kilo-ohms (k), or megaohms(M) ) on your work sheet with the LDR uncovered. 4. Cover the LDR with your hand. Record the resistance (again – pay attention to the units!) on your worksheet. What happened to the resistance? How did it change? Did it go up or down as you covered the LDR with your hand? 6 Lyles College of Engineering, California State University, Fresno The Breadboard 1. In order to build our night light we need a blank canvas. Our blank canvas is a breadboard – this is where we create circuits. 2. Figure X below shows a breadboard. The white plastic board has a number of holes or sockets in it. Bus Strips 3. In this laboratory we will be plugging components (resistors, Op AMP, LDR) and wires into those sockets. The components will be connected electrically. 4. For the electrical connections to occur, we have to follow some rules when using a breadboard. 5. The breadboard has numerous rows of sockets separated into two columns by a trough. The trough splits each row of the sockets into two rows of X. Each row of X sockets is electrically connected inside the breadboard. You can use these rows of sockets to connect components together as shown in circuit schematics. 6. The rows are not electrically connected to each other. If you have a component that is plugged into one row it is electrically isolated from the component that is connected on the next row. 7. On each side of the breadboard are two columns of sockets. These are called bus strips. The sockets in one column are all electrically connected. The columns are not electrically connected to each other. In the above Figure, the blocks of sockets are 1 Lyles College of Engineering, California State University, Fresno separated from each other by a blank space. The gap in the marking indicates that the top set and bottom set are electrically isolated from each other. Can you Light up an LED?? Equipment/Materials: 5 Volt DC Power Supply Digital multimeter Breadboard 470 Ohm resistor Red LED Procedure: 1. We are going to build the following circuit. 2. You know how to measure resistance! 3. Remember the +/- leads of the Red LEDs. 4. Your kit should contain two 470 Ohm resistors (the band colors are YELLOW-PURPLEBROWN). For this circuit you will need to use only one. 2 Lyles College of Engineering, California State University, Fresno 5. Just to confirm that you are in possession of 470 Ohm resistor, measure the resistance using Digital Mulimeter with knob set to Ω (Ohms). Document the measured resistance on your work sheet. 6. To construct the circuit shown in Step 1 we will need 5 Volts. 7. For 5 Volts we will use a DC power supply – you can think of this as a variable battery. We are going to use the fixed 5V output on the right side of the power supply. 8. Turn the power supply on by pressing the Orange Power Button. 9. Measure the output of the power supply using a Digital Multimeter. a. For voltage measurement we need to adjust the knob to Volts. Volts 3 Lyles College of Engineering, California State University, Fresno b. Take the multimeter leads and place the red lead on the red side of the power supply and the black lead on the black side of the power supply. The voltage should read 5 Volts. Side Note: Your cell phone requires a battery. (how many v is this?) Which means that all the components inside the cell phone are powered by that XX volts battery. Not every 10. Connect the circuit as shown in the photos below. component takes away a. Step 1 – place a resistor and red LED (pay attention to +/-). The longer lead the same fraction of the should connect to a resistor as shown in this figure. XX voltage. Some will require more and some will require less , however it turns out that those components that complete a loop (similar to our loop with the LED and resistor – where there is no break in the circuit – we go from a terminal and end b. Step 2 – Connect +5 (the red terminal of the power supply) to the resistor. up in a terminal) will add Nothing should happen – the circuit is not complete. up to XX voltage. 4 Lyles College of Engineering, California State University, Fresno c. Step 3 – Finish the loop – Connect the black terminal of the 5V power supply to the shorter side of the LED. You should see the LED light. Where did the 5 Volts go? Who used the 5 Volts? Measure the voltage across your resistor and LED and see if they add up to 5 Volts!! 5 Lyles College of Engineering, California State University, Fresno Steps to Make the Night Light – The night light circuit diagram from Figure 1 is repeated below in Figure 2. The night light circuit performs three distinct operations. The first block (SENSOR CIRCUIT) senses the light intensity in the room. The left branch of the SENSOR CIRCUIT serves as a reference branch and it never changes, while the right branch of the circuit contains the light dependant resistor (LDR) and therefore it will change depending on the light levels in the room. The second block (COMPARATOR) compares the right branch of the sensor circuit to the left branch and makes a decision to turn the RED LED ON if the current flow through the LDR is less than the current flow through the reference branch. On the other hand if the current flow through LDR is greater than the current flow through the reference branch, the YELLOW LED will stay LIT. You are already familiar with the third block (LIGHT). Because the orientation of the LEDs is not the same (and depending on the output of the comparator) the light block will have only one LED lit at the time. Figure 2. Night light circuit diagram. 1 Lyles College of Engineering, California State University, Fresno Shown is the night light circuit constructed on the breadboard. This is what we are going for… Light Comparator Sensor Circuit Let’s build the SENSOR CIRCUIT – 1. You kit already contains an LDR. What is missing in your kit are the three resistors that complete the sensor circuit. The two resistors labeled RX will have the same value. The equation for finding the value of resistor RX is 2. 3. 4. 5. 6. 7. 𝑅𝑥 = √(𝑅𝑠𝑒𝑛𝑠𝑜𝑟(𝑙𝑖𝑔ℎ𝑡) ∗ 𝑅𝑠𝑒𝑛𝑠𝑜𝑟(𝑑𝑎𝑟𝑘) By this point on your worksheet you should have resistor values for Rsensor(light) and Rsensor(dark). Using the calculator and the above equation find the value of RX. Record your result on the worksheet. From the components cabinet select two resistors which have resistor values that are closest to your calculated resistance RX. Use Digital Multimeter (with the knob set to Ohms) to measure the actual resistance of the select RX. Record measured resistances on your worksheet. For resistor R1 use the following equation 𝑅1 = 𝑅𝑠𝑒𝑛𝑠𝑜𝑟(𝑙𝑖𝑔ℎ𝑡) + 500 Ohms 8. Record your result for R1 on the worksheet. 9. From the components cabinet select a single resistor that will serve as R1 and has the value that is closest to your calculated resistance. 2 Lyles College of Engineering, California State University, Fresno 10. Use Digital Multimeter (with the knob set to Ohms) to measure the actual resistance of the selected R1. 11. Record measured resistance on your worksheet. 12. Now you have all the part to construct the SENSOR CIRCUIT. 13. Construct the following circuit using the LDR provided in the kit and resistors obtained in Step 4 and Step 9. (IMPORTANT! The color band for your RX and R1 resistors may be different than what is shown in the figure below.) Rx R1 Rx 3 Lyles College of Engineering, California State University, Fresno Let’s build the COMPARATOR circuit – 1. The LM741 operational amplifier will serve as a comparator. You should already have one in your kit. 2. Construct the circuit shown below. Make sure to place your LM741 opamp correctly (pay attention where Pin 1 is located). 3. The opamp Pins 2 and 3 will serve as the comparator input. 4. The opamp Pin 6 will serve as the comparator output. 5. The opamp Pins 4 and 7 will be supplied -10 V and +10 V, respectively. 2 4 3 Circle designating Pin 1. 6 7 4 Lyles College of Engineering, California State University, Fresno 6. In the circuit below, the connection between SENSOR CIRCUIT and COMPARATOR is made by red and orange wires. Once you complete this step, have lab instructor double check your wiring. Let’s build the LIGHT circuit – 1. You have already built the circuit in the LIGHT section of the night light in the ‘Can you light up an LED’ section of these instructions. 2. This time is slightly different. Pay close attention to the + and – sides of the LEDs as you construct the below circuit. The resistors are both 470 Ohm in value. 3. One side of the LEDs is connected to ground and the other side is connected to the 470 Ohm resistors. Use the terminal buses at the side of the breadboard to connect to a common ground. 5 Lyles College of Engineering, California State University, Fresno Let’s complete this circuit! Complete circuit – before we proceed with powering up our night light, have lab instructor check your complete circuit. GROUND - 10V VVVV + 10V V 6 Lyles College of Engineering, California State University, Fresno 1. Adjust the Voltage knob on the right side (MASTER) of the power supply to 10 Volts. Repeat and adjust the voltage knob on the left side (SLAVE) of the power supply to 10 Volts. The display on both sides of the power supply should be 10. 7 Lyles College of Engineering, California State University, Fresno 2. The right side of the power supply is the positive voltage. The left side of the power supply is the negative voltage. 8. Measure the right side of the power supply. a. Multimeter lead Red connect to the Red of the power supply. b. Multimeter lead black connect to the green of the power supply. 8 Lyles College of Engineering, California State University, Fresno 9. Measure the left side of the power supply. a. Connect the red lead to the yellow of the power supply. b. Connect the black lead to the green of the power supply. 10. In both cases, document the voltage readings. 11. Connect the yellow alligator clip to -10 V; connect the green alligator clip to ground; connect the red alligator clip to +10 V. - 10V VVVV GROUND + 10V V 9 Lyles College of Engineering, California State University, Fresno 12. If everything is connected correctly a yellow LED will light up. (If the yellow LED does not light up have lab instructor look at your circuit). 13. If you cover the LDR (or if we turn the lights off in the room) the red LED will light up. 10 Lyles College of Engineering, California State University, Fresno Girls SEE 2010 Turn on a Fan! Equipment List: Temperature Sensor – LM35 NPN222A - Transistor Op-Amp – LM741 – Operational Amplifier LEDs DC Fan Multimeter Dual DC Power Supply Resistors Jumpers Wire Cutters Wire Breadboard 11 Lyles College of Engineering, California State University, Fresno Girls SEE 2010 Convert Celsius to Farenheit Equipment List: Temperature Sensor – LM35 NPN222A - Transistor Op-Amp – LM741 – Operational Amplifier LEDs Multimeter Dual DC Power Supply Resistors Jumpers Wire Cutters Wire Breadboard 12 Lyles College of Engineering, California State University, Fresno