Flex Sensor Pin and Working Details

The Flex Sensor is variable flexible  carbon resistor. As a variable printed resistor, the Flex Sensor achieves great form-factor on a thin flexible substrate. When the substrate is bent, the sensor produces a resistance output correlated to the bend radius—the smaller the radius, the higher the resistance value.
Flex sensors are in two sizes.
A. 2.2 inch ( Model: FS-L-0055 ).
B. 4.5 inch.
Although the sizes are different the basic function remains the same. They are also divided based on resistance. There are LOW resistance, MEDIUM resistance and HIGH resistance types. Choose the appropriate type depending on requirement.
Flex sensor is a basically a variable resistor whose terminal resistance increases when the sensor is bent. So this sensor resistance increases depends on surface linearity. So it is usually used to sense the changes in linearity.
FLEX SENSOR WORKING DETAILS:
Flex sensor is a completely linear it will be having its nominal resistance. When it is bent 45º angle the this resistance increases to twice as before. And when the bent is 90º the resistance could go as high as four times the nominal resistance. So the resistance across the terminals rises linearly with bent angle. So in a sense the Flex sensor converts flex angle to resistance.For convenience we convert this resistance into voltage.
Voltage Divider Circuit Diagram:
In this resistive network we have two resistances. One is constant resistance (R1) and other is variable resistance (RV1). Vo is the voltage at midpoint of VOLTAGE DIVIDER circuit and is also the output voltage. Vo is also the voltage across the variable resistance (RV1).
So when the resistance value of RV1 is changed the output voltage Vo also changes. So we will have resistance change in voltage change with VOLTAGE DIVIDER circuit.
PIN CONFIGURATIONS:
Basically Flex sensor is a two terminal resistor type. So it is not a polarized terminals like diode.
PIN-1: Connected to positive of power supply.
PIN-2: Connected to ground.
SPECIFICATIONS.
1. Operating voltage of FLEX SENSOR: 0-5V.
2. Can operate on LOW voltages
3. Power rating: 1/2 Watt, 1 Watt (peak)
4. Life: 1 million
5. Operating temperature: -45ºC to +80ºC
6. Flat Resistance: 25K Ω
7. Resistance Tolerance: ±30%
8. Bend Resistance Range:/45K to 125K Ohms(depending on bend)
APPLICATIONS:
A. Automotive controls.
B. Medical devices.
C. Industrial controls.
D. Computer peripherals.
E. Fitness products.
F. Musical instruments.
G. Measuring devices.
H. Virtual reality games.
I. Consumer products.
J. Physical therapy.
FLEX SENSOR WITH LCD AND SERVO MOTOR CIRCUIT:
FLEX SENSOR WITH ARDUINO SKETCH:
Copy and paste below given code or download bottom of the given link:
//Circuito.io is an automatic generator of schematics and code for off
// Copyright (C) 2016 Roboplan Technologies Ltd.
// Include Libraries
#include “Arduino.h”
#include “Flex.h”
#include “LiquidCrystal.h”
#include “Servo.h”
// Pin Definitions
#define FLEX5V_PIN_SIG A3
#define LCD_PIN_RS 7
#define LCD_PIN_E 6
#define LCD_PIN_DB4 2
#define LCD_PIN_DB5 3
#define LCD_PIN_DB6 4
#define LCD_PIN_DB7 5
#define SERVO360MICRO_PIN_SIG 8
// object initialization
Servo servo360Micro;
Flex flex5v(FLEX5V_PIN_SIG);
LiquidCrystal lcd(LCD_PIN_RS,LCD_PIN_E,LCD_PIN_DB4,LCD_PIN_DB5,LCD_PIN_DB6,LCD_PIN_DB7);
// define vars for testing menu
const int timeout = 10000; //define timeout of 10 sec
char menuOption = 0;
long time0;
// Setup the essentials for your circuit to work. It runs first every time your circuit is powered with electricity.
void setup()
{
// Setup Serial which is useful for debugging
// Use the Serial Monitor to view printed messages
Serial.begin(9600);
while (!Serial) ; // wait for serial port to connect. Needed for native USB
Serial.println(“start”);
// set up the LCD’s number of columns and rows
lcd.begin(16, 2);
menuOption = menu();
}
// Main logic of your circuit. It defines the interaction between the components you selected. After setup, it runs over and over again, in an eternal loop.
void loop()
{
if(menuOption == ‘1’)
{
// Flex Sensor 4.5” – Test Code
// Read Flex sensor value.
int flex5vVal = flex5v.read();
Serial.print(F(“flex5vVal: “)); Serial.println(flex5vVal);
}
else if(menuOption == ‘2’) {
// LCD 16×2 – Test Code
// Print a message to the LCD.
lcd.setCursor(0, 0);
lcd.print(“Circuito Rocks !”);
// Turn off the display:
lcd.noDisplay();
delay(500);
// Turn on the display:
lcd.display();
delay(500);
}
else if(menuOption == ‘3’) {
// Continuous Rotation Micro Servo – FS90R – Test Code
// The servo will rotate CW in full speed, CCW in full speed, and will stop with an interval of 2000 milliseconds (2 seconds)
servo360Micro.attach(SERVO360MICRO_PIN_SIG); // 1. attach the servo to correct pin to control it.
servo360Micro.write(180); // 2. turns servo CW in full speed. change the value in the brackets (180) to change the speed. As these numbers move closer to 90, the
servo will move slower in that direction.
delay(2000); // 3. waits 2000 milliseconds (2 sec). change the value in the brackets (2000) for a longer or shorter delay in milliseconds.
servo360Micro.write(0); // 4. turns servo CCW in full speed. change the value in the brackets (0) to change the speed. As these numbers move closer to 90, the
servo will move slower in that direction.
delay(2000); // 5. waits 2000 milliseconds (2 sec). change the value in the brackets (2000) for a longer or shorter delay in milliseconds.
servo360Micro.write(90); // 6. sending 90 stops the servo
delay(2000); // 7. waits 2000 milliseconds (2 sec). change the value in the brackets (2000) for a longer or shorter delay in milliseconds.
servo360Micro.detach(); // 8. release the servo to conserve power. When detached the servo will NOT hold it’s position under stress.
}
if (millis() – time0 > timeout)
{
menuOption = menu();
}
}
// Menu function for selecting the components to be tested
// Follow serial monitor for instrcutions
char menu()
{
Serial.println(F(“\nWhich component would you like to test?”));
Serial.println(F(“(1) Flex Sensor 4.5””));
Serial.println(F(“(2) LCD 16×2”));
Serial.println(F(“(3) Continuous Rotation Micro Servo – FS90R”));
Serial.println(F(“(menu) send anything else or press on board reset button\n”));
while (!Serial.available());
// Read data from serial monitor if received
while (Serial.available())
{
char c = Serial.read();
if (isAlphaNumeric(c))
{
if(c == ‘1’)
Serial.println(F(“Now Testing Flex Sensor 4.5””));
else if(c == ‘2’)
Serial.println(F(“Now Testing LCD 16×2”));
else if(c == ‘3’)
Serial.println(F(“Now Testing Continuous Rotation Micro Servo – FS90R”));
else
{
Serial.println(F(“illegal input!”));
return 0;
}
time0 = millis();
return c;
}
}
}
Download Full Arduino Uno sketch code here.Flex sensor with servo and lcd

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.