Blog  /  UV Sensor: Everything You Need to Know

UV Sensor: Everything You Need to Know

About UV Sensor, Ultraviolet (UV) light can be very useful. We can use it for applications such as sanitization, stain detection, electrical discharge insect control systems (bug zappers), identity security, and optical lithography (photolithography).

Despite this, cumulative doses of UV light can still be detrimental to human health. Consequently, scientists must employ specialized UV sensors in laboratories to ensure that UV illumination intensity levels are safe. Furthermore, UV light may cause unwanted chemical reactions in medication. Thus, pharmaceutical companies often employ them in factories. Nevertheless, the following guide will discuss UV sensors and how to use them.


Special Offer: Get $100 off your order!

Claim your $100 discount by sending an inquiry today. Act now to save on your next project!
Please email [email protected] for details.

What is a UV Sensor?


People need a way to detect or measure the intensity of UV light. Primarily because it is not visible to the human eye, this is the purpose of UV (radiation) sensors. They detect ambient levels of UV light in indoor and outdoor environments. The formal name of this measurement process is UV spectroscopy, spectrophotometry, or spectrometry. People may refer to some types of UV sensors as UV visible spectrophotometers.




How Do UV Sensors Work?




UV light sensors convert radiant UV light into electrical signals. They then display the measurement of UV light in the area by routing these electrical signals to an electrical meter. Scientists can then observe and potentially store them.

In some cases, you can interface UV sensors with analog-to-digital converters (ADC). This will allow you to connect them to computers (and other devices that can interpret digital signals). Subsequently, the computer can utilize the signals from the UV sensor and ADC to generate records and graphs.


Types of UV Sensors


The most common types of UV Sensors include:


UV Phototubes




People use them to detect UV levels in water and air treatment facilities. They use a phototube (photoelectric/photo-emissive cell) to detect ambient UV radiation. The phototube is often a vacuous cylindrical bulb. However, it can also be gas-filled.  It uses a metal cathode with cerium oxide, potassium oxide, or silver oxide material. This material is sensitive to radiant light emissions.


Barrier layer cells (Photovoltaic cells)




They are one of the most basic UV sensors. Barrier layer cell-based UV detectors are popular because they do not require a power supply. They use incident UV light to produce electric currents. Incidentally, this current is directly proportional to the source light. They consist of three layers:

  • Metal base: A metal plate that mostly consists of iron. It acts as the first electrode.
  • Selenium metal: The base metal plate uses this coating. It is a semiconductor material.
  • A layer of gold or silver: Acts as the second electrode. As such, it functions as the collector.

We mostly use them to detect UV light from solar radiation. Additionally, we also employ photovoltaic cells in solar panels.


Photomultiplier Tube




This is one of the most popular UV detectors. Largely due to its incredible sensitivity. Photomultiplier tubes typically consist of either evacuated glass or quartz. The tube contains a photo-emissive cathode (photocathode).

The photocathode’s inner surface uses a light-sensitive material. Additionally, the photomultiplier has 8-10 photo emissive dynodes (depending on its size). Each dynode is a plate with a positive voltage difference of 75 to 100 volts.

Finally, the photomultiplier tube contains a collector anode known as a scintillator chamber.  When light radiations strike the cathode surface of the photomultiplier tube, it releases 2-5 electrons. The first dynode attracts these electrons, and it emits its own set of electrons for each attracted electron. It releases between 2 and 5 electrons for every electron it attracts from the cathode.


Silicon Photodiode




The silicon photodiode is the most sensitive UV detector. However, it is also the most expensive. For this reason, it is not as popular as the photomultiplier tube. The photodiode is a type of PN junction diode. It converts energy from light radiation into electric current.

Manufacturers produce the silicon photodiode by applying a P-type material (typically boron) to one side of a piece of silicon and an N-type (typically phosphorus) material to the other side.

The photodiode functions in a reverse bias condition. Consequently, the P-side of the photodiode associates with the negative terminal of the power source (usually a battery) while the n-side associates with the positive terminal.

The photodiode generates electrons in its depletion layer when light strikes it. This process causes current to flow between electrodes. Silicon photodiodes are best for detecting UV intensity in solar light radiation.


Special Offer: Get $100 off your order!

Claim your $100 discount by sending an inquiry today. Act now to save on your next project!
Please email [email protected] for details.

The UV Sensor Applications




UV sensors are useful for a wide range of applications such as:

  • Fire detection
  • Security (access and bank cards)
  • Biochemical research
  • Industrial manufacturing
  • Structural health monitoring
  • Environmental studies and monitoring
  • Pharmaceuticals
  • Hospitals
  • Robotics
  • Weather stations


UV Sensor Modules for Microcontroller and SBCs


Equipment for homemade microcontroller project with sensors

Equipment for homemade microcontroller project with sensors


You can build your UV detector using a microcontroller (or SBC such as a Raspberry Pi) and a UV sensor. These UV sensors typically use miniaturized photodiode technology to detect and measure ambient and direct UV light. They contain built-in amplifiers that you can adjust. Additionally, some sensors contain built-in analog-to-digital converters.

However, most of them require you to connect them to ADC before connecting them to a microcontroller or SBC.  Nevertheless, you can use these UV sensors to build projects such as automatic shade system triggers, data logging, control systems for agriculture and gardening, weather detection systems, water control systems, smart home conversion kits, etc.

The UV module sensor typically consists of a maximum of pins. Of course, this depends on what model you use. For instance, many models are missing the Vin pin. Nevertheless, the pin configurations are as follows:


  • Vin
  • 3.3V (or 3V3)
  • OUT
  • GND
  • EN


Selecting UV Sensors – Specifications


Fake money UV sensor detection system

Fake money UV sensor detection system


There are a few factors to consider when selecting and purchasing a UV radiation sensor to interface with your microcontroller. These specifications include:

  • Weight
  • Size (Dimensions)
  • Power range
  • Operating temperature
  • Wavelength range (response spectrum/ spectral range)
  • Accuracy
  • Amplification adjustability
  • Mounting holes (size and positioning)


How to Wire a UV Sensor


Soldering pins and wires to Arduino microcontroller

Soldering pins and wires to Arduino microcontroller


Before creating a UV sensor-based project, you need to understand how to connect it. This section will examine how to do it.




  • Jumper Cables x5
  • Arduino Uno (Or any other compatible microcontroller)
  • UV sensor module (3.3Volt)
  • Breadboard




Once you collect the necessary equipment, you can connect the UV sensor using the following steps:


Step 1: Plug the sensor module into the breadboard


Take the UV sensor along with its four male pins and connect them to the ‘e’ column of the breadboard. Ensure that the EN pin corresponds to the first row while the 3.3 pin connects to the fourth row.


Step 2: Connect EN to a 3.3V pin (Connect the sensor to itself)


Take one end of a jumper wire and connect it to the first row (where the EN pin connects). You can connect it to the ‘c’ column. Take the same wire and connect it to the fourth row where you previously connected the 3.3V pin. It can be in the same column to which you have connected the other end.

Step 3: Connect the OUT pin to the A0 input on the Arduino

Next, take another jumper cable and connect it to the second row of the breadboard. You can utilize the first column. However, ensure that it connects to the same row as the OUT pin on the UV sensor. Take the other end of the jumper wire and connect it to the A0 input of the Arduino.


Step 4: Connect GND from the UV Sensor to GND on the Arduino


Once again, take another jumper wire and connect it to the third row of the breadboard in parallel to the GND pin. Next, take the other end and connect it to the GND input on the Arduino board. We recommend using a black jumper wire to connect the ground (GND) pins.


Step 5: Connect the power pins


Connect a jumper wire to a column on the fourth row of the breadboard where the 3.3 pin connects. Take the other end of the jumper wire and connect it to the 3.3 V input on the Arduino Uno. Ensure that you do not connect it to the 5V connector on the Arduino. This mistake could cause permanent damage to the sensor.


Step 6: Connect the analog pins


There should be one more jumper wire left. Once again, take one end and connect it to an empty column on the 4th row. Connect the other end to the A1 pin on the Arduino. This will allow it to convert analog output from the sensor into digital ones.

If you have followed the above steps correctly, you should be able to connect the Arduino to a PC and interface it with the UV sensor. You can use the above setup as the foundation for your future Arduino and UV sensor-based projects.




Ultraviolet light has many applications, particularly in a world where people and industries require alternative modes of sanitization. For instance, we can use them in a germicidal lamp. However, UV can also be dangerous. Thus, we require tools to measure it so we can control it. There are many types of commercial UV detection devices. Each has a set of advantages and disadvantages. Nevertheless, you do not have to purchase one. You can acquire a UV sensor and build a detection device using a breadboard and Arduino Uno. These are just some of the topics we covered in this guide.



Special Offer: Get $100 off your order!

Claim your $100 discount by sending an inquiry today. Act now to save on your next project!
Please email [email protected] for details.