3D Printed Marble Portal Illusion With Arduino
by EstBuilds in Workshop > 3D Printing
101 Views, 2 Favorites, 0 Comments
3D Printed Marble Portal Illusion With Arduino
)
Hi Everybody,
I built this illusion a couple of weeks ago. It is supposed to look like the marble is continuously teleporting from the bottom to the top of the ramp. In reality, the marbles go to a bottom channel where a marble pump mechanism lifts it up to continue the cycle. The marble pump is powered by a cheap stepper motor that is being controlled with an Arduino using simple code. I also added LEDs to add to the portal effect. I added step by step instructions to my website, so others could build my project. I wanted to also add instructions here where I hope more people are able to see the project and build it. Overall, this is a relatively easy project to build, and the final results look amazing. If you are interested in building the illusion, I would recommend watching my video above to help with some of the assembly. Even if you are not building the illusion, I would highly recommend watching the video to see how it works, and it would help me out a lot.
Supplies

- 3D Printer
- PLA Filament
- Computer/Laptop with 3D Print Slicer and Arduino IDE
- Stepper Motor with Control Board
- Super Glue
- Dupont Jumper Wires
- Arduino with USB Cable
- Power Supply for Arduino
- 1/2 Inch Steel Balls
- Optional: LEDs with about 220 ohm resistors (They do look pretty cool.)
- Optional: 2 M4 Bolts and Square Nuts (A better way to attach the motor to the teleporter.)
3D Print

The first step is to 3D print all of the parts. The STLs can be found here: https://makerworld.com/en/models/1004102. No supports are needed if you orient the parts correctly on the print bed. I used PLA because that is what I always use, but if you have another material that you know how to use, it should work as well. (Just not TPU.)
Attach Stepper Motor

Put the stepper motor through the hole. You can either glue the motor on, or bolt it on. If possible, I would bolt the motor, so it is not permanent. If you do bolt it, the square nuts go into the indents, and then you put the bolts in from the other side.
Add Axles to Wheel

Put each axle in one of the holes on the wheel. Either axles can go into either hole. I would recommend attaching the axles with a little super glue because after the motor turns for a while, the plastic can start to ware off, loosening the fit.
Attach Wheel to Motor

This step is pretty straight forward. Just attach the wheel to the motor by sliding the axle over the motor shaft.
Connect Sides

Use the pegs to connect all four 3D printed sections. I would recommend first connecting the sections 1 and 2, with the wheel and LED closed in between. If you are adding LEDS, solder a resistor to one leg of both. Then strip and solder a Dupont wire to both legs of both LEDs. I would then test to make sure the ball pump mechanism is working. If it is working, you can connect sections 3 and 4 with the other LED closed in between, and then connect 1 and 2 with 3 and 4.
Wire Up

The diagram is helpful if you are adding LEDs. There was no stepper motor or board to add, so you will have to imagine it. Connect the stepper motor to the stepper motor board. Connect IN1 of the stepper motor board to pin 8 of the Arduino. Continue this with IN2 to pin 9, IN3 to pin 10, and IN4 to pin 11. Connect GND and VCC of the stepper motor board to GND and 5V of the Arduino. Plug your desired power supply into GND and VIN of the Arduino. If you use LEDs you will have to use a bread board or split the GND and 5V pins of the Arduino because you will need 3 of each for both LEDs and the stepper motor, and there is only one 5V and two GNDs.
Upload Code

Upload the code to your Arduino. If the balls enter to quickly, lower the RPM in the code and reupload. If the balls exit to slowly, raise the RPM in the code and reupload. You want the ball to exit at the same exact time as the next ball enters. I currently have the RPM set at 15 which is what worked the best for me. This number might change slightly for you based on factors like the weight of your ball and torque of your motor.
Code:
#include <Stepper.h>
const int stepsPerRevolution = 2048;
Stepper stepperName = Stepper(stepsPerRevolution, 8, 10, 9, 11);
void setup() {
// Fine tune RPM of stepper motor
stepperName.setSpeed(13);
}
void loop() {
stepperName.step(stepsPerRevolution);
}
All Done!

Thank you for reading along. I hope you enjoy your portal illusion. After testing out the illusion for a bit, I found that adding more marbles helps the motor from jamming. Consider helping me out by subscribing to my YouTube channel. If you have any questions, feel free to comment.