Introduction: Lego Mindstorms Candy Machine

Picture of 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)

Lego Mindstorms EV3 Software (Free)

Candy Machine Instructions

Lego Digital Designer File

Parts List

Candy Machine EV3 Program

Step 1: Lego Assembly

Picture of 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

Picture of 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.

Step 3: Operating the Machine

Picture of 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!

Comments

DDBANN (author)2016-04-03

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?

goldlego (author)DDBANN2016-04-03

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.

TiaRiaa (author)2015-08-18

your welcome ! :)

TiaRiaa (author)2015-08-15

love the machine i want something like that . i love the candy Chiclets tiny size !!!!

goldlego (author)TiaRiaa2015-08-18

Thanks! I appreciate it.

jmay22 (author)2014-09-30

this is amaying

craftyshan108 (author)2014-07-05

Can this different candy

goldlego (author)craftyshan1082014-07-06

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.

CarterBond (author)2014-07-03

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. :)

This is awesome! I like that you can put two kinds of candy in it!

Thanks!

About This Instructable

26,722views

138favorites

License:

Bio: My name is Calvin and I love to create things. I also enjoy filming and editing movies, playing games, watching movies (especially Marvel movies), and ... More »
Add instructable to: