NEED HELP - Stepper Motor for a 12in Diameter Turntable (HIGHSCHOOLER)

Hello. I have no clue what I'm doing for any of my code, and I've never coded anything before. This is for a class and my final project is to make a drink machine. For the base I would like to use a turntable that spins the cup around from the front to the back to fill up and then back to the front.

Similar to this: https://www.instructables.com/Arduino-Turntable/

I found a Tinkercad thing that might work, I think? But the code needs to be changed and I don't know anything about that and I couldn't find anything online.

#include<Stepper.h>

int val = 0;
int motorValue = 0;

void setup()
{
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(13, OUTPUT);
  pinMode(A0, OUTPUT);
  Serial.begin(9600);
}

void loop()
{
  val = analogRead(A0);
  motorValue = map(val, 0 , 1023, 0, 255);
  digitalWrite(8, HIGH);
  digitalWrite(9, HIGH);
  digitalWrite(10, HIGH);
  digitalWrite(11, HIGH);
  analogWrite(13, HIGH);
  /*digitalWrite(13, HIGH);
  delay(1000); // Wait for 1000 millisecond(s)
  digitalWrite(13, LOW);
  delay(1000); // Wait for 1000 millisecond(s)*/
}

I would appreciate any help, I have no idea where to even begin.

The VERY FIRST step is to make the turntable and somehow connect it to the motor! The turntable MUST support the cup full of water and be able to either turn 360 degrees in a complete circle or 180 degrees to return to the front.
And when that works, you need to design a way for the program to know where the front is and where the drink dispenser is. And finally a nice feature would be knowing there was a cup on the turntable positioned so it can be filled by the dispenser.

Only then can you consider writing code for the end product.

1 Like

@sam_anderson52

Look inside a microwave oven, under the glass platter/table... the clever part is the ring of three wheels that support AND roll with the turning platter/table.

2 Likes

And it has a formed track in the metal case under the glass! I doubt the OP is going to the trouble to actually construct such a device. I would consider using a small "lazy Susan" type mount for the turntable. Readily available at hardware stores.

1 Like

Got an Ikea?

1 Like

I think driving such a table with a rubber tire on a stepper motor shaft would work very well!

3 Likes

Thank you, I was looking at finding something similar to this!

1 Like

Sounds great, thank you!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.