{"id":1536,"date":"2024-06-26T17:36:34","date_gmt":"2024-06-26T21:36:34","guid":{"rendered":"https:\/\/sites.williams.edu\/makerspace\/?p=1536"},"modified":"2026-02-11T18:05:51","modified_gmt":"2026-02-11T23:05:51","slug":"spinning-tales-arduino-turntable-step-by-step-tutorial-part-2","status":"publish","type":"post","link":"https:\/\/sites.williams.edu\/makerspace\/projects\/spinning-tales-arduino-turntable-step-by-step-tutorial-part-2\/","title":{"rendered":"Spinning Tales : Arduino Turntable Step-by-Step Tutorial (Part 2)"},"content":{"rendered":"<p><span style=\"font-weight: 400\">Welcome back to my deep dive into the creation of a low-cost DIY Arduino turntable designed for photogrammetry enthusiasts. In this continuation, I will share a detailed, step-by-step breakdown of the build process, highlighting the technical challenges and solutions, while providing comprehensive resources to empower you to replicate this project.<\/span><\/p>\n<div id=\"attachment_1537\" style=\"width: 594px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1803-scaled-e1719437032170.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1537\" class=\"wp-image-1537 size-large\" src=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1803-scaled-e1719437032170-1024x690.jpg\" alt=\"\" width=\"584\" height=\"394\" srcset=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1803-scaled-e1719437032170-1024x690.jpg 1024w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1803-scaled-e1719437032170-300x202.jpg 300w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1803-scaled-e1719437032170-768x517.jpg 768w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1803-scaled-e1719437032170-1536x1035.jpg 1536w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1803-scaled-e1719437032170-2048x1380.jpg 2048w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1803-scaled-e1719437032170-445x300.jpg 445w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><p id=\"caption-attachment-1537\" class=\"wp-caption-text\">Completed Turntable with the control board<\/p><\/div>\n<h2>Components<\/h2>\n<p><span style=\"font-weight: 400\">The primary goal was to design a reliable and cost-effective turntable that can be easily assembled by hobbyists. The focus was on using readily available parts and open-source software to keep the project accessible. Below is a detailed component breakdown, including links, for each part needed, for the project:<\/span><b><\/b><\/p>\n<p>1. <a href=\"https:\/\/www.amazon.com\/Twotrees-Stepper-17HS4401-Connector-Printer\/dp\/B07TGJT5M2\/\" target=\"_blank\" rel=\"noopener\"><b>NEMA 17 Stepper Motor<\/b><\/a><br \/>\n<span style=\"font-weight: 400\"><strong>Quantity:<\/strong> 2-3<br \/>\n<\/span><b>Why?<\/b><span style=\"font-weight: 400\"> Chosen for its balance between cost and performance. NEMA 17 offers sufficient torque for precise rotations necessary in photogrammetry without being overly robust for lightweight platform applications. Compared to larger steppers like the NEMA 23, which offers more power but at a higher cost and size, the NEMA 17 is more suited for desktop projects where space and budget are limited.<\/span><b><\/b><\/p>\n<p>2. <a href=\"https:\/\/www.amazon.com\/HiLetgo-Stepstick-Stepper-Printer-Compatible\/dp\/B07BND65C8\" target=\"_blank\" rel=\"noopener\"><b>A4988 Stepper Motor Driver<\/b><\/a><br \/>\n<span style=\"font-weight: 400\"><strong>Quantity:<\/strong> 2-3<br \/>\n<\/span><b>Why?<\/b><span style=\"font-weight: 400\"> The A4988 is a reliable and widely used motor driver that offers easy interfacing with Arduino, making it ideal for beginners and intermediate users alike. It supports micro-stepping which is essential for smooth and accurate rotation. Other drivers like the DRV8825 could also be used but typically cost more and require additional adjustments, making the A4988 a more straightforward choice for this project.<\/span><b><\/b><\/p>\n<p>3. <a href=\"https:\/\/www.amazon.com\/Bearings-Skateboard-Shielded-Miniature-Skateboards\/dp\/B07R7PR72H\/\" target=\"_blank\" rel=\"noopener\"><b>608 Bearing 8x22x7<\/b><\/a><br \/>\n<span style=\"font-weight: 400\"><strong>Quantity:<\/strong> 4-6<br \/>\n<\/span><b>Why?<\/b><span style=\"font-weight: 400\"> These standard skateboard bearings are cost-effective and easily available. They are durable and provide smooth rotation with minimal friction, which is crucial for the accuracy of the turntable. Alternative options like specialized robotics bearings offer higher precision but at a significantly higher cost, making them overkill for this application.<\/span><b><\/b><\/p>\n<p>4. <a href=\"https:\/\/www.amazon.com\/100-240V-Transformers-Switching-Applications-Connectors\/dp\/B077PW5JC3\" target=\"_blank\" rel=\"noopener\"><b>12V Adapter with Female Adapter<\/b><\/a><br \/>\n<span style=\"font-weight: 400\"><strong>Quantity:<\/strong> 1<br \/>\n<\/span><b>Why?<\/b><span style=\"font-weight: 400\"> This adapter provides a reliable and stable power source for the project. 12V is typically needed for the stepper motors, and using a dedicated adapter ensures consistent performance. Alternatives like USB power sources do not generally offer sufficient current for larger motors and can lead to performance issues.<\/span><b><\/b><\/p>\n<p>5. <a href=\"https:\/\/www.amazon.com\/100-240V-Transformers-Switching-Applications-Connectors\/dp\/B077PW5JC3\/\" target=\"_blank\" rel=\"noopener\"><b>Male &#8211; Male Jumper Wires<\/b><\/a><br \/>\n<span style=\"font-weight: 400\"><strong>Quantity:<\/strong> 1 pack<br \/>\n<\/span><b>Why?<\/b><span style=\"font-weight: 400\"> Essential for making connections between the Arduino, motor driver, and other components. Chosen for their flexibility and ease of use, they can be quickly reconfigured as needed without soldering, making prototyping faster and simpler. Compared to other connectors, these are very cost-effective and work well in a breadboard setup.<\/span><b><\/b><\/p>\n<p>6. <a href=\"https:\/\/www.amazon.com\/Qunqi-point-Experiment-Breadboard-5-5%C3%978-2%C3%970-85cm\/dp\/B0135IQ0ZC\/\" target=\"_blank\" rel=\"noopener\"><b>Breadboard<\/b><\/a><br \/>\n<span style=\"font-weight: 400\"><strong>Quantity:<\/strong> 1<br \/>\n<\/span><b>Why?<\/b><span style=\"font-weight: 400\"> A breadboard is ideal for this type of project because it allows for easy adjustments and experimentation without permanent changes. This medium-sized breadboard was selected for its sufficient size to fit all components while remaining compact, offering a balance between workspace and portability. I do have plans for using a PCB board in future iterations. More details on it later.<\/span><\/p>\n<p>7. <a href=\"https:\/\/www.amazon.com\/Arduino-A000066-ARDUINO-UNO-R3\/dp\/B008GRTSV6\/\" target=\"_blank\" rel=\"noopener\"><b>Arduino Uno R3<\/b><\/a><br \/>\n<span style=\"font-weight: 400\"><strong>Quantity:<\/strong> 1<br \/>\n<\/span><b>Why?<\/b><span style=\"font-weight: 400\"> The Arduino Uno R3 is the standard for many DIY electronics projects due to its robust community support, extensive libraries, and compatibility with a wide range of shields and accessories. It strikes an ideal balance between functionality, price, and user-friendliness, making it preferable over more powerful boards like the Arduino Mega when simplicity and cost are considered.<\/span><\/p>\n<p>8. <a href=\"https:\/\/www.amazon.com\/Gikfun-12x12x7-3-Tactile-Momentary-Arduino\/dp\/B01E38OS7K\" target=\"_blank\" rel=\"noopener\"><b>Push Buttons<\/b><b><br \/>\n<\/b><\/a><span style=\"font-weight: 400\"><strong>Quantity:<\/strong> 3<br \/>\n<\/span><\/p>\n<p>9. <a href=\"https:\/\/www.amazon.com\/EDGELEC-Resistor-Tolerance-Multiple-Resistance\/dp\/B07QH5PFG3\" target=\"_blank\" rel=\"noopener\"><b>330 Ohm Resistors<\/b><\/a><br \/>\n<span style=\"font-weight: 400\"><strong>Quantity:<\/strong> 4<\/span><\/p>\n<div id=\"attachment_1545\" style=\"width: 594px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1801-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1545\" class=\"wp-image-1545 size-large\" src=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1801-1024x768.jpg\" alt=\"\" width=\"584\" height=\"438\" srcset=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1801-1024x768.jpg 1024w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1801-300x225.jpg 300w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1801-768x576.jpg 768w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1801-1536x1152.jpg 1536w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1801-2048x1536.jpg 2048w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1801-400x300.jpg 400w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><p id=\"caption-attachment-1545\" class=\"wp-caption-text\">The control board<\/p><\/div>\n<h2>STL Files<\/h2>\n<p><span style=\"font-weight: 400\">For each part, I\u2019ve created STL files that you can download and print. The files are designed to be printed with common filament materials like PLA or ABS, which offer a good balance between strength and ease of printing. You can download the .stl files from: <\/span><a href=\"https:\/\/github.com\/tashrique\/DIY-Turntable-Makerspace-Resources\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">https:\/\/github.com\/tashrique\/DIY-Turntable-Makerspace-Resources<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<ul>\n<li><b>Base V2: <\/b><span style=\"font-weight: 400\">This is the foundation of the turntable. It holds the stepper motor and the bearings.<\/span><\/li>\n<li><b>Rotating Platform V2: <\/b><span style=\"font-weight: 400\">This part is mounted on top of the bearings and is directly driven by the stepper motor. It is where the object to be scanned is placed.<\/span><\/li>\n<li><b>Bearing Holders:<\/b><span style=\"font-weight: 400\"> These components are used to hold the 608 bearings in place. Print 3 pieces of these.<\/span><\/li>\n<\/ul>\n<h2>3D Printing Instructions<\/h2>\n<ul>\n<li style=\"font-weight: 400\"><b>Material:<\/b><span style=\"font-weight: 400\"> PLA, PETG, ABS, or ASA<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Layer Height:<\/b><span style=\"font-weight: 400\"> 0.2 mm for a good balance of speed and detail.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Infill:<\/b><span style=\"font-weight: 400\"> 15% is sufficient for structural integrity but can be increased for parts under more stress, like the motor mount and gear set.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Supports:<\/b><span style=\"font-weight: 400\"> All parts should print well without supports.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Bed Adhesion:<\/b><span style=\"font-weight: 400\"> Use a raft or brim if you experience issues with bed adhesion during printing.<\/span><\/li>\n<\/ul>\n<h2>Assembly Tips<\/h2>\n<p><span style=\"font-weight: 400\">Once the parts are printed, follow these tips for assembly:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Before the final assembly, test fit all parts together. This helps identify any print errors or adjustments needed.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">If some parts don&#8217;t fit perfectly, you may need to sand or trim them slightly.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Use appropriate screws and adhesive to secure the parts firmly. This ensures the turntable remains stable during operation.<\/span><\/li>\n<\/ul>\n<div id=\"attachment_1546\" style=\"width: 594px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1798-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1546\" class=\"wp-image-1546 size-large\" src=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1798-1024x768.jpg\" alt=\"\" width=\"584\" height=\"438\" srcset=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1798-1024x768.jpg 1024w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1798-300x225.jpg 300w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1798-768x576.jpg 768w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1798-1536x1152.jpg 1536w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1798-2048x1536.jpg 2048w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/IMG_1798-400x300.jpg 400w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><p id=\"caption-attachment-1546\" class=\"wp-caption-text\">Completed assembly of the turntable<\/p><\/div>\n<h2>Assembly Process<\/h2>\n<p><span style=\"text-decoration: underline\"><b>Assembly Process for the Non-Electronic Components<\/b><\/span><\/p>\n<p><b>Tools and Materials Needed<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Super Glue (optional, for additional stability)<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Sand Paper (optional, to make edges smooth)<\/span><\/li>\n<\/ul>\n<p><b>Step 1: Preparing the Base Plate<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Start by preparing the base plate, clear the base plate of any excess material from printing.<\/span><\/li>\n<\/ul>\n<p><b>Step 2: Installing the Motor<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Align the motor mount with the designated area on the base plate.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Slide the motor into the slot<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Ensure the motor shaft protrudes through the mount to align with the gear system.<\/span><\/li>\n<\/ul>\n<p><b>Step 3: Setting Up Bearings<\/b><\/p>\n<p><span style=\"font-weight: 400\">Objective: Install the bearings that will support the rotating platform.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Position the bearing holders on the base plate as per the design.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Insert the 608 bearings into the holders. If the fit is tight, you may gently tap them into place using a rubber mallet. You might also want to use superglue to secure the holders in place.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Ensure the bearings spin freely without obstruction.<\/span><\/li>\n<\/ul>\n<p><b>Step 4: Installing the Rotating Platform and Connecting the motor<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Carefully align the rotating platform with the top of the bearings.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Slide and apply moderate pressure to put the motor shaft in the connector until it is stable and level.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Check that it rotates smoothly without catching or excessive play.<\/span><\/li>\n<\/ul>\n<p><b>Step 5: Final Adjustments and Testing<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Manually rotate the platform to check for smooth motion and correct gear alignment.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Make any necessary adjustments to the tightness of screws or alignment of gears.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Optionally, apply a small amount of lubricant to the gears and bearings for smoother operation.<\/span><\/li>\n<\/ul>\n<div id=\"attachment_1547\" style=\"width: 510px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/image_2024-06-27_033305423.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1547\" class=\"wp-image-1547\" src=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/image_2024-06-27_033305423-300x262.png\" alt=\"\" width=\"500\" height=\"437\" srcset=\"https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/image_2024-06-27_033305423-300x262.png 300w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/image_2024-06-27_033305423-768x671.png 768w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/image_2024-06-27_033305423-343x300.png 343w, https:\/\/sites.williams.edu\/makerspace\/files\/2024\/06\/image_2024-06-27_033305423.png 846w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><p id=\"caption-attachment-1547\" class=\"wp-caption-text\">Schematic diagram of the electronic components and pin connections<\/p><\/div>\n<p><span style=\"text-decoration: underline\"><b>Electronic Assembly Guide<\/b><\/span><\/p>\n<p><b>Tools and Materials Needed<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Wire Cutters<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Wire Strippers<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Soldering Iron (optional, for a more permanent setup)<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Multimeter (for checking connections)<\/span><\/li>\n<\/ul>\n<p><b>Step 1: Setting Up the Arduino<br \/>\n<\/b><span style=\"font-weight: 400\">Objective: Prepare the Arduino board for connection.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Place the Arduino on your workbench or mount it on the base plate.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Ensure that it is accessible for connections to both power and other components like the LCD and stepper motor driver.<\/span><\/li>\n<\/ul>\n<p><b>Step 2: Connecting the Stepper Motor Driver<br \/>\n<\/b><span style=\"font-weight: 400\">Objective: Install the A4988 stepper motor driver (Tip: <\/span><a href=\"https:\/\/www.pololu.com\/file\/0J450\/a4988_DMOS_microstepping_driver_with_translator.pdf\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">stepper driver documentation<\/span><\/a><span style=\"font-weight: 400\">).<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Connect the motor driver to the Arduino using male-to-female jumper wires. Here\u2019s a basic pin connection guide:<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Connect the DIR (Direction) pin on the driver to a chosen digital pin on the Arduino (e.g., D2).<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Connect the STEP pin on the driver to another digital pin on the Arduino (e.g., D3).<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Ensure ENABLE pin is connected if your driver requires it, otherwise it can be left unconnected or tied to ground.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Connect the VDD on the A4988 to the Arduino\u2019s 5V output, and GND to one of the Arduino\u2019s ground pins.<\/span><\/li>\n<\/ul>\n<p><b>Step 3: Wiring the Stepper Motor<br \/>\n<\/b><span style=\"font-weight: 400\">Objective: Connect the NEMA 17 stepper motor to the A4988 driver (Tip: <\/span><a href=\"https:\/\/pages.pbclinear.com\/rs\/909-BFY-775\/images\/Data-Sheet-Stepper-Motor-Support.pdf\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">NEMA17 documentation<\/span><\/a><span style=\"font-weight: 400\">).<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Identify the wire pairs of the stepper motor using a multimeter or by referring to the motor\u2019s datasheet.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Connect these wires to the respective A and B terminals on the motor driver. Ensure that the polarity matches the driver\u2019s requirements.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Double-check the connections to prevent any potential damage due to incorrect wiring.<\/span><\/li>\n<\/ul>\n<p><b>Step 4: Adding the LCD Display<br \/>\n<\/b><span style=\"font-weight: 400\">Objective: Connect the 16&#215;2 LCD to the Arduino to display status and control messages.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Use a breadboard or direct jumper wires to connect the LCD. Typical connections are:<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">RS (register select) to a digital pin (e.g., D4).<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">E (enable) to another digital pin (e.g., D5).<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">D4 to D7 data pins of the LCD to digital pins D6, D7, D8, D9 on the Arduino.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Connect the VSS pin of the LCD to the ground and VDD to 5V on the Arduino.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Connect a potentiometer to the VO (contrast adjust) pin for contrast control.<\/span><\/li>\n<\/ul>\n<p><b>Step 5: Power Supply Connection<br \/>\n<\/b><span style=\"font-weight: 400\">Objective: Ensure proper power supply connections.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Connect the 12V adapter to the VMOT and GND on the stepper motor driver to power the stepper motor.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Ensure the Arduino is powered either via USB or an external 9V adapter connected to the VIN pin.<\/span><\/li>\n<\/ul>\n<p><b>Step 6: Testing and Debugging<br \/>\n<\/b><span style=\"font-weight: 400\">Objective: Test the setup to ensure everything is working as expected.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Upload a simple test sketch to the Arduino to check motor movements and LCD functionality.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Adjust the potentiometer to get a clear display on the LCD.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Use the multimeter to troubleshoot any connectivity issues.<\/span><\/li>\n<\/ul>\n<p><b>Step 7: Final Setup<br \/>\n<\/b><span style=\"font-weight: 400\">Objective: Secure all electronic components and clean up the wiring.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Use zip ties or cable management clips to organize and secure wires.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Ensure all connections are stable and that there\u2019s no risk of loose wires interfering with the moving parts.<\/span><\/li>\n<\/ul>\n<h2>Wiring Diagram<\/h2>\n<p><span style=\"text-decoration: underline\"><b>LCD Pin Mapping<br \/>\n<\/b><\/span><span style=\"font-weight: 400\">Reset = 7;<br \/>\n<\/span><span style=\"font-weight: 400\">Enable = 8;<br \/>\n<\/span><span style=\"font-weight: 400\">D4 = 9;<br \/>\n<\/span><span style=\"font-weight: 400\">D5 = 10;<br \/>\n<\/span><span style=\"font-weight: 400\">D6 = 11;<br \/>\n<\/span><span style=\"font-weight: 400\">D7 = 12;<\/span><\/p>\n<p><span style=\"text-decoration: underline\"><b>Stepper Motor Pin Mapping<br \/>\n<\/b><\/span><span style=\"font-weight: 400\">Step = 6<br \/>\n<\/span><span style=\"font-weight: 400\">Direction = 5<br \/>\n<\/span><span style=\"font-weight: 400\">(Type of driver: with 2 pins, STEP, DIR)<\/span><\/p>\n<h2>Programming the Turntable<\/h2>\n<pre>#include &lt;LiquidCrystal.h&gt;\r\n#include &lt;AccelStepper.h&gt;\r\n\r\nvoid(* resetFunc) (void) = 0;\r\n\r\n\/*\r\nLCD Pin Map\r\nReset = 7;\r\nEnable = 8;\r\nD4 = 9;\r\nD5 = 10;\r\nD6 = 11;\r\nD7 = 12;\r\n\r\nStepper PIN Map\r\nStep = 6\r\nDirection = 5\r\n(Type of driver: with 2 pins, STEP, DIR)\r\n\r\n*\/\r\n\r\n\r\nAccelStepper stepper(1, 6, 5);\r\n\r\nconst int rs = 7, en = 8, d4 = 9, d5 = 10, d6 = 11, d7 = 12;\r\nLiquidCrystal lcd(rs, en, d4, d5, d6, d7);\r\n\r\nint green = 2;\r\nint red = 3;\r\nint button = 4;\r\nint controls = A1;\r\nint speeds = A0;\r\n\r\n\r\nString currentStat = \"Reset\";\r\nString prevStat = \"Reset\";\r\nint stepsTaken = 0;\r\nbool buttonPressed = false;\r\nbool actionTaken = false;\r\nint buttonClicked = 0;\r\nint currentSpeed = 0;\r\n\r\n\r\nvoid setup() {\r\nlcd.begin(16, 2);\r\npinMode(green, OUTPUT);\r\npinMode(red, OUTPUT);\r\npinMode(button, INPUT);\r\n\r\nresetControls();\r\n}\r\n\r\n\r\nvoid loop() {\r\nrunProgram();\r\n}\r\n\r\nvoid runProgram() {\r\ncurrentSpeed = readSpeed();\r\ncurrentStat = getStatus();\r\nbuttonClicked = buttonClick();\r\n\r\ndigitalWrite(red, HIGH);\r\n\r\nlcd.setCursor(0, 0);\r\nlcd.print(\": \" + currentStat);\r\n\r\nlcd.setCursor(8, 0);\r\nlcd.print(\"-&gt; \" + String(currentSpeed) + \"ms\");\r\n\r\n\r\nif (buttonClicked == 1) {\r\nlcd.clear();\r\n\r\n\/\/Reset\r\nif (currentStat == \"Reset\") {\r\nlcd.setCursor(0, 0);\r\nlcd.print(\"RESETTING...\");\r\nstepsTaken = 0;\r\nprevStat = currentStat;\r\ndigitalWrite(green, LOW);\r\ndigitalWrite(red, HIGH);\r\nresetFunc();\r\n}\r\n\r\n\/\/Resume\r\nelse if (currentStat == \"Start\" &amp;&amp; prevStat == \"Pause\") {\r\nlcd.setCursor(0, 1);\r\nlcd.print(\"RESUMED @\" + String(currentSpeed));\r\nprevStat = currentStat;\r\nstepsTaken = commandStart(currentSpeed, stepsTaken);\r\n}\r\n\r\n\r\n\/\/Start\r\nelse if (currentStat == \"Start\") {\r\nlcd.setCursor(0, 1);\r\nlcd.print(\"STARTED @\" + String(currentSpeed));\r\nprevStat = currentStat;\r\nstepsTaken = commandStart(currentSpeed, 0);\r\n}\r\n\r\nelse if (currentStat == \"Pause\" &amp;&amp; prevStat == \"Pause\") {\r\nlcd.setCursor(0, 1);\r\nlcd.print(\"Already Paused\");\r\n}\r\n\r\n\/\/Undefined\r\nelse {\r\nlcd.setCursor(0, 1);\r\nlcd.print(\"Invalid Command\");\r\n}\r\n}\r\n}\r\n\r\n\r\n\/*--------------------------------------*\/\r\n\r\nint commandStart(int currentSpeed, int initial) {\r\n\r\nlcd.clear();\r\nint steps = 0;\r\n\r\ndigitalWrite(red, LOW);\r\ndigitalWrite(green, HIGH);\r\n\r\nfor (int i = initial; i &lt;= 200; i++) {\r\nstepper.moveTo(i);\r\nstepper.runToPosition();\r\nlcd.setCursor(0, 1);\r\nlcd.print(i);\r\n\r\nlcd.setCursor(4, 1);\r\nlcd.print(\"\/ 200 steps\");\r\nsteps = i;\r\ndelay(currentSpeed);\r\n\r\n\r\n\/\/Check if any other button is pressed while started\r\nString check = getStatus();\r\nlcd.setCursor(0, 0);\r\nlcd.print(check);\r\n\r\nint clicked = buttonClick();\r\nString clickedIndicator = clicked ? \"*\" : \"\";\r\nlcd.setCursor(6, 0);\r\nlcd.print(clickedIndicator);\r\n\r\nif (clicked) {\r\nif (check == \"Reset\") {\r\nlcd.clear();\r\nlcd.setCursor(0, 0);\r\nlcd.print(\"RESETTING...\");\r\ndelay(200);\r\nstepsTaken = 0;\r\nprevStat = \"Reset\";\r\n\r\ndigitalWrite(green, LOW);\r\ndigitalWrite(red, HIGH);\r\n\r\nresetFunc();\r\n}\r\n\r\nelse if (check == \"Pause\") {\r\nlcd.clear();\r\nlcd.setCursor(0, 0);\r\nlcd.print(\"Paused\");\r\ndelay(200);\r\nprevStat = \"Pause\";\r\n\r\ndigitalWrite(green, HIGH);\r\ndigitalWrite(red, HIGH);\r\nreturn steps;\r\n}\r\n}\r\n}\r\n\r\nreturn steps;\r\n}\r\n\r\n\/*--------------------------------------*\/\r\n\r\nint buttonClick()\r\n{\r\nint reading = digitalRead(button);\r\nreturn reading;\r\n}\r\n\r\n\r\nvoid resetControls() {\r\nlcd.clear();\r\nlcd.setCursor(0, 0);\r\nlcd.print(\"Turntable - Tash!\");\r\ndigitalWrite(red, HIGH);\r\ndigitalWrite(green, HIGH);\r\ndelay(500);\r\ndigitalWrite(red, LOW);\r\ndigitalWrite(green, LOW);\r\ndelay(500);\r\ndigitalWrite(red, HIGH);\r\ndigitalWrite(green, HIGH);\r\ndelay(500);\r\ndigitalWrite(red, LOW);\r\ndigitalWrite(green, LOW);\r\nlcd.clear();\r\n}\r\n\r\n\r\nString getStatus() {\r\nint controlStatus = analogRead(controls);\r\nint controlRange = map(controlStatus, 0, 1023, 1, 4);\r\nString stat = \"\";\r\n\r\nif (controlRange == 1)\r\nstat = \"Reset\";\r\n\r\nelse if (controlRange == 2)\r\nstat = \"Pause\";\r\n\r\nelse if (controlRange == 3 || controlRange == 4)\r\nstat = \"Start\";\r\n\r\nelse\r\nstat = \"-----\" ;\r\ndelay(100);\r\n\r\nreturn stat;\r\n}\r\n\r\n\r\nint readSpeed() {\r\nint sensorVal = analogRead(speeds);\r\nint stepSpeed = map(sensorVal, 0, 1023, 250, 5000);\r\nreturn stepSpeed;\r\n}<\/pre>\n<p><span style=\"font-weight: 400\">The code for the turntable is structured to handle various functionalities: controlling the motor, updating the LCD display, and reading inputs from the rotary encoder.&nbsp;<\/span><span style=\"font-weight: 400\">Access the full commented code my GitHub repository: <\/span><a href=\"https:\/\/github.com\/tashrique\/DIY-Turntable-Makerspace-Resources\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">https:\/\/github.com\/tashrique\/DIY-Turntable-Makerspace-Resources<\/span><\/a><\/p>\n<h2>Troubleshooting Common Issues<\/h2>\n<p><b>Motor Noise or Vibration<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Check alignment of gears and ensure the stepper driver is correctly calibrated.<\/span><\/li>\n<\/ul>\n<p><b>LCD Display Issues<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Verify wiring connections and contrast settings; adjust the potentiometer if used or calibrate the voltage divider correctly for clear visibility.<\/span><\/li>\n<\/ul>\n<p><b>Code Bugs<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Use serial debugging to monitor outputs and verify that the logic in your sketches matches the intended functions.<\/span><\/li>\n<\/ul>\n<p><strong>Future Enhancements<\/strong><\/p>\n<p><b>Integration of IR Sensors<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Automate the camera shutter operation in sync with the turntable&#8217;s rotation to facilitate overnight operations.<\/span><\/li>\n<\/ul>\n<p><b>PCB Board<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Integrate all the circuit in a PCB Board<\/span><\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p><span style=\"font-weight: 400\">If you have read this far, thank you and good luck! This guide aims to equip you with all the knowledge needed to create and customize your own turntable, fostering further exploration into the fascinating world of DIY electronics. Feel free to share your project progress and reach out with questions or suggestions. Your feedback helps improve and inspire future projects!<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome back to my deep dive into the creation of a low-cost DIY Arduino turntable designed for photogrammetry enthusiasts. In this continuation, I will share a detailed, step-by-step breakdown of the build process, highlighting the technical challenges and solutions, while &hellip; <a href=\"https:\/\/sites.williams.edu\/makerspace\/projects\/spinning-tales-arduino-turntable-step-by-step-tutorial-part-2\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2802,"featured_media":1537,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"ngg_post_thumbnail":0,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[23],"tags":[15,27,53,70,69,54],"class_list":["post-1536","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","tag-3d-print","tag-3d-scan","tag-arduino","tag-cad","tag-makerspace","tag-programming"],"acf":[],"_links":{"self":[{"href":"https:\/\/sites.williams.edu\/makerspace\/wp-json\/wp\/v2\/posts\/1536","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.williams.edu\/makerspace\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.williams.edu\/makerspace\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/makerspace\/wp-json\/wp\/v2\/users\/2802"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/makerspace\/wp-json\/wp\/v2\/comments?post=1536"}],"version-history":[{"count":24,"href":"https:\/\/sites.williams.edu\/makerspace\/wp-json\/wp\/v2\/posts\/1536\/revisions"}],"predecessor-version":[{"id":2888,"href":"https:\/\/sites.williams.edu\/makerspace\/wp-json\/wp\/v2\/posts\/1536\/revisions\/2888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/makerspace\/wp-json\/wp\/v2\/media\/1537"}],"wp:attachment":[{"href":"https:\/\/sites.williams.edu\/makerspace\/wp-json\/wp\/v2\/media?parent=1536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.williams.edu\/makerspace\/wp-json\/wp\/v2\/categories?post=1536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.williams.edu\/makerspace\/wp-json\/wp\/v2\/tags?post=1536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}