CandySpencer
In a context of a rapid prototyping class, we (Ahmed, Badr, Paul and Thomas, four students of a french engineering school) contributed in the following project.
It is basically a dispenser that delivers candies whenever you put your hand under it.
Supplies
Electronics :
Arduino Uno
Ultrasonic distance sensor
9g Servo motor
Materials :
PLA filament
MDF wood
Handy Tools:
Screw driver
Hex key
Three M5 socket head cap screws + nuts
two M1*5 screws
five M3*20 wood screws
Machines:
3D Printer
Laser Cutting Machine
Coding and Wiring
The first step in this project is to develop a functional code and to ensure that all the electronics are working very well.
The principle of the code is very simple. An ultrasonic sensor will be placed in a 10 cm distance from the table on wich we put the candySpenser, so that when we put our hand under the container, the sensor will detect a decrease in the distance, enabling the servo motor to rotate the enclosure for a certain amount of time, allowing the candy to fall down before the enclosure closes.
You'll find attached the arduino code we wrote, as well as the matching wiring. Feel free to change them if you have other ideas that might be more relevant.
Downloads
Designing
After having verified that the code and the electronics are working functional, we started designing the device. The final model eventually picked gathers 11 distinct parts that must be afterwards combined together.
the STL files are shown below:
3D Printing, Laser Cutting and Assembling
After the 3D printing and laser cutting (it's possible to use only 3D printing but the project expected at least 2 ways of getting the wanted parts) comes the assembling. We could suggest you to figure it out all by yourself (this is really instructive and intuitive),but we still can recommend you the following order :
- fix the servo motor to the "support servo" with the two M1 screws
- put the container in the rectangular hole in the "plaque"
- fix the "support servo" and "support axe" to the container under the "plaque" with four wooden screws
- mount the "clapet" to the servo motor horn from one side and then fix the "axe" on the other side with a wood screw after passing it through the hole in the "support axe"
- mount the ultrasonic sensor to the "support capteur" and the arduino to "support arduino" , make the wiring and then mount the circuit using the rectangular holes in the "plaque"
- fix the 3 "pieds plat" to the "plaque" using three "tompon" and three M5 screws
Fill the container with candies and have fun (and as we say in french, Bon Appétit :) )
PS: You can use the "couvercle" to close the top of the container if you want to keep the surprise for others discovering what will fall into their hands !