Nano Power 2 Click Board
Nano Power 2 Click Board
The Nano Power 2 Click Board™ is a very low power voltage comparator, aimed at portable and battery-powered applications. It allows detecting a difference of two voltage potentials, applied on two input pins. The device can detect differences very precisely, avoiding oscillations that can occur when both input voltages are equal by employing an internal hysteresis.
The Nano Power 2 Click Board™ offers a choice to select one of the input voltages from the internal fixed reference of 1.2V, or by setting both input voltages by the onboard potentiometers.
Software Support
We provide a demo application for Nano Power 2 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 GPIO driver and performs control of device voltage.
For more details check the documentation.
Key Functions
NANOPW2_RETVAL_T nanopw2_checkOutput( void )
- TFunction gets output voltage from the comparator.
Example Description
The application is composed of three sections:
- System Initialization - Initializes OUT (INT) pin as an input.
- Application Initialization - Initializes GPIO driver.
- Application Task - (code snippet) - Checks the comparator's output and logs output value on USB UART. The hysteresis in a comparator creates two trip points: one for upper threshold (VTRIP+) and one for lower threshold (VTRIP-) for voltage transitions on the input signal. When the comparator’s input voltages are equal, the hysteresis effectively causes one comparator input to move quickly past the other, thus taking the input out of the region where oscillation occurs. The output voltage is high (1) when noninverted input voltage rises above the hysteresis and stays high until noninverted input voltage falls below the hysteresis. Then the output goes low and stays low until noninverted input voltage rises above the hysteresis. This is an example where the inverted input voltage is fixed and the noninverted input voltage is varied. If the inputs were reversed, the example would be the same, except with an inverted output.
void applicationTask() { outCheck = nanopw2_checkOutput(); if (outCheck != outCheckPrev) { WordToStr( outCheck, text ); mikrobus_logWrite( "OUT is: ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_LINE ); outCheckPrev = outCheck; } }
The full application code, and ready to use projects can be found on our Libstock page.
Additional notes and information
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
The Nano Power 2 Click Board™ is supported by 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.
Nano Power 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.