Superman Candy Dispenser

by vikramksc2604 in Circuits > Electronics

30 Views, 1 Favorites, 0 Comments

Superman Candy Dispenser

coverrr.jpg

This instructable is an assembly guide for the Superman Candy/Chocolate dispenser model available on Maker World.


The CAD files are available at:

Superman Candy Dispenser: MakerWorld

Supplies

servo_mg995.jpg
limiswitch.jpg
esp32ss.jpg


This assembly requires the following electronics:

  1. ESP32(or any arduino like microcontroller)
  2. MG995 180 Degree Servo motor: (x1)
  3. Limit Switch (x1)
  4. LED (optional)
  5. Wires

Mechanical Components:

M3 screws with bolts

Assembly

IMG-20250522-WA0007.jpg
IMG-20250522-WA0006.jpg
IMG-20250522-WA0008.jpg

Start with the back_cover.stl and Fit the servo motor into the space.

You may encounter that the servo is not fitting (like in the second image), all you have to do is push it to the corner as much as possible, apply pressure and it will eventually go through.

Make sure the servo is aligned as shown in the image where the metal head is next to the little rectangular empty space of the part.

M5 screws are a bit tight and bend the part so u can use M3 screws with bolts for the servo too.

Next

IMG-20250522-WA0010.jpg
IMG-20250522-WA0015.jpg
IMG-20250522-WA0013.jpg
IMG-20250522-WA0014.jpg
IMG-20250522-WA0016.jpg
IMG-20250522-WA0019.jpg

Now pick the right_adapter.stl and left_adapter.stl part to attach with the back_cover.stl part to form the body of the machine.

You can refer the images on how to attach these parts and screw them.

In the last image you can observe that the back cover is supposed to be behind the left/right cover part.

Assemble both the left and right cover parts using m3 screws and bolts.

Coding the Electronics

CIRCUIT_DIAGRAM_SUPCANDY.png

Why we need the coding step now will be justified as we go. You can just use an Arduino UNO R3 too

Firstly follow the connection diagram in the image given.

Wire your connections in the similar way (you can assign any other Pins:


Arduino code:

#include <ESP32Servo.h>


const int switchPin = 14; // Limit switch pin

const int servoPin = 5; // Servo control pin


Servo myServo;


void setup() {

pinMode(switchPin, INPUT_PULLUP); // Use internal pull-up resistor

myServo.attach(servoPin);

myServo.write(35); // Initialize servo to 45 degrees

delay(500); // Give time for the servo to reach position

}


void loop() {

if (digitalRead(switchPin) == LOW) { // Switch is pressed

myServo.write(10); // Move to 10 degrees

} else {

myServo.write(35); // Return to 45 degrees

}


delay(50); // Small delay to reduce unnecessary updates

}


In the setup function adjust the home position of the servo, in my case it is 35.

Set it according to your preference.

When switch is pressed my servo goes to 10 degrees and when switch is not pressed anymore it goes back to 35.


Make sure when the switch is press the servo motor moves clockwise.


Attach Dispenser Part

IMG-20250522-WA0020.jpg
IMG-20250522-WA0009.jpg
IMG-20250522-WA0011.jpg
IMG-20250522-WA0022.jpg

NOTE: Insert the part when the servo

Once you have formed the body, you can attach the dispenser_servo.stl part to the servo motor metal head.

Before that take the circular servo horn and screw it to the 2 holes in the dispenser_servo.stl part.

Observe 3rd Image. Once it is done, attach the part with the servo horn screwed, to the servo metal head.

NOTE: As you have uploaded the code, the servo will be in its home position. now the dispenser_servo part should be placed horizontally to the servo.

Electronics Connections

IMG-20250522-WA0023.jpg
IMG-20250522-WA0025.jpg
IMG-20250522-WA0026.jpg
IMG-20250522-WA0029.jpg
IMG-20250522-WA0030.jpg
IMG-20250522-WA0031.jpg

Now connect the switch, motor and LED(optional) as per given diagram in the previous step.

You can insert the wires through the small gap i have made in the back_cover part.

Now insert them through the supermankey-holder-switch.stl part.

You will get a result like the last two pics.

Note the switch orientation with respect to the part.

Attach Top Part

top1.jpg
top2.jpg
IMG-20250522-WA0035.jpg

The top_cover.stl part is a sliding mechanism.

Slide it onto the sections of left_cover.stl and right_cover.stl part.

Observe 3rd pic.


Final Assembly

IMG-20250522-WA0028.jpg
IMG-20250522-WA0034.jpg

the left and right cover parts have a sliding section for the supermankey-holder-switch.stl.

Similar to previous mechanism, slide this part too and you will get a result like the 2nd image.

Place the superman_key.stl part and test the switch mechanism.



Place Container and Test

coverrr.jpg

Place the container and test it yourself.

NOTE: Use small candies.