Skip to content

Final Project: Motorized Lazy Susan

Project Description

For my final project, I have decided to create a motorized lazy susan with its speed controlled by a potentiometer. In the beginning of Fab, I initially wanted to create a mini fridge with a lazy susan inside of it, but I have decided to focus on the lazy susan instead of creating a mini fridge.

Justification: Why?

Originally, I wanted to make a lazy susan for family dining purposes, as large lazy susans are used quite often in Chinese restaurants and Chinese family dinners. This is because, in Chinese culture, food is usually shared among everyone at the dinner table instead of everyone eating a separate meal. To that end, lazy susans make it easy for everyone at the dinner table to easily access the food available, which is very useful for large meals/family gatherings. However, as the project progressed, I also made some adjustments and found new uses for my project. The first new use that I realized could be worth looking into was for efficiently storing kitchen materials such as utensils and condiments. The reason this is better in many cases than storing them in cabinets is because, with cabinets, items in the back can be hard to reach. However, a lazy susan allows the user to simply spin the turntable to access the items that they need. Secondly, I realized that my project could also be useful to students that want to keep their workplaces organized. I myself realized this because I have a desk at home where I keep all of my pencils, pens, erasers, markers, and more, all clumped up in a single corner. If I had a lazy susan, however, then I could simply put each of those objects in a separate smaller container on the lazy susan; then, if I wanted to grab any one of those objects, I could simply spin the lazy susan to access them. Finally, the last reason I decided to create my project is for decoration purposes, and this is the part where a motorized lazy susan is required. My project can act as a storage space for things such as flowers/plants, small sculptures or action figures, and more, while enhancing the aesthetic of the user’s home.

Overall, I would say people who are looking to either: A, make family/large dinners more comfy, B, create more efficient storage spaces for their kitchen/workspace, or C, decorate their homes with more of a modern aesthetic, would be interested in using my project.

What are the Implications?

Below, I have added a set of Q/A’s that explain the implications behind my final project. These questions highlight things such as the cost of my project, what parts of Fab were most essential when learning how to create my project, and what parts of my project I still have to fine tune. After explaining the implications below, I will explain more in detail the applications of my project, or the criteria under which it will be evaluated.

What will it do?

My final project will be a lazy susan display case that can be controlled by a potentiometer. Currently, I am deciding between two versions of the lazy susan: the first idea is to make the potentiometer determine the speed that it can turn at, and the second idea is to have the lazy susan actually follow the rotations of the potentiometer directly.

Update: I have decided to continue my project with the first idea: making the potentiometer control the speed that the turntable spins at.

Who has done what beforehand?

I haven’t found anyone else who has made a lazy susan controlled by a potentiometer, but I have found other projects which have different functionalities but use similar components. For example, I am planning to use a DRV8825 or an A4988 stepper motor driver on a nema 17 motor, and many people have done this in the past. However, the difference when it comes to my project is that I will have to integrate the motor/potentiometer with the turntable as well.

One example of a similar project I found: Quentin Bolsee

What will you design?

  • Wooden turntable and wooden base (CNC)
  • PCB board for electronics (potentiometer, motor, maybe display screen/neopixels for decoration?)
  • 3D printed cases for potentiometer, PCB board, and other electronics
  • 3D printed parts to attach the motor to the turntable (and a 3D printed base to keep the motor still)
  • Code for the potentiometer + motor driver

What materials and components will be used?

I will use a few different materials for my project. First, the turntable will be CNCed with wood (likely 1/2 inch). Then, I will 3D print (using PLA) a few attachment pieces for my project as well as the case for the electronics. Next, I will mill a PCB board for an A4988 motor driver and connect it to a nema 17 stepper motor for my project. I will also control the speed that it turns at by using a potentiometer. Finally, I plan to buy a metal ball bearing ring off of Amazon for about $5.99. This part will be screwed onto the turntable and will make it turn more smoothly.

