How does it work?
Voltage Click is based on the MCP609, a micropower CMOS operational amplifier from Microchip. It is a unity-gain stable, low offset voltage OpAmp that includes rail-to-rail output, swing capability, and low input bias current. On Voltage Click, the MCP609 is set as a differential amplifier with a buffer output. The current that comes through screw terminals flows through a row of four resistors. The last two resistors generate a voltage proportional to the input charge. From there, it is sent to the differential amplifier that further intensifies the difference between the two inputs (+/-).
The resulting charge on MCP609 is exactly 33 times lower than the actual measured voltage. That is why this Click board™ features the MCP3201, a 12-bit AD converter with the SPI serial interface from Microchip. The MCP3201 provides a single pseudo-differential input, features on-chip sample and hold, a maximum sampling rate of up to 100ksps, and more. As its reference voltage, the MCP3201 gets the 2.048V from the MAX6106, a low-cost, micropower, low-dropout, high-output-current voltage reference from Analog Devices.
The Voltmeter Click uses the 3-Wire SPI serial interface of the MCP3201 to communicate with the host MCU, supporting high clock frequency and SPI 0.0 and SPI 1.1 modes. The voltage amplified through the MCP609 can be directly monitored through the AN pin of the mikroBUS™ socket, which is useful if the host MCU has a higher ADC resolution. The firmware on the host MCU should be set to multiply the ADC value to get the actual voltage from the SPI interface.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the PWR SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Measurements
Applications
Can be used for the development of applications based on voltage measurements, tools, and more
On-board modules
MCP609 – micropower CMOS operational amplifier from Microchip
MCP3201 – 12-bit AD converter with the SPI serial interface from Microchip
MAX6106 – micropower, low-dropout, high-output-current voltage reference from Analog Devices
Key Features
Voltage range from 0 up to 24V, direct current only, screw terminal for connecting an external circuit, analog values direct monitoring, 12-bit ADC, low power consumption, and more
Interface
Analog,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Voltmeter Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | PWR SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
Voltmeter Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Voltage Measurement Range | 0 | – | 24 | VDC |
Maximum Sampling Rate | – | – | 100 | ksps |
Software Support
We provide a library for the Voltmeter Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Voltmeter Click driver.
Key functions
-
Generic write the byte of the data function.
-
Generic read the byte of the data function.
-
Generic reading 16-bit data function.
Example Description
This application give a voltage in milivolts
void application_task ( void )
{
adc_value = voltmeter_read_data( &voltmeter );
log_printf( &logger, " ADC Value: %drn", adc_value );
voltage = voltmeter_get_voltage( &voltmeter, VOLTMETER_VCC_5V_COEFF_0 );
log_printf( &logger, " Voltage : %f mVrn", voltage );
log_printf( &logger, "------------------------rn");
Delay_ms( 1000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Voltmeter
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. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE 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.
For more information about mikroSDK, visit the official page.