Light and Dark Detectors

Below is a pair of simple circuits one uses light to turn on the LED the other uses darkness to turn on the LED.

When the photoresistor (PR) in this circuit is exposed to light the LED turns on. 

The powers supply can range from 6 volts – 14 volts.  The transistor is a NPN 2N222 The leads are from left to right Emitter, Base, And Collector. The value of R1 should adjusted to protect the LED from the supplied voltage. The Value of R2 may be changed slightly to adjust the sensitivity of the circuit. The value show for R2 is 1k and is a good starting point.

This circuit can be used as an input for a Arduino.

When the photoresistor (PR) in this circuit is exposed to darkness the LED turns on. 

The powers supply can range from 6 volts – 14 volts. The transistor is a NPN 2N222 The leads are from left to right Emitter, Base, And Collector. The value of R1 should adjusted to protect the LED from the supplied voltage. The Value of R2 may be changed slightly to adjust the sensitivity of the circuit. The value show for R2 is 2k and is a good starting point.

This circuit can be used to detect a train by placing the photoresistor in the rail bed. When the train covers the sensor the light comes on. A group of this circuit with a latching circuit can be used to control a grade crossing. 

This circuit can also be used as an input for an Arduino.