CoffeeMates

Made by Kristie Lord, yxuan and Jonathan Fortis

The coffeemates are two coasters designed to help two friends share the experience of drinking coffee together even when they are separated.

Created: October 11th, 2019

0

Separated by long distances from your loved ones?  Missing the simple act of enjoying coffee together after a hard day of work?  Fear not, as CoffeeMates can once again allow you to share that intimate moment.

See promotional video of it here: https://vimeo.com/365866298

0

Design Process:

To begin the design process, we started off brainstorming what connected intimacy we wanted to design for and eventually decided on coffee drinking.

0
Brainstorming Ideas
Img 4096.jpg.thumb
0

Next, we decided what components to use and decided on making smart coasters that use a pressure sensor to determine when someone is drinking coffee and lights on the other person's coaster to indicate that.  After that, we used a sheet of acrylic to laser cut the coasters, placing the pressure sensor in between the two coasters and the light strip around it.

0
Fabricating Coasters
Img 4105.jpg.thumb
0

After, we coded the lights on the particle to light up when pressure is applied to the coaster and began testing to ensure the sensor was working correctly and the two devices successfully communicated with each other.

0
Testing Pressure Sensor and Communication Capacity
Img 4106.jpg.thumb
0

After, we began using published values to determine the force applied when a full mug is placed on each coaster and began testing that the opposite device would light up when the mug was placed on the coaster.

0
Testing to ensure communicating correctly
Img 7120.thumb
0
Testing to ensure communicating correctly
Img 7121.thumb
0

Next, we needed to figure out how we wanted the neopixel strip to light up.  We didn't want the device to be too intrusive, so we decided against blinking lights or animating the lights.  Then, we did some research into the meaning of colors, and decided the colors being  yellowish brown, green, and pink since those colors were the feelings we were trying to evoke with this device (warmth, calm, soothing, comfort, and optimism).  We also thought these colors looked good together and almost like a flower, which evokes a feeling of nature and intimacy since flowers are commonly given to love ones.

After deciding the colors, we coded the neopixel strip to see how the colors looked together and edited the rgb values to get better colors closer to what we imagined.

0
Neopixel Strip Code
#include <neopixel.h>

#define PIXEL_PIN D2
#define PIXEL_COUNT 14
#define PIXEL_TYPE WS2812

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);


void setup() {
  strip.begin();
  strip.show();
}

void loop() {

      for(int i = 0 ; i < strip.numPixels(); i++  ){
        if( i % 3 == 0 ){
            strip.setPixelColor( i, strip.Color(139,69,19) );
    }
        else if( i % 3 == 1 ){
            strip.setPixelColor( i, strip.Color(0,128,0) );
    }
        else{
            strip.setPixelColor( i, strip.Color(255,192,203) );
        }
      }
    strip.show();
    delay(100);
}
Click to Expand
0

Finally, we tested the device with the neopixel strips code to ensure it all worked together properly.

0
Final Test of CoffeeMates
Project photo again.thumb
0

Connections:

The neopixel LED Strip has three pins: VCC, ground and data. We connect them to power, ground and digital pin, D2, of the Particle Argon.  The pressure sensor is connected to power and the analog pin, A0.

0

Code:

0

Mug 1 Code:

0
#include <neopixel.h>

#include <stdio.h>
#include <stdlib.h>


#define PIXEL_PIN D2
#define PIXEL_COUNT 14
#define PIXEL_TYPE WS2812

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

// Message 
char *message;
int mug2 = 0;

// Local Pressure sensing
int FSR_PIN = A0; 
int pressure_threshold = 250;
int pressure_reading = 0;

// Local lights
int LED = D7;

void setup() {
    Particle.publish("MUGa", "Mug 1 test online");
    Particle.subscribe("MUGb", handler);
    Particle.variable("mug2", pressure_reading);
    
    pinMode(FSR_PIN, INPUT);
    pinMode(LED, OUTPUT);
    
    strip.begin();
    strip.show();
}

