Unveiling the Rube Goldberg Coffee Machine: Brewing With Whimsy and Complexity!

by Dan Manor in Circuits > Arduino

213 Views, 0 Favorites, 0 Comments

Unveiling the Rube Goldberg Coffee Machine: Brewing With Whimsy and Complexity!

Unveiling the Rube Goldberg Coffee Machine: Brewing With Whimsy and Complexity!
flow.jpg

Attention all coffee enthusiasts and engineering aficionados! Get ready to embark on a delightful journey through the realm of ingenious contraptions as we unveil the mesmerizing world of the Rube Goldberg Coffee Machine. If you've ever wondered how to transform the simple act of brewing your morning cup of joe into an elaborate spectacle of chain reactions, this Instructable is tailor-made for you.

Inspired by the renowned cartoonist and inventor, Rube Goldberg, who was famous for designing overly complex machines to accomplish simple tasks, our Rube Goldberg Coffee Machine is set to redefine your morning coffee routine. Forget the mundane push of a button or the twist of a knob – with this quirky invention, you'll be treated to a dazzling display of creativity and engineering brilliance.

Whether you're a seasoned inventor, a coffee enthusiast looking to spice up your morning ritual, or just someone who appreciates a good dose of whimsy, the Rube Goldberg Coffee Machine promises to amaze and inspire. So, gather your gears, gather your beans, and let's dive into the delightful world of intricate contraptions that will forever change the way you brew your coffee!

the glow is described in the image above.

Supplies

all objects.jpg
cpx1.jpg
cpx2.jpg
wire Dan.jpg
battery 1.jpg
battery2.jpg
ball.jpg

