We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2020-08-05
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Current sensor
Downloaded: 1963 times
Not followed.
License: MIT license
VCP Monitor 3 Click is a high precision Voltage, Current and Power measurement Click board with an input capable of taking up to 15V. It features the LTC2947, from Analog Devices, a high precision power and energy monitor with an internal sense resistor supporting up to ±30A.
Do you want to subscribe in order to receive notifications regarding "VCP Monitor 3 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "VCP Monitor 3 click" changes.
Do you want to report abuse regarding "VCP Monitor 3 click".
Library Description
The library covers all the functions necessary to control VCP Monitor 3 click board. It initializes and defines the SPI and I2C bus drivers, and holds functions that allow full control of the device to the user. User can change operation mode, read: current, power, voltage, VCC voltage, energy, charge and base time. User can also use various read and write functions.
Key functions:
float vcpmonitor3_read_i ( );
- Function is used to get current in Amperes.float vcpmonitor3_read_p ( );
- Function is used to get power in Watts.float vcpmonitor3_read_v ( );
- Function is used to get voltage in Volts.Examples description
The application is composed of three sections :
void application_task( )
{
float cur_data;
float volt_data;
float pow_data;
float die_temp;
float volt_vcc;
cur_data = vcpmonitor3_read_i( );
FloatToStr( cur_data, log_txt );
mikrobus_logWrite( "Current : ", _LOG_TEXT );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( " A", _LOG_LINE );
pow_data = vcpmonitor3_read_p( );
FloatToStr( pow_data, log_txt );
mikrobus_logWrite( "Power : ", _LOG_TEXT );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( " W", _LOG_LINE );
volt_data = vcpmonitor3_read_v( );
FloatToStr( volt_data, log_txt );
mikrobus_logWrite( "Voltage : ", _LOG_TEXT );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( " V", _LOG_LINE );
die_temp = vcpmonitor3_read_temp( );
FloatToStr( die_temp, log_txt );
mikrobus_logWrite( "Die Temperature : ", _LOG_TEXT );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( deg_cel, _LOG_LINE );
volt_vcc = vcpmonitor3_read_vcc( );
FloatToStr( volt_vcc, log_txt );
mikrobus_logWrite( "Voltage at DVCC : ", _LOG_TEXT );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( " V", _LOG_LINE );
mikrobus_logWrite( " ------------------------------- ", _LOG_LINE );
Delay_ms( 1000 );
}
Other mikroE Libraries used in the example:
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.