void loop() {
    // local pressure reading
    pressure_reading = analogRead(FSR_PIN);
    
    char valtext[1];
    sprintf(valtext,"%i", pressure_reading);
    Particle.publish("mug 1 weight",valtext);
    
    if (pressure_reading > pressure_threshold){
        Particle.publish("MUGa", "1");
    }
    else {
        Particle.publish("MUGa", "0");
    }
    
    // Other mug pressure reading
    if (mug2 == 1){
        digitalWrite(LED,HIGH);
        neo_on();
    }
    else {
        neo_off();
        digitalWrite(LED,LOW);
    }
    delay(2000);
}

void handler(const char *event, const char *data){
    if(data){
        message = const_cast<char*> (data);
        mug2 = atoi(message);
    }
}

void neo_on(){
    for(int i = 0 ; i < strip.numPixels(); i++  ){
        if( i % 3 == 0 ){
            strip.setPixelColor( i, strip.Color(210,105,30) );
        }
        else if( i % 3 == 1 ){
        strip.setPixelColor( i, strip.Color(0,128,0) );
        }
        else{
            strip.setPixelColor( i, strip.Color(255,104,180) );
            }
        }
        strip.show();
}

void neo_off(){
    uint32_t c = strip.Color(0, 0, 0); 
    for( int i = 0; i < strip.numPixels(); i++ ) {
        strip.setPixelColor(i, c); // set a color 
        strip.show();
    }    
}
Click to Expand
0

Mug 2 Code:

0
#include <neopixel.h>

#include <stdio.h>
#include <stdlib.h>


#define PIXEL_PIN D2
#define PIXEL_COUNT 14
#define PIXEL_TYPE WS2812

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

// Message 
char *message;
int mug1 = 0;

// Local Pressure sensing
int FSR_PIN = A0; 
int pressure_threshold = 1300;
int pressure_reading = 0;

// Local lights
int LED = D7;

void setup() {
    Particle.publish("MUGb", "Mug 2 test online");
    Particle.subscribe("MUGa", handler);
    Particle.variable("mug1", pressure_reading);
    
    pinMode(FSR_PIN, INPUT);
    pinMode(LED, OUTPUT);
    
    strip.begin();
    strip.show();
}

void loop() {
    // local pressure reading
    pressure_reading = analogRead(FSR_PIN);
    
    char valtext[1];
    sprintf(valtext,"%i", pressure_reading);
    Particle.publish("mug 2 weight",valtext);
    
    if (pressure_reading > pressure_threshold){
        Particle.publish("MUGb", "1");
    }
    else {
        Particle.publish("MUGb", "0");
    }
    
    // Other mug pressure reading
    if (mug1 == 1){
        digitalWrite(LED,HIGH);
        neo_on();
    }
    else {
        neo_off();
        digitalWrite(LED,LOW);
    }
    delay(2000);
}

void handler(const char *event, const char *data){
    if(data){
        message = const_cast<char*> (data);
        mug1 = atoi(message);
    }
}

void neo_on(){
    for(int i = 0 ; i < strip.numPixels(); i++  ){
        if( i % 3 == 0 ){
            strip.setPixelColor( i, strip.Color(210,105,30) );
        }
        else if( i % 3 == 1 ){
        strip.setPixelColor( i, strip.Color(0,128,0) );
        }
        else{
            strip.setPixelColor( i, strip.Color(255,104,180) );
            }
        }
        strip.show();
}

void neo_off(){
    uint32_t c = strip.Color(0, 0, 0); 
    for( int i = 0; i < strip.numPixels(); i++ ) {
        strip.setPixelColor(i, c); // set a color 
        strip.show();
    }    
}
Click to Expand
0

Materials Used:

No.

Item Name

Quantity

1.

Particle Argon Boards

2

2.

Square Force Sensing Resistor

2

3.

NeoPixel LED Strip

2

4.

Breadboard

2

5.

Black Acrylic Sheet

1

6.

10 K Resistors2

7.

Solder Iron and Flux

1

8.

Connecting Wires14
0

Results:

Thus, we created two smart coasters that light up to indicate when the other person is drinking coffee.  We liked the sleek design of the coasters and feel the problem of being unable to share the experience of drinking coffee together has been successfully solved.

x
Share this Project

Courses

49313 Designing for the Internet of Things

· 11 members

Thermostats, locks, power sockets, and lights are all being imbued with smarts making them increasingly aware and responsive to their environment and users. This course will chart the emergence of ...more


About

The coffeemates are two coasters designed to help two friends share the experience of drinking coffee together even when they are separated.