For Experiment 6, the familiar phototransistor is part of the circuit. As the light on the phototransistor changes, so does the voltage value felt on pin 5 of the ML339. A 5k trimmer (potentiometer) is used to "dial in" a test voltage (called the Reference Voltage) that is felt on pin 4. If the voltage on pin 5 is greater than the voltage on pin 4, the output pin (2) provides enough voltage to an LED to light up. Pretty cool!
Here's the video...
After you've built the circuit, you can tweak the 5k trimmer a bit until you get some flickering of the LED. You really need to see this in action, because it will help cement your understanding of the "hunting" that the comparator is doing... and the next discussion in Chapter 6 that shows how to prevent this type of thing. What's happening is that with very subtle changes in the light on the phototransistor, the comparator is turning on and off the LED quickly because the tiny changes in voltage are above and below the Reference Voltage. There's your flickering of the LED.
In the next post, I'll share the new circuit with some additional components that will remove this flickering/hunting effect.