How does it work?
The Ambient 11 Click is based around the VEML6035, which is a 16-bit low power, high sensitivity CMOS ambient light sensor operated via a simple I2C command. The VEML6035 incorporates a photodiode, amplifiers, and analog/digital circuits in a single chip. Vishay’s patented Filtron™ technology, a wafer level optical filter, provides the best spectral sensitivity to match human eye responses. One of these features is certainly its high level of integration that allows a minimal number of external components.
The sensor offers an active interruption feature that is triggered outside of the threshold window settings eliminating loading on the host. Besides that, VEML6035 has excellent temperature compensation to maintain output stability under changing temperature and its refresh rate setting does not need an external RC low pass filter. There is a programmable shutdown mode which reduces current consumption to 0.5 μA. Operating voltage ranges from 1.7 V to 3.6 V.
VEML6035 is a cost effective solution of ambient light sensor with I2C bus interface. The standard serial digital interface is easy to access “Ambient Light Signal” without complex calculation and programming by external controller. Beside the digital output also a flexible programmable interrupt pin is available.
Given the options its elements can offer, the Ambient 11 Click can be used as an ambient light sensor for mobile devices, industrial lighting operation, and as an optical switch for consumer, computing and industrial devices and displays.
This Click Board™ is designed to be operated only with 3V3 logic level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with logic levels of 5V.
Specifications
Type
Optical
Applications
Ambient light sensor for mobile devices, industrial lighting operation, and as an optical switch for consumer, computing and industrial devices and displays
On-board modules
VEML6035, a low power, high sensitivity, I2C ambient light sensor from Vishay Semiconductors
Key Features
Low stand by current consumption: typ. 0.5 μA; Integrated modules: ambient light sensor (ALS)
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 Ambient 11 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 |
Software Support
We provide a library for the Ambient11 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
This library holds functions that can be used to write data, read raw data, read and calculate ambiental illumination and check for interrupt occurence.
Key functions:
void ambient11_write_data ( uint8_t wr_cmd, uint16_t wr_data )
– Writes 16-bit data into register defined by 8-bit command.uint16_t ambient11_read_data ( uint8_t wr_cmd )
– Reads data from register defined by 8-bit command.float ambient11_calc_illumination ( float typical_res )
– Function is used to calculate ambiental illumination.
Examples description
The application is composed of three sections :
- System Initialization – Initializes I2C module, LOG structure and sets INT pin as input.
- Application Initialization – Initalizes I2C driver, applies low sensitiviti settings ( GAIN = 0, DG = 0, SENS = 1 and IT = 100ms ) and makes an initial log.
- Application Task – (code snippet) This example shows the capabilities of the Ambient 11 click by measuring ambiental illumination and displaying calculated value via USART terminal in luxes.
void application_task ( ) { lx_val = ambient11_calc_illumination( resolution ); FloatToStr( lx_val, log_txt ); mikrobus_logWrite( "Illumination : ", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "lx", _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); Delay_ms( 2000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversion
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
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.