# Motorized Turntable

## Overview

https://www.youtube.com/watch?v=qP0Wdj3dGf8&

When you think of the word turntable, you might think of something that you play a record on, but for this project, at least, we're going to build a different type of turntable. A turntable, in the video and photography world, is a flat platform on a stand that spins around, allowing you to get a 360 degree view of an object. This is great for adding movement to video, focusing on details that you otherwise might miss, and to raise an object up for better lighting. Turntables, much like other pieces of production equipment, can carry a premium price tag with minimum features.

For this project, we'll go over how to build your own turntable with the ability to have adjustable rotation speed, rotate both clockwise and counterclockwise, and 3D print interchangeable platforms.

![](https://cdn-learn.adafruit.com/assets/assets/000/053/590/medium800/3d_printing_edited_P1060660.jpg?1525783423)

 **For supplies you'll need:**

### Part: Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single
quantity: 1
Perma proto board for soldering
[Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single](https://www.adafruit.com/product/1608)

### Part: Adafruit ItsyBitsy M0 Express - for CircuitPython and Arduino IDE
quantity: 1
Itsy Bitsy M0 Express Board
[Adafruit ItsyBitsy M0 Express - for CircuitPython and Arduino IDE](https://www.adafruit.com/product/3727)

### Part: Continuous Rotation Micro Servo - FS90R
quantity: 1
Servo motor
[Continuous Rotation Micro Servo - FS90R](https://www.adafruit.com/product/2442)

### Part: Mini Panel Mount SPDT Toggle Switch
quantity: 1
Switch
[Mini Panel Mount SPDT Toggle Switch](https://www.adafruit.com/product/3221)

### Part: Panel Mount Extension USB Cable - Micro B Male to Micro B Female
quantity: 1
USB Micro B extension
[Panel Mount Extension USB Cable - Micro B Male to Micro B Female](https://www.adafruit.com/product/3258)

### Part: Panel Mount 10K Log Potentiometer w/ On-Off Switch - 10K Log w/ Switch
quantity: 1
Potentiometer with on/off switch
[Panel Mount 10K Log Potentiometer w/ On-Off Switch - 10K Log w/ Switch](https://www.adafruit.com/product/3481)

### Part: Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy
quantity: 1
LiPo backpack
[Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy](https://www.adafruit.com/product/2124)

# Motorized Turntable

## Electronics

The circuit for this project is fairly simple, using only five main components including the Itsy Bitsy board. The Itsy Bitsy M0 is running CircuitPython code to control everything and to supply power and ground via USB or battery power. A LiPo backpack is soldered on top of the Itsy Bitsy to easily add-in a LiPo battery for power that can be charged via the Itsy Bitsy's USB port and to allow for a power switch.

A potentiometer with a built-in switch controls the rotation speed and can turn everything on or off. A SPDT switch controls whether the turntable spins clockwise or counterclockwise and of course, the star of the show, a servo motor, of the continuously rotating variety, receives its orders from the components while sporting a circular horn that will fit into its 3D printed part.

![](https://cdn-learn.adafruit.com/assets/assets/000/053/591/medium800/3d_printing_turntable_bb_v2.jpg?1525783919)

# Motorized Turntable

## CircuitPython Code

Running on an Itsy Bitsy M0 means that we can code this project with CircuitPython!

Are you new to using CircuitPython? No worries, [there is a full getting started guide here](https://learn.adafruit.com/welcome-to-circuitpython "Welcome to CircuitPython").

Adafruit suggests using the Mu editor to edit your code and have an interactive REPL in CircuitPython.&nbsp;[You can learn about Mu and installation in this tutorial](https://learn.adafruit.com/welcome-to-circuitpython/installing-mu-editor "Mu tutorial").

We're using the&nbsp;`adafruit_motor`&nbsp;library for CircuitPython to easily control the servo by declaring the pin as a continuous servo motor.

You can learn about installing the&nbsp;`adafruit_motor`&nbsp;library in the&nbsp;[CircuitPython Essentials Guide on CircuitPlayground Libraries](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries). It is easiest to install the whole library package.

The code is listed below and is available on Adafruit's GitHub repository.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Motorized_Turntable/code.py

The potentiometer is going to read a minimum value of `0` and a maximum value of `1` because the servo's speed will range between `0` for no movement and `1` for maximum speed.

Additionally, for the continuous rotation servo, a maximum value of `1` means the maximum speed for clockwise motion and `-1` means the maximum speed for counterclockwise motion. This comes into play in the loop, where the switch begins to play a role. For the loop, whether or not the switch is `HIGH` will determine whether the servo is rotating clockwise or counterclockwise by multiplying the speed registered by the potentiometer by either `1` or `-1`.

# Motorized Turntable

## 3D Printing

![](https://cdn-learn.adafruit.com/assets/assets/000/053/592/medium800/3d_printing_edited_P1060633.jpg?1525783974)

There are two 3D printed parts for the turntable: the electronics enclosure/base and the turntable platform. The enclosure has a snap fit back to easily access the electronics. I followed along with the Ruiz Brothers' tutorial for snap fit enclosures that you can find on YouTube here:

https://www.youtube.com/watch?v=VVmOtM60VWw

The enclosure also has cutouts for the USB micro B extension to poke out the side and a spot for the servo to stick out of the top. Holes are in the front for the potentiometer and switch. The hole for the switch also has arrows above it to denote that it's switching directions.

The entire design is parametric, so you can adjust it to (literally) fit your needs, whether you need a larger slot for a motor or want the enclosure to be bigger or smaller. You can download both the Fusion360 file below or the .STL file from Thingiverse.

[Thingiverse](https://www.thingiverse.com/thing:2899821)
[Fusion360](https://a360.co/2K2zSjj)
For printing, I printed it at .2 layer height and 20% infill. You do need some supports because of the USB and servo cutouts, but if you're feeling brave you can certainly try it with no supports.

![](https://cdn-learn.adafruit.com/assets/assets/000/053/593/medium800/3d_printing_edited_P1060662.jpg?1525784002)

The turntable platform is also designed to be parametric and is available in the same Fusion360 file. The base fits perfectly around the circular disc that comes as an option with the servo motor. The point of this design is that you can print multiple platforms in different filaments, or even different shapes and sizes, to fit different needs you may have for various b-roll and photography situations.

# Motorized Turntable

## Assembly

Now the fun part, putting everything together. First up is soldering the electronics. I used a quarter-sized perma proto board to have all the electronics live on like a tiny breadboard island. The quarter-sized variation is the perfect size for an Itsy Bitsy with about one row to spare.

![](https://cdn-learn.adafruit.com/assets/assets/000/053/594/medium800/3d_printing_IMG_5428.jpg?1525784140)

In order to have the option to remove the Itsy Bitsy easily later, start with two rows of female headers spaced so that the Itsy Bitsy will be able to slot in. Next you'll solder the male headers to the Itsy Bitsy board along with the three longer headers that the lipo backpack will be soldered to.

![](https://cdn-learn.adafruit.com/assets/assets/000/053/595/medium800/3d_printing_IMG_5430.jpg?1525784172)

Before soldering the lipo backpack to the Itsy Bitsy, solder two pieces of wire to the solder points on the board for a power button. These will be attached to the switch terminals on the potentiometer. After that, cut the trace that is between the two holes. This allows an on/off switch to work. Use a hobby knife or other similar tool to cut this. Once that step is complete, you can solder the lipo backpack to the Itsy Bitsy.

![](https://cdn-learn.adafruit.com/assets/assets/000/053/596/medium800/3d_printing_IMG_5432.jpg?1525784206)

Danger: 

![](https://cdn-learn.adafruit.com/assets/assets/000/053/597/medium800/3d_printing_edited_P1060635.jpg?1525784265)

Up next is the wiring for the components according to the circuit diagram from the Electronics portion of the guide. Wires for ground, power and data for the servo are left exposed on one end so that they can plug into the servo's included header.

![](https://cdn-learn.adafruit.com/assets/assets/000/053/598/medium800/3d_printing_edited_P1060647.jpg?1525784292)

After soldering, you can put the electronics into the enclosure. Start by running the USB micro B extension into the side hole and securing it with its screws. Next, take the other end of the extension and plug it into the Itsy Bitsy board by running it under the board between the headers to save room inside the enclosure.

Then take the switch and potentiometer and insert them into their respective holes at the front of the enclosure. Once they're thru, secure them with their included washers and nuts. After that, you can slide the electronics fully into the enclosure, leaving the three wires for the servo off to the side. Insert the servo into the top slot and then plug the three wires into the servo's header. Close-up the enclosure by snapping on the lid.

For finishing touches add a knob to the potentiometer and pop the circular horn onto the servo. Top the servo off with the turntable platform and your turntable is ready to spin off into the sunset.

![](https://cdn-learn.adafruit.com/assets/assets/000/053/607/medium800/3d_printing_edited_P1060663.jpg?1525784553)


## Featured Products

### Adafruit ItsyBitsy M0 Express - for CircuitPython & Arduino IDE

[Adafruit ItsyBitsy M0 Express - for CircuitPython & Arduino IDE](https://www.adafruit.com/product/3727)
What's smaller than a Feather but larger than a Trinket? It's an **Adafruit ItsyBitsy M0 Express**! Small, powerful, with a rockin' ATSAMD21 Cortex M0 processor running at 48 MHz - this microcontroller board is perfect when you want something very compact, but still...

In Stock
[Buy Now](https://www.adafruit.com/product/3727)
[Related Guides to the Product](https://learn.adafruit.com/products/3727/guides)
### Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy

[Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy](https://www.adafruit.com/product/2124)
If you have an ItsyBitsy or Pro Trinket you probably know it's the perfect little size for a portable project. This LiPoly backpack makes it really easy to do! Instead of wiring 2 or 3 boards together to make a charging system, this little PCB sits on top of the PCB and allows a...

In Stock
[Buy Now](https://www.adafruit.com/product/2124)
[Related Guides to the Product](https://learn.adafruit.com/products/2124/guides)
### Panel Mount 10K Log Potentiometer w/ On-Off Switch

[Panel Mount 10K Log Potentiometer w/ On-Off Switch](https://www.adafruit.com/product/3481)
This potentiometer is a two-in-one: it's a **log taper 10K ohm potentiometer** , with a grippy shaft _an__d_ it comes with an **on-off switch**. It's smooth and easy to turn, but not so loose that it will shift on its own. We like this one because...

In Stock
[Buy Now](https://www.adafruit.com/product/3481)
[Related Guides to the Product](https://learn.adafruit.com/products/3481/guides)
### Mini Panel Mount SPDT Toggle Switch

[Mini Panel Mount SPDT Toggle Switch](https://www.adafruit.com/product/3221)
This or that, one or the other, perhaps or perhaps not! So hard to make decisions these days without feeling like you're just going back and forth constantly. Deciding whether or not to use this mini toggle switch? That's the easiest decision you'll make all day!

This...

In Stock
[Buy Now](https://www.adafruit.com/product/3221)
[Related Guides to the Product](https://learn.adafruit.com/products/3221/guides)
### Adafruit Perma-Proto Quarter-sized Breadboard PCB - 3 Pack!

[Adafruit Perma-Proto Quarter-sized Breadboard PCB - 3 Pack!](https://www.adafruit.com/product/589)
Customers have asked us to carry basic perf-board, but we never liked the look of most basic perf: it's always crummy quality, with pads that flake off and no labeling. Then we thought about how people **actually** prototype - usually starting with a solderless breadboard and then...

In Stock
[Buy Now](https://www.adafruit.com/product/589)
[Related Guides to the Product](https://learn.adafruit.com/products/589/guides)
### Continuous Rotation Micro Servo

[Continuous Rotation Micro Servo](https://www.adafruit.com/product/2442)
Need to make a _tiny_ robot? This little micro servo rotates 360 degrees fully forward or backward, instead of moving to a single position. You can use any servo code, hardware, or library to control these servos. Good for making simple moving robots. Comes with five horns and...

In Stock
[Buy Now](https://www.adafruit.com/product/2442)
[Related Guides to the Product](https://learn.adafruit.com/products/2442/guides)

## Related Guides

- [Introducing ItsyBitsy M0 Express](https://learn.adafruit.com/introducing-itsy-bitsy-m0.md)
- [NeoPixel LED Necklace Insert with USB Charging](https://learn.adafruit.com/neopixel-led-necklace-insert-with-usb-charging.md)
- [Building CircuitPython](https://learn.adafruit.com/building-circuitpython.md)
- [Circuit Playground - P is for PCB](https://learn.adafruit.com/circuit-playground-p-is-for-pcb.md)
- [Breadboards for Beginners](https://learn.adafruit.com/breadboards-for-beginners.md)
- [Trinket Sound-Reactive LED Color Organ](https://learn.adafruit.com/trinket-sound-reactive-led-color-organ.md)
- [Color Balancing Video Camera Light feat. DotStars](https://learn.adafruit.com/color-balancing-light-box-with-dotstar-cool-warm-white-leds.md)
- [Cup o' Sound](https://learn.adafruit.com/cup-o-sound.md)
- [Talking d20 20-Sided Gaming Die](https://learn.adafruit.com/talking-d20-20-sided-gaming-die.md)
- [LED Trampoline](https://learn.adafruit.com/led-trampoline.md)
- [Sensor Plotting with Mu and CircuitPython](https://learn.adafruit.com/sensor-plotting-with-mu-and-circuitpython.md)
- [Happy Chewbacca Mask](https://learn.adafruit.com/happy-chewbacca-mask.md)
- [Introducing Pro Trinket](https://learn.adafruit.com/introducing-pro-trinket.md)
- [Pocket Galaxy](https://learn.adafruit.com/pocket-galaxy.md)
- [DRAFT PUNK](https://learn.adafruit.com/draft-punk.md)
