Systems like Home Assistant do tell you if it is day time or night time based on your physical location on the earth, but sometimes it is good to check just how much light you are actually getting on your home. This is typically part of a local weather station that can tell you if the sun is shining or it is overcast.

We will be using a photocell (light dependent resistor) to read the analog value of ambient light outside of your Mini Smart Home.

CdS cells are little light sensors. As the squiggly face is exposed to more light, the resistance goes down. When it's light, the resistance is about ~1KΩ, when dark it goes...
$0.95
In Stock
ΩMG! You're not going to be able to resist these handy resistor packs! Well, axially, they do all of the resisting for you!This is a 25 Pack of 10K...
$0.75
In Stock

One side of the photocell will get connected to 3.3v in the Signal I/O section of the Crickit.

The other side of the photocell should be connected to the Signal 1 pin on the Crickit as well as to a 10K ohm Resistor.

The other end of the Resistor will connect to the GND pin on the Crickit.

I used a Tiny Breadboard to make this connection easy, but there are other ways to build this sensor if you want. Just be sure that the connections are correct.

You may want this to be on the roof of your Mini Smart Home so that you always know if the sun is out or not.

This guide was first published on Oct 02, 2019. It was last updated on Oct 02, 2019.

This page (Light Sensor) was last updated on Oct 15, 2021.

Text editor powered by tinymce.