Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›GUVA-S12SD UV Sensor

Component guide · Beginner · 3 min read

GUVA-S12SD UV Sensor

Pinout, Wiring and Code

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the GUVA-S12SD UV sensor isGUVA-S12SD UV sensor pinoutWiring the GUVA-S12SD UV sensorExample codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Short answer

The GUVA-S12SD is a UV photodiode that responds to ultraviolet light from about 240 to 370 nm. Modules add an amplifier, giving an analog voltage that rises with UV intensity, which you read with analogRead() and convert to an approximate UV index. Use it for sun-exposure alarms, weather stations and UV lamp checks.

Key specs at a glance

Sensor
GaN-based UV photodiode (GUVA-S12SD)
Spectral range
About 240 to 370 nm (UVA and UVB)
Output
Analog voltage, rises with UV
Supply
3.3 to 5 V
UV index estimate
About UV index = output voltage / 0.1 V on common modules
Response time
Under 0.5 s

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1CJMCU-GUVA-S12SD Sunlight Ultraviolet Ray Intensity UV Sensor Module₹207
  • Option 2DFRobot Gravity GUVA-S12SD Analog UV Light Sensor (200-370nm, UVA, UVB, UVC) – Module w/ Cable₹619
  • Option 3Seeed Studio Grove UV Sensor – GUVA-S12SD Photodiode Module₹919
01

What the GUVA-S12SD UV sensor is

Ultraviolet light is invisible but causes sunburn. A GaN photodiode responds to UV and is almost blind to visible light, so indoor lamps barely move the reading while sunlight does.

The photodiode current is tiny, so modules use an op-amp to turn it into a voltage you can read. The exact scale depends on the module's resistor and amplifier, so treat the UV index as an estimate.

02

GUVA-S12SD UV sensor pinout

The pins on the GUVA-S12SD UV sensor and what each one does.

PinFunction
VCC / +Supply, 3.3 to 5 V
GND / −Ground
SIG / OUTAnalog output voltage
PinFunction
VCC / +
Supply, 3.3 to 5 V
GND / −
Ground
SIG / OUT
Analog output voltage
03

Wiring the GUVA-S12SD UV sensor

Point the sensor's window at the sky or the UV source. On an ESP32, power it from 3.3 V.

GUVA-S12SD UV sensor pinArduino UnoESP32
VCC5V3V3
GNDGNDGND
SIGA0GPIO 34 (ADC1)
VCC
Arduino Uno:
5V
ESP32:
3V3
GND
Arduino Uno:
GND
ESP32:
GND
SIG
Arduino Uno:
A0
ESP32:
GPIO 34 (ADC1)
04

Example code

Compare against a local UV index forecast on a clear day and adjust the 0.1 V factor for your module.

Read UV and estimate the UV index (Arduino Uno) · Arduino C++Verify & upload in Electrolark
const int UV = A0;

void setup() { Serial.begin(115200); }

void loop() {
  long sum = 0;
  for (int i = 0; i < 32; i++) sum += analogRead(UV);
  float v = (sum / 32.0) * 5.0 / 1023.0;
  float uvIndex = v / 0.1;          // typical module scale
  Serial.print(v, 3); Serial.print(" V  UV index ~"); Serial.println(uvIndex, 1);
  delay(1000);
}
05

Setup and tuning

Window

ordinary glass and many plastics block UVB; use a quartz or UV-transparent window, or leave it open.

Angle

point it straight up for UV index; the reading drops when tilted.

Averaging

average several readings to remove ADC noise at low UV.

06

What you need

Shop this list6 of 7 found in our store · ₹2,322

  • CJMCU GUVA-S12SD UV sensor module: the sensor this guide coversCJMCU-GUVA-S12SD Sunlight Ultraviolet Ray Intensity UV Sensor Module₹207Closest match, check the specs
  • DFRobot Gravity GUVA-S12SD Analog UV Light Sensor (200-370nm, UVA, UVB, UVC) – Module w/ Cable: another version this guide coversDFRobot Gravity GUVA-S12SD Analog UV Light Sensor (200-370nm, UVA, UVB, UVC) – Module w/ Cable₹619
  • Seeed Studio Studio Grove UV Sensor – GUVA-S12SD Photodiode Module: another version this guide coversSeeed Studio Grove UV Sensor – GUVA-S12SD Photodiode Module₹919Closest match, check the specs
  • Uno R3 development board: the controller used in the wiring tableFind this part
  • ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
  • 0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
  • Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
07

Alternatives and when to choose them

  • ✓UV sensors compared: GUVA-S12SD, ML8511 and VEML6070.
  • ✓VEML7700: visible light in lux, not UV.
  • ✓Weather station sensors: building a full station.
08

Try it: Adc resolution calculator

Change the values and the diagram and results update as you type.

09

Common mistakes to avoid

  • !Putting it behind a glass or acrylic window that blocks UV.
  • !Testing it under indoor LED lights, which emit almost no UV.
  • !Treating the UV index estimate as a calibrated measurement.
  • !Powering it from 5 V into a 3.3 V ADC.
10

Frequently asked questions

What does the GUVA-S12SD measure?

UV light from about 240 to 370 nm, covering UVA and UVB.

How do I get the UV index?

On common modules, divide the output voltage by about 0.1 V. Check against a reference.

Does it work indoors?

It reads near zero under most indoor lights, which emit little UV.

Does it work with ESP32?

Yes, power it from 3.3 V and read an ADC1 pin.

Can it check a UV lamp?

Yes, for relative strength; use a UV-C rated meter for germicidal lamps.

Parts for this guide

  • CJMCU-GUVA-S12SD Sunlight Ultraviolet Ray Intensity UV Sensor Module
    ₹207View
  • DFRobot Gravity GUVA-S12SD Analog UV Light Sensor (200-370nm, UVA, UVB, UVC) – Module w/ Cable
    ₹619View
  • Seeed Studio Grove UV Sensor – GUVA-S12SD Photodiode Module
    ₹919View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • 0.96" OLED Display 128x64
    ₹139View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
Shop Ambient Light, Lux & UV Sensors

Calculators

Adc resolution calculator

Projects that use it

Put this into practice: 26 step-by-step builds in our project library use parts from this guide.

Beginner · 1 hourUV index monitor with sunburn warningView projectBeginner · 30 minutesUV index meterView projectBeginner · 1–2 hoursWi-Fi UV index monitorView project
Browse all 26 projects

Keep learning

Component guideBeginnerUV SensorsA UV sensor module measures ultraviolet light, mostly UVA and UVB from sunlight.3 min read · SensorsHow-toIntermediateWeather Station SensorsA DIY weather station needs three outdoor sensors: an anemometer for wind speed, a wind vane for direction and a tipping-bucket rain gauge.3 min read · SensorsComponent guideIntermediatePhotodiodes, Phototransistors and PhotointerruptersA photodiode turns light into a small current and is the fastest light sensor.3 min read · SensorsConcept explainerBeginnerADCs ExplainedAn analog-to-digital converter (ADC) measures a voltage and returns a number.4 min read · Electronics Fundamentals

Sources

  • GUVA-S12SD UV-B sensor datasheet (GenUV / Roithner)

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the GUVA-S12SD UV sensor isGUVA-S12SD UV sensor pinoutWiring the GUVA-S12SD UV sensorExample codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)3 items · ₹1,030

CJMCU-GUVA-S12SD Sunlight Ultraviolet Ray Intensity UV Sensor Module · DFRobot Gravity GUVA-S12SD Analog UV Light Sensor (200-370nm, UVA, UVB, UVC) – Module w/ Cable · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output

Roughly 0.1 V per UV index point. Indoors reads near 0; midday sun in India is often 8 to 11.

Serial monitor115200 baud
0.599 V  UV index ~6.0

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question