How does it work?
UV 2 Click is based on the VEML6075, a UVA and UVB light sensor with an I2C interface from Vishay. The UVA and UVB have their own individual channels, along with the UVD as a dummy channel for dark current cancellation, and UVcomp1, and UVcomp2, parts of a normalized spectral response. All those values are essential for deriving the UV radiation values from the sensor readings. The measurement results are stored in separate registers. They remain in registers and can be read from them until the device wakes up and a new measurement is made.
The UVB rays wavelengths ranging from 280nm to 320nm are extremely energetic and harmful for the skin to the extent that they are responsible for 65% of skin tumors. Thankfully, only 0.1% of the solar energy that arrives on the earth’s surface is in the shape of UVB radiation.
The UVA ray wavelengths ranging from 320nm to 400nm are less powerful than the previous ones but highly penetrating. They can reach the skin, becoming responsible for photoaging and promoting the onset of different forms of skin cancer. 4.9% of solar energy is made up of UVA rays. The UV 2 Click communicates with the host MCU using an I2C interface over the mikroBUS™ socket, supporting Standard (100KHz) and Fast (400KHz) operating frequencies.
This Click board™ can only be operated with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Specifications
Type
Optical
Applications
Can be used for the development of applications based on systems that warn of excessive UV exposure, or industrial applications where UV is used for sterilization
On-board modules
VEML6075 – UVA and UVB light sensor with an I2C interface from Vishay
Key Features
Excellent UVA, and UVB peak sensitivities, reliable performance of UV radiation measurement under long-time solar exposure, integrated UV sensor, and signal conditioning IC, low power consumption, 16-bit resolution per channel, converts solar UV signal to digital data, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on 9DOF 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
UV2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Peak UVA Sensitivity | – | – | 365 | nm |
Peak UVB Sensitivity | – | – | 330 | nm |
Range of Spectral Bandwidth | – | ±10 | – | nm |
Software Support
We provide a library for the UV 2 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for UV 2 Click driver.
Key functions
-
This function set active force mode by write force mode UV_AF bit to config register of VEML6075 sesnor on UV 2 Click.
-
This function get UVA data by read UVA register value of VEML6075 sesnor on UV 2 Click.
-
This function get UVB data by read UVB register value of VEML6075 sesnor on UV 2 Click.
Example Description
This app measurement UVA and UVB data and calculate UV index level.
void application_task ( void )
{
uint16_t val_uva;
uint16_t val_uvb;
float uv_index;
val_uva = uv2_get_uva( &uv2 );
log_printf( &logger, " UVA data = %d rn", val_uva );
val_uvb = uv2_get_uvb( &uv2 );
log_printf( &logger, " UVB data = %d rn", val_uvb );
uv_index = uv2_get_uv_index( &uv2 );
log_printf( &logger, " UV Index = %f rn", uv_index );
log_printf( &logger, "------------------------rn" );
Delay_ms( 2000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.UV2
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.