Friday, May 22, 2015

Chapter 2 Glove Implementation 12 Flexible Sensor

2-3 Flexible Sensor
The amount of that 5V that each part gets is proportional to its
resistance. So if the flex sensor and the resistor have the same
resistance, the 5V is split evenly (2.5V) to each part. (Analog reading of 512).
Figure 2.10 shows example of connection of five Flex sensors with
Arduino.








 

Fig 2.10 connection with Arduino

Chapter 2 Glove Implementation 11 Flexible Sensor

2.3 Flexible Sensor
2.3.3 Connection to Arduino.
As with any other kind of variable resistors, they must be used with
a voltage divider to get changing voltages into the analog input pins
(see Fig 2.9).


Fig 2.9 voltage divider for connecting Flex with Arduino

The flex sensor changes its resistance when flexed so we can measure thatchange using one of the Arduino’s analog pins. And to do that we need a fixedresistor that we can use for that comparison (We are using a 22K resistor). This iscalled a voltage divider and divides the 5v between the flex sensor and theresistor.
The analog read on the Arduino is basically a voltage meter. at 5V (its max) it would read 1023, and at 0v it read 0. So we can measure how much voltage is on the flex sensor using the analogRead.

Chapter 2 Glove Implementation 10 Flexible Sensor

2-3 Flexible Sensor
2.3.2 How flex sensors work.
Flex sensors are analog resistors.
It works as variable analog voltage dividers.
Inside the flex sensor are carbon resistive elements within a thin
flexible substrate. More carbon means less resistance.
When the substrate is bent the sensor produces a resistance output
relative to the bend radius.
The range of the resistance value varies from approximately 10 to 50 kilohms when the sensor is bent to 90ยบ.


Fig 2.8 resistance value changes due to bending level

Chapter 2 Glove Implementation 9 Flexible Sensor

2.3 Flexible Sensor


2.3.1 What are the Flex Sensors?
Flex sensors are sensors that change in resistance depending on the
amount of bend on the sensor.
Then they convert the change in bend to electrical resistance , the
more the bend, the more the resistance value.
They are usually in the form of a thin strip from 1"-5" long that vary in resistance
This sensor can be made uni-directional or bi-directional



Fig 2.7 Flex sensor

Chapter 2 Glove Implementation 8 Arduino

2.2.5 Summary of the Arduino Uno board


Fig 2.6 Arduino Board description

Analog Reference pin (orange)
Digital Ground (light green) , Digital Pins 2-12 (green)
Digital Pins 0-1/Serial In/Out - TX/RX (dark green)
Reset Button - S1 (dark blue) , Analog In Pins 0-5 (light blue)
In-circuit Serial Programmer (blue-green)
Power and Ground Pins (power: orange, grounds: light orange)
External Power Supply In (9-12VDC) - X1 (pink)
Toggles External Power and USB Power (place jumper on two pins closest to desired supply) - SV1(purple)
USB (used for uploading sketches to the board and for serial communication
between the board and the computer (yellow)

Chapter 2 Glove Implementation 7 Arduino

2.2 Arduino
Analog pins
The Atmega microcontrollers used in the Arduino boards contain a six channel analog-to-digital converter (ADC). The function of this device is to convert an analog input voltage into a digital number proportional to the magnitude of the input voltage in relation to the reference voltage (5V).
Serial Monitor
The Serial Monitor (at the top right of your Arduino IDE) is a tool to display the serial data being sent from the Arduino board to the
computer (see Fig 2.5).




Fig 2.5 Serial monitor



Chapter 2 Glove Implementation 6 Arduino

2.2 Arduino




 Fig 2.4 Arduino Input and Output Pins









 

Digital pins
There are 14 digital pins, numbered from 0 to 13. The digital pins can be configured as INPUT or OUTPUT, using the pinMode() function. On both modes, the digital pins can only send or receive digital signals,which consist of two different states: ON (HIGH or 5V) and OFF (LOW,or 0V).