Cereal for Breakfast - Rube Goldberg Machine With CPX

by zoharlevany in Circuits > Arduino

189 Views, 0 Favorites, 0 Comments

Cereal for Breakfast - Rube Goldberg Machine With CPX

IOT final project

Hello, and welcome to our Instructible.

We are Zohar and Yotam from Reichman University, and this is our Internet of Things final project.

The goal, build a Rube Goldberg machine using the techniques and tools we learned in our IOT course. For those of you who don’t know, a Rube Goldberg machine is a complex contraption that performs a simple task in an overly complicated way. As you will see, we did just that, and so can you after you follow the simple steps in this Instructible.

The Project: A Rube Goldberg machine that “helps” you with putting cereal in a bowl in the morning. Did you ever wake up with no energy, and asked yourself, how will I have the strength to put cereal in my bowl? If you answered yes, this project is exactly what you need. When you turn on the kitchen light, automatically, your Arduino signals your partner that you’re ready for your cereal, he can signal that he’s coming, via the Arduino lights, you’ll know the signal has gone through and that your partner is on the way. After he’s come, activated the mechanism and cereal is in your bowl, you can send him a pre-defined text message, saying thank you.

Above, you will see an attached video, showcasing our project and simple steps you can follow, to experience our Rube Goldberg machine at home. Enjoy:)

Supplies

machine supplies.jpeg
hardware supplies.jpeg

General:

  • Make.com (Integromat) account + mobile app
  • Blynk.cloud account + mobile app
  • Arduino software

Hardware:

  • CPX (Adafruit Playground Express)
  • ESP8266 (Wi-Fi microchip)
  • Power supply + wire to connect it to the CPX

Rube Goldberg machine:

  • Few books (or book- shaped items)
  • Any kind of rope (we used wool thread)
  • Bowl
  • Plastic bowl or anything that can be used as a kind of pulley axis
  • Cup filled with your favorite cereal
  • Something slightly heavy that you don't mind dropping
  • Scissors
  • Sellotape

Connect the CPX to ESP8266

connecting ESP8266.jpg

Connect the CPX to ESP8266 using 4 wires as shown in the picture.

The ESP8266 provides Wi-Fi connectivity and includes built-in TCP/IP networking software, so connecting it to the CPX, allows the CPX to connect to Wi-Fi.

This capability allows for wireless communication and the exchange of data between devices.

Blynk Preparations

app1.jpeg
app2.jpeg
app3.jpeg
app4.jpeg
app5.jpeg
blynk datastreams.jpg
blynk webhook.jpg
  1. create a new Blynk account: click here
  2. create a new template: for "HARDWARE" choose "Arduino" and for "CONNECTION TYPE" choose "WiFi"
  3. click on the "Datastreams" tab and create 4 new data streams of type "Virtual Pin", you can see the specific details of each of them in the figures
  4. create a new Webhook, you can see the details in the figure
  5. click on the search tab and you'll see a "New Device" button, create a new device from the template you've created in point 2, you will get few lines of code with your device's information - save it, we will use it soon
  6. open the Blynk app on your mobile and add buttons to the device according to the description in the figures

Integromat Preparations

make1.jpg
make2.jpg
make3.jpg
make4.jpg
make5.jpg
make6.jpg
make7.jpg
make8.jpg
  1. create a new make account: click here
  2. create a new scenario
  3. add a webhook module, in its settings click on "Add" and choose a name, then you'll see an URL, copy it and open it in a new tab, you should see there an "Accepted" message and when you will go back to the scenario you should see a "Successfully determined" message (see figure)
  4. go back to Blynk and edit the webhook you've created there, in the "WEBHOOK URL" paste the same URL from point 3
  5. go back to make and enter "Devices" -> "Add device", after you'll choose a name a QR code will appear, now need to open the make app on your phone and scan it
  6. back to the scenario, click on the small plus sign next to webhook circle and add another module. Choose "Flow Control" -> "Router" and you will immediately get 2 new spots for new modules (see figure)
  7. for both of them choose "Apple iOS" -> "Send a push notification" , choose the device from point 5 and you can see the rest of the settings in the figures
  8. set up filters for both of the iOS modules by clicking on the the line that connects them to the router. The specific settings for the filters are in the figures

Code

  1. load the attached file on your Arduino software
  2. notice that the first 3 lines aren't complete and you need to replace them with the 3 lines of code we mentioned in step 2 - point 5 (your device information)
  3. enter your wifi details - you will easily locate it in the file
  4. load the code to your CPX

Downloads

Build the Rube Goldberg Machine

rube1.jpeg
rube2.jpeg
rube3.jpeg
rube4.jpeg
rube5.jpeg
  1. take a short piece of the rope and tie it to the top of the cup
  2. use some tape to hang the cup over the table and put the bowl under the cup
  3. now take a longer piece of the rope, tie the bottom of the cup to one edge of the rope and the item you are dropping to the other
  4. set your pully axis as in the figure and make sure the rope is above it
  5. use the books to build a "domino" line such that when the last book falls it will drop the item
  6. put the CPX somewhere it can sense when you turn on the light and you can see when its lights turn on


All Ready!!