Simplify lighting management and reduce energy consumption with our responsive ambient light solution
A
A
Hardware Overview
How does it work?
Ambient 11 Click is based on the VEML6035, which is a 16-bit low power, high sensitivity CMOS ambient light sensor operated via a simple I2C command from Vishay Semiconductor. This sensor has many features that make it a perfect solution for small designs such as the Ambient 11 Click board™. 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™ 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. Also, it comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Features overview
Development board
Curiosity HPC, standing for Curiosity High Pin Count (HPC) development board, supports 28- and 40-pin 8-bit PIC MCUs specially designed by Microchip for the needs of rapid development of embedded applications. This board has two unique PDIP sockets, surrounded by dual-row expansion headers, allowing connectivity to all pins on the populated PIC MCUs. It also contains a powerful onboard PICkit™ (PKOB), eliminating the need for an external programming/debugging tool, two mikroBUS™ sockets for Click board™ connectivity, a USB connector, a set of indicator LEDs, push button switches and a variable potentiometer. All
these features allow you to combine the strength of Microchip and Mikroe and create custom electronic solutions more efficiently than ever. Each part of the Curiosity HPC development board contains the components necessary for the most efficient operation of the same board. An integrated onboard PICkit™ (PKOB) allows low-voltage programming and in-circuit debugging for all supported devices. When used with the MPLAB® X Integrated Development Environment (IDE, version 3.0 or higher) or MPLAB® Xpress IDE, in-circuit debugging allows users to run, modify, and troubleshoot their custom software and hardware
quickly without the need for additional debugging tools. Besides, it includes a clean and regulated power supply block for the development board via the USB Micro-B connector, alongside all communication methods that mikroBUS™ itself supports. Curiosity HPC development board allows you to create a new application in just a few steps. Natively supported by Microchip software tools, it covers many aspects of prototyping thanks to many number of different Click boards™ (over a thousand boards), the number of which is growing daily.
Microcontroller Overview
MCU Card / MCU

Architecture
PIC
MCU Memory (KB)
64
Silicon Vendor
Microchip
Pin count
28
RAM (Bytes)
3648
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support
Library Description
This library contains API for Ambient 11 Click driver.
Key functions:
ambient11_generic_write
- This function writes data to the desired registerambient11_generic_read
- This function reads data from the desired registerambient11_calc_illumination
- Function is used to calculate ambiental illuminationambient11_check_int
- Function checks interrupt occurence
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* \file
* \brief Ambient11 Click example
*
* # Description
* < The devices resolution depends on settings applied.
* User should consult the datasheet and choose resolution value
* that corresponds to the settings applied. >
*
* The demo application is composed of two sections :
*
* ## Application Init
* < Initalizes I2C driver, applies low sensitiviti settings
* ( GAIN = 0, DG = 0, SENS = 1 and IT = 100ms ) and
* makes an initial log.>
*
* ## Application Task
* < This example shows the capabilities of the Ambient 11 click
* by measuring ambiental illumination and displaying calculated value
* via USART terminal in luxes.>
*
* *note:*
*
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "ambient11.h"
// ------------------------------------------------------------------ VARIABLES
static ambient11_t ambient11;
static log_t logger;
float lx_val;
float resolution = 0.1024;
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
ambient11_cfg_t cfg;
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
// Click initialization.
ambient11_cfg_setup( &cfg );
AMBIENT11_MAP_MIKROBUS( cfg, MIKROBUS_1 );
ambient11_init( &ambient11, &cfg );
ambient11_default_cfg ( &ambient11 );
}
void application_task ( void )
{
lx_val = ambient11_calc_illumination( &ambient11, resolution );
log_printf( &logger, "Illumination : %.2f lx \r\n", lx_val );
log_printf( &logger, "-------------------------\r\n" );
Delay_ms( 1000 );
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END