Coffee Fountain
About the project
Turning Donations into a Coffee Cup Water Feature
Project info
Difficulty: Moderate
Platforms: Adafruit, SparkFun, MicroPython, Espressif
Estimated time: 1 hour
License: Creative Commons Attribution CC BY version 4.0 or later (CC BY 4+)
Items used in this project
Hardware components
Hand tools and fabrication machines
Story
There I was one day, sipping on my morning brew, staring at my 'Buy Me A Coffee' (BMAC) button, and pondering the mysteries of the universe. Suddenly, a light bulb moment occurred. Why not make my BMAC button a tad bit more engaging? And thus, the idea of my Coffee Cup Water Feature was born, ready to make a splash in the world of online donations!
Allow me to explain. Each time someone brews up a donation for my channel, this fascinating contraption springs into action. A coffee cup - no ordinary one, mind you, but a yellow painted masterpiece - fills with coffee, and a mini screen displays the generous donor's name and the size of their donation.
Now, you're probably thinking, "Surely, there's a ready-made API for this?" Well, dear reader, I must confess, I have a self-imposed rule of using nothing but Python. So, when I found only a JS API for BMAC, I took the road less traveled. I rolled up my sleeves, pulled up the Google Gmail API, and set about filtering the necessary info – name and amount of coffee donated – from a dedicated email address for my BMAC donations. The code is currently being refined and put through robust security testing before I release it to the public.
Moving on from the code, I had a cup to procure. After a mission to my local coffee shop, I returned victorious with an empty paper cup. A splash of yellow paint later, my cup was ready for action.
Next, my 3D printer was put to work, producing two key parts for my coffee cup water feature. The first was a stand for the cup to sit above the coffee reservoir - a cleverly repurposed plant pot tray. The second part was an interior component to secure the pump tube and decrease the volume of the cup, ensuring it wouldn't take a millennium to fill up.
As the main code runs on my trusty PC, I needed a worthy sidekick to control the cup. Enter the D1 Mini, a motor driver, and a 16x2 LCD screen. The code on this end is straightforward, thanks to a helpful HTTP message from the main script. This message contains the donor's name and donation amount, which gets displayed on the screen. The motor then runs for a duration proportional to the donation size – 1 coffee = 2 seconds, plus an extra 4 seconds to allow the cup to fill up.
1 / 2
The final step? Housing the electronics in a 3D printed case to save them from any rogue water splashes. And voilà, my Coffee Cup Water Feature was born!
If this tale has piqued your interest, join my stream live on Twitch. https://www.twitch.tv/mellow_labs Your donations are not just appreciated – they're the lifeblood that keeps this coffee machine (and my projects) running! Alternatively, you can support me on Patreon and gain early access to videos, as well as work-in-progress updates.
Thank you for joining me on this madcap adventure, and I'll see you in the next project
Leave your feedback...