SLEEPY CARDBOARD PLAYHOUSE

Madlibs 1

PROJECT NAME: SLEEPY CARDBOARD PLAYHOUSE

Name of group members:
Jad Rabbaa
Roxanne Henry
Emilia Mason

Project description
Our project is an art installation consisting of a playhouse made for grownups to help them reconnect with their inner child. In this space, they will be able to go on a journey mentally in their childhood and fall asleep just like when they were a kid.

The installation works with a proximity sensor that will sense once a person is asleep inside the playhouse. Once the person is asleep the speakers/speaker will play the song Twinkle Twinkle Little Star.

Circuit diagram
Circuit diagram with a speaker.
Input: Proximity sensor
Output: speaker

proximity-and-speaker_bb

 

Circuit diagram without a speaker
In this diagram, we removed the 1-tone speaker because we will be using a set of 2 big speakers. To do that, we needed to use the USB cable as an output to connect the feather to the speakers through a 3rd party software “Gobetwino” previously installed on the computer.

Schematic diagram

schematic-proximity-and-speaker-for-sleepy-bed


Code: https://github.com/rh11lp/experiment1/blob/master/experiment1.ino

The proximity sensor polls once every 500ms to detect if there is an obstruction between 110 and 85 cm. (Since the proximity sensor is in the roof, this distance is the approximate distance of an obstruction if there is a human lying down on the floor). The goal is that we don’t want the proximity sensor to trigger an event unless the person is lying down (not when they’re entering or positioning themselves in the house).

Once the person is settled, the event Serial.println is triggered, and it prints the instruction “#S|PLAYSONG|[]#

We capture the time at this moment and begin to count down the length of the song.

We also toggle the variable speakerInProgress to true so that we don’t continue to send the instruction to GoBetwino.

GoBetwino picks up the instruction through Serial communication, and executes the program VLC, which plays a mp3 file that contains the song  “twinkle twinkle little star”.

Once the time is up for the song, we toggle speakerInProgress to return to false, so that we can go back to a state where we can send instructions to GoBetwino.

If the person is still sleeping in the cardboard house, the song will repeat.

If the person has meanwhile left the house, the song will not play until someone else settles down to sleep.

Sketches
Finite State Machine
To formulate timer by plotting out the variable cases.

22279346_10159376815670057_1517827803_o 22279055_10159376605385057_654208813_o

Design Files
1st ATTEMPT:
CRIB MADE FROM CARDBOARD (which we didn’t eventually adopt)

screen-shot-2017-10-05-at-4-16-40-pm

screen-shot-2017-10-05-at-4-16-50-pm

screen-shot-2017-10-05-at-4-16-29-pm

2nd ATTEMPT (final):
Cardboard Playhouse: the design of this installation which we agreed to develop is supposed to give the visitor a feeling of DIY child-like impression, so we built the design by hand on the go.

Photographs

img_8650

22250982_10159433866970344_1221790906_ofullsizerender-7 img_8688

Videos
Test 1:
http://vimeo.com/237020450

Test 2:
http://vimeo.com/237020653

Fritzing Circuit:
http://vimeo.com/237020745

Prototype Cardboard Crib
http://vimeo.com/237020832

Finite State Machine
http://vimeo.com/237021137

Sleepy Cardboard Playhouse
http://vimeo.com/237021672
http://vimeo.com/237021248

It Works!
https://vimeo.com/237109819


Process journal
Day 1: September 25th

Madlib materials:

Input: Proximity Sensor
Output: Speaker
Material: Cardboard
Adjective: Sleepy

Day 2: September 29th
Our project will be a cardboard rocking crib for a baby. As the crib moves from one direction to another, the sensor will identify them if the crib is moving or not and that movement will allow the music to play or stop.

During this day we decided to incorporate a mp3 or MIDI file for the music coming out of the speaker (Twinkle Twinkle little star) and Nick suggested that for MP3 we might need an extra hardware or possibly a third party software depending on the code and circuit.

Day 3: October 2nd
To avoid the complication of using MP3, we realized the melody can be a coded version of the notes to play from arduino. We investigated the possibility of using a midi file uploaded to arduino. We tried and we realized the arduino doesn’t play music files and the space available on is certainly not enough.

After we talked to Kate about how our project was going, she suggested we should amplify or extend the properties of our assigned material (cardboard) in a way that references to our assigned adjective (sleepy).

screen-shot-2017-10-05-at-10-20-02-pm
Music melody of Twinkle Twinkle little star in code.
Copied from Github: https://gist.github.com/baojie/4522173
screen-shot-2017-10-05-at-10-20-15-pm

screen-shot-2017-10-05-at-10-24-39-pm
The melody code uses the function delay() to give the music a short pause between the notes.
When incorporating the melody code, the input of the proximity sensor is affected by this delay() function which was stopping it from being accurate and triggering the corresponding function of playing music on time.

Day 4: October 3rd
After lots of brainstorming our inner child came to life. We decided to change the idea we had about the baby crib. Our new project consists of a nostalgia cardboard playhouse for adults that will be a safe and comfortable place to sleep. This installation will reminisce old childhood memories for everybody because who hasn’t played cardboard playhouse to sleep in.

Code:  The code was not working this morning, but after some thorough debugging, we made some changes and added a line of code that reads the number of milliseconds.

Research: This day we looked for information on asynchronous timers and since this is a single core processor and there can only be one active task at the same time. Instead of stopping in the middle of a task, we decide to make a sophisticated timer using a finite state machine to plot out the variable cases.

Materials: We looked for large boxes to make our playhouse big enough for a grownup. We built the cardboard playhouse using a glue gun, tape, and plastic but made sure it looks like a cardboard house from childhood made by kids.

We measured the height of the playhouse, which is = 120cm.
We placed the sensor where it should be (the top of the house) and ran the code to make sure of the distance: The sensor reads “proximity = 120”
.
This information was added to the code being the maxDistance when it is empty. When someone is inside and hasn’t slept yet the proximity reads between 0 and 85. When someone is actually sleeping, the proximity reads between 85 (shoulder) and 110 (head). We thought that the music should only play if, and only if the person is laying down.

Day 5: October 4th
We thought the note melody on the small speaker is, on one hand, inaudible and on the other not very soothing, which calls for the use of a more complex and soothing melody and this is only possible through a mp3 file saved on the computer.
We added a line of code to allow the arduino circuit to communicate with the computer through a 3rd party software (gobetwino) and play the music once the proximity is the right value (between 85 and 110).

Day 6: October 5th
We finalized the construction of the cardboard playhouse while taking into consideration that we should hide the circuit really well.
We made sure the blog is on point and translating the process and the actual installation.



Project Context
Cardboard houses are as old as cardboard boxes. Every child has experimented his construction skills through building houses from cardboard And blankets to sleep in and create a comfort zone.

Emilia, Roxanne, and Jad are interested in refreshing stressed student’s memories and bring back childhood memories. They created the cardboard playhouse which invites every student to reconnect with his inner child and find his inner peace to have a rest after a long week of no sleep.

References
http://www.pbs.org/parents/crafts-for-kids/cardboard-houses/
http://mikmo.dk/gobetwinodownload.html
http://benology.bur.st/arduino/xxOther/Gobetwino%20manual.pdf
https://sites.google.com/a/divinechildhighschool.org/electronics/Home/Arduino-Lessons/using-gobetwino-to-control-windows-through-arduino
http://www.orangefreesounds.com/twinkle-twinkle-little-star-song/

 

Leave a Reply