Sensors

Light: Phototransistor.

A phototransistor conducts more or less current as a function of light level. The signal is just the current times the resistance R. Sensitivity can be changed by changing the value of R in the range 1kOhm - 100kOhm. We have phototransistors that are sensitive in the visible and others sensitive in the near infrared.


Above is the schematic, and a screenshot of a Tinkercad simulation. Link to Tinkercad Simulation.



Light: Photoresistor.

A photoresistor changes its resistance as a function of light. As it receives more light its resistance decreases, and the voltage at the point labeled A0 decreases. Any of the analog inputs A0 - A5, could be used. Here is sample code using this configuration.