Candy Tosser

by MikeTheMaker in Workshop > 3D Printing

3241 Views, 8 Favorites, 0 Comments

Candy Tosser

assembly - 39.jpg

This "talking, watching, listening" candy dispenser is triggered by the code word, "Alexa." When "Alexa" is heard, the Adafruit sound board requests, "If you want candy, smile NOW!" The Google AIY vision kit watches for a smile. If there is no smile, the sound board says, "No smile, no candy." If there is a smile, candy is dropped onto the catapult, aimed and flung toward the requestor (direction is determined by "where Alexa heard sound from." An Arduino Uno monitors Alexa (Amazon Echo Dot), Google AIY vision, Adafruit sound and four servo motors.

Materials Needed

Arduino Uno

Google AIY Vision Kit (available at target.com)

Echo Dot (Amazon.com)

Adafruit sound board

Speaker

(5) Snowmobile bearings (Amazon.com)

(1) High torque servo motor (Savox sc-0251--Amazon.com)

(3) Servo motors

Extension spring 7/16 x 10 1/4" x .041" (Home depot)

6 volt 2 amp power supply (for servo motors)

5 volt usb power supplie (for Arduino)

Plywood

Paint

(2) skateboard bearings (Amazon.com)

Servo extension cables

Misc. screws, bolts and nuts

Candy

3d printed pieces

schematic04052018_2.jpg

Go to my "Happy Face" project on Instructables to find the large gears and instructions for creating them. This project is a greatly improved version of "Candypult" which was posted some time ago on instructables.

This schematic shows the overall electrical diagram and connections to the Arduino Uno.

assembly - 29.jpg
assembly - 31.jpg

Take the main drive gear and glue (or melt using a soldering iron) the piece that holds the catapult board.

assembly - 33.jpg
assembly - 36.jpg
assembly - 2.jpg

The gears that will be under the catapult holder are mounted in position (using wood screws--see the Happy Face instructable). "Cushions" are placed under the catapult tray to prevent excessive movement when the spring fires.

tosser - 6.jpg
tosser - 9.jpg

Assemble the flinging arm and bearing holders.

tosser - 8.jpg

Attach the candy holder to the end of the rod (they screw together).

tosser - 4.jpg
tosser - 5.jpg

Attach the spring to the collar on the rod.

tosser - 12.jpg

Attach the other end of the spring to the high torque (Savox) servo motor.

tosser - 16.jpg

Install the stopper posts and insert a rubber band between the posts. This stops the forward motion of the arm and launches the candy into space. The position of the stopper determines the arc of the candy thrown.

tosser - 17.jpg

The release servo moves out of the way when tension is placed on the spring.

tosser - 3.jpg

The base holds the candy dispensing tower.

assembly - 25.jpg

The candy dispensing tower is melted (or glued) onto the base.

assembly - 4.jpg

The dispenser servo motor and rods (blue in the photo) push the candy on command from the master Arduino.

assembly - 8.jpg

The drive gear servo horn is melted to the drive gear.

assembly - 9.jpg

The servo motor for the drive gear is mounted to two 1" x 2" pieces of wood.

assembly - 10.jpg

The drive gear (with servo horn) is brought over the motor and attached.

assembly - 11.jpg

The screw on the servo horn is tightened through a hole in the gear.

assembly - 12.jpg

The gear spindle is inserted in the bearing holder.

assembly - 13.jpg

The gear lock is threaded into place.

assembly - 14.jpg

The drive assembly is mated with the gears that travel under the catapult platform.

assembly - 16.jpg

The stopper is placed between the boards so that the gears (not the motor) will turn when the motor is energized.

assembly - 19.jpg
assembly - 17.jpg

Photocells are attached to the "Alexa holder" and wired out.

aiy - 13.jpg
aiy - 12.jpg

Remove the pushbutton from the Google AIY vision kit. There is a plug in wire set labeled "piezo" coming from the pushbutton. Cut those wires and use the black wire for "AIY ground." Solder a wire to "P6" at the bottom of the pushbutton--this is "B" (blue?) within the button. The led set in the button uses a common anode--so there will always be voltage on the "B" pin. When nothing happens, that voltage will be 3.39 volts. When a face is detected, the voltage will drop to 2.59 volts. When there is a smile, the voltage will rise to 2.89 volts (the range between 2.59 and 2.89 depends on the magnitude of the smile).

aiy - 16.jpg

I set the AIY kit in a 3d printed holder.

assembly - 45.jpg

Put it all together and wait for it to boot up (Google AIY Vision takes a minute or two--Alexa takes a minute or two). Turn the volume all the way down on Alexa. You don't want to hear her complaining and "not understanding" all the talk about "smile if you want candy"--it really confuses her.

If you want candy, call out "Alexa," smile and prepare to catch!