Silicon ChipUVM-30A Module Ultraviolet Light Sensor - May 2024 SILICON CHIP
  1. Contents
  2. Subscriptions
  3. Back Issues
  4. Publisher's Letter: Welcome to May!
  5. Feature: Techno Talk - One step closer to a dystopian abyss? by Max the Magnificent
  6. Feature: Net Work by Alan Winstanley
  7. Feature: The Fox Report by Barry Fox
  8. Project: GPS-Disciplined Oscillator by Alan Cashin
  9. Project: Dual RF Amplifier for Signal generators by Charles Kosina
  10. Feature: UVM-30A Module Ultraviolet Light Sensor by Jim Rowe
  11. Project: Songbird by Andrew Woodfifield
  12. Feature: Teach-In 2024 by Mike Tooley
  13. Feature: Max’s Cool Beans by Max the Magnificent
  14. Feature: Audio Out by Jake Rothman
  15. Feature: Circuit Surgery by Ian Bell
  16. PartShop
  17. Market Centre
  18. Back Issues: Peak Test Instruments

This is only a preview of the May 2024 issue of Practical Electronics.

You can view 0 of the 72 pages in the full issue.

Articles in this series:
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
Articles in this series:
  • Win a Microchip Explorer 8 Development Kit (April 2024)
  • Net Work (May 2024)
  • Net Work (June 2024)
  • Net Work (July 2024)
  • Net Work (August 2024)
  • Net Work (September 2024)
  • Net Work (October 2024)
  • Net Work (November 2024)
  • Net Work (December 2024)
  • Net Work (January 2025)
  • Net Work (February 2025)
  • Net Work (March 2025)
  • Net Work (April 2025)
Articles in this series:
  • Teach-In 2024 (April 2024)
  • Teach-In 2024 (May 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (June 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (July 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (August 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (September 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (October 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (November 2024)
Articles in this series:
  • Max’s Cool Beans (April 2024)
  • Max’s Cool Beans (May 2024)
  • Max’s Cool Beans (June 2024)
  • Max’s Cool Beans (July 2024)
  • Max’s Cool Beans (August 2024)
  • Max’s Cool Beans (September 2024)
  • Max’s Cool Beans (October 2024)
  • Max’s Cool Beans (November 2024)
  • Max’s Cool Beans (December 2024)
Articles in this series:
  • Audio Out (January 2024)
  • Audio Out (February 2024)
  • AUDIO OUT (April 2024)
  • Audio Out (May 2024)
  • Audio Out (June 2024)
  • Audio Out (July 2024)
  • Audio Out (August 2024)
  • Audio Out (September 2024)
  • Audio Out (October 2024)
  • Audio Out (March 2025)
  • Audio Out (April 2025)
  • Audio Out (May 2025)
  • Audio Out (June 2025)
Articles in this series:
  • Circuit Surgery (April 2024)
  • STEWART OF READING (April 2024)
  • Circuit Surgery (May 2024)
  • Circuit Surgery (June 2024)
  • Circuit Surgery (July 2024)
  • Circuit Surgery (August 2024)
  • Circuit Surgery (September 2024)
  • Circuit Surgery (October 2024)
  • Circuit Surgery (November 2024)
  • Circuit Surgery (December 2024)
  • Circuit Surgery (January 2025)
  • Circuit Surgery (February 2025)
  • Circuit Surgery (March 2025)
  • Circuit Surgery (April 2025)
  • Circuit Surgery (May 2025)
  • Circuit Surgery (June 2025)
Using Electronic Modules with Jim Rowe UVM-30A Module Ultraviolet Light Sensor This ultraviolet (UV) light-sensing ‘breakout’ module detects the intensity of UV solar radiation and hence the degree of protection you may need to prevent skin damage. If you connect it to an Arduino or other microcontroller, it can even indicate the current ‘UV Index’. P rotection is critical if you spend a lot of time outdoors in the summer sunshine (sunscreen and hat) to avoid sunburn and to lower your chances of developing skin cancer. The UVM-30A analogue UV light sensing module is ideal for detecting harmful UV rays and can be used to build your own UV sensor. It easily connects to an Arduino or other microcontroller unit (MCU) and with the right firmware, it will indicate the current UV Index or ‘UVI’. If you’re unsure what this is, please see the ‘UV Radiation and UV Index’ panel. Sunburn and skin damage are caused by the UV wavelengths in solar radiation, which can still be quite strong even when the sky is overcast. So checking the UV radiation level is still important. UV radiation varies in strength during the day, just like visible light and infrared (IR) heat radiation. As with these other wavelengths, its intensity tends to follow a bell-shaped curve, with the peak at the middle of the day or soon thereafter. So it can be worthwhile to keep tabs on the UV radiation level if you are going to be outdoors, even in the early morning or late afternoon. At the heart of the UVM-30A module is a miniature UV sensor called the GUVA-S12SD. This is in an SMD package measuring 3.5 × 2.8 × 1.8mm and is made by Genicom Co Ltd in South Korea. Genicom describes their device as a schottky-­type gallium-nitride photodiode designed to respond to UV radiation with wavelengths between 240 and 370nm (nanometres). It is also described as being ‘blind’ to visible light. The response curve of the GUVAS12SD sensor is shown in Fig.1. Its sensitivity is very low at wavelengths below 240nm, rising steadily to a peak at 350nm before dropping sharply between 360nm and around 375nm. So it has good sensitivity over the UV-B range from 280nm to 315nm and even better sensitivity over slightly more than half of the UV-A range, from 315nm to 365nm. The vertical units in Fig.1 are microamps per milliwatt of UV radiation. The Genicom data sheet for the GUVAS12SD lists the typical peak response of the device as 0.14A/W at 350nm, equivalent to the peak of the curve in Fig.1. Inside the module As shown in the circuit diagram (Fig.2) there’s very little in the UVM-30A module apart from the GUVA-S12SD sensor (PD1), and a small SGM8521 op amp (IC1) used to convert its output current into a voltage. The conversion performed by op amp IC1 conforms to the expression Vo = 4.3 × 106 × Ipd, where Ipd is the current passed by PD1 in amps. So a PD1 current of 280nA should result in an output of 1.2V. Most of the circuitry in Fig.2 is inside a pale yellow rectangle with a dashed red border because that The UVM30A module comprises a larger PCB (28 × 12.5mm) and a smaller PCB (3.5 × 2.8mm). The smaller PCB hosts the GUVA-S12SD UV sensor in a white SMD package. Fig.1: the sensitivity of the GUVA-S12SD sensor to light within the UV spectrum. The x-axis is the light wavelength in nanometres, while the y-axis shows the microamps conducted per milliwatt of incident radiation at that wavelength. This indicates that it’s most sensitive to UV-A but will also pick up much of the UV-B spectrum and some UV-C, at reduced sensitivity. Practical Electronics | May | 2024 This image is shown at 250% actual size. 29 part of the module is on a small subPCB mounted on the larger PCB. The smaller PCB measures only 3.5 × 2.7mm square, while the larger module PCB is 28 × 12.5mm. The only components on the larger PCB are a 10μF supply bypass capacitor and a 3-pin SIL header. Fig.2: the circuit of the UV sensor module is pretty straightforward. A bias voltage is applied to the photodiode from the op amp output via a resistor, converting the current into a voltage that’s fed to the OUT pin. The yellow box surrounds the components on the sub-PCB; the main PCB just adds a bypass capacitor and the 3-pin SIL header with two power pins (+ and −) and the analogue output. Connecting it to an MCU Since the module has an analogue voltage output and operates from a DC supply voltage of 3.3V to 5V, it is quite easy to connect to a microcontroller such as an Arduino Uno or Nano. You just need to connect the + and − power pins to the +5V and GND pins on the MCU board, while the ‘OUT’ pin goes to an analogue input on the MCU, such as the A0 analogue input, as shown in Fig.3 and Fig.4. Once set up, all that’s needed is suitable firmware for your Arduino/MCU. After searching the Internet, I found a website with a graph showing the output voltage of the UVM30A module plotted against the equivalent UV Index (see https://bit.ly/pe-may24-uv). I’ve redrawn this as Fig.5. On the same website, I also found an Arduino sketch for a UVI sensor, although this sketch was designed to display the calculated UVI level using a Nokia 5110 LCD module. I adapted this sketch into one that displays both the module’s output voltage and the equivalent UVI figure on a low-cost 16×2 LCD module with an I2C serial interface. Fig.6 shows how an Arduino Uno can be connected to both the UVM30A module and the LCD with the I2C interface attached. The resulting sketch file is called Arduino_UVI_meter_sketch.ino and is available from the May 2024 page of the PE website: https://bit.ly/pe-downloads When you upload it to the Arduino, it first gives you this opening display: Silicon Chip UVI Meter Fig.3: wiring up the module to an Arduino Uno couldn’t be much simpler. Just connect the module’s + supply pin to its +5V, the module’s – supply pin to its GND and the module’s output to one of its analogue inputs (in this case, A0, to suit our example sketch). Fig.4: connecting the UV sensor module to an Arduino Nano isn’t much different than the Uno shown in Fig.3. Once again, the module is supplied with 5V from the Nano’s +5V and GND pins while the module’s analogue output signal goes to the Nano’s A0 analogue input. 30 Then, after pausing for two seconds, it starts measuring the output voltage from the UVM30A module. It converts the reading into the equivalent UV Index and displays both, like this: UV Index = 2 Vout = 350mV It repeats this every 1.5 seconds. The sketch also sends this data back to your computer via the Serial Monitor (if you have it connected). So it is easy to hook the UVM30A UV sensing module up to an MCU like the Arduino and make yourself a handy UVI meter. The sketch could also be adapted to MMBasic code for use on a Micromite or Maximite; any microcontroller with an analogue input should do. One morning in late October, I took this arrangement outdoors and got UVI readings of 1-2 when the Sun was only about 30° above the horizon. The readings steadily rose as the morning wore on (although they Practical Electronics | May | 2024 Shown above, right is the Adafruit version of the UV sensor. It uses the same GUVA-S12SD sensor IC as the Altronics version. Fig.5: the mapping of the output of the UV sensor to the UV index is primarily linear, except below a UV index of one. Therefore, the formula to convert its output voltage to the UV index is pretty simple. The sketch source code (available for download) shows exactly how it’s down. UV Radiation and UV Index Ultraviolet or UV radiation is electromagnetic radiation with wavelengths between 10nm (nanometres) and 400nm – shorter wavelengths than light that is visible to humans, but longer than the wavelength of X-rays. UV radiation constitutes about 10% of the total radiation from our Sun. Still, this radiation is the primary cause of suntan, sunburn and skin damage resulting in skin cancers. The section of the solar UV radiation spectrum primarily of interest regarding human skin safety is between 100nm and 400nm. This is subdivided into three main divisions: UV-A (315nm to 400nm; ‘long wave UV’), UV-B (280nm to 315nm; ‘medium wave UV’) and UV-C (100nm to 280nm; ‘short wave UV’). Although photons of UV-C radiation carry more energy than those of UV-B or UV-A and are therefore more capable of skin damage, the good news is that virtually none of the Sun’s UV-C radiation ever reaches the surface of the Earth. These photons are absorbed by oxygen and ozone in our upper atmosphere. Most of the UV-B radiation from the Sun suffers the same fate, especially when there is heavy cloud cover. When there is cloud cover, more than 95% of the solar UV radiation reaching the surface of the Earth consists of the longer UV-A wavelength. And these wavelengths are of concern when it comes to protecting our skin. So clouds tend to reduce the amount of UV reaching the surface but do not eliminate it; you can still get sunburn on a cloudy day. The UV Index is an international measurement scale used to indicate the intensity of UV radiation in easily understood terms for the ‘general public’. It uses a scale of 11 or more steps, with each step corresponding to an increase of UV radiation intensity of 25mW/m2 (milliwatts per square metre). A UVI of one indicates a UV intensity of 25mW/m2, two indicates an intensity of 50mW/m2 and so on. Fig.7 shows the UV Index on the right and the corresponding UV radiation intensity on the left. The coloured bands indicate the five categories into which the UVI levels are grouped in terms of their ‘risk of harm’ to our skin. Fig.7: this shows the five ranges of UV index values that provide some guidance as to the danger of skin exposure under those conditions. It will depend somewhat on your skin pigmentation, but it’s still a good idea to ‘cover up’ at the upper end of the risk spectrum. Practical Electronics | May | 2024 31 dropped back when clouds obscured the Sun). When the Sun was directly overhead and the clouds were not obscuring it, the UVI readings reached a level of 8 or 9. So it appears to be doing its job and should be helpful for those who spend a lot of time outdoors. By the way, the Australian Bureau of Meteorology also publishes UV Index predictions in their forecasts. For the UK, the Met Office includes UVI in its forecasts: www.metoffice.gov.uk Of course, they can only give a rough idea of what to expect, whereas this module provides an actual reading of the immediate conditions that you are experiencing. Cost and availability I obtained the module shown in the photos from Altronics (catalog code Z6397) for around $40. If you want to source this in the UK then Amazon and eBay offer it for around £18, but at the time of writing fluxworkshop. com offer it for just over £14. This version has the same circuit, but everything is mounted on a single PCB measuring only 19 × 10 × 2mm and seems to originate from the US firm Adafruit: www.adafruit.com Adafruit has a smaller version (ID 1918) available for US$6.50 plus shipping. It’s also available from Digi-Key in the US for around the same price. There is yet another smaller version available from various suppliers on AliExpress. This one measures 19.8 × 10 × 2mm and is available for a few pounds with free shipping. So you have quite a good range to choose from, all with the same UV sensor and its surrounding circuit, in various sizes and prices. Reproduced by arrangement with SILICON CHIP magazine 2024. www.siliconchip.com.au Fig.6: to make a practical device, I added a serial (I2C) 16×2 LCD module to the basic circuit, wired as shown here. That allows the Arduino to display both the raw UV sensor output voltage and the equivalent UV index in a handy portable package if the Arduino is battery-powered. GET T LATES HE T CO OF OU PY R TEACH -IN SE RIES AVAILA BL NOW! E Order direct from Electron Publishing PRICE £8.99 (includes P&P to UK if ordered direct from us) EE FR -ROM CD ELECTRONICS TEACH-IN 9 £8.99 FROM THE PUBLISHERS OF GET TESTING! Electronic test equipment and measuring techniques, plus eight projects to build FREE CD-ROM TWO TEACH -INs FOR THE PRICE OF ONE • Multimeters and a multimeter checker • Oscilloscopes plus a scope calibrator • AC Millivoltmeters with a range extender • Digital measurements plus a logic probe • Frequency measurements and a signal generator • Component measurements plus a semiconductor junction tester PIC n’ Mix Including Practical Digital Signal Processing PLUS... YOUR GUIDE TO THE BBC MICROBIT Teach-In 9 – Get Testing! Teach-In 9 A LOW-COST ARM-BASED SINGLE-BOARD COMPUTER Get Testing Three Microchip PICkit 4 Debugger Guides Files for: PIC n’ Mix PLUS Teach-In 2 -Using PIC Microcontrollers. In PDF format This series of articles provides a broad-based introduction to choosing and using a wide range of test gear, how to get the best out of each item and the pitfalls to avoid. It provides hints and tips on using, and – just as importantly – interpreting the results that you get. The series deals with familiar test gear as well as equipment designed for more specialised applications. The articles have been designed to have the broadest possible appeal and are applicable to all branches of electronics. The series crosses the boundaries of analogue and digital electronics with applications that span the full range of electronics – from a single-stage transistor amplifier to the most sophisticated microcontroller system. There really is something for everyone! Each part includes a simple but useful practical test gear project that will build into a handy gadget that will either extend the features, ranges and usability of an existing item of test equipment or that will serve as a stand-alone instrument. We’ve kept the cost of these projects as low as possible, and most of them can be built for less than £10 (including components, enclosure and circuit board). © 2018 Wimborne Publishing Ltd. www.epemag.com Teach In 9 Cover.indd 1 01/08/2018 19:56 PLUS! You will receive the software for the PIC n’ Mix series of articles and the full Teach-In 2 book – Using PIC Microcontrollers – A practical introduction – in PDF format. Also included are Microchip’s MPLAB ICD 4 In-Circuit Debugger User’s Guide; MPLAB PICkit 4 In-Circuit Debugger Quick Start Guide; and MPLAB PICkit4 Debugger User’s Guide. ORDER YOUR COPY TODAY: www.electronpublishing.com 32 Practical Electronics | May | 2024