How does it work?
UV Click is based on the ML8511A, an ultraviolet light sensor suitable for acquiring UV intensity indoors or outdoors from Rohm Semiconductor. The ML8511A is equipped with an internal amplifier converting photocurrent to voltage depending on the UV intensity working with a wavelength between 280-390nm (sensitive to UV-A (315-365nm) and UV-B (280-315nm) rays). After that, the MP8511A outputs an analog signal concerning the detected amount of UV light (mW/cm2).
The output signal of the ML8511A can be converted to a digital value using MCP3201, a successive approximation A/D converter with a 12-bit resolution from Microchip using a 3-wire SPI compatible interface, or can be sent directly to an analog pin of the mikroBUS™ socket labeled as AN. Selection can be performed by onboard SMD jumper labeled as A/D SEL, placing it in an appropriate position marked as AN or ADC. Also, the ML8511A can be enabled or disabled through the EN pin routed to the RST pin of the mikroBUS™ socket; hence, offering a switch operation to turn Active or Stand-by mode of operation depending on the set logic level.
This Click board™ can be operated only 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.
NOTE: When handling the UV Click plate, it is recommended not to press or rub the sensitive surface of the ML8511 UV sensor.
Specifications
Type
Optical
Applications
Systems that warn of excessive UV exposure, or industrial applications where UV is used for sterilization
On-board modules
ML8511A – ultraviolet light sensor from Rohm Semiconductor
Key Features
Low power consumption, photodiode sensitive to UV-A and UV-B, embedded operational amplifier, high accuracy and precision, possibility of signal processing in analog and digital form, and more
Interface
Analog,GPIO,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on UV 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 | A/D SEL | Right | Output Voltage A/D Selection EXT/INT: Left position EXT, Right position INT |
UV Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Spectral Range | 280 | – | 390 | nm |
Peak Wavelength | – | 365 | – | nm |
ADC Resolution | – | 12 | – | bit |
Software Support
We provide a library for the UV 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 UV Click driver.
Key functions
-
Read 12-bit UV data function.
-
Set power mode function.
Example Description
This is a example which demonstrates the use of UV Click board.
void application_task ( void )
{
uint16_t uv_data;
uv_data = uv_read_data ( &uv );
log_printf( &logger, " UV : %4drn", uv_data );
log_printf( &logger, "--------------------rn" );
Delay_ms( 5000 );
}
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.Uv
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.