TELEO
 
 
 
 
 
 
COOKBOOK
 

Bend Sensor

How to Use a Bend Sensor:

 

Concept Overview

Circuit Diagram

Component Selection

Wiring the Bend Sensor

A Max Patch using a Bend Sensor

Flash Code using a Bend Sensor

Project Ideas

Glossary

 

 
   

Initial Setup Requirements:

Components:

Bend Sensor
Multi I/O module
Resistors
Wire

Tools:

Soldering Iron
Solder
Voltmeter

 

Concept Overview

A bend sensor is a type of resistor. It is composed of tiny patches of carbon that change resistance values when bent from convex to concave shapes. The bend sensor is used in conjunction with a voltage divider to provide changing voltages, which the Teleo reads on an Analog input.


fig. 1: Concept Diagram

 

Circuit Diagram

The circuit used is a plain voltage divider. It is used since we need to present a voltage to the Analog In device and the bend sensor merely changes resistance. You can see in the circuit below that the as the resistance of the bend sensor reduces (as a result of bending it into a convex shape) the voltage on Ain will go up towards 5V. If the resistance of the bend sensor decreases (as a result of bending it in the opposite direction) the voltage on Ain will fall towards Gnd (0V).

For an explanation of symbols, refer to circuit basics



fig. 2: circuit diagram

Component Selection

In order to make a suitable voltage divider, we determined the 12 k resistor value by hooking up the bend sensor to an ohmmeter and measuring its resistance while straight. Its resistance was very near 13 k, so a 12 k resistor was adequate.

 

Wiring the Bend Sensor

Wire a 12 k resistor from +5V to the analog in, shown using red and yellow wire in figure 3. Then connect a wire from ground to one lead of the bend sensor, represented here as the black wire. It doesn not matter which lead on the bend sensor you attach it to. Then attach a wire from the sensor's unused lead to the end of the resistor that's connected to the analog in, shown here in orange. After that, you're ready to bend.



fig. 3: bend sensor wiring

 

A Max Patch Using a Bend Sensor


fig. 4: Bend Sensor Max Patch

 

This patch is part of a larger patch used to control an animatronic hand with a bend sensor. The general idea of this patch is that numerical values returned from the bend sensor are used to control the position of a slider. The slider's values are then scaled appropriately to enable control of a servo. Information from the analog in could have been fed directly to a servo, but the vertical slider enables the user to control the servo directly from the computer screen if desired.

The two number boxes on the top left describe an input range for the bend sensor. They will need frequent adjustment, because the bend sensor will not stay calibrated for very long if it is severely bent. The bottom right box, t.servo, is a servo control object that requires the use of a Teleo Servo Module.

Flash Code Using A Bend Sensor

Objective
Control Flash with analog input from the bend sensor through an Intro Module.

How To
1. Be sure your Teleo module and the bend sensor are properly connected.

2. Run the Teleo XML server. Check the user guide for more information.

3. Create a Flash movie.

4. Insert the code found below into the Action Window in the first frame of a new layer called "Actions". The lines following "//" symbols are comments, which are ignored when the code is run but can help the coder keep track of what certain lines of code mean.

5. Run the movie, then vary the degree to which the sensor is bent. In the Output Window, notice how the "New Analog In Value" changes in response.

Code   
//import the MakingThings Class Libraries 
import com.makingthings.*;
   
//create a new Intro Analog In object
var ain:TIntroAin = new TIntroAin( 0 );
   
//read the analog input value each time it is changed
ain.onValue = function( value:Number)
{
      //display the current analog in value in a separate output window
      trace("New Analog In Value: " + value);
      //now do something useful with the value
 }

Project Ideas Using a Bend Sensor

Actuation
Bend sensors are an ideal input device for controlling limblike mechanisms, because they can be easily attached to your finger or elbow to track movement.

Control
Since bending fingers and elbows is a very easy motion to make, bend sensors make for excellent input devices for controlling any kind of function.

Detection
Position a bend sensor to be in the path of an object, so that when the object passes by it deflects the bend sensor.

copyright © 2002-2004 MakingThings LLC