Where will they come from?

  • Wood for CNC turntable: Also from the lab
  • Generic materials to attach stuff (screws, etc.): Uhhhh try to guess (from the lab)
  • Electronics (nema 17 stepper motor, potentiometer, possibly neopixel strips, etc.): ok so… the lab has a lot of stuff
  • Stepper motor driver (DRV8825 or A4988): Bought online likely from Digikey (not from the lab!!! I think at least…) Update: I got A4988s from the lab.
  • Custom PCB board: Made in the lab (ok so most of the stuff is from the lab)
  • 3D printed electronics case: Printed using Prusa or Bambu printers (we have a Bambu printer in the lab)
  • Metal ball bearing ring: Bought off Amazon (this will help the turntable turn more smoothly)

How much will they cost?

Most components will be from the lab, so they will not cost anything for me. However, I have still created a full BOM of all of the parts I will be using in my final project, and this BOM is shown a bit further down in my documentation. Overall, for me, since I already have many of the parts that I need in the lab, the cost will only be around $10-$20. However, the cost of all the combined components (including the ones I already have) will be much higher, and this higher cost will more accurately reflect the cost if someone else were to try and recreate my project.

What processes will be used?

  • Wood for turntable: Designed in Fusion, CNC with Vectric Aspire
  • Case for electronics: Designed using CAD in Fusion, 3D printed with a Prusa or Bambu 3D printer
  • Electronics: Create PCB board in Kicad and mill/solder using milling machine in the lab with Bantam
  • Programming in Arduino IDE will be used to code the speed of the motor to correspond with the analog reading of a potentiometer

What questions need to be answered?

  • How will I attach the motor to the turntable? Is ther ea better way than screwing into onto an attachment piece for the motor?
  • How will I make the stepper motor read inputs from a potentiometer?
  • What stepper motor driver will be best for my project (A4988 potentially)?

How was it evaluated?

My project will be evaluated based on a few different factors. Firstly, it should be able to able to spin smoothly without potentiometer input guiding it. This would be for the use case where the user is away from the turntable and is leaving it on. Secondly, the project should be able to respond to potentiometer inputs by changing its speed accordingly. If the potentiometer is spun clockwise, the turntable should turn faster; if the potentiometer is spun counterclockwise, the turntable should turn slower. Additionally, the turntable should be able to spin at a maximum of 30 rpm, as that is the limit that I set in its code. Finally, the turntable should be able to support a weight of at least 15-20 lbs, as my turntable is on the smaller side for most lazy susans. However, it should still be able to accomplish the tasks I laid out in my justification such as being able to store kitchen utensils, school materials, and small sculptures/figures.

Final Slide

Final Video

Gantt Chart

Note from the future: I managed to keep to the main parts of this gantt chart pretty well, finishing things like programming input/output devices, creating the electronics case, and wiring in a reasonable amount of time. However, as the project progressed, I ended up having to delay parts of the project such as creating acrylic panels and lining the turntable with LEDs due to time constraints. Overall, though, I still feel decent about the time management aspect of my project. I think the main factors that caused me to deviate from my original schedule were issues when programming, as I experienced quite a bit of trial and error when figuring out how to make the motor driver/potentiometer work together, resulting in me not having enough time to work on certain features of the project.

Flowchart

Current flowchart for final project, order of certain steps (such as adding neopixels) may change in the future.

Bill of Materials

Please keep in mind that I found many of these components in my school’s lab, so my final cost was much lower than the estimated cost provided in the image above.

System Diagram

The system diagram for my final project is shown below. The CAD model used in this diagram is slightly different than the one I made during CAD week.

CAD: Final Project Draft

Note: This is the concept CAD that I made for my final project at the beginning of Fab. My eventual final project ended up being very different from this CAD.

Below, I have attached a picture of a final project draft CAD that I made at the beginning of Fab Academy. This illlustrates the original plan I had for the project as well as some of the initial features that I wanted to have (ex: acrylic side plates) but didn’t end up including in the final product. You can find the documentation for this CAD (which was created during CAD week) here.

Final CAD

For my actual final project CAD, I didn’t create one Fusion file, as my project will be made up of several different components, including three 3D printed components and 1 CNC wooden turntable. Below, I have added pictures of all of my main final project components, starting from the top. Ideally, I would like to import all of these components into one file and combine them there, but unfortunately, Fusion does not have the same assembly features as some other CAD softwares, like Onshape.

Turntable

