SKUNKWORKS - ROOT BEER ON TAP:
This is a short project I did over the summer. I got a beer keg system from a friend and decided to make a root beer vending machine operated out of my room. I did not want to deal with accepting cash, so I decided to make it accept venmo. The entire system is operated by a raspberry pi, which checks for payments and opens a valve for a limited time to serve root beer.
The name “Skunkworks” is a slang term used to describe any kind of secret engineering project. I think it’s fitting because I’m always cooking up various engineering projects in my lab-bedroom and this allows people to taste the mysterious fruits of my labor through a tube in the wall.
Venmo unfortunately does not have a public API, however they send confirmation emails immediately after every payment. So I needed the pi to check my email to detect venmo payments. This presented another issue, because I need my main email (which receives the venmo confirmation messages) to be secure. The raspberry pi can not be given access to this account. So, I set up a filter on my main account which automatically forwards every email from venmo to a separate “burner” email. Since this email contains only the venmo messages, I could give the pi access to this by setting up an “app-specific” password stored on the pi. If some hacker gets access to the burner email, I don’t lose much.
The rest of the system is quite simple. Root beer is stored in a keg which is pressurized by CO2 from a tank. The pressure wants to force the soda through the outlet tube, which is blocked by a valve before it reaches the tap. When payment is received, the raspberry pi opens the valve and shows a confirmation message on the display. A relay had to be used between the pi and the valve because the valve runs on 12V, and the pi runs on 3.3V.
My favorite part of the project was drilling a hole all the way through my dorm room wall. (My dorm is old and about to be renovated so we can do this). The keg and CO2 tank are stored in my room and the tap and electronics are in the hallway outside. Root beer passes from the keg to the tap through a tube running through the wall.