Encourage users to take a break at the same time and share a cup of Coffee .

Created: February 5th, 2016

0

CoffeeLove

The idea with CoffeeLove  was to encourage people separated by a distance to connect with each other for few moments during their busy schedules and share a cup of coffee over long distances. CoffeeLove is a set of two mugs which intelligently communicate with each other. When coffee is poured into cup A , cup A turns green in color as A registers coffee has been poured into the cup , this triggers communication with the cup B,  through the cloud and cup B starts glowing blue thus indicating the person with cup A is having coffee and its time for a coffee break. The cup also informs if the person has finished their cup of coffee as the brightness of the color is dependent on the force being applied to the force sensor in the other person's cup. 


0

Components Used 

1. Breadboards x 2

2. FSR Sensors x 2 

3. Resistors 220 Ohms x 8

4. Jumper Wires 

5. MOSFETS x 6 

6. RGB Led Strips x 2

7. Particle Photon x 2 

8. Mugs x 2

9. Lithium Ion  and Alkaline Battery 9V x 2


0

Process


- We began the process by brainstorming about ideas through which we can connect people over long distance with Internet of Things . We generated concepts such as Teddy Hug , two teddy bears that are separated and light up when hugged , Replicating or mirroring music played by the partner . Post a few rounds of brainstorming we conceptualized an idea of connecting people over the most loved beverage - A cup of Coffee !! We chose to use the weight of coffee when poured in as an indicator to communicate with a cup situated at a distance .

- Next, we started working on the code to realize this concept. It is written in such a way that when liquid(coffee) is being poured into the glass, the increase in weight is detected by a force sensor and the mug lights up in blue. The matching cup lights up in blue indicating to the partner that it is time for a coffee break. When they pour their drink into their glass, both the mugs turn green. The same code runs on both devices.

- The hardware for this concept was designed initially using a button switch. However, we wanted to add another layer of intimacy and decided to use an fsr sensor so that the brightness of the lights depends directly on the amount of liquid poured into the mug. This way, the second partner can see how much coffee is poured into the first mug and understand how much time their partner can spare for this coffee break.

0
Code for CoffeeLove
// Setup LED and FSR pins
double fsrPin = A0;
int ledPin = D0;
int Red = D1;
int Blue = D2;
int Green = D3;
String Id1;
int currentPressure2;
String Scurrentpressure2="";
int ledState=0;
// Store the current FSR pressure reading
int currentPressure = 0;
String myID="";
// Set the threshold for the pressure sensor
int threshold = 650;
// General setup fun!
void setup() {
  // What's input and what's output
  pinMode( fsrPin , INPUT); // sets pin as input
  pinMode( ledPin , OUTPUT );
    pinMode( Red , OUTPUT );
      pinMode( Blue , OUTPUT );
        pinMode( Green , OUTPUT );

  Particle.subscribe(  "ass4/paired/pressure" , handlePressureChange );
  digitalWrite( ledPin, 0);
    digitalWrite( Red, 0);
      digitalWrite( Blue, 0);
        digitalWrite( Green, 0);
  // And so we can see what's happening...
  // Start the serial...
  Serial.begin(9600);
}
void loop()
{

double currentPressure = analogRead( fsrPin );
Serial.println(currentPressure);
digitalWrite( ledPin, HIGH);
 while ( currentPressure>threshold & currentPressure2<threshold )
 {

double currentPressure = analogRead( fsrPin );
   digitalWrite( Green, HIGH);
  delay(1000);
  digitalWrite(Green,LOW);
   ledState = 1;
}
 while ( currentPressure>threshold & currentPressure2>threshold ) {
   // otherwise
   double currentPressure = analogRead( fsrPin );
   digitalWrite( ledPin, LOW);
   digitalWrite( Blue, HIGH);
   delay(5000);
   digitalWrite( Red, HIGH);
   digitalWrite(Blue,LOW);
   delay(1000);
   digitalWrite(Red,LOW);
   digitalWrite( Green, HIGH);
   delay(1000);
   digitalWrite(Green, LOW);
   ledState=1;
 }
 if( currentPressure<threshold & currentPressure2>threshold )
 {
   // turn the LED On

   int ledValue = map( currentPressure, threshold, 4094, 0 , 255 );
   digitalWrite( Blue, ledValue);
 ledState=0;
}
 announceLed( ledState );
}
void handlePressureChange(const char *event, const char *data)
{
  // Display what we got
//  Serial.println( "received=" );
  Serial.println( data );
  Serial.println( event );
  // conver the data to a String type.
  String dataStr = data;
  String ScurrentPressure2= (dataStr.substring(dataStr.indexOf(','), dataStr.length()));

  // if there isn't data do nothing
  if (!data) return;
 // We only want to handle events
 // From our paired device
 // We're not interested in stuff that's come from
 // this device ...
 String myID = System.deviceID();
 // if the device that sent is this device... ignore. return exits this function
 if( dataStr.indexOf( myID ) > -1 ) // return;
 {// If we get to here, it's an event we care about

 int ledValue = map( currentPressure, threshold, 4094, 0 , 255 );
 digitalWrite( Blue, ledValue);
}
}
// Publish an event saying that
void announceLed( int ledState )
{

  String data = System.deviceID()+","+currentPressure;
  // and share as a public event
  if (ledState ==1){
  Particle.publish( "ass4/paired/pressure", data );}
}
Click to Expand
0

Outcome

The video gives a glimpse of the working concept for Coffee Love. 

0
0

Reflections

While many forms of communication already exist to connect people living away from each other, we realized that IoT can be a very powerful medium to influence a person's mood through small gestures and ambient indicators. It is not possible to always call or text a loved one and in such cases, receiving a small signal that shows that someone is thinking of you can make your day.  

Initially, we had a few issues with the RGB LED strips due to the extensive wiring required for the MOSFETs. However, once we got it working, the result was beautiful and justified the effort.

While working on this concept, we could think of so many more dimensions that we can add to it. One of them was the use of a temperature sensor so that the mug could communicate to it's mirror about whether a hot or cold liquid is poured into it through changing the color of the LEDs. This can indicate to a person the weather their partner is experiencing or even their mood . 

x
Share this Project

Courses

49-713 Designing for the Internet of Things

· 4 members

This course charts the emergence of the now "connected world" to explore the possibilities for future products and connected spaces.


Focused on
About

Encourage users to take a break at the same time and share a cup of Coffee .