Stufin
Home Quick Cart Profile

2.2inch Flex Sensor

Buy Now on Stufin

Length

2.2 inches (56mm)

Width

0.25 inches (6.4mm)

Thickness

0.01 inches (0.25mm)

Operating Voltage

5V

Operating Current

<1mA

Resistance Range

10k to 100k

Sensitivity

10k to 100k per inch of bending

Response Time

<10ms

Applications

The 2.2inch Flex Sensor is suitable for a wide range of applications, including

Robotics and robotic arms

Wearable technology, such as gesture recognition and motion tracking

Prosthetic limbs and exoskeletons

Gaming controllers and joysticks

Industrial automation and machine learning systems

Conclusion

The 2.2inch Flex Sensor is a versatile and reliable component for measuring bending and flexing in various applications. Its high sensitivity, linear response, and compact size make it an ideal choice for designers and engineers working on projects that require accurate and reliable flex sensing capabilities.

Pin Configuration

  • 2.2inch Flex Sensor Documentation
  • Pin Description
  • The 2.2inch Flex Sensor has 2 pins, which are used to connect the sensor to a microcontroller or other compatible devices. Below is a detailed description of each pin:
  • Pin 1: Signal Pin (S)
  • Function: Output signal from the flex sensor
  • Description: This pin outputs an analog signal that varies in proportion to the degree of bending or flexing of the sensor.
  • Connection: Connect to an analog input pin on a microcontroller or other compatible devices.
  • Pin 2: Ground Pin (GND)
  • Function: Ground reference for the flex sensor
  • Description: This pin provides a ground reference for the sensor and is used to complete the circuit.
  • Connection: Connect to a ground pin on a microcontroller or other compatible devices.
  • Connection Structure:
  • To connect the 2.2inch Flex Sensor to a microcontroller or other compatible devices, follow these steps:
  • 1. Connect Pin 1 (Signal Pin) to an Analog Input Pin: Connect the Signal Pin (S) to an analog input pin on the microcontroller or other compatible devices. This will allow the microcontroller to read the analog signal output from the flex sensor.
  • 2. Connect Pin 2 (Ground Pin) to a Ground Pin: Connect the Ground Pin (GND) to a ground pin on the microcontroller or other compatible devices. This completes the circuit and provides a ground reference for the sensor.
  • Tips and Considerations:
  • When connecting the flex sensor, ensure that the pins are securely connected to avoid loose connections, which can lead to erratic readings.
  • Use a breadboard or PCB to connect the flex sensor to a microcontroller or other compatible devices for a more stable connection.
  • For accurate readings, ensure that the flex sensor is properly calibrated and adjusted according to the manufacturer's specifications.
  • The flex sensor is sensitive to bending and flexing, so handle it with care to avoid damaging the sensor.
  • By following these pin descriptions and connection structures, you can successfully integrate the 2.2inch Flex Sensor into your IoT projects and applications.

Code Examples

2.2inch Flex Sensor Documentation
Overview
The 2.2inch Flex Sensor is a flexible potentiometer that changes its resistance value when bent or curved. It is commonly used in various IoT applications, such as gesture recognition, robotics, and wearable devices, to measure bending or displacement. This documentation provides a comprehensive guide on how to use the 2.2inch Flex Sensor with Arduino and Raspberry Pi platforms.
Technical Specifications
Operating Voltage: 5V
 Resistance Range: 10k - 30k
 Sensitivity: 1k/mm
 Flexibility: Up to 180 bend
 Dimensions: 2.2 inches (55mm) x 0.25 inches (6.3mm) x 0.01 inches (0.25mm)
Connecting the Flex Sensor
To connect the Flex Sensor to your microcontroller board, follow these steps:
1. Connect the VCC pin to a 5V power source.
2. Connect the GND pin to a ground pin on your microcontroller board.
3. Connect the SIG pin to an analog input pin on your microcontroller board.
Code Examples
### Example 1: Arduino - Read Flex Sensor Value
In this example, we will read the Flex Sensor value using an Arduino Uno board and display it on the serial monitor.
```c
const int flexPin = A0;  // Connect SIG pin to analog input A0
void setup() {
  Serial.begin(9600);
}
void loop() {
  int flexValue = analogRead(flexPin);
  flexValue = map(flexValue, 0, 1023, 0, 180);
  Serial.print("Flex Sensor Value: ");
  Serial.print(flexValue);
  Serial.println(" degrees");
  delay(50);
}
```
### Example 2: Raspberry Pi - Flex Sensor with Python
In this example, we will read the Flex Sensor value using a Raspberry Pi and Python, and display it on the console.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
flex_pin = 17  # Connect SIG pin to GPIO 17
GPIO.setup(flex_pin, GPIO.IN)
while True:
    flex_value = GPIO.input(flex_pin)
    flex_angle = (flex_value / 1023)  180
    print("Flex Sensor Value: {:.2f} degrees".format(flex_angle))
    time.sleep(0.05)
```
### Example 3: Gesture Recognition using Flex Sensor and Arduino
In this example, we will use the Flex Sensor to recognize three different gestures: up, down, and neutral. We will use the Arduino Uno board and the `if-else` statement to determine the gesture based on the Flex Sensor value.
```c
const int flexPin = A0;  // Connect SIG pin to analog input A0
void setup() {
  Serial.begin(9600);
}
void loop() {
  int flexValue = analogRead(flexPin);
  if (flexValue < 300) {
    Serial.println("Gesture: Up");
  } else if (flexValue > 700) {
    Serial.println("Gesture: Down");
  } else {
    Serial.println("Gesture: Neutral");
  }
  delay(50);
}
```
Troubleshooting
Ensure that the Flex Sensor is properly connected to the microcontroller board.
 Use a multimeter to measure the resistance value of the Flex Sensor when bent or curved.
 Adjust the sensitivity of the Flex Sensor by adjusting the voltage supply or using a voltage divider circuit.
Conclusion
The 2.2inch Flex Sensor is a versatile component that can be used in a wide range of IoT applications. By following the examples and guidelines provided in this documentation, you can easily integrate the Flex Sensor into your projects and start measuring bending or displacement with ease.