Introduction: Lego Mindstorms Candy Machine
This "sweet" candy machine features two candy chutes, a locking mechanism for storing candy, and a fun and simple design. It uses 2 EV3 servo motors to operate both candy chutes. Also, the machine's program can be tweaked to add various sounds, images and more! It is fun, easy-to-use, made out of lego bricks, and dispenses candy. What more could you ask for in a machine?
This machine only works with small candies such as Nerds, Mini M&Ms, Sprinkles, Tiny Size Chiclets, etc.. Larger candies may result in the machine clogging.
Files Needed:
Lego Digital Designer Software (Free)
Step 1: Lego Assembly
Before starting, you will need to be sure you have the necessary pieces to build this. The color of the pieces can be changed depending on what you would like or what you have. The suggested colors are listed in the "Parts List" PDF. Refer to that document to be sure you have the necessary pieces. You will also need a LEGO MINDSTORMS EV3 Kit.
The "Lego Candy Machine Instructions" PDF provides the step-by-step building instructions for this Lego creation. If you would like animated 3D instructions, you can download the "Lego Candy Machine.lxf" file. This file can be opened with "LEGO Digital Designer", which is available free for download here. The LDD (LEGO Digital Designer) file provides 3D, animated building steps.
After you have made sure you have all of the necessary LEGO pieces, you may begin assembling the candy machine as described in LDD file or the PDF.
After assembling you will need to connect the motors to the Intelligent Brick. To do this, you will need to first take off the red roofing pieces from the top of the machine. This will open up room for you to plug in the cables. Now, (facing the front of the machine) connect the motor on the right to "Port D" and connect the motor on the left to "Port A" using the cables included in the LEGO MINDSTORMS EV3 Kit. Then replace the red roofing bricks.
Step 2: EV3 Programming
To add the candy machine program to your EV3 Intelligent Brick:
1. First, install the EV3 software first which is available free for download here.
2. Download the "Lego Candy Machine.ev3" file from this step.
3. Connect your EV3 Intelligent Brick to your computer.
4. Open the "Lego Candy Machine.ev3" file with the EV3 software.
5. Download the "Lego Candy Machine.ev3" file to your EV3 Intelligent Brick.
Attachments
Step 3: Operating the Machine
To operate the machine, first make sure you are running the Candy Machine program on your EV3 Intelligent Brick. The screen should then display the text: "Candy Machine". Now, simply press the left or right button depending on which candy you would like. The left & right buttons correspond with the left & right sides of candy. For example, if you would like the candy from the right side (which happens to be Wonka Nerds in my case) press the right button. An arrow will appear on the screen indicating which side you have chosen. Pressing the center button after a side has been chosen will dispense the candy from the desired side.
To fill the machine with candy, simply remove the red (the color may be different on yours) locks from the side of the machine and then take off the dark red (again, you may choose a different color) cap. This is where the candy goes; on both the left and right sides. You can choose any candy as long as it is small about the sam size as Nerds, or mini M&Ms.
The candy labels shown in the photos were created by doing the following:
1. Finding the candy's logo on the internet
2. Scaling the photo down to a small size
3. Printing the photo on regular paper
4. Cutting it out
5. Taping it to the candy machine
Have fun!

Second Prize in the
Community Contest: Toy Building Blocks

Participated in the
Home Technology Contest

Participated in the
Battery Powered Contest
11 Comments
7 years ago
How do you store the candy at the back?
After how many times do you have to refilll it?
Will the mechanism scoop up more candy after you click it once?
Doesn't the bricks all get dirty because of the candy melting?
Reply 7 years ago
That's explained in step 3.
It probably needs to be refilled every few uses, I'm going to guess about 3 (per side).
Yes, the machine can dispense candy multiple times in a row, as demonstrated in the video.
Nope. Hard candies like Wonka Nerds, Gobstoppers, Skittles, and Tic Tacs don't really melt. Chocolate candies might melt though, so try to avoid using those.
8 years ago on Introduction
your welcome ! :)
8 years ago on Introduction
love the machine i want something like that . i love the candy Chiclets tiny size !!!!
Reply 8 years ago on Introduction
Thanks! I appreciate it.
9 years ago on Introduction
this is amaying
9 years ago
Can this different candy
Reply 9 years ago on Introduction
Yes you can use different candy, as long as it is about the same size as the candy I used. Mini M&Ms, Tiny Size Chiclets, Sprinkles and Wonka Nerds are all candies that should work. Bigger candies tend to clog the machine. They may be others that work, so feel free to experiment with different candies.
9 years ago
Really cool! I have a Mindstorm NXT 2.0 but I have not used it in a while. You have have encouraged me to start messing with t again. :)
9 years ago on Introduction
This is awesome! I like that you can put two kinds of candy in it!
Reply 9 years ago on Introduction
Thanks!