Introduction: Smart Pillow... How to Make an Alarm Clock Pillow
SMART PILLOW
How to make an Alarm Clock Pillow!
CONCEPT:
When presented with the challenge to create a "smart object" I choose to concentrate on objects that effect my life everyday. My pillow and my alarm clock. One I adore. The other I do not. I was searching for a solution to my incessant knack for oversleeping, thus the “Alarm Clock Pillow”. This object utilizes the Arduino micro-controller to wake 3 of your 5 senses, not just your ears! The “Alarm Clock Pillow” additionally exemplifies my interest in functional art.
GOAL:
Fuse together the purpose of two separate objects into one "smart-object" in an aesthetically appealing functional piece of art.
TECHNICAL:
Proposal:
Create an “Smart Pillow: Alarm” for all those heavy sleepers out there…
Features:
The alarm clock pillow could potentially include:
... Digital Alarm
... Vibrate Function - LilyPad Vibe Board
... Multiple LED Display
Aesthetics:
... Hand and Machine Embroidery
How to make an Alarm Clock Pillow!
CONCEPT:
When presented with the challenge to create a "smart object" I choose to concentrate on objects that effect my life everyday. My pillow and my alarm clock. One I adore. The other I do not. I was searching for a solution to my incessant knack for oversleeping, thus the “Alarm Clock Pillow”. This object utilizes the Arduino micro-controller to wake 3 of your 5 senses, not just your ears! The “Alarm Clock Pillow” additionally exemplifies my interest in functional art.
GOAL:
Fuse together the purpose of two separate objects into one "smart-object" in an aesthetically appealing functional piece of art.
TECHNICAL:
Proposal:
Create an “Smart Pillow: Alarm” for all those heavy sleepers out there…
Features:
The alarm clock pillow could potentially include:
... Digital Alarm
... Vibrate Function - LilyPad Vibe Board
... Multiple LED Display
Aesthetics:
... Hand and Machine Embroidery
Step 1: List of Supplies:
Supplies for Smart Pillow:
What to make your pillow out of?
Anything! In this example, I recycled an old t-shirt and an old pillowcase.
ClockIt 1
$24.95
http://www.sparkfun.com/products/9205
Real Time Clock - DS3234 1
$9.95
http://www.sparkfun.com/products/1007 9
4-Digit 7-Segment Display - Yellow
$1.95
http://www.sparkfun.com/products/9480
LilyPad Pro Kit
$ 39.95
http://www.sparkfun.com/products/8873
LilyPad Vibe Board
$14.95
http://www.sparkfun.com/search/results?term=vibe+board&what=products
Fuse-able Interfacing
Conductive Thread
$29.95
http://www.sparkfun.com/products/8549
Hammer
Sewing Machine
Grommet Punch
Solder Iron
Clothes Iron
Scissors
Interface
Needles
Red Thread
Blue Thread
BLUE LEDs
What to make your pillow out of?
Anything! In this example, I recycled an old t-shirt and an old pillowcase.
ClockIt 1
$24.95
http://www.sparkfun.com/products/9205
Real Time Clock - DS3234 1
$9.95
http://www.sparkfun.com/products/1007 9
4-Digit 7-Segment Display - Yellow
$1.95
http://www.sparkfun.com/products/9480
LilyPad Pro Kit
$ 39.95
http://www.sparkfun.com/products/8873
LilyPad Vibe Board
$14.95
http://www.sparkfun.com/search/results?term=vibe+board&what=products
Fuse-able Interfacing
Conductive Thread
$29.95
http://www.sparkfun.com/products/8549
Hammer
Sewing Machine
Grommet Punch
Solder Iron
Clothes Iron
Scissors
Interface
Needles
Red Thread
Blue Thread
BLUE LEDs
Attachments
Step 2: LED Layout in MAX
MAX/ MSP is a great place to layout LED Matrices.
IMAGE - A proposed LED layout created in MAX 5.
IMAGE - A proposed LED layout created in MAX 5.
Step 3: Embroidery Work
Create Embroidery Work...
Step 4: Layout - Conductive Thread
After completing embroidery work...
1
Test connections of LilyPad with conductive thread and LEDs
2
Choose a piece of cloth, cut to size and apply interfacing to piece of cloth to stitch conductive thread on.
3
Layout design for conductive thread
1
Test connections of LilyPad with conductive thread and LEDs
2
Choose a piece of cloth, cut to size and apply interfacing to piece of cloth to stitch conductive thread on.
3
Layout design for conductive thread
Step 5: Machine Stitch Conductive Thread
1
Use a sewing machine to stitch conductive thread
Color coding the bottom stitch helps to prevent crossing of negative and positive thread lines.
2
Glue ends of threads
Use a sewing machine to stitch conductive thread
Color coding the bottom stitch helps to prevent crossing of negative and positive thread lines.
2
Glue ends of threads
Step 6: Insert Grommets
Insert Grommets to help anchor LEDs.
I’ve used a soldering Iron to make holes to insert grommets into.
The grommets also connect the patch of cloth with conductive thread with embroidery patch.
I’ve used a soldering Iron to make holes to insert grommets into.
The grommets also connect the patch of cloth with conductive thread with embroidery patch.
Step 7: Connect LEDs and Vibe Board
Step 8: Build ClocKit
Follow instructions with kit. Do not attach speaker.
Step 9: Put All the Pieces Together
Step 10: Completed Pillow and CODE
LILYPAD CODE
/* VARIABLES */
int digPin[6] = {8, 9, 10, 11, 12 }; // LEDs // 5 "Rounds" of LED's (LED's connected to PIN 2 with light first, then LED's
int vibePin = 7; // VIBE BOARD //
int buzzPin = 4; // ALARM
int isOn = LOW;
int isBuzzerOn = 0;
unsigned long zeroCount = 0;
unsigned long timestash = 0; // Last time I did something.
/* SETUP - initialize variables; runs once; after each powerup/reset of LilyPad (micro-controller) */
void setup()
{
pinMode(digPin[0], OUTPUT);
pinMode(digPin[1], OUTPUT);
pinMode(digPin[2], OUTPUT);
pinMode(digPin[3], OUTPUT);
pinMode(digPin[4], OUTPUT);
pinMode(digPin[5], OUTPUT);
pinMode(vibePin, OUTPUT);
pinMode(buzzPin, INPUT);
}
/* LOOP - loops consectively, allowing program to change and respond, actively controls the LilyPad */
void loop()
{
unsigned long currTime = millis(); // Get my current time // -- This is the mechanism we use to do something every second without using a delay
unsigned long difTime = currTime - timestash; // current time subtracted from saved time to find the difference
// Is the Buzzer On?
if(digitalRead(buzzPin) > 0)
{
isBuzzerOn = 1;
zeroCount = 0;
} else {
// 20 zeros?
zeroCount +=1;
if(zeroCount > 20)
{
isBuzzerOn = 0;
}
}
if (isBuzzerOn==1) {
if (difTime > 1000) {
timestash = currTime; // I have to put the current time in timestash so I restart the timing
difTime = 0;
// VIBE BOARD
if (isOn == LOW) {
isOn = HIGH;
digitalWrite(vibePin, HIGH);
} else {
isOn = LOW;
digitalWrite(vibePin, LOW);
}
// turn on all the LEDs
digitalWrite(digPin[0], HIGH);
digitalWrite(digPin[1], HIGH);
digitalWrite(digPin[2], HIGH);
digitalWrite(digPin[3], HIGH);
digitalWrite(digPin[4], HIGH);
digitalWrite(digPin[5], HIGH);
}
}
// -- end of the one second thing
if (difTime > 100) {
digitalWrite(digPin[0], LOW);
}
if (difTime > 200) {
digitalWrite(digPin[1], LOW);
}
if (difTime > 300) {
digitalWrite(digPin[2], LOW);
}
if (difTime > 400) {
digitalWrite(digPin[3], LOW);
}
if (difTime > 500) {
digitalWrite(digPin[4], LOW);
}
if (difTime > 600) {
digitalWrite(digPin[5], LOW);
}
if (difTime > 700) {
digitalWrite(digPin[6], LOW);
}
}
/* VARIABLES */
int digPin[6] = {8, 9, 10, 11, 12 }; // LEDs // 5 "Rounds" of LED's (LED's connected to PIN 2 with light first, then LED's
int vibePin = 7; // VIBE BOARD //
int buzzPin = 4; // ALARM
int isOn = LOW;
int isBuzzerOn = 0;
unsigned long zeroCount = 0;
unsigned long timestash = 0; // Last time I did something.
/* SETUP - initialize variables; runs once; after each powerup/reset of LilyPad (micro-controller) */
void setup()
{
pinMode(digPin[0], OUTPUT);
pinMode(digPin[1], OUTPUT);
pinMode(digPin[2], OUTPUT);
pinMode(digPin[3], OUTPUT);
pinMode(digPin[4], OUTPUT);
pinMode(digPin[5], OUTPUT);
pinMode(vibePin, OUTPUT);
pinMode(buzzPin, INPUT);
}
/* LOOP - loops consectively, allowing program to change and respond, actively controls the LilyPad */
void loop()
{
unsigned long currTime = millis(); // Get my current time // -- This is the mechanism we use to do something every second without using a delay
unsigned long difTime = currTime - timestash; // current time subtracted from saved time to find the difference
// Is the Buzzer On?
if(digitalRead(buzzPin) > 0)
{
isBuzzerOn = 1;
zeroCount = 0;
} else {
// 20 zeros?
zeroCount +=1;
if(zeroCount > 20)
{
isBuzzerOn = 0;
}
}
if (isBuzzerOn==1) {
if (difTime > 1000) {
timestash = currTime; // I have to put the current time in timestash so I restart the timing
difTime = 0;
// VIBE BOARD
if (isOn == LOW) {
isOn = HIGH;
digitalWrite(vibePin, HIGH);
} else {
isOn = LOW;
digitalWrite(vibePin, LOW);
}
// turn on all the LEDs
digitalWrite(digPin[0], HIGH);
digitalWrite(digPin[1], HIGH);
digitalWrite(digPin[2], HIGH);
digitalWrite(digPin[3], HIGH);
digitalWrite(digPin[4], HIGH);
digitalWrite(digPin[5], HIGH);
}
}
// -- end of the one second thing
if (difTime > 100) {
digitalWrite(digPin[0], LOW);
}
if (difTime > 200) {
digitalWrite(digPin[1], LOW);
}
if (difTime > 300) {
digitalWrite(digPin[2], LOW);
}
if (difTime > 400) {
digitalWrite(digPin[3], LOW);
}
if (difTime > 500) {
digitalWrite(digPin[4], LOW);
}
if (difTime > 600) {
digitalWrite(digPin[5], LOW);
}
if (difTime > 700) {
digitalWrite(digPin[6], LOW);
}
}