Track Your UV Exposure In Real Time With This DIY Meter

Know when you’ve had enough sun before you get burned

While editing an article about skin cancer early in my career, I learned many not-so-cheerful facts about how ultraviolet light causes molecular disruptions in DNA—how the damage is typically incurred early in life, and how people are particularly susceptible when they live closer to the equator than their forebears, as I do. Since then, I’ve tended to avoid the sun rather than revel in it. Now, however, with a little bit of home-brewed technological help, I have a device that lets me get the major benefit of solar rays without worrying about ill effects.

The impetus for revisiting my long-standing aversion to the sun was reading about a small-scale study in Spain of patients admitted to a hospital for COVID-19. They were randomly divided into two groups, one of which was administered calcifediol, a prehormone the body normally produces from vitamin D. Of the people in that group, only 2 percent deteriorated to the point of needing intensive care. For those who were not given calcifediol, 50 percent ended up in the ICU.

Doctors have found other evidence, too, that vitamin D might help to protect against COVID. Vitamin D also keeps bones strong, and deficiencies in vitamin D are associated with various diseases, including schizophrenia. While people can get vitamin D from the food they eat, a major source is its synthesis in the skin when exposed to sufficient amounts of ultraviolet light. So, when it comes to getting out in the sun, it seems that you’re damned if you do and damned if you don’t.

In an effort to seek the right balance, I hunted for guidance about how much sun would be enough but not too much. A lot of what I read was hopelessly vague, but I eventually stumbled on a scholarly article by Richard L. McKenzie and others that provided concrete guidance. The article told me that, as you might expect, your chance of skin damage scales up with the intensity of UV radiation and duration of exposure, factors that also raise your ability to produce vitamin D. But it also said you can reduce the UV intensity and duration needed to produce the required amount of vitamin D simply by exposing more skin area.

Just walking the dog in my skivvies didn’t seem a reasonable strategy, though. I figured I needed a quantitative—and portable—way to gauge whether I was getting enough sunlight to produce a healthy amount of vitamin D without getting burned. While you can find generalized charts that provide estimates of what is called the UV index for your latitude at different times of the day and year, I wanted to know exactly what the prevailing UV index was as I moved in and out of shadows and clouds passed overhead.

The solution involved a US $7.50 UV-sensor board I bought from SparkFun. It measures both UV-A and UV-B radiation (although only the latter wavelength range is involved in the production of vitamin D). I wired this sensor to an $18 Arduino Pro Micro, which integrated the sensor readings to measure my total exposure. A diminutive $10 graphical display connected to the Pro Micro shows at a glance when I’ve likely taken in enough sunlight to get my daily dose of vitamin D and when my exposure might be approaching the danger level. [READ MORE]