Equipment

  • 2 cpx (CPX (Adafruit Circuit Playground express)
  • 2 batteries cartridges + 3 AAA batteries
  • 2 Micro USB cable
  • 1 small pot
  • 1 tape
  • pulleys (as much as needed)
  • rope (as much as needed)
  • 2 glasses
  • Soccer ball
  • A PC
  • ESP8266 ESP-12E CH340G board

Accounts

  • Make Integromat
  • Blynk

Hardware Preparation

FZAC7EULKGVP47U.jpg

Make the following connections from the ESP8266 to the CPX: (see the wires in the picture above)

  1. RX -> TX (A7)
  2. TX -> RX (A6)
  3. GND -> GND
  4. VCC -> VCC

IDE Setup

arduino.png
  1. Install Arduino IDE
  2. Install SAMD board manager
  3. Install ESP8266 modules
  4. plug your CPX to the PC using the USB cable
  5. Select "Adafruit Circuit Playground Express" -> "Arduino SAMD (..)" -> "Adafruit Circuit Playground Express" board from "tools" toolbar
  6. Select a port from "tools" toolbar (Adafruit Circuit Playground Express)

Blynk Setup

switches.jpg
Blynk1.jpg
Blynk2.jpg
Blynk3.jpg
Blynk4.jpg
Blynk5.jpg

Complete the following steps according to the pictures above:


1. Access your Blynk account and navigate to the "Templates" option located in the side bar.

2. Locate the "New Template" button and proceed to complete it by providing the specified values.

3. To continue, access the top menu and click on "Datastreams".

4. Next, select the "New Datastream" button and opt for the "Virtual Pin" option.

5. Complete the form by following the details provided in the image above.

6. After filling in the form, click on the "Create" button located at the bottom of the form.

7. Upon successful creation, you will now find a virtual pin labeled V0, titled "CPX Input Noise or Button Pressed."

8. To proceed, replicate the process outlined in steps 4 to 7 four more times, each time crafting another virtual pin with the identical configuration as before, with different name.

10. Once all the virtual pins are set up, click on the "Save" button located at the top right corner of the screen. Afterward, the datastreams window should mirror the exact appearance demonstrated in the provided image.

11. Navigate to the left panel and select "Search," then proceed to choose "New Device."

12. Once the new window appears, select the option "From template."

13. A fresh form will now be displayed. Locate the template you created in step 1 from the available options and click the "Create" button to proceed.

Make Setup (Integromat)

isCoffeeSpilled.png
isCoffeeTime scenario.png
isColdMilk.png
isHotWater.png
isWarmMilk.png
Blynk Buttuns.jpg

Follow these steps

  1. Begin by signing up for an account on "Make Integromat."
  2. Install the Make app on your mobile device.
  3. Establish a connection between your mobile device and the Make app.
  4. Within the app, create two buttons named "Cold Milk" and "Hot Milk."
  5. Proceed to create five scenarios as described below (refer to the provided pictures):

Scenario 1 - "Is Coffee Time":

This scenario retrieves events from your calendar and triggers a chain of actions when it detects an empty list of events using appropriate filters. It then sends a push notification to your iPhone (already connected) with the message, "It's Coffee time, please turn on the stove," and turns on the "Coffee Time" switch in Blynk.

Scenario 2 - "Is Water Hot":

This scenario fetches the value of the "isWaterHot" switch in Blynk at fixed time intervals. When it detects that the switch has been turned on, it sends a message to your phone saying, "The water will become hot shortly. Would you mind passing the ball, please?"

Scenario 3 - "Is Coffee Spilled":

This scenario fetches the value of the "isCoffeeSpilled" switch at fixed time intervals. When it detects that the switch has been turned on, it sends your phone a message stating, "The coffee has been added to the water. Do you prefer hot or cold milk?"

Scenario 4 - "Is Cold Milk":

This scenario listens for the "Cold Milk" button press and changes the "isColdMilk" switch in Blynk if the button is hit.

Scenario 5 - "Is Warm Milk":

This scenario listens for the "Warm Milk" button press and changes the "isWarmMilk" switch in Blynk if the button is hit.


6. Activate all the scenarios to enable their functionality and automation.

Inject and Run the Code

Code for CPX1 (which is hanged over the pot)


#define BLYNK_TEMPLATE_ID           "<Blink-template-ID>"
#define BLYNK_TEMPLATE_NAME         "<Blynk-template-name>"
#define BLYNK_AUTH_TOKEN            "<Blynk-token>"


#define EspSerial Serial1
#define BLYNK_PRINT SerialUSB
#define NEO_PIXELS_NUMBER 10
#define ESP8266_BAUD 115200
#define tempSensor A0


#include<LiquidCrystal.h>
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <Adafruit_CircuitPlayground.h>


char ssid[] = "YOUR_SSID";
char pass[] = "YOUR_PASSWORD";
ESP8266 wifi(&EspSerial);


void setup()
{
  CircuitPlayground.begin();
  SerialUSB.begin(115200);


  EspSerial.begin(ESP8266_BAUD);
  delay(10);


  Blynk.begin(BLYNK_AUTH_TOKEN, wifi, ssid, pass);
}


void loop()
{
  Blynk.run();
  Blynk.syncVirtual(V0);
  isWaterHot();
  Blynk.syncVirtual(V3);
  Blynk.syncVirtual(V4);
}


BLYNK_WRITE (V0) {
  // Extract isCoffeeTime variable from 'blynk'
  String isCoffeeTime = param[0].asStr();
  if (isCoffeeTime == "1") {
      sing();
      // reset isCoffeeTime switch
      Blynk.virtualWrite(V0, 0);
  }
}


BLYNK_WRITE (V3) {
  // Extract isColdMilk variable from 'blynk'
  String isColdMilk = param[0].asStr();
  if (isColdMilk == "1") {
    turnBlueLights();
    delay(2000);
    turnOffLights();
    // reset isColdMilk switch
    Blynk.virtualWrite(V3, 0);
  }
}


BLYNK_WRITE (V4) {
  // Extract isHotMilk variable from 'blynk'
  String isHotMilk = param[0].asStr();
  if (isHotMilk == "1") {
    turnRedLights();
    delay(2000);
    turnOffLights();
    // reset isHotMilk switch
    Blynk.virtualWrite(V4, 0);
  }
}


void turnBlueLights() {
  for (int i = 0; i < NEO_PIXELS_NUMBER; ++i) {
    CircuitPlayground.setPixelColor(i, 0, 0, 255); 
  }
}


void turnRedLights() {
  for (int i = 0; i < NEO_PIXELS_NUMBER; ++i) {
    CircuitPlayground.setPixelColor(i, 255, 0, 0); 
  }
}


void turnOffLights() {
  for (int i = 0; i < NEO_PIXELS_NUMBER; ++i) {
    CircuitPlayground.setPixelColor(i, 0, 0, 0); 
  }
}


void isWaterHot()
{
    float reading=analogRead(tempSensor);
    float temperature=reading*(5.0/1023.0)*100;    
    if (temperature > 100) {
      Blynk.virtualWrite(V1, 1);
    }
    delay(2000);
    Blynk.virtualWrite(V1, 0);
}


void sing() {
 int melody[] = {
    294, 330, 392, 330, 294, 392, 330,
    262, 262, 294, 330, 349, 330, 294, 330
  };
  int noteDurations[] = {
    400, 200, 400, 200, 400, 400, 400,
    400, 400, 400, 200, 200, 200, 400, 800
  };


  // Play the melody
  for (int i = 0; i < sizeof(melody) / sizeof(melody[0]); i++) {
    CircuitPlayground.playTone(melody[i], noteDurations[i]);
    delay(50); // Add a short pause between notes
  }
}


Replace the Blynk data with your own, and inject your WiFi credentials.

The purpose of the code above is to automate the coffee-making process using various interconnected technologies. The code samples the 'isCoffeeTime' variable from the 'blynk' platform, which is updated by 'integromat.' 'integromat' monitors the user's Google Calendar to check if the schedule is empty. If the schedule is empty, 'isCoffeeTime' is set to '1,' prompting the CPX to play a song and then reset the 'isCoffeeTime' variable.

Upon hearing the song (and recieving a message), the user is reminded to turn on the stove. Once the water in the kettle boils, the 'isWaterHot()' method detects the temperature using a thermometer and updates the 'isWaterHot' variable in 'blynk' to '1.' This results in a notification being sent to the user, prompting them to pass the ball and, consequently, pour the coffee into the coffee cup.

Following the coffee being poured, the user is prompted to choose between hot or cold milk, changing the 'isColdMilk' or 'isHotMilk' variables to '1' accordingly. These variables are continuously monitored, and based on their values, the code will turn on blue or red lights to indicate to the barista which type of milk to use.

In summary, the code automates the coffee-making process by checking the user's schedule, boiling water, notifying the user, poring coffee and assisting the barista in choosing the right milk type for the coffee.


Code for CPX2 (which is taped to the glass)

#define BLYNK_TEMPLATE_ID           "<Blink-template-ID>"
#define BLYNK_TEMPLATE_NAME         "<Blynk-template-name>"
#define BLYNK_AUTH_TOKEN            "<Blynk-token>"


#define EspSerial Serial1
#define BLYNK_PRINT SerialUSB
#define NEO_PIXELS_NUMBER 10
#define ESP8266_BAUD 115200


#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <Adafruit_CircuitPlayground.h>


char ssid[] = "<SSID>";
char pass[] = "<Password>";
ESP8266 wifi(&EspSerial);


void setup()
{
  CircuitPlayground.begin();
  SerialUSB.begin(115200);

  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(BLYNK_AUTH_TOKEN, wifi, ssid, pass);
}

void loop() {
  Blynk.run();
  float x = CircuitPlayground.motionX();
  float z = CircuitPlayground.motionZ();
  float y = CircuitPlayground.motionY();
  if (x > 7 || y > 7 || z > 7) {
    Blynk.syncVirtual(V2);
  }
}


BLYNK_WRITE (V2) {
  String isCoffeeSpilled = param[0].asStr();
  Serial.println("isCoffeeSpilled");
  Blynk.virtualWrite(V2, 1);
}


Replace the Blynk data with your own, and inject your WiFi credentials.

The objective of the code above is to detect movement in any direction, indicating that the coffee has been poured, and then activate the "isCoffeeSpilled" switch in Blynk.

Run this code in each CPX accordingly.

Scene Setup

Snapshot.PNG

Now, its time to set up the scene !

steps:

  1. Place one CPX (movement listener) outside of a glass, powered by a battery.
  2. Position a pot with water on the stove.
  3. Hang another CPX (temperature listener) above the pot, at an appropriate distance (not too close, not too far), also powered by a battery.
  4. Set another glass on a flat surface.
  5. Suspend the CPX-taped glass above this glass, using pulleys to enable lifting the back of the glass and spilling the coffee.
  6. Ensure that the pulleys are properly taped at angles that minimize friction when pulling the rope.
  7. Attach a ball to the opposite end of the rope.

Enjoy !

smiley.png

Free your calender to have a nice coffee