Motor attachment (connects to turntable using screws)

This picture shows the bottom of the connector piece

Bottom base

Electronics case

Planning Electronics

After creating the concept CAD design, I started to think about what components to use for my project (specificaly when it came to electronics). The parts I needed to decide on the most were the motor and motor driver. I initially wanted to use a nema 17 stepper motor and a L293D stepper motor driver, but I eventually changed to using an A4988 driver instead. The reason for this decision was simply because the A4988 is easier to use. I also decided to use a Xiao RP2040 to send signals to the A4988 and the potentiometer, which would then turn the motor at variable speeds.

After deciding on these components and taking a few days to get everything ordered/ready, I began to test ways of controlling the motor. In the final project, I want to control the turntable using inputs from a potentiometer, so I tried wiring my stepper motor driver and potentiometer to a breadboard for testing. The code I used as well as a video of the motor turning are shown below.

// Ryan Zhou
// Fab Academy 2024
// Charlotte Latin Fab Lab
// Licensed with the Fab License

// (c) 06/01/2024

// This work may be reproduced, modified, distributed, performed, and displayed for any purpose, but must acknowledge "motorized lazy susan". Copyright is retained and must be preserved. The work is provided as is; no warranty is provided, and users accept all liability.

#include <Arduino.h>
#include "A4988.h"

#define MOTOR_STEPS 100

#define DIR 8
#define STEP 9
#define ENBL 7
#define MS1 10
 #define MS2 11
 #define MS3 12
 A4988 stepper(MOTOR_STEPS, DIR, STEP, MS1, MS2, MS3);
int previous = 0;
int v=0;
void setup() {
  stepper.setRPM(150);
  stepper.setMicrostep(4);
}

void loop() {
  int val = analogRead(A2);
   v=map(val,0,1023,0,400);

  stepper.move((v - previous)*2);

  previous = v;
}

IMPORTANT: As you might be able to see in this video, the motor isn’t turning very smoothly and is instead turning in small bursts. This isn’t because of the code used, but it was actually because of the way that the stepper motor driver was configured. On the A4988 driver, there is a small screw in the back which can be turned to change the amount of current allowed to flow through to the motor. At the time, I didn’t know this, and so, in the video, there is not enough current being sent to the motor to enable it to turn very smoothly. To make the motor turn more smoothly, I should have turned the screw on the driver clockwise. Another thing to note is that you can use a multimeter to measure the amount of current flowing through to the motor to more accurately configure the driver.

After successfully getting the motor to work with a potentiometer by using a breadboard, I wanted to begin designing a PCB board for the motor driver and potentiometer. However, before doing that, I first decided to CAD and 3D print a few pieces I need for my project while also CNCing my wooden turntable.

CADing/Printing Support Pieces

Motor Attachment

I now began to design the connector piece for the motor as well as the base for my project. I will be 3D printing both of these parts for the final product. To do this, I first had to measure the dimensions of the metal ball bearing ring, as I will be screwing these two parts together. The ball bearing ring is shown below.

As the picture shows, there are two layers to this ball bearing ring. The motor attachment will be screwed onto the layer with smaller (M4) screw holes, while the base will be screwed onto the layer with 1/4 inch screw holes.

After measuring the distance between each of the holes, I found that they were spaced approximately 4.74 inches apart from each adjacent hole, so, in Fusion, I created 4 circles which matched the holes on the ball bearing ring. Then, I created a square around them and extruded it, creating a 1/2 inch think piece with holes in the correct places.

Now, the next step was to measure the diameter of the d-shaft on the actual motor. I searched for the motor shaft’s dimensions on Google, and both of these methods helped me reach the conclusion that the motor shaft had a diameter of ~1.97 inches. However, the flat portion of the shaft (which is what makes the shaft look liek a “d-shaft”) was only about 1.88 inches from the farthest end of the shaft. The picture below shows what my sketch in Fusion looked like after taking these measurements.

I then extruded this piece upwards by 0.6 inches. Finally, to finish the piece, I created a large fillet on the piece which the motor shaft attaches to in order to make sure that it wouldn’t break. The final piece is shown in the picture below.

3D Printed Base

