Introduction
I love wild camping. I've been doing it for fifteen years, and I also love finding new ways to experience and connect with nature. So when an opportunity came up in my busy schedule for a two-night wild camp to watch the partial (90%) solar eclipse, I naturally started wondering - could I capture it in some way?
I had an M5Stack Cardputer that had been sitting on my desk for a while, waiting for a project, along with an I²C temperature, humidity and pressure sensor. But as an eclipse is inherently a visual phenomenon, measuring light seemed much more fitting. Unfortunately, I didn't have a light sensor, and there wasn't enough time before the trip to get one delivered. So I raided my parts bin and found an LDR...
Making an LDR Work
Being primarily an I²C device, the Cardputer doesn't conveniently expose an analogue input that I could connect an LDR to through a simple voltage divider. I did, however, have a handful of ATtiny85s in my parts bin.
So I had the idea of using one of those instead. The ATtiny85 could read the analogue voltage from the LDR circuit, then pass the resulting light value to the Cardputer over I²C.
I prototyped a small circuit on a breadboard - I'd planned to transfer this onto veroboard but ran out of time so I kept it as is. I left a long lead on it to enable me to choose the best position for the sensor.
I used an Arduino Uno to programme the ATtiny85 and, after an evening's coding and one small mishap involving a chip seated the wrong way around, got the two devices talking.
The ATtiny85 measured the voltage from the LDR circuit and converted it to a single-byte value (0–255), which it sent to the Cardputer over I²C. The Cardputer then timestamped each reading and logged it to a CSV file on its SD card.
I didn't have any useful specifications for the LDR, so choosing the resistor for the voltage divider was by trial and error. I tried several values and looked at the range produced between my approximate versions of "dark" (thumb over the sensor) and "bright" (phone torch pointed directly at it). Once I had a useful spread of values across the 0–255 range, that was good enough for the experiment. As I was looking to observe 'relative changes in light level' I didn't do any kind of calibration or conversion to anything like 'lux'.

The Logger
I programmed the Cardputer using the Arduino IDE. At power-on it prompts me to enter the date and time, followed by the sampling interval. From then on it takes a reading from all four sensors at each interval and writes them to a timestamped CSV file on the SD card.
The idea was to keep it simple - set it up at the start of the experiment, leave it running, and come back for the sweet sweet data afterwards.
Into the wild
I headed out into the Dark Peak, with a forecast of hot weather and clear skies. After spending some time rehydrating after the hike in, I climbed to the top of the nearest hill and hunted around for somewhere to deploy the logger.
I found a fence post in an ideal location and secured the light sensor on top, pointing directly upwards at the sky. I suspended the Cardputer and the other sensors underneath with a length of paracord, keeping them out of direct sunlight.
I set the Cardputer to take a sample every 60 seconds, started the logger and then left it alone to do its job while I watched the eclipse.

The Eclipse
The eclipse itself was a surreal experience, watching the Moon slowly take a bite out of our nearest star. At 19:10, at its peak, the light had a strange quality to it, casting an odd glow across the trees.
A quick glance at the Cardputer's screen showed a much lower light-level reading, which was reassuring, although I'd have to wait until I got home the following day and plotted the CSV data to really know how well it had performed.
Satisfied, I carefully packed up my equipment and retired for a rehydrated salmon pasta and to watch the Perseid meteor...
Read more »
Tom Green
jaromir.sukuba
Marek
Mayke
Andrew Sowa