Monday 29 July 2019

Twilight Photometer Part 1 - Construction

I'm a big fan of Forest M. Mims III.  Not only has he published some excellent reference books such as his charmingly hand-drawn Engineers Notebook, he very much represents the best of what's possible with Citizen Science. Mimms was one of the first to realise that light-emitting diodes (LEDs) can act as photosensors as well as light emitters and he has created some ingenious applications of this. A lot of what Mims promotes are simple, but rigorous observations. Even such things as measuring the 'temperature' of the sky with an IR thermometer or simply taking a photo in the same place at noon each day, provide a surprising amount of useful data. With simple equipment and careful observations and analysis, Mims shows that we can all do interesting science.

A few years ago he wrote a couple of articles in Make Magazine about Twilight Photometry. These really caught my imagination - the idea that what was essentially an LED pointed into the sky being able to detect aerosol layers tens of kilometres up seemed fascinating.  Of course, the Devil is in the Details and there are some important considerations to get this to work.  It's taken some years to get around to it but I've finally found the time to get started on this project.

The keys parts of the photometer are simple - a circuit to amplify the tiny current created by the LED as it points at the twilight (or dawn) sky. To do this requires a low noise amplifier with a very high gain circuit. This requires resistors in the GΩ range. These are by far and away the most expensive resistors I've ever purchased at $10 each!

Following the schematic in the Make article and Mim's related book, I used KiCad to design and layout a small PCB. The files for this are available on GitHub.

























Mims suggests that the LED, capacitor C2 and resistor R1 should be soldered directly to input,  pin 2 of the TLC271 in order to reduce noise. I'm hoping that because I'm on a "proper" PCB with a ground plane that it will be sufficient to just use the PCB connections as normal. I can always re-engineer it if the noise is a problem.

I followed Mim's suggestion to install everything in a metal enclosure and to make the LED mounted in a removable fitting. In my case, I used a metal 6.5mm phono plug which holds a LED and a piece of brass tubing (with some black heat shrink extension) as a collimator quite nicely.  I've set up both red and infra-red LEDs in phono plugs and these can be swapped out.

Data is collected using an Arduino and the excellent Adafruit Datalogger shield which contains both an SD card and a Real-Time Clock. Like all Adafruit products, it's well documented, robust and well-thought-out. As an interface between the output of the amplifier, I used the 16-Bit, 4 channel ADC also from Adafruit. This is an I2C device, easy to use and seems accurate. Since I'm running everything off 5V (supplied by the Arduino) there's not a lot of voltage range but hopefully, the 16bit ADC (running at 0.0635 mV resolution given the 2V full range setting ) will be sensitive enough.

The code for the Arduino is here. It's pretty straight-forward, several readings are taken for each channel and averaged giving a recording time of about once every second. One notable thing is I added the ability to download the datafiles (YYYYMMDD.CSV)  from the SD card over a serial connection to my laptop which saves constantly having to open up the enclosure and get the SD card out.


Here are some photos of the final enclosure:



Since there are three "unused" channels on the ADC I've added three additional LEDs (each in clear housings) attached to those channels as described in "Atmospheric Monitoring with Arduino". I did a test of various LEDs - using an RGB LED to generate various colours and measuring the response.




The response curves are not ideal as clearly a couple of them are saturating fairly easily but it seemed blue, yellow and red gave the best spread so I've used those. Daylight photometry is kind of tricky since there tends to be shade from ground features and clouds at some time during the day. At the very least I may be able to get some full sunshine measurements around noon for some days of the year.


Finally I decided to add a ground stake to the enclosure to keep electrical interference to a minimum. Here's a picture of it all set up on my deck on the first night I tried it. It's powered by my 'portable' SLA/Solar power box I used for water pumps and the like around the garden - the solar controller has a convenient USB output. You can see I mounted the photometer on a piece of plywood with a levelling mechanism made of some embedded threaded rod and some bolts. The ground stake connection goes off to the right and into the garden.




This was not an ideal night, a little hazy and with some low cloud to the west of us. However, a brief look at the data looks promising - if anything it might currently be too sensitive and need a longer tube over the LED as it was at its max reading until about 10 minutes after sunset but then steadily decreased over the 45 minutes. I'm keen to collect more data but we've had day after day of clouds. Here's hoping for a nice clear frosty morning or evening soon!

Part II will discuss the analysis of the data.






A Proton Precession Magnetometer - Part 1: Overview and Polarisation Coil

 A Proton Precession Magnetometer - Part 1: Overview and Polarisation Coil For some time now I've wanted to add a magnetometer to my wea...