Ambient 6 Click Board
Ambient 6 Click Board
The Ambient 6 Click Board™ can sense the intensity of the ambient light, providing the measurement data in digital format over the I2C interface. It utilises the VEML7700, a miniature ambient light sensor (ALS) with an I2C interface. Packed in a small transparent casing, this sensor can provide very accurate readings: thanks to a 16-bit dynamic range, it can be used in very dim and very bright lighting conditions.
A well-proven Filtron™ technology allows response close to a real human eye, while the O-Trim™ technology allows for ALS tolerance of less than 10%. The flicker noise rejection algorithm further improves accuracy, while excellent thermal compensation ensures consistency of the measurement results.
Thanks to the used proprietary technologies that allow high precision, reliability, and low power consumption, Ambient 6 click can be used for the rapid development of various cost-effective applications that rely on light intensity sensing, including optical switches, backlight dimming applications for mobile and handheld devices, light metering applications (lux meters), and similar.
How Does The Ambient 6 Click Board™ Work?
The main component of the Ambient 6 Click Board™ is the VEML7700, a high accuracy ambient light sensor (ALS) with an I2C interface, from Vishay Semiconductors. This sensor utilizes several proprietary technologies to ensure accurate measurements of the light intensity, with the spectral response very close to a human eye. By utilizing a sensitive photo-diode, low noise amplifier, and a 16-bit A/D converter (ADC), this sensor can provide the data directly, with no need for complex calculations. The dynamic range for the ambient light sensor is very large, starting down from 0 lux up to about 167 lux, with a maximum resolution of only 0.005 lux/count. A high dynamic range along with a linear response to different light sources, allows this sensor to be placed behind a dark glass or panels made of other semi-transparent materials.
The VEML7700 sensor uses only six 16-bit registers, which makes it very simple to configure and use. Even though, it comes with the mikroSDK compatible library, which simplifies the development even more. However, a more detailed explanation of each command can be found in the datasheet of the VEML7700, if required.
By using these six registers, the user can configure the Click board™ and the equipped VEML7700 sensor, fine-tuning it according to the requirements of the application. All the working parameters including the sensitivity, integration time, interrupt detection, persistence protection for the interrupt triggering, low and high threshold window for the interrupt, can all be set using these registers. Finally, the Ambient Light Sensing (ALS) result can be found here in the 16-bit register 0x04. The data can be read or written in LSB/MSB format, using the 8-bit I2C interface.
A selectable sensitivity allows a very wide dynamic range for ALS measurement. There are two ALS_SM bits, allowing the sensitivity to be set to 1/4, 1/8, 2, and 1 x ALS nominal sensitivity. This offers four different luminosity ranges to be covered for each selected integration time (ALS_IT). For example, the fastest integration time (25ms) results in the lowest resolution and combined with the sensitivity of 1/8 x ALS, it allows the highest luminosity value to be measured.
The event detection engine allows optimized firmware to be developed. Although there is no dedicated interrupt pin on the VEML7700 IC, the software can still poll the status by reading two event flag bits. When any of the programmed light thresholds are exceeded a programmed number of times (persistence protection), an interrupt event will be generated, asserting this pin to a LOW logic level. The interrupt pin is routed to the mikroBUS™ INT pin.
The Ambient 6 Click Board™ is supported by the mikroSDK library, which contains functions for simplified development. The mikroSDK functions are well-documented, but there is still a need, the datasheet of the VEML7700 offers a listing of all the registers and their specific functions.
The Ambient 6 Click Board™ is designed to work with 3.3V only. When using it with MCUs that use 5V levels for their communication, a proper level translation circuit should be used.
SPECIFICATIONS
Type | Optical |
Applications | It can be used for the rapid development of various cost-effective applications that rely on light intensity sensing, including optical switches, screen dimming applications for mobile and handheld devices, light metering applications (lux meters), and similar. |
On-board modules | VEML7700, a high accuracy ambient light sensor (ALS) with an I2C interface, from Vishay Semiconductors. |
Key Features | High resolution and range of light intensity that can be measured, a spectral response similar to the human eye, low power consumption, a compact design ideal for building IoT applications, immune to flickering and fluorescent light sources, independent of the light source type, and more. |
Interface | I2C |
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 the Ambient 6 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | NC | ||
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED indicator |
Software Support
We provide a library for the Ambient 6 Click Board™ 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
Library initializes and defines I2C bus driver and driver functions which offer a choice to write data in registers and to read data from registers. Library also offers a choice to reads ambient data and ambient light in LUX. The user also has the function for configuration chip.
Key Functions
uint16_t ambient6_getAmbientData()
- Functions for read 16bit Ambient Data (ALS).float ambient6_getAmbientLight()
- Functions for get Ambient Light Data.void ambient6_configuration(uint16_t configData)
- Functions for configuration device for measurement.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C module.
- Application Initialization - Initialization driver init and default configuration device for measurement.
- Application Task - (code snippet) - Read Ambient Light in lux[lx] and this data logs to USBUART every 1sec.
void applicationTask(){ char demoText[ 50 ]; float AmbientLight; AmbientLight = ambient6_getAmbientLight(); FloatToStr(AmbientLight,demoText); demoText[ 7 ] = 0; mikrobus_logWrite(" Ambient Light : ", _LOG_TEXT); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" lx", _LOG_LINE); Delay_1sec();}
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
I2C
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The Ambient 6 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.
Software Support
We provide a library for the Ambient 6 Click Board™ 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
Library initializes and defines I2C bus driver and driver functions which offer a choice to write data in registers and to read data from registers. Library also offers a choice to reads ambient data and ambient light in LUX. The user also has the function for configuration chip.
Key Functions
uint16_t ambient6_getAmbientData()
- Functions for read 16bit Ambient Data (ALS).float ambient6_getAmbientLight()
- Functions for get Ambient Light Data.void ambient6_configuration(uint16_t configData)
- Functions for configuration device for measurement.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C module.
- Application Initialization - Initialization driver init and default configuration device for measurement.
- Application Task - (code snippet) - Read Ambient Light in lux[lx] and this data logs to USBUART every 1sec.
void applicationTask(){ char demoText[ 50 ]; float AmbientLight; AmbientLight = ambient6_getAmbientLight(); FloatToStr(AmbientLight,demoText); demoText[ 7 ] = 0; mikrobus_logWrite(" Ambient Light : ", _LOG_TEXT); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" lx", _LOG_LINE); Delay_1sec();}
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
I2C
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The Ambient 6 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.
Ambient 6 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.