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
PIC18F57Q43 Curiosity Nano evaluation kit is a cutting-edge hardware platform designed to evaluate microcontrollers within the PIC18-Q43 family. Central to its design is the inclusion of the powerful PIC18F57Q43 microcontroller (MCU), offering advanced functionalities and robust performance. Key features of this evaluation kit include a yellow user LED and a responsive
mechanical user switch, providing seamless interaction and testing. The provision for a 32.768kHz crystal footprint ensures precision timing capabilities. With an onboard debugger boasting a green power and status LED, programming and debugging become intuitive and efficient. Further enhancing its utility is the Virtual serial port (CDC) and a debug GPIO channel (DGI
GPIO), offering extensive connectivity options. Powered via USB, this kit boasts an adjustable target voltage feature facilitated by the MIC5353 LDO regulator, ensuring stable operation with an output voltage ranging from 1.8V to 5.1V, with a maximum output current of 500mA, subject to ambient temperature and voltage constraints.
Microcontroller Overview
MCU Card / MCU
Architecture
PIC
MCU Memory (KB)
128
Silicon Vendor
Microchip
Pin count
48
RAM (Bytes)
8196
You complete me!
Accessories
Curiosity Nano Base for Click boards is a versatile hardware extension platform created to streamline the integration between Curiosity Nano kits and extension boards, tailored explicitly for the mikroBUS™-standardized Click boards and Xplained Pro extension boards. This innovative base board (shield) offers seamless connectivity and expansion possibilities, simplifying experimentation and development. Key features include USB power compatibility from the Curiosity Nano kit, alongside an alternative external power input option for enhanced flexibility. The onboard Li-Ion/LiPo charger and management circuit ensure smooth operation for battery-powered applications, simplifying usage and management. Moreover, the base incorporates a fixed 3.3V PSU dedicated to target and mikroBUS™ power rails, alongside a fixed 5.0V boost converter catering to 5V power rails of mikroBUS™ sockets, providing stable power delivery for various connected devices.
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Schematic
Step by step
Project assembly
Track your results in real time
Application Output via Debug Mode
1. Once the code example is loaded, pressing the "DEBUG" button initiates the build process, programs it on the created setup, and enters Debug mode.
2. After the programming is completed, a header with buttons for various actions within the IDE becomes visible. Clicking the green "PLAY" button starts reading the results achieved with the Click board™. The achieved results are displayed in the Application Output tab.
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
This example can be found in NECTO Studio. Feel free to download the code, or you can copy the code below.
/*!
* \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