Space Frame Structure Force Sensors

Written by: roboguru

Picture of Space Frame Structure Force Sensors

Space frames are super efficient structures made entirely from straight pieces of material, joined together at their ends to form complex 3D shapes.

They can look like thisthis, or this. They can be gigantic, but are also cool on a small scale, like this space frame bench I built.

Their advantages include low material usage, ease of construction, free-form design possibilities, and awesome space-age appearance.

One major disadvantage is that they can be difficult to engineer. It's not straightforward to determine how forces will distribute throughout a structure that has a lot of redundant pieces.

All of the "struts" (the straight parts) of a space frame are subject to eithertension or compression forces along their length (they're "axial forces," in engineer talk). Tension forces are pulling or stretching forces; compression forces are pushing or squeezing forces. The direction of the force (tension or compression) can change depending on how a structure is loaded and can sometimes be surprising in a complicated structure.

This Instructable will show you how to use the sticky tape pressure sensorsfrom Plusea's Instructable to determine the forces acting on the struts in a space frame model you can build and test. To make a space frame model, check out my Instructable on the topic.


Step 1: Gather Materials

Picture of Gather Materials

This Instructable requires:
Magnetic space frame model - You can buy toy kits like Geomagsconsisting of plastic struts with magnets on their ends and steel spheres, or you can put together your own from drinking straws, magnets, and steel spheres you can buy for much cheaper. 
Sticky tape, Velostat, conductive thread, scissors - These are all materials required for the pressure sensors, details in Plusea's Instructable.
Arduino - For converting the analog signal from your sensors into something your computer can read.
Various wires, alligator clips, breadboard - For connecting your sensors to the Arduino. 
10K Potentiometers or resistors of various values - For creating voltage dividers to get the variable resistance of your sensor into a form the Arduino can use.
Multimeter - Helpful for testing, though not absolutely necessary
A computer with Processing and Arduino software - You probably have access to a computer if you're reading this. Processing and Arduino are available for free.

Step 2: Make your Sensors

Picture of Make your Sensors4092308530_2104455631.jpg4091544901_39b316241a.jpg

Follow the instructions from Plusea's Instructable to make the sticky tape pressure sensors. I didn't have conductive fabric, so mine don't have nice tabs like hers, but they still work fine.

I made mine very small and thin - this way they don't interfere too much with the magnets' attraction.

Step 3: Put the sensors in the model

Picture of Put the sensors in the model4091545113_f4298fc657.jpg4091545195_aa3e463258.jpg4092309040_70e783b500.jpg

The magnets should be strong enough to hold the thin sensor between the end of the strut and the steel hub. Just sandwich it in there like you see in the pictures. Sandwiches all around!

The force of the magnet will create some pressure on the sensor to begin with. Pushing on it  (placing it in compression) will add more pressure to this. Pulling the node away from the strut  (putting it in tension) will lower the pressure. More pressure will decrease the electrical resistance, less pressure will increase the resistance. You can check this with your multimeter by hooking the leads up to to the conductive threads coming out of the sensor.

Step 4: Connect the sensors to your Arduino

Picture of Connect the sensors to your Arduino4092310308_bd4b869123.jpg

I would make a very sad electrical engineer. See the second picture on this step for an example of my failures. But you are probably much smarter than I or have more determination or simply can learn from my mistakes.

Connecting the sensors into the Arduino might be straightforward for you. Or, if you're like me, it might seem like some electrical voodoo magick and you just follow blindly what others have done. In any case, it requires setting up avoltage divider for each of the inputs. This lets the Arduino interpret your changing resistance as a changing voltage.

I'm totally not qualified to explain this, but here's my attempt: Your sensors have two leads coming from them. One goes to the +5V on your Arduino. The other connects to the Analog Input pin on the Arduino, and also in series to a resistor connected to the GND pin on the Arduino. The value of this resistor depends on the range of resistances your sensor creates. Instead of experimenting by swapping in and out resistors (or calculating it the engineering way), I just put a potentiometer in series and adjusted it until I got a reasonable response.

Step 5: Set up the programs

Plug the Arduino into your computer (a connection even I can handle!) and upload the code below labeled "ARDUINO". Open Processing and run the code below labeled "PROCESSING".

// reads analog input from the five inputs from your arduino board 
// and sends it out via serial
/ variables for input pins and
  int analogInput0 = 0;
  int analogInput1 = 1;
  int analogInput2 = 2;
  int analogInput3 = 3;
  int analogInput4 = 4;
  int analogInput5 = 5;
// variable to store the value 
  int value0 = 0; 
  int value1 = 0; 
  int value2 = 0; 
  int value3 = 0;
  int value4 = 0;
  int value5 = 0;  
void setup(){
// declaration of pin modes
  pinMode(analogInput0, INPUT);
  pinMode(analogInput1, INPUT);
  pinMode(analogInput2, INPUT);
  pinMode(analogInput3, INPUT);
  pinMode(analogInput4, INPUT);
  pinMode(analogInput5, INPUT);
// begin sending over serial port
}// end setup

void loop(){
// read the value on analog input
  value0 = analogRead(analogInput0);
  value1 = analogRead(analogInput1);
  value2 = analogRead(analogInput2);
  value3 = analogRead(analogInput3);
  value4 = analogRead(analogInput4);
  value5 = analogRead(analogInput5);

// print out value over the serial port
    Serial.print(1, BYTE); //prefix
    Serial.print(10, BYTE); //end signal
    Serial.print(2, BYTE);
    Serial.print(10, BYTE);
    Serial.print(3, BYTE);
    Serial.print(10, BYTE);
    Serial.print(4, BYTE);
    Serial.print(10, BYTE);
    Serial.print(5, BYTE);
    Serial.print(10, BYTE);
    Serial.print(6, BYTE);
    Serial.print(10, BYTE);

// wait for a bit to not overload the port
}// end loop

*  Based on code by Hannah Perner-Wilson,
*  Modified by Sam Kronick

import processing.serial.*;

// definition of window size
// you can change the size of the window as you like
// the thresholdGraph will be scaled to fit
// the optimal size for the thresholdGraph is 1000 x 400
int xWidth = 800;
int yHeight = 600;

// Current values
int[] values = {0,0,0,0,0,0}; 

// Time-averaged values
int[] avgCounter = {0,0,0,0,0,0};
int[] avgs       = {0,0,0,0,0,0};

static final int INTERVAL = 5;

// Zero force values, changed on spacebar press
int[] zeros = {0,0,0,0,0,0};

// variables for serial connection. portname and baudrate are user specific
Serial port1;

//Set your serial port here (look at list printed when you run the application once)
String V3 = Serial.list()[0];
String portname1 = V3;
int baudrate = 9600;
int prefix = 1;
boolean myCatch = true;
int serialIN = 0;
int serialINPUT = 0; 
String buffer = ""; 
int value = 0; 

void setup(){
  // set size and framerate
  size(xWidth, yHeight);

  // establish serial port connection      
  port1 = new Serial(this, portname1, baudrate);
  println(Serial.list());  // print serial list

}//end setup

void keyPressed() {
  if(key == ' ') {
    for(int i=0; i      zeros[i] = avgs[i];  

// draw listens to serial port, draw 
void draw(){
  // listen to serial port and trigger serial event  
  while(port1.available() > 0){
        serialIN =;
  for(int i=0; i<4; i++) {
    if(frameCount % INTERVAL > 0) {
      avgCounter[i] += values[i]; 
    else {
      avgs[i] = avgCounter[i] / INTERVAL;
      avgCounter[i] = 0;
    if(avgs[i] - zeros[i] < 0 )
      fill(0, 20 * -(avgs[i] - zeros[i]), 250);
      fill(100, 20 * (avgs[i] - zeros[i]), 250);
    rect(width/2, height/4 * i, 10*(avgs[i]-zeros[i]), height/4);    

void serialEvent(int serialINPUT){
  if(myCatch == true) {
    if(serialINPUT != 10) {        
      // add event to buffer
      buffer += char(serialINPUT); 
    else {
      // if serial is line break set value to buffer value and clear buffer
      value = int(buffer);
      values[(prefix-1)] = value;
      myCatch = false;     
  //myCatch is the beginging of the each sended number used to define the port
  // myCatch gets true if serial is less than 10 since header is 1-9
  if (!myCatch && serialINPUT < 10) { 
    myCatch = true;
    prefix = int(serialINPUT);

Step 6: Test your structure!

Picture of Test your structure!4091545497_bab28de175.jpg

With the Processing code running, you should see four horizontal bars on your screen (it's hard coded to only handle four sensors; extending it for more or less is an exercise for the reader). Press the spacebar to set the zero-points (a one-point calibration!) and the bars should shrink to thin lines in the center of the screen.

Press on one of the nodes on your structure. You should see the width of the bars change. Green bars that extend to the right represent compression forces; red bars to the left represent tension forces. Try adjusting the resistor values/changing the potentiometers if you see a very small or too large of a response. You may need to press the space bar again to re-zero the sensors; they tend to drift quite a bit.

The software is doing a couple of things. First, it is averaging the past few readings to get rid of some noise. Second, it compares the averaged reading to the zero point you set, and determines if there is more or less force on the sensor. The size of the bar is only relative to itself; it's not calibrated to any unit of force. Maybe someone can figure out a way to do that. I'm not sure if the response from the sensors is linear, and that might be a problem.