EECE 211L: Photocell and Op-Amp Comparator - LT Spice Simulation - Report Writing Engineering Assignment Help

Download Solution Order New Solution
Assignment Task

Introduction:  

• The output of this circuit is connected to an LED which indicates whether the intensity  of light in an area is above or below some threshold. The light level is detected by a  cadmium sulfide (CdS) photocell which has a variable resistance according to the  amount of light reaching its surface. Typical values for the resistance in direct sunlight  can be as low as a few hundred ohms while the resistance in complete darkness can be  over 10 mega-ohms. Photocells have no polarity and can be placed in a circuit the same  way as resistors. 

CdS Photocell 

Figure 1: CdS Photocell 

• A large variation in resistance values for the same illumination levels exists even within  the same manufactured batch of photocells. For this reason, these devices are only used  to measure large changes in levels of illumination and not to measure the actual  illumination level. We will be observing the output of the comparator under two  different lighting conditions that represent “day” and “night,” and measuring the  photocell resistance under these conditions. 

• Since the photocell’s resistance is a continuously varying analog quantity depending on  the light intensity, we need to use an op-amp as a comparator to ensure that this circuit has only two outputs: 0 volts = day mode, 5 volts = night mode. 

• Op-amps used as comparators have no negative feedback connection and do not  amplify the input signal. Rather, the voltage levels of two inputs are compared and the  output of the op-amp indicates which input is greater according to the following rules:  

o If VP > VN, VOUT = positive power supply voltage: positive saturation/logic high.

o If VP < VN, VOUT = negative power supply voltage or ground: negative saturation/logic low. 

o If VN is used as a fixed reference voltage (VREF) and VP is allowed to vary, then the  threshold voltage where VOUT changes state will be the value of VN.

• For this lab, we will be using the MCP6004 quad op-amp that was used in Lab 5. The pin  See the datasheet posted on Blackboard for the pin diagram.  

• The op-amp will not work without a power supply so you must connect VDD to +5 V  and VSS to ground. Make sure that you don’t reverse the polarity of the power supply  into the chip, this will destroy it! 

Calculations and Simulations: 

• Perform a .TRAN analysis in LTSpice to simulate the comparator circuit in Figure 2. Use a  subcircuit to implement the LM324 op-amp model in the “LM324.cir” file: see example  posted on Blackboard for details. Connect the positive power supply terminal of the op amp to 5 V and the negative power supply terminal to ground. Run the analysis for 3-5  periods based on a source frequency of 100 Hz and plot waveforms for VSIN and VOUT on  the same graph. Verify that the value of VSIN that causes a change in VOUT is 2.5 V. 

Circuit diagram for LTSpice simulation

• In Figure 3, the inverting input of the MCP6004 op-amp will be used as the reference  voltage (VREF) for the comparator. A voltage divider is being used to produce the  reference voltage. Determine values for R1 and R2 to meet the following two conditions:

o VREF = 2.5 V.  

o Current flowing through R1 and R2 is a maximum of 0.2 mA. Assume iP = iN = 0 A.

• A light-emitting diode (LED) will be used to indicate the output state of the comparator in Figure 3. Calculate the value of ROUT that will give an LED current in the range of 4 mA  to 6 mA, given the following assumptions: 

o Voltage at the output pin of the op-amp = 5 V. 

o Voltage drop across the LED when it is turned on = 1.7 V. 

• Select standard resistor values that will enable you to match your calculated values as  close as possible. You may use combinations of resistors if needed.

Comparator circuit with photocell

Figure 3: Comparator circuit with photocell. 

Lab Experiment: 

• Measure and record the resistance of the photocell in day and night modes. For day  mode, you should perform this measurement in an area that is well-lit. For night mode, you need to decide how the light will be blocked from reaching the photocell. Covering  the photocell with your finger is sufficient to simulate night mode, however the  resistance value will still be much lower than if the photocell was in full darkness. 

• In the circuit in Figure 3, RX forms a second voltage divider with the photocell and the  voltage at VP may be higher or lower than VREF depending on the photocell’s resistance. Based on your measured values for the day and night resistances of the photocell,  calculate the value of RX needed to meet the following conditions: 

o Day mode: VP < VREF with a 1 V safety margin: VP ≈ 1.5 V.  

o Night mode: VP > VREF.  

• Build the circuit shown in Figure 3 and use the DFRobot breadboard power supply to  provide 5 V. Verify proper operation of your photocell circuit by changing the amount of  light reaching the photocell. The LED should be off in day mode (photocell exposed) and on in night mode (photocell covered). Note that LEDs have polarity and current  only flows in one direction. If you reverse the polarity of the LED, it will never light even  if the output of the op-amp is correct. The longer lead is always the positive side. 

Photocell polarity and current direction

Sign-off Requirements: 

• Demonstrate the following to your lab instructor: 

o LTSpice netlist and output graph showing plot of VSIN vs. VOUT for the circuit in  Figure 2. You will not receive credit if schematic entry is used. 

o Physical circuit: demonstrate that the LED comes on when you cover the  photocell and turns off when you uncover the photocell. 

o Design calculations you performed to find the values of the resistors R1, R2, and  ROUT for the circuit in Figure 3. 

o Measured value of photocell resistance in day and night modes and design  calculations to find the value of RX for the circuit in Figure 3. 

• Circuit functionality: LED must indicate day/night mode according to the following  criteria. 

o Photocell exposed: day mode, LED off. 

o Photocell covered: night mode, LED on. 

• Include the following items in your lab summary: 

o Picture of your physical circuit. 

o Screenshots of your LTSpice netlist and plot for VOUT vs. VSIN. 

o Design calculations you performed to find the values of the resistors R1, R2, and  ROUT for the circuit in Figure 3. 

o Measured value of photocell resistance in day and night modes and design  calculations to find the value of RX for the circuit in Figure 3.

 

This EECE 211L: Engineering Assignment has been solved by our Engineering Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.