Rock tumbler with timer

Rock tumbler with timer

thingiverse

I was thinking of printing JT3D's Affordable Rock Tumbler but wanted a little more control so I decided to build one based on an Arduino. The main thing is the stepper motor and using its rpm and steps/revolution to get an approximation for how long it will run. ### Assembly You should be able to put it together by just looking at the pictures. One thing I decided to do is put bearings in the right side wheels and let them move freely. The drive side is fixed and the bearings sit in the frame. There's a replacement STL included for the right side of the frame if you decide to go that way. ### Barrel Insert The insert for the barrel is 153mm wide. I bought some anti-slip mat that I hot glued to the inside and then just put some glue on the edges and forced it in. I use a bunch of nails and rivets as my polishing media. ### Arduino Wiring I used an Arduino Uno and a Perma-Proto board to mount the electronics on. My power adapter is 9V 2A so there's a voltage regulator between the power cord and motor to get it down to 4.83V. I couldn't find the correct representations for the components so you'll have to check each part for how to connect them. Code --------------------- ```c #include <Button.h> #include <Stepper.h> #include <U8glib.h> const int potPin = A0; Button startButton(3); const int steps = 200; const int rpm = 80; Stepper stepper(steps, 4, 5, 6, 7); U8GLIB_SSD1306_64X48 oled(U8G_I2C_OPT_NONE); enum status { stopped, started }; status tumblerStatus; long stepsLeft; void setup() { stepper.setSpeed(rpm); startButton.begin(); tumblerStatus = stopped; stepsLeft = 0; } void loop() { oled.firstPage(); if (tumblerStatus == stopped) { do { drawStartPage(); } while (oled.nextPage()); } if (startButton.read() == LOW && tumblerStatus != started) { tumblerStatus = started; stepsLeft = getTotalSteps(); } else if (startButton.read() == HIGH && tumblerStatus == started) { tumblerStatus = stopped; stepsLeft = 0; } if (tumblerStatus == started) { if (stepsLeft > 0) { stepper.step(-1); stepsLeft--; } else { oled.clearDisplay(); oled.setFont(u8g_font_helvB12); oled.drawStr(10, 30, "Time's Up!"); delay(2000); tumblerStatus = stopped; } } } unsigned long getTotalSteps() { unsigned long potValue = getHoursToRun(); unsigned long stepsToRun = potValue * 60 * steps * rpm; return stepsToRun; } long getHoursToRun() { unsigned long potValue = analogRead(potPin); unsigned long value = map(potValue, 0, 1023, 1, 24); return value; } void drawStartPage() { oled.setFont(u8g_font_04b_03); drawLine("Rock Tumbler", 8); drawLine("v1.0", 16); oled.setFont(u8g_font_helvB08); drawLine("Run for", 28); char time[5]; sprintf(time, "%dh", getHoursToRun()); oled.setFont(u8g_font_helvB12); drawLine(time, 44); } void drawLine(char text[], int line) { int x = (oled.getWidth() - oled.getStrWidth(text)) / 2; oled.drawStr(x, line, text); } ``` Hardware --------------------- I've put what I used in parentheses: - Arduino + wires (Arduino Uno rev. 3) - 64x48 OLED (OLED Shield for WeMos D1 mini) - Stepper Motor driver (Adafruit TB6612) - Perma-Proto board (Adafruit Perma-Proto Half-sized, 82mm x 55mm) - Voltage regulator (Luxorparts, 4.5-28 V to 0.8-20 V. Based on MP1584) - Power Adapter (9V, 2A) - Button - Potentiometer - Power switch - 8mm Threaded rods - 8mm Nuts, lock nuts, lock washers - Bearings, 22mm x 7mm M8 - O-rings for the wheels Video --------------------- https://youtu.be/vNP2_rVvvXg

Download Model from thingiverse

With this file you will be able to print Rock tumbler with timer with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Rock tumbler with timer.