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.

  • 3 respects

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


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.


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!


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);



void loop()
  int sensorValue;

  sensorValue = analogRead(sensorPressure);

  Serial.print("sensor value: ");


void barGraph(int value)

  int x;

  for (x=0; x <= 5; x++)
    if (value > (x*170) )


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


Similar projects you might like

Arduino101 / tinyTILE BLE: Match-Making Sunglasses

Project tutorial by Kitty Yeung

  • 50 respects

Arduino 101 - Intel Curie Pattern Matching Dress

Project tutorial by Kitty Yeung

  • 66 respects

A DIY Smart Insole to Check Your Pressure Distribution

Project tutorial by Juliette van der Pas

  • 62 respects

Light Sensing Backpack

Project tutorial by Bryan Johnson

  • 1 comment
  • 7 respects

The Vibrating Pressure Temperature Altitude Tilt Detector

Project tutorial by Kutluhan Aktar

  • 1 comment
  • 6 respects
Add projectSign up / Login