Prototype 4: Materials as Sensors

Stationary Indicator

https://www.nextergo.ai/7-easy-ways-to-reduce-back-pain-at-work/
https://www.nextergo.ai/7-easy-ways-to-reduce-back-pain-at-work/

Introduction

Before the pandemic, many of us spent a large part of our day sitting or in a prolonged restrictive position. With the pandemic forcing most of us to work from home, we have become accustomed to seating for a lengthy-time period, which studies have shown to contribute to most back pains and joint-related problems.

My stationary indicator aims to solve this problem using a DIY pressure sensor that can be attached to any chair. When the pressure pad is activated, the led turns on indicating the device has been activated. If the pad is activated for a set time, the device buzzes suggesting that it is time to talk a walk.

How it’s made 

Materials:
breadboard
microcontroller
buzzer
led
jumper wires
Alligator clips
velostat
conductive fabric
conductive thread
scissors
foam-like material

Step 1: Build pressure sensor pad

The sensor is made from two layers of foam. Sandwiched between them are two cut pieces of conductive fabric and a single piece of velostat.

  1. Cut two pieces of foam to your desired shape and dimensions. The thickness of the foam will be one factor that will determine the sensitivity of the sensor.
  2. Cut two pieces of conductive fabric into the same shape as the foam but slightly smaller than the foam(about 2cm shorter).
  3. Cut the velostat to the same size as the foam.
  4. Attache a long pieceof conductive thread to each of the conductive fabrics by sawing or with a piece of tape.
  5. Place the first piece of foam on a flat surface and attach the conductive fabric to it, pulling the conductive thread to the side.
  6. Place the velostat above the conductive fabric and foam you just assembled. Make sure it is aligned with the foam underneath.
  7. Place the second piece of conductive fabric in the velostat and pull the conductive thread to the side.
  8. Place the second piece of foam on the velostat and aline it the foam underneath.
  9. using none conductive thread, saw around the assembly sandwiching all the components together(do not saw to tightly)

img_7349img_7348

 

 Step 2: Build the circuit

 

prtotype1

 

 Step 3: Code

Right not he code is not perfect. it appears to have glitches when I try to add delays within the if statement. I am working to resolve this. I played around with the code and this seems to be the most stable. use the serial monitor to keep an eye on the input values. you may have to adjust the conditional value within the if statement depending on the input values you are getting through the serial monitor.

#include <math.h>
int touchpin = A0;
const int buzzer = 8;
int led = 9; 
void setup() {
  Serial.begin(9600);
  pinMode(9, OUTPUT);
  pinMode(A0, INPUT);
  pinMode(buzzer, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  int sensorValue = analogRead(touchpin);
  Serial.println(sensorValue);
if(analogRead(touchpin) > 40 ){
digitalWrite(led, HIGH);
delay(30000); 
tone(buzzer, 1000);
delay(1000);
noTone(buzzer);     // Stop sound...
delay(1000);

}
  else{
    digitalWrite(led, LOW);
  }
  
}

#include <math.h>
int touchpin = A3;
int led = 9; 
void setup() {
  Serial.begin(9600);
  pinMode(9, OUTPUT);
  pinMode(A0, INPUT);
}

// the loop function runs over and over again forever
void loop() {
  int sensorValue = analogRead(touchpin);
  Serial.println(sensorValue);
if(analogRead(touchpin) < 100 ){
digitalWrite(led, HIGH);
  
}
  else{
    digitalWrite(led, LOW);
  }
  
}

please note some of the codes used here were modified from the arduino reference library. from https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/img_7390

Leave a Reply