How does it work?
Force 4 Click work in the same way as our air (atmospheric) pressure sensors, using the piezoresistive method. They detect loads (force) with a piezoresistive element manufactured using MEMS processes. Force sensors differ from air pressure sensors in that they have a thicker diaphragm, allowing detection of only relatively large changes in pressure, like from loads, while very subtle fluctuations, such as changes in air pressure, do not affect the output.
Force 4 Click utilizes an additional IC. It uses the MCP3221, a 12-bit successive approximation A/D converter (ADC) with I2C Interface, from Microchip. It is used to sample the output voltage from the sensor, providing data for the microcontroller (MCU) or some other device capable of communicating over the I2C bus. The voltage is sampled to a 12-bit value using the MCP1101-33 as the voltage reference.
If analog voltage is preferred to be red directly by the MCU, it can be easily done by adding 0 ohm resistor on J1 marked position on PCB, and the sensor output voltage will be available for reading on AN pin of mikroBUS™.
Force 4 Click features the smallest force sensors in the industry with dimensions compact enough which makes it a perfect solution for developing a fine-diameter stylus pen.
Specifications
Type
Force
Applications
Fine-diameter stylus pen evelopment, load and compression sensing, variable tension control and many more
On-board modules
HSFPAR003A
Key Features
High sensitivity and good linearity, precisely detect micro force less than 0.01 N. no characteristics change after 1 million cycles
Interface
Analog,I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Force 4 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 |
---|---|---|---|
PWR | LD1 | – | Power LED Indicator |
J1 | – | NP | Jumper for direct analog voltage reading from sensor |
Software Support
We provide a library for the Force 4 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
Library provides function for reading raw ADC data from device.
Key functions:
uint16_t force4_read_adc( void )
– Reading raw 12 bit ADC data
Examples description
The application is composed of three sections :
- System Initialization – Initialization of I2C communication
- Application Initialization – Mapping pins on selected MIKROBUS
- Application Task – Every 100ms read 12bit adc value from dev
void application_task ( ) { uint16_t adc_val; char demo_txt[ 30 ] = ""; adc_val = force4_read_adc( ); WordToStr( adc_val, demo_txt ); mikrobus_logWrite( "-ADC: ", _LOG_TEXT ); mikrobus_logWrite( demo_txt, _LOG_LINE ); Delay_ms( 100 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- Conversions
- I2C
- 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.