I then began to design the base of my project. Similar to the motor attachment, I began by measuring the distance between each of the screw holes on the metal ball bearing that I would be screwing it into. These holes were spaced differently than the holes for the motor attachment, with the distance between the centers of adjacent screw holes being ~5.34 inches. For this piece, I also added 2 small wall pieces that the motor will stay between so that it doesn’t move. Then, I added a hole on the side of the base for wiring electronics, as the storage case for my electronics will be located outside of the base and I need a way to connect them to the motor. After doing this, the final design for this part is shown below.

Top View

Bottom View

After finishing these designs, I began to 3D print them out. The motor attachment was printed on a Prusa Mini, while the bottom base was printed on a Bambu X1-Carbon

CNCing the Turntable

After designing the 3D printed pieces which connect onto the ball bearing as well as the motor, I began designing the file to CNC my turntable in Fusion. The reason I only began to design this file after the others was because I needed to know the placements for each of the 4 screws I would be using to secure the turntable to the motor case and ball bearing ring. The design is shown below.

After finishing this design, I exported the sketch as a .dxf file and brought it into Vectric Aspire so that I could upload it to the Shopbot as a shopbot file. For a more detailed description of this process, you can check out Angelina Yang’s CNC documentation, which I referenced while doing this.

Eventually, I got to the point where I could begin cutting, and the video below shows my turntable being CNCed.

Below is an image showing what my turntable looked like after being sanded. I eventually put a layer of primer over it, so this is not how the turntable will look on my final project.

Designing PCB Board

While working on this project, I went through several PCB designs, but only one of them ended up working out. That is the board that I will be documenting here, and it is for the A4988 motor driver while also having holes for a potentiometer.

The main pins that I will be using on the A4988 motor driver are step, direction, VDD, GND, VMOT (12V PWR), and the 4 motor pins. Although I was able to successfully turn the motor using the microstep pins (shown previously), I decided not to use the 3 microstep pins in my final project as I could achieve the same thing using just the step pin to turn the motor. This is because you can turn the motor by pulsing high/low signals to the step pin with delays between each pulse, and the speed of the motor is determined by the delay between each pulse.

Designing and routing this PCB board took around an hour even though I thought it would take a shorter amount of time. This design includes several vertical male headers (for the A4988 to connect to the nema 17 and the Xiao) with 3 holes for a potentiometer. I have attached the schematic and PCB layout of this board below.

I was originally worried about having through holes in this board as I thought it could make system integration harder, but I realized that I could just solder on vertical female headers to the through hole parts for the A4988 and insert the motor driver in them.

After creating the designs, I began the milling/soldering process, using trace widths of 0.5 mm (I actually had to remill this board several times because I kept ripping the traces, so I probably should have increased the trace widths ;-;). The video below shows this process.

Then, I soldered on all of the components, which took about 45 minutes (the female headers were very hard to solder on), and began to test it with the Xiao and nema 17 motor.

Image of the A4988 PCB Board

Below, I have attached a picture of the final PCB board used for the A4988 motor driver. I apologize for the low quality, as it is cropped from another photo, but I did not have a more detailed photo of the board and cannot currently obtain one at the time of writing this.

Testing with PCB and Xiao

Now that I had the PCB board for my A4988, I began to test it using code from the Xiao RP2040. Although this worked earlier on the breadboard, I wasn’t sure if it was going to work on the PCB board. This is because, prior to testing it with my current PCB board, I tried it with several other boards to no avail. After thinking about why these boards didn’t work and getting help from fellow Fab student Collin Kanofsky, I came to the conclusion that the most likely problem with those boards was that the A4988 wasn’t properly connected to the 12V power supply due to bad soldering.

Anyways, since I’m only using 3 pins on the Xiao to send signals to the A4988 (step, direction, and the potentiometer’s analog pin) instead of using the microstep pins (MS1, MS2, MS3), I will have to use different code to test my new motor setup. Since I felt like it would be difficult to add potentiometer inputs into this setup at first, I decided to begin by running the motor at a constant speed by sending high/low signals from the Xiao to the step pin of the A4988. The code I used is shown below.

// Ryan Zhou
// Fab Academy 2024
// Charlotte Latin Fab Lab
// Licensed with the Fab License

