Tutorial about Flex Sensor and ARDUINO
Flex sensor and ARDUINO UNO:
The flex sensor are sensor that change in resistance depending on the amount of the bend on the sensor. They convert the change in bend to electrical resistance, they are usually in form of a thin strip from 1" - 5" long that vary in resistance and they can be made uni-directional or bi-directional. These flex sensors are being patented technology by spectra symbol. Also this flex sensor can be used to do prototype and use for a lot kind of enterprise, work on computer, for the movement of the hand and other thing based on technology and also is a good option to use in the future when you use a computer and without the need of a keyboard, just can use these to move everything with the use of the hands. In this investigation I work with the Flex Sensor to find how is the range of inclination and degree about the fingers, also do a simulation about the hand on computer including an accelerometer for a future time, also this can be use for robotic experiment.
Here is a tutorial of how is connect the cables to the ARDUINO UNO and the Flex Sensor with the port cable.
Materials:
1. Flex Sensors
2. Wires
3. Resistance (2.2 to 10kohm)
4. Card ARDUINO UNO
5. Glove for the Flex Sensor
Connection:
1. Place ARDUINO UNO to computer.
2. Connect the wire to the Flex Sensor using welding.
3. Connect the resistance to green cable using welding.
4. Doing the step 3 connect other cable to resistance and connect to the annalog.
5. Doing the step 3 to 4 connect another wire to resistance and connect to GND.
6. Connect the white wire to the 5V.
Code:
// FLEX SENSOR TEST PROGRAM
// HARDWARE:
// MAKE THE FOLLOWING CONNECTION BETWEEN THE ARDUINO AND THE FLEX SENSOR
// NOTE THAT THE FLEX SENOR PINS ARE INTERCHANGEABLE
// SENSOR PIN - GND
// SENSOR PIN - ANALOG INDEX 0,WITH RESISTOR TO +5V (A0)
// SENSOR PIN - ANALOG HEART, WITH RESISTOR TO +5V (A1)
// SENSOR PIN - ANALOG ANNULAR, WITH RESISTOR TO +5V (A2)
// HARDWARE:
// MAKE THE FOLLOWING CONNECTION BETWEEN THE ARDUINO AND THE FLEX SENSOR
// NOTE THAT THE FLEX SENOR PINS ARE INTERCHANGEABLE
// SENSOR PIN - GND
// SENSOR PIN - ANALOG INDEX 0,WITH RESISTOR TO +5V (A0)
// SENSOR PIN - ANALOG HEART, WITH RESISTOR TO +5V (A1)
// SENSOR PIN - ANALOG ANNULAR, WITH RESISTOR TO +5V (A2)
// SENSOR PIN - ANALOG PINKY, WITH RESISTOR TO +5V (A3)
// SENSOR PIN - ANALOG THUMB, WITH RESISTOR TO +5V (A4)
// INSTRUCTIONS:
// UNPLOAD THIS SKETCH TO YOUR ARDUINO, THEN ACTIVATE THE SERIAL MONITOR
// SET THE SERIAL MONITOR TO 9600 BAUD
int index;
int heart;
int annular;
int pinky;
int thumb;
void setup()
{
// put your setup code here, to run once:
Serial.begin (9600);
}
void loop()
{
// put your main code here, to run repeatedly:
Serial.print (index);
Serial.print(",");
index = analogRead (A0);
Serial.print (index);
Serial.print(",");
index = map (index, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO INDEX FINGER
Serial.print (heart);
Serial.print(",");
heart = analogRead (A1);
Serial.print (heart);
Serial.print(",");
heart = map (heart, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO HEART FINGER
// INSTRUCTIONS:
// UNPLOAD THIS SKETCH TO YOUR ARDUINO, THEN ACTIVATE THE SERIAL MONITOR
// SET THE SERIAL MONITOR TO 9600 BAUD
int index;
int heart;
int annular;
int pinky;
int thumb;
void setup()
{
// put your setup code here, to run once:
Serial.begin (9600);
}
void loop()
{
// put your main code here, to run repeatedly:
Serial.print (index);
Serial.print(",");
index = analogRead (A0);
Serial.print (index);
Serial.print(",");
index = map (index, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO INDEX FINGER
Serial.print (heart);
Serial.print(",");
heart = analogRead (A1);
Serial.print (heart);
Serial.print(",");
heart = map (heart, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO HEART FINGER
Serial.print (annular);
Serial.print(",");
annular = analogRead (A2);
Serial.print (annular);
Serial.print(",");
annular = map (annular, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO ANNULAR FINGER
Serial.print (pinky);
Serial.print(",");
pinky = analogRead (A3);
Serial.print (pinky);
Serial.print(",");
pinky = map (pinky, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO PINKY FINGER
Serial.print (thumb);
Serial.print(",");
thumb = analogRead (A4);
Serial.print (thumb);
Serial.print(",");
thumb = map (thumb, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO THUMB FINGER
Serial.println ();
delay (1000);
}
Serial print:
The data sheet and the analysis of how is move the fingers.
Video:
A video about how is going the resistance and the connection to the ARDUINO UNO using a glove with the flex sensor.
More Information:
More information about the sensor can be found on the:
http://www.spectrasymbol.com/ (for other future investigation)
https://celebratelife24x7.wordpress.com/2014/11/17/arduino-project-5robotic-hand/ (here can find the code and do a prototype on the third link)
Serial.print (annular);
Serial.print(",");
annular = analogRead (A2);
Serial.print (annular);
Serial.print(",");
annular = map (annular, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO ANNULAR FINGER
Serial.print (pinky);
Serial.print(",");
pinky = analogRead (A3);
Serial.print (pinky);
Serial.print(",");
pinky = map (pinky, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO PINKY FINGER
Serial.print (thumb);
Serial.print(",");
thumb = analogRead (A4);
Serial.print (thumb);
Serial.print(",");
thumb = map (thumb, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO THUMB FINGER
Serial.println ();
delay (1000);
}
Flex sensor y el ARDUINO UNO:
Los flex
sensor son sensores que tienen cambio de resistencia dependiendo del aumento de
la curva de los sensores. Estos se convierten en un cambio de cambio a la
resistencia electrica, tambien son usualmente en forma de una tira fina y
tienen un largo de 1" - 5" que varia en la resistencia
y también se pueden hacer en forma uni-direccional o o
bi-direccional. Los flex sensor son echos y patentizados por spectra
symbol. también los flex sensor se pueden utilizar para hacer
prototipos y usarlo para diferentes tipos de empresas y trabajarla en el
uso de una computadora, para hacer movimientos de la mano simulados en una
computadora que sea basado todo en tecnologia o robotica, tambien para el
futuro cuando se este usando una computadora no tengas que utilizar el teclado
y solamente trabajes con tan solo utilizar las manos con este tipo de sensores.
En esta investigacion estuve trabajando con los flex sensor para encontrar el
rango de inclinacion y el grado de los dedos, tambien hacer una simulacion de
la mano en la computadora incluyendo el acelerometro para trabajarlo en el
futuro, también utilizarlo para experimentos de robotica.
Aqui un tutorial de como va conectado los cables en el ARDUINO UNO y los Flex Sensor con cable de entrada a la computadora.
Materiales:
1. Flex Sensors
2. Cables
3. Resistencia (2.2
to 10kohm)
4. Tarjeta ARDUINO
UNO
5. Guante para los
Flex Sensor
Coneccion:
1. Programar
ARDUINO UNO a la computadora.
2. Conectar los
cables a los Flex Sensor utilizando soldadura.
3. Conectar la
resistencia al cable verde utilizando soldadura.
4. Hacer el paso 3
conectando otro cable a la resistencia y conectarlo al analogo.
5. Hacer el paso
del 3 - 4 conectando otro cable a la resistencia y conectarlo al GND.
6. Conectar el
cable blanco a los 5V.
Código:
// FLEX SENSOR TEST PROGRAM
// HARDWARE:
// MAKE THE FOLLOWING CONNECTION BETWEEN THE ARDUINO AND THE FLEX SENSOR
// NOTE THAT THE FLEX SENOR PINS ARE INTERCHANGEABLE
// SENSOR PIN - GND
// SENSOR PIN - ANALOG INDEX 0,WITH RESISTOR TO +5V (A0)
// SENSOR PIN - ANALOG HEART, WITH RESISTOR TO +5V (A1)
// SENSOR PIN - ANALOG ANNULAR, WITH RESISTOR TO +5V (A2)
// HARDWARE:
// MAKE THE FOLLOWING CONNECTION BETWEEN THE ARDUINO AND THE FLEX SENSOR
// NOTE THAT THE FLEX SENOR PINS ARE INTERCHANGEABLE
// SENSOR PIN - GND
// SENSOR PIN - ANALOG INDEX 0,WITH RESISTOR TO +5V (A0)
// SENSOR PIN - ANALOG HEART, WITH RESISTOR TO +5V (A1)
// SENSOR PIN - ANALOG ANNULAR, WITH RESISTOR TO +5V (A2)
// SENSOR PIN - ANALOG PINKY, WITH RESISTOR TO
+5V (A3)
// SENSOR PIN - ANALOG THUMB, WITH RESISTOR TO
+5V (A4)
// INSTRUCTIONS:
// UNPLOAD THIS SKETCH TO YOUR ARDUINO, THEN ACTIVATE THE SERIAL MONITOR
// SET THE SERIAL MONITOR TO 9600 BAUD
int index;
int heart;
int annular;
int pinky;
int thumb;
void setup()
{
// put your setup code here, to run once:
Serial.begin (9600);
}
void loop()
{
// put your main code here, to run repeatedly:
Serial.print (index);
Serial.print(",");
index = analogRead (A0);
Serial.print (index);
Serial.print(",");
index = map (index, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO INDEX FINGER
Serial.print (heart);
Serial.print(",");
heart = analogRead (A1);
Serial.print (heart);
Serial.print(",");
heart = map (heart, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO HEART FINGER
// INSTRUCTIONS:
// UNPLOAD THIS SKETCH TO YOUR ARDUINO, THEN ACTIVATE THE SERIAL MONITOR
// SET THE SERIAL MONITOR TO 9600 BAUD
int index;
int heart;
int annular;
int pinky;
int thumb;
void setup()
{
// put your setup code here, to run once:
Serial.begin (9600);
}
void loop()
{
// put your main code here, to run repeatedly:
Serial.print (index);
Serial.print(",");
index = analogRead (A0);
Serial.print (index);
Serial.print(",");
index = map (index, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO INDEX FINGER
Serial.print (heart);
Serial.print(",");
heart = analogRead (A1);
Serial.print (heart);
Serial.print(",");
heart = map (heart, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO HEART FINGER
Serial.print (annular);
Serial.print(",");
annular = analogRead (A2);
Serial.print (annular);
Serial.print(",");
annular = map (annular, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO ANNULAR FINGER
Serial.print (pinky);
Serial.print(",");
pinky = analogRead (A3);
Serial.print (pinky);
Serial.print(",");
pinky = map (pinky, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO PINKY FINGER
Serial.print (thumb);
Serial.print(",");
thumb = analogRead (A4);
Serial.print (thumb);
Serial.print(",");
thumb = map (thumb, 90, 10, 0, 179);
Serial.print("\t");
// COMMAND TO THUMB FINGER
Serial.println ();
delay (1000);
}
Impresión de la serie:
La hoja de datos y el análisis de como se mueven los dedos.
Video:
Un vídeo sobre
como van conectadas las resistencias y la coneccion al ARDUINO UNO utilizando el
guante con los flex sensor.
Mas Información:
Mas información sobre
los sensores puede ser conseguida en:
http://www.spectrasymbol.com/ (para otras
investigaciones futuras)
(aquí
puede conseguir el código y prototipo en la tercera pagina)
No hay comentarios.:
Publicar un comentario