How does it work?
UVA Click as its foundation uses the GUVA-C32SM, an ultraviolet light sensor capable of measuring UV index between 0 to 14 from Genicom Co., Ltd. The GUVA-C32SM contains the GaN-based chip die, integrated amplifiers, analog-to-digital converter, digital control logic, and serial interface circuit to measure detected solar UV index in the spectral range of 220-370nm. The GUVA-C32M acquires the intensity of UVA, respectively, and outputs digital count according to each intensity. A reasonable power management mode can reduce power consumption according to specific application requirements.
UVA Click communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting Standard Mode operation with a clock frequency of 100kHz and Fast Mode up to 400kHz. Since the sensor for operation requires a 3.3V logic voltage level only, this Click board™ also features the PCA9306 voltage-level translator from Texas Instruments. The I2C interface bus lines are routed to the dual bidirectional voltage-level translator, allowing this Click board™ to work with both 3.3V and 5V MCUs properly.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library that contains easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Optical
Applications
Can be used in applications such as determining exposure to ultraviolet radiation in a laboratory or environmental settings, weather stations, industrial manufacturing, and many more
On-board modules
GUVA-C32SM – ultraviolet light sensor capable of measuring UV index between 0 to 14 from Genicom Co., Ltd
Key Features
Integrated GaN Sensors for UVA, programmable gain and integration time, power management modes, I2C interface, and more
Interface
I2C
Compatibility
mikroBUS
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on UVA 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 |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
UVA Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
UV Index Range | 0 | – | 14 | |
Resolution | – | 16 | – | bits |
Operating Temperature Range | -30 | +25 | +85 | °C |
Software Support
We provide a library for the UVA Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for UVA Click driver.
Key functions
-
uva_read_data
This function reads the raw UVA data from registers. -
uva_soft_reset
This function executes the soft reset command. -
uva_write_register
This function writes a data byte to the selected register by using I2C serial interface.
Example Description
This example demonstrates the use of UVA Click board™ by reading and displaying the UVA data measurement results.
void application_task ( void )
{
uint16_t uva_data = 0;
if ( UVA_OK == uva_read_data ( &uva, &uva_data ) )
{
log_printf ( &logger, " UVA data: %u rnn", uva_data );
Delay_ms ( 100 );
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.UVA
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 MikroElektronika compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika 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.