DIY UVB meter experiment

sghctoma

New Member
Joined
Mar 14, 2018
Messages
17
Location (City and/or State)
Hungary
Hi all!

A month ago @Markw84 and me had a conversation about UVB sensors here: https://tortoiseforum.org/threads/meet-Áfonya-lift-and-mormota.165538/
As a summary: I am on a quest of finding a UVB sensor that is suitable for our purposes, and build a meter around it. Both the software and the hardware will be open source, so if successful, anybody with a bit of soldering skills could build their own. I think it's important to say that I'm not doing this because I don't want to spend money on the Solarmeter (I will anyways, because I need the baseline for the experiments); I just like to build stuff and experiment. That said, if successful, maybe a cheaper option could result in more torts getting adequate UVB light. Yeah, me and my world-changing plans :)

The plan is to find a sensor that has a close enough spectral response to the Solarmeter 6.5, and see if a regression equation could be devised that would calculate the Solarmeter 6.5 value from the output of my meter. This is not something unheard of: the study that resulted in the Ferguson zones (Voluntary Exposure of Some Western-Hemisphere Snake and Lizard Species to Ultraviolet-B Radiation in the Field: How Much Ultraviolet-B Should a Lizard or Snake Receive in Captivity?) used three types of meters (Solarmeter 6.2, Solarmeter 6.4 and Gigahertz-Optik UVB meter), and they too converted them to match the Solarmeter 6.5 UVI reading.

I have found a UVB sensor family (GUVB-xxxx) that has a very similar spectral response to the Solarmeter 6.2 (not the 6.5 sadly, but they are quite close to each other). The following picture shows the spectral responses of those sensors, the Solarmeter 6.2 and 6.5, and the vitamin D3 action spectrum:

graph.png

The data on this picture came from digitizing graphs from the datasheets and from the Solarmeter website. The raw data and the Python script used to create the graph is on GitHub (https://github.com/sghctoma/uvb-sensor-graphs), and the interactive graph is accessible here: http://sghctoma.com:8060/

As you can see, the GUVB-T11GD and GUVB-S11SD are really similar to the Solarmeter 6.2, which gave me hope that this whole thing could work. There are of course a lot of factors that could ruin it. Just to name a few:
  • I don't have any data on how precise the sensors themselves are. It is quite possible that sensors of the same type give different reading under the same conditions.
  • A lot could depend on how precise the surrounding electronics (resistors, operational amplifiers, ADCs, etc.) are. I have tried to pick quality components, but we will see.
  • My biggest concern at this point: the spectrum of various bulbs vary a lot (even between individual pieces of the same type at the same age!), and this may prevent me from devising a universal regression function (remember, the Ferguson study had to deal only with the spectrum of the Sun - albeit that is not exact either).
I plan to build several prototypes (I have 3 T11GD and 5 S11SD sensors), collect readings under various conditions (sunlight, different UVB bulbs), and compare them to the Solarmeter 6.5 readings under the same conditions. The prototypes are designed around the Arduino Nano, the sensor board is basically an Arduino Nano shield, and I will use either an OLED display or serial communication to get the readings.

I am currently waiting on the OLED order, but my PCBs arrived yesterday, and everything else is here. The displays are not an essential part, so I can finally start soldering :) A picture of the sensors and PCBs (from left to right: S11SD, T11GD, and the last one is not a UVB sensor, but an MLX90614 IR thermometer to measure basking spot temperature):

boards.jpg

As I have said earlier, this whole thing will be open source. In fact, it already is: the PCB designs are on my GitHub (https://github.com/sghctoma/terrapi-boards) as KiCAD projects, and released under the MIT licence. I am not an electrical engineer, so it is quite possible that these are not optimal, but I believe they will work.

Let me know what you think of this project, or if you have any questions or suggestions! I will document my progress and the whole experiment in this topic, so you will experience my success of failure at first hand :)
 

Taylor T.

Well-Known Member
5 Year Member
Joined
Jul 22, 2014
Messages
600
Location (City and/or State)
New England
Ambitious! I've never tried building anything this complex programming-wise. I've built RC model airplanes and racing drones, but those don't require much programming. I'll definitely be following this thread in hopes to learn a thing or two.:)
 
Last edited:

sghctoma

New Member
Joined
Mar 14, 2018
Messages
17
Location (City and/or State)
Hungary
Ambitious! I've never tried building anything this complex programming-wise. I've built RC model airplanes and racing drones, but those don't require much programming. I'll definitely be following this thread in hopes to learn a thing or two.:)
The programming part is quite simple here, I just have to read a voltage value from one of the analog pins, and the Arduino makes this really easy. The hard part was learning a lot of electrical engineering stuff, and designing the PCBs. Probably because I've never done that before :)

BTW, I have some quads too, but I don't really like racing, I'm more into LOS flying. If you are interested, here are some of my quads: https://rotorbuilds.com/profile/2598
 

Markw84

Well-Known Member
5 Year Member
Platinum Tortoise Club
Joined
Jan 17, 2012
Messages
4,401
Location (City and/or State)
Sacramento, CA (Central Valley)
I love your experimenting and it will be a great exercise for you. However, for the application of using it to work well with lighting situations for reptiles, you will have many problems.

There are many reasons why the Solarmeter 6.5 is so expensive and no others less expensive meters can work. The filter cap that must be used for the sensor and the proper sensor to get the right response alone cost well over $100 by themselves. Each sensor you try will have different response curves. Especially in the 290nm - 310nm range which is the bioactive range. When you create your formula, you are adjusting for the percentage of UV in that range based upon the sensor you are using and comparing to the 6.5 meter results. The problem is if you get that working - that will only work with that exact light source. The percentage of bioactive UV in the range we need is different with every type of bulb and way different in sunlight. So you will need to build a different unit wth a different formula for every type of light source.

For you, this could work just fine in reading your levels and detecting deterioration in the bulb for replacement. But for others, and any other application, a different set of circumstances will be in place. Even for you if you want to check outside shade levels. Or another bulb...
 
Top