Week 9: Design a Night Light

22
Week 9: Design a Night Light The experimental procedure Is not in the lab manual

description

Week 9: Design a Night Light. The experimental procedure Is not in the lab manual. Goal. Design a circuit that cause a green LED to turn on when the intensity of light on a CdS photocell is below a certain value . Eye Response. http://www.soton.ac.uk/~solids/ir_clip_image002.jpg. - PowerPoint PPT Presentation

Transcript of Week 9: Design a Night Light

Page 1: Week  9:   Design a Night Light

Week 9: Design a Night Light

The experimental procedureIs not in the lab manual

Page 2: Week  9:   Design a Night Light

Goal

• Design a circuit that cause a green LED to turn on when the intensity of light on a CdS photocell is below a certain value.

Page 3: Week  9:   Design a Night Light

Eye Response

http://www.soton.ac.uk/~solids/ir_clip_image002.jpg

Page 4: Week  9:   Design a Night Light

Night Vision Vs. In Day Light

Principles of Vision by M. Kalloniatis and C. Luuhttp://www.ncbi.nlm.nih.gov/bookshelf/br.fcgi?book=webvision&part=ch24psych1

Wavelength (nm)

Page 5: Week  9:   Design a Night Light

CdS Photocell

• Light sensitive resistor

http://www.advancedphotonix.com/ap_products/pdfs/PDV-P9203.pdf

Page 6: Week  9:   Design a Night Light

CdS Photocell

http://www.advancedphotonix.com/ap_products/pdfs/PDV-P9203.pdf

The experience last semester was that the CdS photocells didn’t meet the datasheet specifications very well. You will need to measure the dark and illuminated resistance of your photocell to complete your design.

Page 7: Week  9:   Design a Night Light

Voltage Comparator

• An operational amplifier (Op Amp) can be used as a voltage comparator.

Page 8: Week  9:   Design a Night Light

Voltage Comparator

• The output voltage (vo) of the Op Amp switches to some positive voltage (less than V+) when the input voltage on the v+ (or INPUT+) pin is greater than the voltage on the v- (or INPUT-) pin.

• The output voltage (vo) of the Op Amp switches to some negative voltage (~ V_) when the input voltage on the v+ (or INPUT+) pin is less than the voltage on the v- (or INPUT-) pin.

Page 9: Week  9:   Design a Night Light

Modeling the CdS photocell in Pspice

• Use R_var for the CdS photocell to demonstrate the operation of the circuit as the light intensity is varied.– The minimum value of R_var is the resistance of the CdS

photocell measured when it is illuminated.– The maximum value of R_var is the resistance of the CdS

photocell measured when it is in the dark.• Use a resistor when you want to simulate the

operation of your circuit for a particular light intensity.– Assume that the light intensity on the CdS photocell has

decreased by 75%.

Page 10: Week  9:   Design a Night Light

Example: DC Sweep of Vref

Output voltage of the LM324 (voltage marker) will change from V- to V+ when Vref equals the voltage at the - input pin (5V).

LED

The light emitting diode (discrete as well as any one of the LEDs in the 10 segment LED display) is modeled as a battery in series with Dbreak.

A resistor is needed in series to limit the current to 10mA.

This is NOT the circuit that you will construct.

Page 11: Week  9:   Design a Night Light

DC Sweep

• Sweep Variable: Voltage Source• Name: V2• Sweep Type: Linear• Start Value: 0V• End Value: 9V• Increment: ?

Page 12: Week  9:   Design a Night Light

Plot from DC Sweep

There should be a sharp transition as the output of the op amp switches. However, I used an increment of 0.5V. PSpice interpolated between the calculated values for the output voltage of the op amp and the current through Rlimit at Vref = 5V and Vref = 5.5V.

Page 13: Week  9:   Design a Night Light

Nonideal Op Amps

• The output voltage of an ideal Op Amp is either V+ (VPOS) or V- (VNEG).

• The output voltage of a real Op Amp, such as the LM 324, is not quite 9V.– According to the LM324 datasheet, the maximum

output voltage will be 1.5V less than V+, the positive voltage supply powering the op amp.

Page 14: Week  9:   Design a Night Light

LM 324 Quad Op Amp

http://www.national.com/ds/LM/LM124.pdf

Page 15: Week  9:   Design a Night Light

The Notch

The recessed “U” on the DIP (dual inline package) package should be matched with the image when looking down at the package after it has been inserted into the breadboard.

Page 16: Week  9:   Design a Night Light

Light Emitting Diode (LED)

• A nonlinear component that ‘looks’ like a battery when it is on and an open when it is off.

Page 17: Week  9:   Design a Night Light

Discrete LEDs

Page 18: Week  9:   Design a Night Light

Anode vs. Cathode

• Switch your DMM to the diode symbol.• Place the red probe into the V-W plug and the

black probe into the COM plug.• Place your probes across the diode.– If the result is a very small number, then your red

probe is contacting the anode and the black probe is contacting the cathode of the diode.

– If the result is an overload (overflow) condition, then the red probe is contacting the cathode and the black probe is contacting the anode of the diode.

Page 19: Week  9:   Design a Night Light

Simulating a LED in PSpice No LED part in the student PSpice so we use a

series combination of parts.– Dbreak (diode breakout part)• Allows current to flow when the voltage on the anode

is 0.7V higher than the voltage on the cathode.– Vdc• Set to the difference in the voltage needed on the

anode to turn the LED on – The green LEDs need at least 2V to turn on.

Page 20: Week  9:   Design a Night Light

What do you have to design?

• The method used to trigger the change in the output of the Op Amp when the resistance of the CdS photocell increases beyond a specific value.– You will define this resistance based upon your

measurements of the resistance of the CdS photocell.• The resistance used to limit the current through the

green LED when the output of the Op Amp changes.– The current through the LEDs should be designed to be

15mA.• Assume that the green LEDs need 2 V to turn on.

Page 21: Week  9:   Design a Night Light

Pre-Lab Report• The report should be written in Word with images inserted

appropriately. Equations and calculations should be entered using the Equation Editor in Word. The file should be saved as a .pdf before it is uploaded for submission on Scholar.

• The list of what must be included in the report is:– Measurement of the CdS resistance when illuminated and in the dark.– Calculations used to select values of R and Rlimit

– Circuit schematic– PSpice simulation of the circuit that demonstrates that 15 mA flows

through the equivalent of the green LED (DBREAK and the 1.3 V source) when the voltage drop across the photocell is equal to Vref

• Clarity of writing, writing style, and correctness of the information will be graded.

Page 22: Week  9:   Design a Night Light

Post-Validation Report• The report should be written in Word with images inserted

appropriately. Equations and calculations should be entered using the Equation Editor in Word. The file should be saved as a .pdf before it is uploaded for submission on Scholar.

• This report should include the analysis, simulation, and measurements that demonstrate the operation of the night light.– There should be some discussion about the performance of the circuit

with some explanation provided on any deviations in operation from that expected from the results obtained from your analysis or modeling.

• Clarity of writing, writing style, and correctness of the information will be graded.