Method to interface and use Flexibend sensor

Introduction

Flex sensors are sensors that change in resistance depending on the amount of bend on the sensors. They convert the change in bend to electrical resistance-the more the bend, the more the resistance value. They usually in form of strip from 1″ to 5″ long that vary in resistance. The Flex sensors are analog resistors and work as variable analog voltage dividers. Inside the flex sensor are carbon resistive elements within a thin flexible substrate. More carbon mean less resistance.When the substrate is bent the sensor produces a resistance output relative to the bend radius-the smaller the radius, the higher the resistance value..


Figure 1: The resistance of Flex sensor change proportion to the angle of bend

SN-FLX-01

According to Spectra Symbol (the manufacturer), this simple 4.5″ flex sensor was used in the original Nintendo Power Glove, which was one of the first cool hackable electronic toys. As the sensor is flexed, the resistance across the sensor increases (bending with text on inside of curve).
The data sheet can be download from here
 
Flex Sensor Features:
  • Straight (unflexed) resistance: ~9000 Ohm
  • 90 degree bend resistance: ~14000 Ohm
  • 180 degree bend resistance : ~22000 Ohm
  • Connector is 0.1″ spaced and bread board friendly.

SN-FLX-02

This is a simple flex sensor 2.2″ in length. As the sensor is flexed, the resistance across the sensor increases. Made by Spectra Symbol; they claim these sensors were used in the original Nintendo Power Glove.The resistance of the flex sensor changes when the metal pads are on the outside of the bend (text on inside of bend) and the connector is 0.1″ spaced and breadboard friendly. It is lower cost and shorter Flexible Bend Sensor. This is 2.2 inches in length which is shorter as compared to 4.5 inches version. The data sheet can be download from here
*Note: To ensure sensor longevity, make sure to add strain relief between the connector and the plastic backing.
Flex Sensor Features:
  • Life Cycle: >1 million
  • Height: 0.43 mm (0.017″)
  • Temperature Range: -35°C to +80°C
  • Flat Resistance: 25K Ohms
  • Resistance Tolerance: ±30%
  • Bend Resistance Range: 45K to 125K Ohms (depending on bend radius)
  • Power Rating: 0.50 Watts continuous. 1 Watt Peak

In this tutorial, you will going to learn on how to implement and use the flexible bend (for SN-FLX-01 and SN-FLX-02) by using BBFuino and SK28A. The setup and the source code shared at here will result the voltage display on LCD as you bend the flexible sensor.

Hardware and Accessories

                     
            1 x BBFuino                                               1 x SK28A                                             1 x SN-FLX-01
           
          1 x SN-FLX-02                                          1 x LCD (8×2)                                 1 x Breadboard GL-12 (C&D)        
                           
   1 x 100k ohm resistor                                  Male to Male Jumper Wires               1 x Atten 830L Digital Multimeter
 
                      
         2 x 10k ohm resistor                                    1 x 6.8k ohm resistor                                       1 x 22k ohm resistor
                     
          1 x 20k ohm resistor                             PC104 Header Pin (2×20)                      Straight Pin Header (Male) 2×40 Ways
            1 x IC LM324
  

Getting Started

Part 1: BBFuino with SN-FLX-01 and SN-FLX-02

1. A cutter used to cut the 2×40 header pin (Male) into 2×8 ways. The pins was soldered to the 2×8 LCD as shown below.
                                                
                                                  Before (Front view)                                     After (Back view)

                                                 Figure 1: Soldering the header pins onto the 2×8 LCD

2. A 2×40 header pins (Female) was cutting into 2×8 ways and being soldered onto the LCD pad (DS3) of BBFuino board as shown below.
                                                      
                                                          Front view                                                 Back view

                                                 Figure 2: Soldering the header pin onto the BBFuino Board

3. Soldered the JP8 on the BBFuino as shown below in order the LCD backlight can be function properly.
                                                        
                                                         Before                                                            After

                                                   Figure 3: Soldering the JP8 on the BBFuino board

4. The 2×8 LCD with 2×8 ways of header pin was plug in into the BBFuino board and fit them to a breadboard as shown below.
                                         

                                   Figure 4: 2×8 LCD plug to the BBFuino board and fit them to a breadboard

5. Measure the SN-RLX-1 and SN-RLX-02 resistance when it is unflexed and it is flexed to 90 degree in order to choose the suitable resistor for voltage divider purposed.
    
                  a) Unflexed ~ 10.95k ohm                       b) 90 degree bend resistance ~ 16k ohm              c)180 degree bend resistance ~ 19.5k ohm
                                                          Figure 5: The degree bend resistance of SN-RLX-01
 
    
                  a) Unflexed ~ 39.2k ohm                                    b) 90 degree bend resistance ~ 68.5k ohm                   b) 180 degree bend resistance ~ 125.0k ohm

                                                       Figure 6: The degree bend resistance of SN-RLX-02

6. Next, connect the circuit as the schematic provided.
    

                                                                     a) BBFuino and SN-FlX-01 schematic

                                                                          b) BBFuino and SN-FlX-02 schematic
 
 

                                                                   c) The connection between BBFuino and SN-FlX-01with LM324

                    d) The connection between BBFuino and SN-FlX-02 with LM324

*Note: The LM324 used in here in order to amplify the voltage different between unflexed bend resistance and 180 degree bend resistance. The Op Amp gain can be caculated by A = 1 + [22/(20 + 10)] ~= 1.7

7. Plug in the power supply. Bend the flexible bend to certain degree to observed the voltage change by using digital multimeter.
a) BBFuino with SN-FLX-01
              
           a) Voltage(unflexed bend resistance) ~ 3.48V                              b) Voltage(90 degree bend resistance) ~ 4.16V

                                       Figure 7: The voltage vary with the degree bend resistance of SN-RLX-01

