Pillow Talk

Made by Brian Xiao

Found in DioT 2019: Augmented Objects

Electronics for pillows for long distance couples to know when sleeping

0

Intention

For this Internet of Things exercise, I created a prototype intended to become a pair of pillows for long distance couples. In this day in age, due to increased globalization and need for traveling and working remotely. The person I interviewed was my girlfriend, Anko who recently began traveling for her career. A big pain point for Anko is the time we spend apart, and a sense of loneliness and isolation at night. At first, discussions surrounded ideas of redesigning and “enchanting” the bed, as it is where she spends her time resting, working, or watching tv. However, to do so would be overcomplicated, and the product not portable. Ultimately we decided that an enchanted pillow would be the best solution. 

1

Goal

For this project, the goal was a simple one: use internet of things technology and sensibilities to “enchant” a pillow, so that someone far away can know when the user is sleeping. Enchanting a pillow, or perhaps a pair of them, in this would can create a sense of intimacy and connectivity between couples, in the object’s communication of the other person in a resting position.

0

Process

In my process, I began through exercises involving the connection of my Particle Argon device to the cloud. For this step, only LEDs were used. It was very much a back-to-basics exercise; though I have had experience with electronics before, connecting to the internet is quite new to me.


[1]

Afterward, studies involved testing out two sensors: a flex sensor and a force sensitivity resistor. This was quite quick, as both sensors have similar resistive qualities and almost identical circuits. Some improvisation was needed to combine the two. One interesting problem I ran into was in making the LED that signals flexing to light UP when bent, instead of the other way around: the default function from the teaching code provided. It was a learning experience, inverting the mapping by subtracting the variable from the highest reading of the sensor.


[1]


0

Outcome

The Final Outcome of the prototype has 2 sensors: a force sensitive resistor and a flex sensor. Both are there to tell if there is a head on the pillow, presumably going inside. When either is pressed, a corresponding LED will light up to indicate it. The information is also displayed through the internet, to communicate that the pillow is used.

For this prototype I used an FSR, a flex sensor, 2 LEDs, 2 1K resistors, 2 10K resistors.

https://vimeo.com/314540325



0

Next Steps

Going forward, next steps would involve putting the electronics in an actual pillow, and creating an identical prototype to function as a pair. Other refinements may include visual and auditory indicators, and graphics to accompany the underlying functions in order to augment the inherent ability of this project to decrease loneliness.

0

Reflection

Overall this project was an incredibly enjoyable one that allowed me to not only create a product that is fun and lighthearted but to explore the inherent sociability of common household items and reflect on ways to "enchant" them. 

I consider myself quite inept at coding. However, the incremental nature of this project aided in me creating something that is quite new to me. Looking back I find overall timeline of the project quite short; if given more time, I could even see this as a full-blown product that can be showcased as a portfolio piece. However, going further independently to create a fun home addition is not out of the question.

0

References and Acknowledgements

[1]  https://diotlabs.daraghbyrne.me

tutorials and code snippets used.

0
0
// Define a pin that we'll place the Flex on
// Remember to add a 10K Ohm pull-down resistor too.
int flexPin = A0;

// Create a variable to hold the Flex reading
int flexReading = 0;
int flexReading1 = 0;

// Define a pin we'll place an LED on
int ledPin = D2;

// Create a variable to store the LED brightness.
int ledBrightness = 0;
int state = 0;


// Define a pin that we'll place the FSR on
// Remember to add a 10K Ohm pull-down resistor too.
int fsrPin = A1;

// Create a variable to hold the FSR reading
int fsrReading = 0;

// Define a pin we'll place an LED on
int ledPin1 = D5;

// Create a variable to store the LED brightness.
int ledBrightness1 = 0;



void setup() {


  
    // Set up the LED for output
  pinMode(ledPin, OUTPUT);

  // Create a cloud variable of type integer
  // called 'light' mapped to photoCellReading
  Particle.variable("force", &flexReading, INT);
  Particle.variable("bent", state);
  
  
  
    // Set up the LED for output
  pinMode(ledPin1, OUTPUT);

}





void loop() {



  // Use analogRead to read from the sensor
  // This gives us a value from 0 to 4095
  flexReading = analogRead(flexPin);
  flexReading1 = 4095 - flexReading;

  // Map this value into the PWM range (0-255)
  // and store as the led brightness
  ledBrightness = map(flexReading1, 3000, 4095, 0, 255);

  // fade the LED to the desired brightness
  analogWrite(ledPin, ledBrightness);


  // wait 1/10th of a second and then loop
  delay(100);
  
  //if flexReading1 >3000, then then particle publish ..... am i doing it right?
  

    if (flexReading1 > 3700)
    {
        state = 1;
    }
    else 
    {
        state = 0;
    }
    
    
      // Use analogRead to read the photo cell reading
  // This gives us a value from 0 to 4095
  fsrReading = analogRead(fsrPin);

  // Map this value into the PWM range (0-255)
  // and store as the led brightness
  ledBrightness1 = map(fsrReading, 0, 4095, 0, 255);

  // fade the LED to the desired brightness
  analogWrite(ledPin1, ledBrightness1);

  // wait 1/10th of a second and then loop
  delay(100);



}
Click to Expand
x
Share this Project

This project is only accessible by signed in users. Be considerate and think twice before sharing.


Courses

49713 Designing for the Internet of Things

· 18 members

A hands-on introductory course exploring the Internet of Things and connected product experiences.


About

Electronics for pillows for long distance couples to know when sleeping

Created

January 31st, 2019