Project tutorial
Glow Pillow with Force Sensing Resistor

Glow Pillow with Force Sensing Resistor © GPL3+

Create a pressure-sensitive light-up pillow with an embedded soft circuit.

  • 499 views
  • 0 comments
  • 1 respect

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

Materials for Circuit:

Arduino LilyPad Protosnap Plus

15 V Resistor

Square Force-Sensing Resistor

11 Allligator Clips (while prototyping)

4 LEDs (two blue, two yellow)

Conductive Thread

E-Textiles Battery

Soldering Iron

Materials for Pillow: (or you can use a pillow you already own, but I'd recommend making your own because it's much easier to sew in the circuit before the pillow is constructed)

Polyester Fiber Fill

White All-Purpose Thread

Blue Poly Cotton

Sewing Needles

Background:

I was interested in learning more about working with force-sensing resistors and wanted to find a beneficial application where a person would have a logical reason to apply pressure to a portable textile. I decided to create a small pillow that would glow if hugged, and the harder a person squeezed the pillow, the more light would shine in the dark. The LEDs build up in designed series based on how hard the force-sensing resistor in the center of the pillow is pressed. I placed the series of LEDs on one side of the border of the pillow so they wouldn’t be covered if users were resting their heads on it.

Process:

1. I bought materials to make the small pillow and used alligator clips to test my code using the schematic.

2. The connections between the pressure sensor (force sensing resistor) and the resistor were improved with a soldering iron.

3. I lightly sketched out my embedded design over the pattern for the pillow, avoiding overlapping paths. I didn't want any of the conductive thread to accidentally touch and interfere with my circuit. You can reference the schematic diagram which is much neater, but make sure the location of the LEDs match your code.

4. I attached my LilyPad board, pressure sensor, and four LEDs to the fabric using conductive thread. I attached the pressure sensor first, sewing the paths between the LilyPad and the sensor. I then sewed the four positive ends of the LEDs to the corresponding outputs to match my code (edit the series in the bargraphLED in your code to match the LED output locations that you choose), and then then sewing the negative paths to the LilyPad.

5. I sewed the borders of the pillow once I finished (and tested my progress) and added the stuffing. I left a small gap so the cable could reach the embedded battery to recharge and so I could easily turn the LilyPad on/off.

Final Pillow

When the pillow is pressed, hugged, or used the LEDs light up on the side of the pillow!

Code

Glow Pillow CodeArduino
The series of LEDs glow according to the force sensing resistor.
int sensorPressure = A9;


int bargraphLED[6] = {4,5,6,7};


void setup()
{
  int x;


  pinMode(sensorPressure, INPUT);


  for (x = 0; x <= 5; x++)
  {
    pinMode(bargraphLED[x], OUTPUT);
  

  }


  Serial.begin(9600);
}

void loop()
{
  int sensorValue;


  sensorValue = analogRead(sensorPressure);

  Serial.print("sensor value: ");
  Serial.println(map(sensorValue,0,1023,0,2000));


  barGraph(sensorValue);
}


void barGraph(int value)
{


  int x;


  for (x=0; x <= 5; x++)
  {
    if (value > (x*170) )
    {
      digitalWrite(bargraphLED[x],HIGH);
    }
    else
    {
      digitalWrite(bargraphLED[x],LOW);
    }    
  }
}

Schematics

Glow Pillow Schematics
Add as many LEDs as you would like to your series!
Glow pillow v1 bb gtpgdrnomf

Comments

Similar projects you might like

Arduino101 / tinyTILE BLE: Match-Making Sunglasses

Project tutorial by Kitty Yeung

  • 13,576 views
  • 5 comments
  • 44 respects

Arduino 101 - Intel Curie Pattern Matching Dress

Project tutorial by Kitty Yeung

  • 11,584 views
  • 17 comments
  • 57 respects

A DIY Smart Insole to Check Your Pressure Distribution

Project tutorial by Juliette van der Pas

  • 16,721 views
  • 12 comments
  • 46 respects

Laser, Robe, Star Wars?! - Versalume + Adafruit Gemma

Project tutorial by Kitty Yeung

  • 2,462 views
  • 2 comments
  • 9 respects

The Vibrating Pressure Temperature Altitude Tilt Detector

Project tutorial by Kutluhan Aktar

  • 1,749 views
  • 0 comments
  • 4 respects

Bluetooth Control Hat

Project showcase by EyalSch

  • 11,720 views
  • 13 comments
  • 48 respects
Add projectSign up / Login