Materials Needed

  1. You will need: A photoresistor, an arduino, an LED, and wires.
  1. For this project, you can only use TinkerCAD, as the Arduino kits do not have any photoresistors.


  1. As the name suggests, a photoresistor is a resistor of some kind, except that it can change resistance. A photoresistor is called a variable resistor, because it’s resistance changes, and in this case, changes depending on the amount of light around.

  1. A photoresistor can be used just like a normal resistor. So, we can connect the LED in series with a resistor.
  1. To do this, we can connect the cathode of the LED to the photoresistor.
  1. Then, the photoresistor connects to the GND of the Arduino so that the cathode side of the LED connects to the GND indirectly.
  1. The anode side of the LED connects to the 5v so that it can receive power.
  1. And that's it, no code required! Just click on the photoresistor and slide the circle around and see what happens.

Explanation of how it works

  1. When there is a lot of light hitting the photoresistor, the resistance drops, and so, the current increases throughout the circuit.
  1. This makes the LED brighter, as more current is passing through it, doing more work.
  1. When there is less light hitting the photoresistor, there is more resistance, and so current decreases, creating a dimmer LED due to less current passing through it.
  1. This can be used for things like light detectors for example. Photoresistors can be connected to an analog pin, and so, if there is a lot of voltage, the reading from the analog pin will be higher, indicating more light.
  1. Programming can be used to detect daytime or night time by setting a range of values that indicate daytime when the value is high enough, or nighttime when the value is low enough.
Last modified 4 months ago Last modified on Jan 9, 2021, 3:38:15 PM

Attachments (1)

Download all attachments as: .zip