Let's Workshop: UVM-30A Ultraviolet Sensor Module

Here is a quick introduction to using the UVM-30A ultraviolet light sensor module. Hopefully it will provide you with the confidence to integrate UV light sensing into your project, maybe even helping you get a tan.

This example will demonstrate the use of an Arduino UNO in monitoring an analog pin over the range of light levels that the sensor responds to.


  • 1pcs Arduino UNO or Compatible - LCAA100005
  • 1pcs UVM-30A Ultraviolet light Sensor Module - BDAA100001
  • 3pcs Male to Female Jumper Cables - GBAA100002


Wire the one of the two boards to the Arduino as can be seen in the images below, taking care to match the pin numbers.


The code consists of a definition, setup and loop. First the A0 pin is assigned followed by a variable to store the value read. This allows easier use later in your program. A setup informs the system that the pin is an input is an input and then launches the serial connection. Next we enter the loop, where the value on the pin is read and stored in the variable declared earlier. Following that we send it to the serial monitor so that the value can be read on the screen.

Load the code below into the Arduino IDE and upload it to your board.

  A simple program designed to setup and demonstrate the UVM-30A ultraviolet sensor module - BDAA100001
  The program monitors a connected analog pin and outputs the value to the
  serial monitor.
  modified 5th July 2019
  by Sebastian Karam - Flux Workshop
int analogApin = 0; // define OUT signal pin
int analogA; // define variable to store value read from pin
void setup() {
  pinMode(analogApin, INPUT); // set the OUT signal pin as an input
  Serial.begin(9600); // launch the serial monitor
  Serial.println("Flux Workshop Example");
void loop() {
  analogA = analogRead(analogApin);  // read the voltage level on the A0
  Serial.println((String)"UV level: " + analogA); // send the result to the serial monitor
  delay(200); // pause for a moment before repeating


With the board loaded with the program and all the connections made the serial monitor will produce an output like the one seen below. In this case the sensor is in daylight before it is covered. Note the values are low in the example below, thanks to the lovely British summer we had no sun for the test. When in full sun/under a UV lamp the results should read around 30.

What to try next?

  • Use the output to monitor sunrise and sunset.
  • Factor in the readings into a weather station, to help guide sunscreen and shade use.
Previous article Let's Workshop: GY-30 Light Intensity Sensor Module
Next article Let's Workshop: DS18b20 Temperature Probe


oyadubimuloni - October 12, 2020

http://mewkid.net/when-is-xuxlya/ – Amoxil Amoxicillin Without Prescription wlg.xfyl.fluxworkshop.com.isn.pz http://mewkid.net/when-is-xuxlya/

araxecajiniju - October 12, 2020

http://mewkid.net/when-is-xuxlya/ – Amoxicillin 500 Mg Amoxicillin 500 Mg tmf.zkwm.fluxworkshop.com.ovw.en http://mewkid.net/when-is-xuxlya/

owofatomokiaz - August 21, 2020

http://mewkid.net/when-is-xuxlya/ – Dosage For Amoxicillin 500mg Amoxicillin 500mg Capsules vww.rvdz.fluxworkshop.com.cac.hy http://mewkid.net/when-is-xuxlya/

agoaxobuwak - August 21, 2020

http://mewkid.net/when-is-xuxlya/ – Amoxicillin 500mg Capsules Amoxicillin Without Prescription tdh.dncw.fluxworkshop.com.evn.rg http://mewkid.net/when-is-xuxlya/

oipoucufev - August 21, 2020

http://mewkid.net/when-is-xuxlya/ – Amoxicillin 500 Mg Amoxicillin No Prescription xmh.cngi.fluxworkshop.com.jto.jw http://mewkid.net/when-is-xuxlya/

atehalifakeaw - August 21, 2020

http://mewkid.net/when-is-xuxlya/ – Amoxicillin Without Prescription Amoxicillin 500 Mg xhu.dsrm.fluxworkshop.com.xym.xp http://mewkid.net/when-is-xuxlya/

Tanbirul Quadir Choudhru - May 22, 2020

Can we have a co relation of UV intensity uW/cm2 and the reading

Leave a comment

* Required fields