With the ability to adjust the voltage on the AN pin very accurately, this Click board™ can be used for development of applications that require voltage reference other than what is commonly available as an output from a dedicated IC. The output from the potentiometer is buffered by the high-performance rail-to-rail operational amplifier, which ensures clean and low-noise signal to the MCP3201 and VO pin of the Click Board. This Click board™ can be used in any application that requires an analog or digitized control voltage, or it can be used to build HMI applications, adding them an accurate potentiometer.
How does it work?
POT 3 click uses a very simple design by featuring the MCP1501, a precision voltage reference IC from Microchip is used to provide the voltage of 2.048V. This voltage is routed to the small SMD jumper labeled as VREF SEL. By moving the jumper to the 2V position, 2.048V will be applied to one end of the potentiometer. Otherwise, the potentiometer will be connected to the 3.3V rail of the mikroBUS™. The other end of the potentiometer is tied to GND, allowing to select voltage from 0V to VREF (from 0 to 2.048V or from 0 to 3.3V ranges). The adjustable voltage is available on both AN pin of the mikroBUS™ and to the + input pin of the MCP3201.
The potentiometer itself is labeled as RK1191110001. It is a high-quality potentiometer from Alps Alpine. This company is otherwise known for their high-quality electromechanical components, used in many industries. The potentiometer has a carbon-based resistive surface with the resistance of 10 kΩ. It is a single-turn linear potentiometer, with 50% of resistance achieved when in the middle position. Its turning knob is not fixed: the potentiometer has 15mm shaft and a turning knob with the matching shape is delivered in the package with the Click board™.
The output of the potentiometer is fed to the non-inverting input of the OPA344, a rail-to-rail single supply operational amplifier, from Texas Instruments. This operational amplifier is a perfect choice for this design, as it allows rail-to-rail operation, uses a single power supply of 5V, and has a stable unity gain. The OPA344 is used as a buffer, providing a constant input and output impedance. Without buffer, variable impedance would affect the reference voltage. The reference voltage IC can provide less than 10 mA, with the significant voltage drop for output currents exceeding 2 mA. Therefore, the OPA344 ensures good stability of the circuit.
The second section of this click board™ consists of the MCP3201 IC, a well known 12-bit ADC from Microchip. The potentiometer end terminals are connected between GND and the VREF, while the buffered voltage from the wiper is connected to the IN+ pin of the MCP3201. VREF is also connected to the reference voltage input pin of the MCP3201. That way, the whole range of the ADC is always used, regardless the chosen VREF voltage. The MCP3201 has its SPI lines routed to the mikroBUS™ so that the values can be read easily by the MCU.
Specifications
Type
Measurements
Applications
It can be used for development of different types of HMI applications where the potentiometer can be used to provide fine control the movement or to change the intensity of a LED segment in fine steps, backlight amount of a TFT screen, etc.
On-board modules
MCP1501, a precision voltage reference IC from Microchip; OPA344, a single-supply, rail-to-rail operational amplifier from Texas Instruments. MCP3201 IC, 12-bit ADC from Microchip
Key Features
Precise and buffered reference voltage output, selectable maximum value for the adjustable voltage reference, high-quality linear potentiometer from Alps Alpine.
Interface
Analog,SPI
Compatibility
mikroBUS
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V,5V
Pinout diagram
This table shows how the pinout on POT click 3 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 | VREF SEL | Left | Voltage reference level selection: left position 2.048V, right position 3.3V |
Software Support
We provide a library for the POT 3 Click 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
This library allows user to check the output voltage (VOUT) of the POT 3 Click board. User can get the output voltage as 12-bit digital value (ADC only), or as averaged value calculated to millivolts (ADC + calculations). The AD converted value can be read as one conversion sample, or as averaged value with desired number of conversions. For more details check documentation.
Key functions:
uint16_t pot3_read_adc( void )
– This function reads the result of AD conversion.uint16_t pot3_get_vout( uint8_t vref_sel, uint16_t nSamples )
– This function returns VOUT value calculated to millivolts, with desired number of AD conversions included in calculations.
Examples description
The application is composed of three sections :
- System Initialization – Initializes peripherals and pins
- Application Initialization – Initializes SPI driver
- Application Task – (code snippet) – Reads VOUT value calculated to millivolts with 2000 conversions included in one measurement cycle. The reference voltage (VREF) of 2V is selected as default value for calculations. Results will be sent to the uart terminal every 10us * number of conversions
void applicationTask() { voltage_mv = pot3_get_vout( _POT3_VREF_2V, 2000 ); WordToStr( voltage_mv, text ); mikrobus_logWrite( "** VOUT : ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( " mV", _LOG_LINE ); mikrobus_logWrite( "*******************************", _LOG_LINE ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- Conversions
- SPI
- UART
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.
mikroSDK
This Click board™ is supported with 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.
For more information about mikroSDK, visit the official page.