a) BBFuino with SN-FLX-02
         
           a) Voltage(unflexed bend resistance) ~ 2.46V                                Voltage(90 degree bend resistance) ~ 3.72V

                                          Figure 8 The voltage vary with the degree bend resistance of SN-RLX-02

8. The following show the some part of the sample source code..
    Arduino Ide version 0021  for BBFuino can be download from here
   
    main function: It will obtain the analog value and display it as decimal on the LCD
         
    sub-function: It read the data for 1000 times and return an average value to main function
 
Note: The sample source file can be downloaded from the attachment below.
 
9. Load the source code the the BBFuino. Bend the flexible sensors and observed the result.
a) The circuit connection with SN-FLX-01
         
             a) Voltage(unflexed bend resistance) ~ 3.4V                     b) Voltage(90 degree bend resistance) ~ 4.1V
                                       Figure 9: The voltage vary with the degree bend resistance of SN-RLX-01
From the theoretical calculation,
~~ unflexed voltage = [10.95/(10.95 + 16.8)] *5 *1.7 = 3.35V
~~ 90 degree bend resistance voltage = [16/(16 + 16.8)] * 5 *1.7 = 4.15V
From the result obtained, the value obtained was roughly the same as the theoretical value.
**Note: The voltage measured by digital multimeter was differ from the voltage obtained was due to the loading effect of the digital multimeter
 
b) The circuit connection with SN-FLX-02
          
         a) Voltage(unflexed bend resistance) ~ 2.4V                 b) Voltage(90 degree bend resistance) ~ 3.5V
                                          Figure 10: The voltage vary with the degree bend resistance of SN-RLX-02
 From the theoretical calculation,
~~  unflexed voltage = [39.2/(39.2+ 100)] * 5 *1.7 = 2.39V
~~ 90 degree bend resistance voltage = [68.5/(68.5 + 100)] * 5 *1.7 = 3.46V
From the result obtained, the value obtained was roughly the same as the theoretical value.
**Note: The voltage measured by digital multimeter was differ from the voltage obtained was due to the loading effect of the digital multimeter
 
Part 2: SK28A with SN-FLX-01 and SN-FLX-02

1. Repeat the step 1 to step 4 in section Part 1.

2 Next, connect the circuit as the schematic provided.
  

                                                                            a) SK28A and SN-FlX-01 schematic

                                                                               b) SK28A and SN-FlX-02 schematic
 

                                              c) The connection between SK28A and Flexible sensors with LM324 Op-Amp

          d) The connection between SK28A and Flexible sensors with LM324 op-amp

*Note: The LM324 used in here in order to amplify the voltage different between unflexed bend resistance and 180 degree bend resistance. The Op Amp gain can be caculated by A = 1 + [22/(20 + 10)] ~= 1.7

3) The following show the some part of the sample source code..
    The used for this tutorial is PIC16F876A.
    The MPlab X version 1.20 and XC8 compiler version 1.0 can be downloaded from here
    Please refer to here for MPlab X tutorial
   
    main function: It will obtain the analog value and display it as decimal on the LCD
   
Note: The sample source file can be downloaded from the attachment below.
 
4. Load the source code the the SK28A. Bend the flexible sensors and observed the result.
a) The circuit connection with SN-FLX-01
          
      a) Voltage(unflexed bend resistance) ~ 3.36V                  b) Voltage(90 degree bend resistance) ~ 4.15V
                                       Figure 11: The voltage vary with the degree bend resistance of SN-RLX-01
From the theoretical calculation,
 ~~  unflexed voltage = [10.95/(10.95 + 16.8)] * 5 * 1.7 = 3.35V
 ~~ 90 degree bend resistance voltage = [16/(16 +16.8)] * 5 * 1.7 = 4.15V
From the result obtained, the voltage obtained was roughly the same as the theoretical value.**
**Note: The voltage measured by digital multimeter was differ from the voltage obtained was due to the loading effect of the digital multimeter
 
b) The circuit connection with SN-FLX-02
          
         a) Voltage(unflexed bend resistance) ~ 2.43V                b) Voltage(90 degree bend resistance) ~ 3.43V
                                          Figure 12 The voltage vary with the degree bend resistance of SN-RLX-02
From the theoretical calculation,
~~ unflexed voltage = [39.2/(39.2+ 100)] * 5 *1.7 = 2.39V
~~ 90 degree bend resistance voltage = [68.5/(68.5 + 100)] *5 * 1.7 = 3.46V
From the result obtained, the voltage obtained was roughly the same as the theoretical value.
**Note: The voltage measured by digital multimeter was differ from the voltage obtained was due to the loading effect of the digital multimeter
 

The tutorial ends here…

Attachment
Flexible Sensors_BBFuino.zip
Flexible Sensors_SK28A.X.zip
, , ,

Related Post

How to Make your Line Following Robot Faster?

Control Mobile Robot through WiFi with ESP-WiFi Shield (Arduino + Andriod)

Arduino + 2A motor + Encoder

Arduino + 2A Motor Shield + Encoder Motor

ESPresoo Lite V2 Package

Bringing IoT to Everyone – Collaboration of ASEAN Makers

2 thoughts on “Method to interface and use Flexibend sensor

  1. sir
    The flex sensor interfacing is very seful for our project.
    i need assembly language program for flex sensor interfacing. plz send it to our mail id.

  2. Sorry, we only have the C code for Arduino and MPLAB. You need to understand the program and translate it into assembly. You may consider to get the BBFuino (Arduino compatible) or SK28A (28-pin PIC Start Up Kit) from Cytron too. Thanks.

Leave a Reply

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