// (c) 06/01/2024

// This work may be reproduced, modified, distributed, performed, and displayed for any purpose, but must acknowledge "motorized lazy susan". Copyright is retained and must be preserved. The work is provided as is; no warranty is provided, and users accept all liability.

const int stepPin = 1; // Step pin connected to pin 1
const int dirPin = 2;  // Direction pin connected to pin 2

void setup() {
  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
}

void loop() {
  digitalWrite(stepPin, HIGH);
  delayMicroseconds(3000);
  digitalWrite(stepPin, LOW);
  delayMicroseconds(3000);
}

Since this code was uploaded to the Xiao RP2040, I have attached an image of the Xiao’s pinout below for reference.

Since the grey pins (P1, P2, etc.) are used as reference in Arduino IDE, I have set the step pin to pin 1, and the direction pin has been set to pin 2 to correspond with the Xiao pins that the A4988’s pins are connected to.

After writing this code, I uploaded it to my Xiao, connected everything using jumper wires, made 100% sure that my 12V power supply was properly connected to the VMOT pin of the A4988 (I wasted like 1-2 days trying to fix previous boards because of that issue…), and turned on the power. The motor turned successfully! The video below shows what this looked like.

YAY! Now that I could send signals from the Xiao to the motor, I began to assemble my final project before trying to integrate the potentiometer.

Assembly

The assembly process was rather simple, as all I had to do was screw a few different parst together. In particular, I had to fix the 3D printed motor attachment and base to the metal ball bearing ring. For the motor attachment, I used M4 screws, but I used 1/4 inch screws for the base. I was having trouble getting the screws through the holes on the 3D printed base at first, so I used a drill to force the screws into it. In the end, I secured all of the screws in place using locknuts below. The following picture shows what my assembled final project looked like.

And this is what it looks from the side.

In that last picture, you can see all of the layers of the project. At the bottom is the base, followed by the metal ball bearing ring, the motor attachment, and finally the wooden turntable sits at the top.

Now that my project was assembled, I decided to test the previous code (that doesn’t use the potentiometer) with the newly assembeled turntable. This worked well, and the video showing this has been added below.

Testing with Potentiometer

Now, I began to try adding a potentiometer input so that the speed of the motor could be controlled. To do this, I first had to write code that would allow me to read the analog signals from the potentiometer.

Writing this code took a while, but, with some help from ChatGPT, I was able to write code that allowed the motor’s speed to correspond with the reading from the potentiometer. The code I wrote is shown below.

// Ryan Zhou
// Fab Academy 2024
// Charlotte Latin Fab Lab
// Licensed with the Fab License

// (c) 06/01/2024

// This work may be reproduced, modified, distributed, performed, and displayed for any purpose, but must acknowledge "motorized lazy susan". Copyright is retained and must be preserved. The work is provided as is; no warranty is provided, and users accept all liability.

const int stepPin = 1;
const int dirPin = 2;
const int potPin = 26;

const int stepsPerRevolution = 200;  // Number of steps per revolution for NEMA 17 motor

void setup() {
  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
  pinMode(potPin, INPUT);
  digitalWrite(dirPin, HIGH);  // Sets direction
}

void loop() {
  int potValue = analogRead(potPin);

  // Map the potentiometer value to a speed range (RPM)
  float minRPM = 10.0;
  float maxRPM = 30.0;
  float rpm = map(potValue, 0, 1023, minRPM * 100, maxRPM * 100) / 100.0;

  // Calculate the delay between steps in microseconds
  float stepsPerMinute = rpm * stepsPerRevolution;
  float stepsPerSecond = stepsPerMinute / 60.0;
  float delayBetweenSteps = 1000000.0 / stepsPerSecond;

  // Calculates movement
  digitalWrite(stepPin, HIGH);
  delayMicroseconds(delayBetweenSteps / 2);
  digitalWrite(stepPin, LOW);
  delayMicroseconds(delayBetweenSteps / 2);
}

As you might have noticed, the pin designed to read the potentiometer’s analog signals is pin 26. I will be connecting the analog output pin of the potentiometer to the PCB board I made for the A4988, and that will then connect directly to pin 26 on the Xiao.

After making all of these connections, I tested my final project with the potentiometer, as shown in the video below.

Electronics Case

Now that I had my electronics working, I needed a better way to integrate them into my system. To do this, I decided to create a 3D printed case for my electronics. I did this in Fusion, and it took around an hour to design. The picture below shows what it looked like after I finished creating it in Fusion.

I then uploaded the file to a Bambu Labs printer which I used to print out this design. This took about 5 hours; after it finished printing, I took off the supports, put my electronics inside, wired everything, and connected it to my turntable. The image below shows what my final project looks like beside my electronics case.

This is the end of development (for now) of my final project!! My presentation slide and video can be found at the top of this documentation.

System Integration with the Electronics Case

PCB board for the Xiao RP2040

The PCB board that I created for the Xiao was very simple, as all it has is holes for the Xiao and a row of 5 horizontal conn headers soldered to the board; 4 of these pins go to the A4988 (the step pin, direction pin, PWR, and GND), and the last pin goes to the analog input pin of the potentiometer. I apologize for not having a picture of the board by itself, but I have attached a reference photo below which shows one of my prototype boards that is almost identical to the final Xiao board I ended up using (as well as a pinout of the final board). In addition to these images, I have added the KiCad files for the Xiao board in a link at the bottom of my documentation, so feel free to check that out if you are interested.

And here is the pinout of the final Xiao board.

As you can see from the first photo, there are 2 sets of female headers facing up on the board; one for the Xiao, and one for the A4988. In my final Xiao board, I only have 1 set of female headers (for the Xiao), and the 4 copper pads in the bottom right of the board have been replaced with a 5-pin conn header instead of a 4-pin one. Again, I apologize for not having a picture of the final Xiao board, but I currently cannot get one at the time of writing this, as I am out of the country visiting family.

How were the boards fixed to the case?

When creating the electronics case, one of the things that I took into consideration was its size, as I had to make sure that the PCB boards for the A4988 and Xiao, as well as the potentiometer, all fit in with no issues. However, one issue that I did encounter when trying to put all of the electronics in the box was how I would get them to stay fixed to the case and not move, therefore reducing the chance of damage/jumper wires disconnecting. Due to the fact that, at this point in my project, I had only about 1 day left before presentations, I ended up securing the 2 PCB boards to 2 corners of the case using tape. After doing some stress testing (shaking the case and moving the project around), I found that this actually worked very well to keep these two boards from moving. More importantly, I found that the jumper wires wouldn’t become disconnected due to the smaller size of the case, which meant that the jumper wires had a pretty limited space to shake around in while the case moved. I think another one of the reasons behind this was the fact that I used jumper wire connectors that I got from my lab to keep them grouped together (very similar to the ones found here) The arrangement of my PCB boards is shown in a diagram below.

In the picture above, the A4988 board connects to the lazy susan through a hole in the back of the case (left-hand side in the picture). I will explain this more a bit further down in my documentation. If I had more time, I would have liked to be able to screw in the PCB boards directly to the electronics case, but due to time constraints, I ended up using my current method instead.

Finally, when it comes to the potentiometer, you can see from my CAD design for the electronics case (as well as the picture of my final project a little bit above this section in my documentation) that there is a small circular hole on the front that the potentiometer fits in. This hole makes sure that the potentiometer stays in the case securely, as the hole is not large enough for the bottom part of the potentiometer to fit through. This works well for system integration, as, after the same testing as I did for the PCB boards, the potentiometer stayed in place with all 3 of its connections intact.

How is the electronics case connected to the lazy susan?

There is only one cable that connects the electronics case to the lazy susan, and that is the 4-pin connector from the motor driver to the Nema 17 motor. Other than this connection, there are no others that are necessary, as the only piece of electronics located inside of the lazy susan is the motor. The way this connection is created is pretty simple, and that is because I added a small hole on one of the sides of the 3D printed base for the lazy susan. You can check this by either downloading the Fusion file for yourself. This is also shown in the pictures below, where the multi-colored 4-pin connector between the motor driver and motor is visible.

Files

All of my final project files can be found here.


Last update: July 14, 2024