Professional Documents
Culture Documents
7
Experiment TITLE: Flex Sensor
Discussion:
This experiment titled Flex has us student familiarize ourselves with the Flex
Sensor or also known as the bend sensor. The experiment aimed to teach the students
how to program and use the Flex Sensor, specifically, we were tasked to Calibrate the
Flex sensor. This flex sensor is a variable resistor like no other. The resistance of the
flex sensor increases as the body of the component bends. Sensors like these were
used in the Nintendo Power Glove. They can also be used as door sensors, robot
whisker sensors, or a primary component in creating sentient stuffed animals.
The bend of the of the sensor is detected by the change in resistance it is
essentially a potentiometer that is dependent on how much the sensor is bent. The
Challenge of the Experiment is to properly create the program that corresponds to the
proper resistance in the Arduino Uno Program. Repeatedly Testing with the use of a
protractor to check if the actual bend of the Flex Sensor is accurate to the output of the
program.
Learning Objectives:
Roca , Reimbert
Randalla Programmed
2 100% 100
the arduino
Fernando , Bon
Keno R. Brought the
4 100% 100
laptop
Legend:
1. USB Data Cable (Yellow)
2. Arduino Uno
3. Bread Board
4. 3 pieces Green Connecting wire
5. 10K ohm Resistor
6. Flex Sensor
List of ACTUAL SAFETY procedures implemented in this experiment:
Steps:
1. Identify all the different parts needed for the set up
2. Assemble the Flex Sensor setup, referencing from the manual provided.
3. Make sure the wires are connected properly between the Arduino Uno and Flex
sensor
4. Connect the Arduino Uno to the Laptop using the Provided Data Cable.
5. Open the Arduino Program
6. Referencing from the Arduino Site, Copy the Provided Code.
7. Make necessary adjustment to the code if errors are found.
8. Using a Protractor Test if the Arduino Program is reading the Resistance of the
Flex sensor, and if it outputs the proper angles.
10. If data recorded is Correct, Disassemble the set up and put away the
components.
Arduino Code:
int flexSensorPin = A0; // This declares flexSensorPin as an integer connected at
analog pin 0.
void setup()
Serial.begin(9600); // Open the connection between the computer and the Arduino Uno,
So you may see the Values from the Analog input onto the Computer Screen.
}
void loop() { // This is where the Main code Loop Begins
int flexSensorReading = analogRead(flexSensorPin); // This reads the input from the
flex sensor and stores the reading to flexSensorReading.
Serial.println(flexSensorReading); //Displays the value onto the serial monitor
int flex0to100 = map(flexSensorReading, 512, 614, 0, 100); //The map function enables
the arduino to read values ranging from a minimum of 512 to a maximum of 100. These
values will be set/calibrated to range from only 0 to 100.
Serial.println(flex0to100); //displays a value from 0 to 100 in the serial monitor
delay(500); ;delays output readings by 500ms
}
Data Sheet/ Gathered:
*in degrees
Required Angle Sensor
0 232
30 192
45 175
60 157
90 118
ANALYISIS:
The data we gathered in this experiment was acquired by using a protractor and
ruler. Our experiment was a success because the Arduino Uno Program Successfully
Converted the Resistance being measured when the Flex sensor is bent , and properly
converting that to a known degree Value. We were able to Properly calibrate the Flex
sensor to give out a reading but within a margin of error.
Our readings weren’t 100% accurate but that may be because it is hard to
accurately bend the flex sensor in our setup without pulling it away from the bread
board. Which could cause differences in the resistance values being sent to the Arduino
Uno.
Recommendation:
I recommend that students Immediately ask for the 2 Extra wires so that the Flex
sensor may be connected to the Bread Board through the 2 Extra connecting wires ,
and not connect the Flex sensor itself onto the Bread board. This would allow for more
accurate bending of the Flex sensor, and a proper connection to the bread board so that
the resistance won’t be altered during bending.
Conclusion:
In conclusion to this experiment we were able to achieve the objectives set for
us. We were able to familiarize ourselves with the Flex Sensor and figure out how it
works. It works like a potentiometer increasing its resistance the more it is bent in one
direction. As resistance increases the Arduino Uno program outputs the corresponding
Degree Output,by using the program provided to use we were able to calibrate the Flex
sensor to output the Proper Degree readings as the Flex Sensor was bent to that Angle.
Confirmed with a protractor set up next to the Flex Sensor.
Answer to Questions:
a. Is a flex sensor a type of resistor? How? Describe the function of the flex sensor?
- Yes the Flex Sensor is a type of Resistor, it is a Variable Resistor The
resistance of the flex sensor increases as the body of the component bends.
b. SUGGEST the INDUSTRIAL APPLICATION of this kind of experiment.
- The Flex sensor has many Applications in the Industry, one of the leading
uses is in the robotics segment. Where in it is used to determine the position
of different mechanical arms. Greatly used when mimicking biological body
parts.
c. Individually suggest electrical and mechanical standards or codes and local or
international applicable in this experiment. Cite source/s.