49713 Designing for the Internet of Things
· 25 members
A hands-on introductory course exploring the Internet of Things and connected product experiences.
Mood Mobile reflects user mood depending on their day’s events when they settle into bed. The interaction with the mobile motivates deeper reflection and acceptance during rest period for the user.
We believe reflection and acceptance improve emotional well-being. Therefore, our aim is to enable bedroom objects to help individuals transition between moods and set new moods before sleeping. Interacting with mood mobiles triggers music, which can be considered as a means of promoting relief. We believe mood mobile leads users into deeper reflection and acceptance during sleep.
Users reflect on the day’s events and their resulting mood as they settle into bed by interacting with the Mood Mobile. There are 3 objects (referred as "mobiles"), one representing a blissful and sunny emotion, one representing a nebulous and less optimistic emotion, and a final object representing a sharp and biting emotion. Upon interaction with the mobile via vibration switch, music that reflects the mood is played to motivate deeper reflection and acceptance during rest.
Our design was inspired by the ambiguity of emotion. Because there is an entire spectrum of discreet emotions that could not possibly captured with an object, we chose to pursue three objects that were representative of emotional categories. Our inspiration came from the weather, which like an emotional state is always shifting and can take on many forms.
The design of our mobile container created several serious challenges. Especially because we made an aesthetic decision to combine the mobile and the alarm clock housing, we encountered a huge amount of interference during testing. Our wires touched, which created issues with conductivity, and our speakers played sound that was fuzzy due to the many signals in a small place.
We also struggled to correctly activate the mobile elements. We tried working with vibration sensors before changing our project to utilize touch capacitors. Almost every sensor that we tried to utilize was too sensitive to work. The touch capacitors were finally made to work with some insulation, but they still misfire frequently when they don't receive the proper trigger.
#define innerLED D7
#define VibAPIN D2
#define VibBPIN D3
#define VibCPIN D4
#define TouchControlPIN D6
const String prefixEventName = "DIOT-2018-DARA-TEAM-HOME-WRECKERS";
const String nameMiniGroup = "MOBILE";
const String eventMobileA = prefixEventName + "-" + nameMiniGroup + "-MOBILEA";
const String eventMobileB = prefixEventName + "-" + nameMiniGroup + "-MOBILEB";
const String eventMobileC = prefixEventName + "-" + nameMiniGroup + "-MOBILEC";
const String eventReset =prefixEventName+"-RESET";
const String eventPlay = prefixEventName + "-PLAY";
int EventInterval = 5; //unit second;
int EventBlock = 2;
unsigned long timeLastEventAny = 0;
unsigned long timeLastEventA = 0;
unsigned long timeLastEventB = 0;
unsigned long timeLastEventC = 0;
int amountMobileA =0;
int amountMobileB =0;
int amountMobileC =0;
int resetTouchCap(String cmd);
void eventHandlerReset(const char *event, const char *data)
{
String sdata = String(data);
amountMobileA =0;
amountMobileB =0;
amountMobileC =0;
}
int PushEventA() {
if (timeLastEventA < 0) {
Particle.publish("LOG_TIMELASTNOTEXPECTED","");
return -1; //time stamp not initialized or unkown error
}
int currentTime = Time.now();
if (abs(currentTime - timeLastEventAny) < EventBlock) {
return 0;
}
if (abs(currentTime - timeLastEventA) > EventInterval) {
amountMobileA += 1;
Particle.publish(eventMobileA,String(amountMobileA));
Particle.publish(eventPlay,"MA");
timeLastEventA = currentTime;
timeLastEventAny = currentTime;
return 1; // published
} else {
timeLastEventAny = currentTime;
Particle.publish("LOG_TOOFREQUENT","");
return 0;
}
return -2; // unknown error
}
int PushEventB() {
if (timeLastEventB < 0) {
return -1; //time stamp not initialized or unkown error
}
int currentTime = Time.now();
if (abs(currentTime - timeLastEventAny) < EventBlock) {
return 0;
}
if (abs(currentTime - timeLastEventB) > EventInterval) {
amountMobileB += 1;
Particle.publish(eventMobileB,String(amountMobileB));
Particle.publish(eventPlay,"MB");
timeLastEventAny = currentTime;
return 1; // published
} else {
timeLastEventAny = currentTime;
return 0;
}
return -2; // unknown error
}
int PushEventC() {
if (timeLastEventC < 0) {
return -1; //time stamp not initialized or unkown error
}
int currentTime = Time.now();
if (abs(currentTime - timeLastEventAny) < EventBlock) {
return 0;
}
if (abs(currentTime - timeLastEventC) > EventInterval) {
amountMobileC += 1;
Particle.publish(eventMobileC,String(amountMobileC));
Particle.publish(eventPlay,"MC");
timeLastEventAny = currentTime;
return 1; // published
} else {
timeLastEventAny = currentTime;
return 0;
}
return -2; // unknown error
}
int resetTouchCap(String cmd){
digitalWrite(TouchControlPIN, LOW);
if (cmd.toInt() > 0) {
delay(cmd.toInt());
} else {
delay(500);
}
digitalWrite(TouchControlPIN, HIGH);
return 1;
}
void setup() {
pinMode(VibAPIN, INPUT);
pinMode(VibBPIN, INPUT);
pinMode(VibCPIN, INPUT);
pinMode(TouchControlPIN, OUTPUT);
pinMode(innerLED,OUTPUT);
Particle.subscribe(eventReset, eventHandlerReset);
digitalWrite(TouchControlPIN, HIGH); /////
Particle.function("resetTouch",resetTouchCap);
}
bool ReadVib( int PIN){
if (digitalRead(PIN) == HIGH){
// Particle.publish("LOG_VIBSENSOR",String(PIN));
digitalWrite(innerLED,HIGH);
return TRUE;
} else {
digitalWrite(innerLED,LOW);
return FALSE;
}
}
void loop() {
if (ReadVib(VibAPIN)) {
PushEventA();
}
///////////////////////////disable moblie B and C for debuging
if (ReadVib(VibBPIN)) {
PushEventB();
}
if (ReadVib(VibCPIN)) {
PushEventC();
}
delay(100);
}
Click to Expand
The key thing that we learned while making the mobile is that you should always strive for simplicity and elegance. Somehow our mobile design became very complicated very quickly. We struggled with too many wires, too much string and too many moving parts. Creating elegant ways of managing the elements and pieces from the get-go would have saved us hours and hours of time in the long run. A mobile is by nature a simple element- we let it get out of hand.
A hands-on introductory course exploring the Internet of Things and connected product experiences.
Mood Mobile reflects user mood depending on their day’s events when they settle into bed. The interaction with the mobile motivates deeper reflection and acceptance during rest period for the user.
March 7th, 2018