Stay Aware of the Current UV Radiation Levels with This Special Amulet

The UV Protection Amulet is a small device that lets the wearer know when the outside ultraviolet radiation levels are too high.

The idea

For some people, merely sitting next to a window can damage their skin and lead to mild sunburn. So rather than lathering up in sunscreen every single day, Tim Alex Jacobs, who runs the site and YouTube channel mitxela, had the idea to make an amulet that his friend could wear to measure her UV exposure throughout the day. In addition to displaying the amount of UVA radiation, it would also show the level of UVB and the overall UV index which could be cycled through by tapping the amulet.

Detecting ultraviolet radiation

To begin the project, Tim first had to figure out how to capture both bands of ultraviolet radiation levels. The sensor he chose was the VEML6075 because it claimed to support detection of both UVA and AVB along with I2C connectivity, all in a small surface-mount package. But as Tim would later discover, this sensor lacked adequate documentation and only captured two variants of the UVA spectrum. But due to time constraints, he opted to keep moving forward with the sensor.

Showing the current UV levels

With a way to detect UV light levels, the next step was to build a display so the user can view the data. Tim had initially considered an analog gauge, but due to the extra complexity required, he decided to just have a bank of eight LEDs for showing the level and three other LEDs that indicate the type of measurement: UVA, UVB, and the UV index (UVI). A single ATtiny84 microcontroller in the surface-mount QFN-20 package which was both compact enough to fit on a small PCB and had an ample number of GPIO pins for driving the LEDs and sensor. For user interaction, a simple TTP223 capacitive sensing chip was added to the design that allows a person to tap a center copper pad and switch between the three viewing modes. Lastly, a CR2032 3V coin cell battery powers the whole device.

PCB design

As one might expect, coming up with a PCB that was both compact and easy to solder by hand was no easy task. Tim's design features a circular board that has the bank of eight level LEDs and the three mode indication LEDs opposing each other. On the top half is the ATtiny84 and UV sensor while the bottom half has the TTP223 capacitive touch sensor and a few passive components. The center contains a circular copper pad and the underside has a small spring that the battery rests against for delivering current.

Creating a housing

The housing for this special amulet was hand crafted over many hours from several pieces of metal. A lathe was used to bore out a hole slightly larger in size than a CR2032 coin cell battery from a solid brass rod. Once completed, a few threads were added to the underside that allow for a solid cap to get screwed into place. Finally, the attachment point was added to the top by soft soldering it to avoid discoloring the brass.

Software

Programming the amulet was quite simple. When the TTP223 senses that someone has touched the central copper pad, it sends a signal to the ATtiny84's external interrupt pin that wakes it up from the deepest level of sleep, which helps to greatly conserve battery life. From there, UV values are read from the sensor and used to calculate UVA, UVB, and UVI levels which are then displayed on the LEDs depending on the currently selected mode. After 15 seconds have elapsed, the microcontroller is put back to sleep until reawakened at a later time. You can view the code for this project here on GitHub.

Final assembly and testing

After finishing the software and the PCB, Tim added some final touches to the amulet housing by covering the surface in electrostatic gold plating and then polishing it to give the amulet a nice shine. The assembled PCB was dropped into place and soft soldered to the housing which connects it to the battery's ground terminal and helps to hold it in place. You can view Tim's excellent build log and demonstration video here on YouTube to see the amulet working just as intended.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles