Zum Inhalt springen

WSAL20467 – UV Sensor (C)/en

Aus JW Tech Wiki
Version vom 6. September 2026, 00:30 Uhr von JWTechPublisher (Diskussion | Beiträge) (Freigegebene technische Dokumentation veröffentlicht; Text-only und noindex)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

The Waveshare UV Sensor (C) is an I2C expansion board with the LTR390-UV-01 chip that measures ultraviolet and visible light. The 27 × 20 mm board outputs digital light-intensity values over I2C and provides programmable interrupts with upper thresholds.

Related products at JW Tech

Technical overview

  • Sensor chip: LTR390-UV-01, a low-voltage I2C ambient light sensor (ALS) and UV light sensor (UVS) in a 2 × 2 mm package.
  • Operating voltage: 3.3 V or 5 V; the board includes a level-conversion circuit for both voltages.
  • Sensor response range: 280–430 nm; fixed aperture of 2.0 mm.
  • Fixed I2C address: 0x53.
  • The board has four connections: VCC, GND, SDA, SCL, plus an additional INT pin for interrupt output.
  • The chip converts light intensity directly into a digital output signal transmitted over I2C.
  • Programmable interrupts with hysteresis reduce the need for polling and improve system efficiency.
  • Sample programs are available for Raspberry Pi (Python), Arduino (INO demo), and STM32 (NUCLEO-F103RB).

Commands and examples – verify before use: 

sudo raspi-config
sudo reboot
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz
tar zxvf bcm2835-1.60.tar.gz
cd bcm2835-1.60/
sudo ./configure
sudo make
sudo make check
sudo make install
sudo apt-get install wiringpi
cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio -v
sudo apt-get install p7zip-full
wget https://files.waveshare.com/upload/a/ab/UV_Sensor_C_Code.7z
7z x UV_Sensor_C_Code.7z -r -o./UV_Sensor_C_Code
sudo chmod 777 -R UV_Sensor_C_Code
cd UV_Sensor_C_Code/RPI
sudo python LTR390.py

Notes and version constraints

  • Pin assignments must be followed exactly: VCC, GND, SDA, SCL, and INT. Swapped SDA/SCL wires will prevent data exchange.
  • For all three platforms (Raspberry Pi, Arduino, STM32), verify the hardware connection before running the program.
  • The Raspberry Pi demo uses Python; ensure required libraries are installed.
  • For Arduino, the Waveshare_UV_C library must be placed in the Arduino directory so it appears in the IDE.
  • On the STM32 platform, the example was verified on NUCLEO-F103RB; other boards require adjusted pin mappings.
  • If only a short message prints after power-on or all values read zero, re-check the wiring (especially SDA/SCL order) and reconnect the sensor.

Source and revision record

  • UV Sensor (C) - Waveshare Wiki
  • Source revision: 69243
  • Captured: 2026-09-02T03:52:48+00:00
  • SHA-256: 56f2f7ee1ce17c85d1d548a5c9ebc0403b8954312c2faf8b30848509058fbf6d