Light sensor

Read more
The Challenge
Design an internet-connected device that utilizes at least two sensors.
Solution
I created my own temperature and light monitoring system using a breadboard.
Role
Engineer
Industry
Electronics
Timeline
February 2025
Team
Tools
Arduino
Photocel
Temperature sensor
02. Design challenge
How can I design my own temperature sensor and light monitoring system?
03. Understanding currents
Configuring the breadboard
I configured an Arduino breadboard with a temperature sensor(connected to pin A2) and a photocell(connected to pin A3) to send their data to Adafruit IO. In the setup()function, the code starts communication with the computer using Serial.begin()and connects the Arduino to Adafruit IO. In the loop()function, the temperature sensor provides an analog reading, which is converted into a temperature in Celsius and sent to Adafruit IO. Simultaneously, the photocell provides a raw light reading, which is also sent to Adafruit IO. Based on the photocell's value, the code categorizes the light level into one of five categories: "Dark," "Dim," "Light," "Bright," or "Very Bright," and continuously updates the data on Adafruit IO for remote monitoring.

04. Light and temperature data
Collecting data at home
On the afternoon of December 10th, I collected data from my living room window at 30-minute intervals to observe changes in temperature and light levels over time. As expected, the light gradually diminished as the sun set, and the temperature also decreased steadily throughout the afternoon.Going from left to right I collected data from around 2:44pm to 5:44pm.
Light-Feed Graph displays the values collected from the photocell sensor and uploaded to Adafruit IO. Similarly, the Temp-Feed Graph shows the temperature data gathered from the temperature sensor and sent to Adafruit IO.
05. Converting data
Arduino code
I wanted to collect data from a temperature sensor and a photocell, then send the readings to Adafruit IO for remote monitoring. It connects to Adafruit IO, reads the sensor values, converts the temperature reading to Celsius, categorizes the light level, and uploads both sets of data every 60 minutes to allowing real-time tracking of temperature and light conditions.
06. Creating the artwork
Data visualization
I chose to use suns and flames to visually represent the light and temperature data from my sensors. The size of each sun and flame corresponds directly to the respective data value, making it easy to compare the two datasets. Each color represents a different half-hour period, providing a clear and intuitive way to track trends and variations in both temperature and light over time.

07. Connecting engineering and design
Retrospective
For this project, I set out to create an Internet-connected device that would collect data using two sensors: a temperature sensor and a photo/light sensor. The goal was to monitor environmental conditions in my living room for an afternoon, providing valuable insights into the fluctuations of temperature and light levels. I chose to use a temperature sensor and a photo/light sensor because they provided a good balance between simplicity and useful data. The temperature sensor allowed me to monitor the temperature in the room, while the light sensor captured changes in ambient light levels, both of which are essential for understanding the comfort and atmosphere of the space.
I knew that the data collection would need to be regular but not overly frequent, as sending too many data points at once could overwhelm the database and exceed the limits set by platforms like AdafruitIO (which restricts each feed to 30 data points).
To address this, I opted to collect data every 30 minutes.This project gave me a deeper understanding of the practical aspects of working with Internet-connected devices and sensors. By creating a device that collected real-time data and visualized it in a meaningful way, I was able to gain insights into how temperature and light levels.




