Flex (strain) sensor

Specifications

  • Sensor resistance when straight: 10 kΩ ±30%.
  • Sensor resistance when bent: 60–110 kΩ.
  • Nominal power: 0.5 W.
  • Peak power: 1 W.
  • Flex life: more than 1 million cycles.
  • Operating temperature: −35 to +80 °C.
  • Flexible section dimensions (L × W): 100 × 6.35 mm.

The sensor circuit has a trimmer resistor used to set the circuit’s output zero point.

Overview

A strain gauge is a resistor whose resistance changes when it is deformed. Strain gauges are used in strain measurement to measure deformation in mechanically coupled components. They are a core part of strain sensors used to indirectly measure force, pressure, weight, mechanical stress, torque, and other quantities.

Applications

The sensor can be used to:

  • Measure angles and displacement.
  • Analyze bending to infer a device’s physical state or movement.

When the strain gauge’s conductive elements are stretched, they become longer and thinner, increasing resistance. Compression decreases resistance.

Connecting

The sensor uses a standard 3-pin connector and plugs into any IN port on the Trackduino controller.

Programming

The sensor block is in the Sensors block group.

Block and generated functionDescription
Flex sensor reading block
int bend(int port)
Returns a value from 0 to 1023 corresponding to the resistance level.
int port: port connected to the sensor.

Example project

Controlling a servomotor

Generated code:

#include <Servo.h>

Servo servo_port_OUT1;

void setup()
{
  servo_port_OUT1.attach(OUT1, BIG_SERVO);
}

void loop()
{
  servo_port_OUT1.write( ( bend(IN1) / 10 ) ); // map resistance readings to the servomotor angle
  // Dividing by 10 keeps the rotation angle between 0 and 102 degrees.
}