Voltage Divider
#
Voltage Divider OverviewThe LDR and 100KΩ resistor create a voltage divider, which takes a larger amount of voltage in and outputs a smaller amount. As you just learned, the LDR's resistance depends on the amount of light shining on it.
For the transistor to turn on and allow current to flow from its collector to its emitter. Note that a small amount of current will leak out from its base, but amount alone is not enough to turn on the LED. The LED will only turn on when the transistor is turned on.
With the current flowing through the emitter and collector, the LED gets enough current and illuminates. The 330Ω resistor in the circuit is used to ensure the LED doesn't receive too much current from the transistor and burn out.
The battery supplies 3V to R1 and R2. R1 is the LDR which has a variable resistance based on how much light hits the LDR. R2 is 100KΩ, so we can fill out a bit more for the voltage divider equation.