Building a phosphorescence detector
There's very little written about natural phosphorescence. Let's design a device that can spot it in the wild.
Some time ago, my eldest son decided to make glow-in-the-dark pigments by doping strontium aluminate with rare earth elements. After a bit of trial and error, he succeeded — and the relative simplicity of the process made me wonder if there are any naturally-phosphorescent materials in our homes.
Of course, we’re not surrounded by items that exhibit strong and long-lived phosphorescence. Still, perhaps the effect is too faint or too brief to see with a naked eye? The internet offered no good answers, so I decided to investigate on my own.
Spoiler: the results so far are less exciting than you might be hoping for. Keep reading for the journey, not for the big reveal. In the coming days, I’m planning to update this article with a revised design.
The test chamber
In theory, the idea was simple: place samples in a lightproof container, shine a UV light on them for a while, and then measure any residual glow with a photodiode circuit — as discussed in one of the recent posts.
The main gotcha is the inherent trade-off between sensitivity and response speed. A photodiode with a large active area is more sensitive, but has a high junction capacitance, making it harder to capture short-lived events. In contrast, a small photodiode is fast, but needs more amplification; faint readings are more easily drowned out by noise.
Based on a gut feeling, I decided to go for speed: I figured I want to be able to measure down to a microsecond, so I bought a Marktech MT03-023 photodiode with a 1.2 mm² die and a 20 pF junction capacitance. For the first iteration of the device, I constructed the test chamber from a small tin can, drilling five holes in the lid: one for a photodiode, and four for standard 385 nm UV LEDs (VAOL-5GUV8T4):
I picked this particular photodiode because it has a high sensitivity for its size. In contrast to run-of-the-mill silicon photodiodes, it also boasts better-than-usual response on the blue-green end of the visible spectrum:
The analog path
Regular readers might recall that the bandwidth of operational amplifiers is derated proportionally to the desired amplification. It follows that to measure microsecond-range phosphorescence at the very high gain needed for a photodiode, we need to start with a high-speed amplifier.
In that vein, I scoured my parts bin and picked TLV3541 — a neat if somewhat finicky rail-to-rail op-amp with fGBP = 100 MHz:
The fundamental architecture is the same as outlined in a recent article on photodiodes, so I won’t repeat all the details. In brief, it’s a transimpedance amp that produces an output voltage proportional to diode photocurrent times 220,000 (i.e., 10 µA becomes 2.2 V). There is also a small offset (130 mV) added to keep the op-amp within its nominal I/O range.
With an allowance for parasitics on the input pin, the estimated cutoff frequency of this circuit is:
After the initial amplification, the signal goes through a passive RC lowpass filter. The purpose of the filter section is to further limit op-amp overshoot, radio interference, and thermal noise contributed by the feedback resistor.
Next, the signal is routed to a second stage that adds another 20x gain using a more mellow op-amp (OPA322, fGBP = 20 MHz). The result is then shipped off to a 14-bit, 1 Msps analog-to-digital converter, MCP33151-10:
After ordering the ADC, I noticed that it required an additional 1.8 V supply at about 1 mA. This can be handled with a simple three-terminal linear regulator (MCP1700-1802), adding about $0.50 to the project’s price tag.
Intermission: noise management
Short wires and PCB traces are quite capable of picking up high-frequency radio interference. The resulting tiny voltages and currents usually go unnoticed, especially in digital circuits — but in this particular design, a combination of high gain and high bandwidth is a recipe for pain.
I expected trouble from the get go, so I started with careful supply filtering. As shown earlier, the analog supply (AVdd) is protected with a beefy ferrite bead sandwiched in between bulk capacitors, with additional low-ESR caps directly next to each chip.
In the same vein, I took care to keep all the wires short as feasible to reduce radio pickup. I also connected the photodiode via a twisted pair to make sure that any induced currents would largely cancel out. The lowpass filters, as discussed earlier, were supposed to keep the noise in check too.
I soon found out that these precautions were not enough; I was still getting around 200 mVp-p of noise on the output — or more if I stood near:
To solve the problem, I had to place the amplifier itself in another tin can, soldering both cans together and bonding them to circuit ground, and then routing the photodiode wires within this protected enclosure. The trick worked fine; here’s the resulting waveform:
The trace also shows the output signal has a roughly 1 µs rise and fall time, so the design seemed to be within the original, gut-based design spec.
Digital circuitry
Compared to dealing with high-speed analog signals, the digital side of the circuit is fairly straightforward. I used an AVR Dx series microcontroller running at 24 MHz to talk to the ADC over the serial peripheral interface (SPI). The MCU is also connected to a text-based LCD that follows the common Hitachi HD44780 protocol over an 8-bit parallel bus:
The only other feature of note is a small n-channel MOSFET (2N7000) that controls the UV LEDs. I picked this transistor because it has a low gate capacitance, allowing the LEDs to be turned off nearly instantaneously. Power MOSFETs can have input capacitances measured in nanofarads, so if driven directly by an MCU, they could take unacceptably long to respond.
Correction to the schematic: “33 Ω” resistors should actually be around 68 Ω.
The software side
After some additional testing, I noticed the circuit reacted quickly to lower-amplitude signals, but took a bit longer to fully settle in the wake of high photocurrents. This wasn’t a matter of op-amp slew rate, overload recovery time, or bandwidth; I tracked down the issue later on, but my first instinct was just to compensate for it in software. The calibration step involved briefly strobing the LED and taking a series of measurements to establish the “dark” baseline.
After that, the software turned the LEDs on for a couple of seconds to “charge” the material, turned them off again, and then performed ADC conversions at hardcoded intervals (2 µs, 10 µs, 100 µs, 1 ms, 2 ms, 5 ms, 7 ms, 10 ms, 20 ms).
This process wasn’t conductive to acquiring multiple samples and averaging the values for better accuracy, so I eventually tweaked the algorithm. The new code performed a single full “charging” round, and then started pulsing the LED on and off at high duty cycle: for example, to get the 2 µs average, it repeatedly turned the LED off for 2 µs, performed an ADC conversion, and then turned the diode back on for 1 ms. With such timings, the UV source stayed on 99.8% of the time, so any number of measurements could be made without losing charge.
I tinkered with the averaging method, too. Normal average (arithmetic mean) is easily skewed by individual outlier readings caused by strong pulse-like RFI noise — nearby cell phones, motors, etc. To mitigate this problem, my code records all the ADC acquisitions, sorts the values, and then picks a band of n elements centered around the midpoint of the buffer. The case of n = 1 is the median, but n > 1 can improve resolution at no cost.
The (mildly disappointing) results so far
My first test involved a plastic glow-in-the-dark trinket dyed with zinc sulfide. The measurements are shown below:
Although the object glows in the dark for a good while, the intensity of the effect already decays exponentially on a sub-millisecond scale.
After this, I scoured the kitchen for test materials. I tested a fair amount of condiments, but with the first version of the circuit, I had no meaningful readings on most — even the ones that visibly fluoresce in UV. One of the finds that exhibited pretty strong phosphorescence was powdered milk:
The plot is quite similar to the earlier one, but the effect is about two orders of magnitude weaker; the glow is actually visible with a naked eye, but only in total darkness and only for about a second after hitting the material with a UV beam.
Another unexpected glow-in-the-dark foodstuff? Gelatin! It initially registered about 30% higher than powdered milk, but decayed more quickly.
Elsewhere in the home, in my kids’ mineral collection, an unassuming chip of natural ruby exhibited surprisingly strong phosphorescence — yielding an ADC reading of about 2,000 at the 100 µs mark, then decaying to almost nothing at 20 ms.
Postscript: thoughts for version 2
After completing the project, I wondered if improving the performance of the device would yield more exciting results. For example, according to the internet, some nuts glow in the dark for a brief while — yet an experiment with an oddball jar of almond butter didn’t yield a good reading.
The most obvious tweak would be to add more UV LEDs and parallel several photodiodes — or perhaps even switch to a beefier sensor such as Marktech MT03-02 (10 mm²). That said, I also have misgivings about the software calibration process: I suspect that with some substances, even a brief pulse of UV could trigger enough phosphorescence to shift the “zero” reading and reduce sensitivity.
In the end, to reduce the reliance on software compensation, I spent a fair amount of time debugging the circuit’s relatively slow settling time in the wake of strong photocurrents. I narrowed it to two things:
The PSU voltage was sagging by about 50 mV when the LEDs are turned on, and then took about 200 µs to recover once the illumination is turned off. Because my circuit relied on resistor-based dividers for biasing op-amps, these voltage swings ended up getting amplified by the circuitry. I am solving this with a bandgap reference (MCP1501), although these chips still need some input filtering due to reduced PSRR above 10 kHz.
There is a little-known phenomenon of slower-responding diffusion currents in photodiodes; I spent far too much time debugging this, and posted a standalone article about it here.
My current plan is to revise this write-up with new blueprints and updated results once all this work is done.
For a thematic catalog of articles on electronics, gear-making, and assorted other topics, click here.
In the 1980s I worked for marine biologists who used fluorometers to measure chlorophyll in the open ocean at concentrations of micrograms per litre in seawater. The lab instuments used a photomultiplier tube detector -which was impractical to package for conducting chlorophyll profiles of the water column using an instument package the was to measure down to 200 meters or so. So, the instrument we used made by Sea-Tech which used xenon flash excitation and a large photodiode along with optical filters to limit the excitation band to around 425nm and the receiver band to 685nm. The receiver had a sample and hold/peak detector to capture the received 685nm energy flourescing from any chlorophyll bearing biomass in the water.
It worked but it was noisy. It was difficult to eliminate noise emmitted by the flash circuit, and the sample and hold - not to mention the clumpy nature of chlorophyll bearing criters distributed in the water column.
These were hand built, expensive instruments. I made an attempt to build a cheapo instrument that used blue LEDs as emmitters and a red LED as a detector. The red LED was used as a photo generated current source meant to drive a current-to-frequency converter (Op Amp + 7555 timer chip). Frequency variation was to offer some measure of chlorophyll content. The setup would be calibrated against the lab fluorometer. I never got past a protoype. It sort of worked but was probably not sensitive enough.
I'm sure you know this, but peanut butter phosphoresces (relatively) strongly