Sherwin Chiu
Published © GPL3+

Candy Dispenser with 3D Print & Stepper Motor

Just a simple, fun Candy Dispenser using Arduino, a 3D Printer, and tape.

BeginnerShowcase (no instructions)2 hours427
Candy Dispenser with 3D Print & Stepper Motor

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Stepper Motor
Digilent Stepper Motor
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Gravity:Digital Push Button (Yellow)
DFRobot Gravity:Digital Push Button (Yellow)
×1
BOOSTXL-ULN2003 ULN2003A Dual Stepper Motor BoosterPack
Texas Instruments BOOSTXL-ULN2003 ULN2003A Dual Stepper Motor BoosterPack
×1

Software apps and online services

Arduino IDE
Arduino IDE
Ultimaker Cura 4.4
FreeCAD

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Tape, Clear
Tape, Clear

Story

Read more

Custom parts and enclosures

CandyDispenser

.gcode to print using Cura

Schematics

Close-up Wiring

Code

CandyDispenser

Arduino
Code used to rotate stepper motor 60 degrees.
#include <Stepper.h>
#define   buttonPin   7 
const int stepsPerRevolution = 200;
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11); 
void setup() {
  // put your setup code here, to run once:
  myStepper.setSpeed(100); // 100RPM 
  pinMode(buttonPin, INPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  if (digitalRead(buttonPin)){
    myStepper.step(347); 
    delay(500);
  }
}

Credits

Sherwin Chiu

Sherwin Chiu

3 projects • 3 followers
Just a guy who occasionally blows up capacitors. I love doing this type of stuff!

Comments