Skip to main content

Subsection 14.2.2 Part 2: Part 1 of Lab 8, Technical Study of Photocells

We’ll now give you some time to work through Part 1 of Lab 8, where you will go deeper into the datasheet.
Figure 14.2.7. Lab 8’s Figure 1, the photocell voltage divider: \(R_1\) is the photocell, \(R_2\) the fixed resistor, and \(V_1\) the node.

Activity 14.2.2. Part 1 of Lab 8: Technical Study of Photocells.

(b)

Deliverable 2. Using your multimeter and a flashlight, record the dark resistance and illuminated resistance for \(R_1\text{.}\)

(d)

Deliverable 4. It is recommended that the value of \(R_2\) be set as the geometric mean of \(R_\text{dark}\) and \(R_\text{illuminated}\text{,}\) i.e. \(R_2 = \sqrt{R_\text{dark} \times R_\text{illuminated}}\text{.}\) Based on the values you measured, compute \(R_2\text{.}\)

(e)

Deliverable 5. Recall that the equation for the voltage divider in Lab 8’s Figure 1 is \(V_1/V_{cc} = R_2/(R_1 + R_2)\text{.}\) Using the values you measured, roughly what are the voltages that you would expect to see at \(V_1\) when the sensor is illuminated and when the sensor is dark, assuming \(V_{cc} = 3.3\) V?

(f)

Deliverable 6. You are limited by the discrete resistor values made available for your use in the laboratory, so you might not have the exact value you calculated. Assume that you have a 10 kΩ resistor available to you. Repeat the calculations from the previous deliverable. Is using a 10 kΩ going to be a problem?
When you move on to the two-channel program, take the potentiometer off the breadboard first, with nothing powered: its channel, A0 (PA0), is where the first photocell’s divider goes, and A1 (PA1) is where the second photocell’s divider goes.
Figure 14.2.9. Lab 8’s Figure 2, the two photocell dividers on the breadboard. The Nucleo’s 3.3 V and GND feed the two rails. Each divider is a photocell from the 3.3 V rail to a node row and a 10 kΩ resistor from that row to the ground rail; one node goes to A0 (PA0) and the other to A1 (PA1).

Activity 14.2.3. Technical Study of Photocells, continued.

Wire the two photosensors and 10 kΩ resistors on your breadboard as shown in Lab 8’s Figure 2.

(a)

Write a program to measure the two sensor voltages and print them on your screen. This should be an easy two-channel modification of the earlier A/D + potentiometer program. A one-second sampling period is fine.

(b)

Deliverable 7. Also wire the sensor voltages to analog channels 1 and 2 of the AD2, to display the voltages with Waveforms’ voltmeter function. Do your measured values for each channel fall within the expected range you calculated earlier?

(c)

Deliverable 8. Slowly sweep a flashlight beam (the one on your phone is fine) across the two sensors and observe how the voltages change. Note the maximum and minimum voltages. How do they compare to your theoretical maximum and minimum voltages?