Candy vault unlocks only when you’ve earned it
Maker Tim van de Vathorst is a self-confessed candy addict, to the point where he can’t keep it in the house or he’ll eat in all in one go. So he built something that would house the candy safely until he really deserved it. (Yes, I am going to call it “candy” and not “sweets” for the entirety of this post; forewarned is forearmed.)
Doing push-ups is the price Tim set for the release of the hostage candy. He fashioned a very nicely woodworked vault, and set it up with a Raspberry Pi to detect when he is doing push-ups. When enough push-ups have been performed, the vault is opened, and candy can be consumed. It’s like getting a notification on your Apple watch that you’ve “closed your ring today”, except good.
How does it work?



A Raspberry Pi Camera Module captures movements happening near the vault, while a Raspberry Pi 4 handles complex machine learning algorithms from the Mediapipe library to detect the joints of Tim’s body. It recognises when his joints are at the angles they need to be to do a push-up, and it can count how many Tim does.
Tim designed the vault itself in Affinity Designer. Raspberry Pi triggers a servo inside the vault door to open it once ten push-ups have been detected.


List of parts
- Raspberry Pi 4
- Raspberry Pi Camera Module
- OLED screen
- Servo
- Xtorm power bank
Check out the final few minutes of the project video to see Tim testing the candy vault in public. He went to a local train station with a sign promising “free candy for ten push-ups” and, lo and behold, he had quite a few takers.

Personally I’d like a refrigerated version that releases adult beverages after I exercise. But I can only do one push-up, so…
3 comments
yeb
Cool! But needs a more dramatic win effect – lights, sounds and an actuator that springs the vault door wide open.
Sandro Grundmann
Wow! quite a nice project and awesome build!
aardvark
Thanks for the forewarning, I was able to stop reading any further.
Comments are closed