Simple Turntable Drawing Machine With Arduino

by ysmnhssn in Circuits > Arduino

1045 Views, 10 Favorites, 0 Comments

Simple Turntable Drawing Machine With Arduino

371541513_6785863764835126_3215928299929451224_n.jpg

Learn to create a very basic mark-making "turntable" using scrap materials and a few basic electronics components!

Supplies

The majority of these supplies are pretty flexible and can be swapped out for equivalent items, some of which are detailed below.


MATERIALS

  1. Arduino Uno (or any other microcontroller capable of using pulse width modulation) - qty 1
  2. USB 2.0 Cable Type A/B - should be included with Arduino
  3. Small breadboard
  4. M-M jumper wires - qty 6
  5. SG90 Servo motor + accompanying servo attachments - qty 1
  6. 5/16" wooden dowel
  7. 1.5 - 2" screws (can be substituted with other fasteners or adhesives depending on the type of scrap used) - qty 4
  8. Scrap wood (or any other non-conductive material that is thick & sturdy enough to support weight & be drilled through) - roughly 12" x 12" of material
  9. I used 3/4" thick scrap oak (3/4" thick)
  10. Disk of roughly 3.75" diameter (any rigid, thin material)
  11. I used a spare gear that was lasercut from 1/8" masonite
  12. Masking tape
  13. Sharpie marker (or any other ink-based mark-making tool of your choice)

Optional:

  1. 9V battery and snap-on connector (to operate the machine without a laptop)


TOOLS + SOFTWARE REQUIRED

  1. Drill press (can be substituted for hand drill if needed)
  2. Drill bits of varying diameters (3/8" and larger)
  3. Miter saw, band saw, or table saw to cut material (depending on personal preference & starting dimensions of stock material)
  4. Arduino IDE

Create Base Pieces

openhardware_drawingmachine_basespecs.png

(Again, the specific dimensions and materials are flexible for this step depending on what you have available, but the included diagrams are based off of the exact material dimensions of my finished version.)

From your stock material, cut out the following pieces:

  1. Base (7 1/2" x 9 3/4") - qty 1
  2. Feet (7 1/2 x 1 1/4" - qty 2

Drill Holes Into Base

openhardware_drawingmachine_hole1.png
openhardware_drawingmachine_hole2.png
openhardware_drawingmachine_hole3.png
openhardware_drawingmachine_hole4.png

Measure and mark your base piece according to the included diagrams.

Using the 3/16" drill bit, you will create the first through hole for the drawing arm fulcrum. [Fig. 1 + 2]

The second "hole" is actually an oblong cavity for the Servo motor. I used a 3/8" drill bit to create three overlapping through holes. You may need more or fewer holes to create this cavity, depending on your precision & the diameter of the specific bit that you use. The rough dimensions required for the cavity are pictured on Fig. 3.

Attach Base to Feet

openhardware_drawingmachine_hole5.png

Measure and mark your base piece according to the included diagram.

At each intersection, drill a pilot hole using an 1/8" pilot bit and attach the feet to the base using 1.5-2" long screws.

(You can substitute the screws in this step for any fastener or adhesive of your choice, as long as the feet are firmly attached to the base.)

Cut Out Drawing Arm Pieces

openhardware_drawingmachine_arm1.png
openhardware_drawingmachine_arm2.png

From the remainder of your stock material, cut out the first piece of the drawing arm using the dimensions provided in the included diagram.

Then, cut the 5/16" dowel to a length of 3 3/4".

Drill Holes in Drawing Arm

openhardware_drawingmachine_arm3.png
openhardware_drawingmachine_arm4.png

Measure and mark your base piece according to the included diagram.

For hole A, use a 3/8" drill bit to create a blind hole that is roughly 1/4" deep.

For hole B, you will be drill a through hole. For now, you can use the 3/8" drill bit, but you may need to adjust the size of this hole depending on what type of drawing tool you'd like to use.

Preliminary Assembly (base, Drawing Arm, and Servo Motor)

371461093_997543694863179_7346889086092648739_n (1).jpg
377116078_872766967833530_5833737297211889312_n.jpg

Fit the dowel piece through the first hole from Step 2, doing your best to ensure that it sits perpendicularly to the top of the base assembly. The drawing arm will then sit on top of this dowel using the blind hole (A) that you created in Step 5.

Then, fit the servo motor into the cavity from Step 2. It should fit comfortably, but snugly. If the cavity is too small, you can use the drill press (or a small file) to widen it. (Be careful to not drill away too much material!)

Wiring

openhardware_drawingmachine_wiring.png

Using the M-M jumper cables and the included diagram for reference, wire the Servo motor to your Arduino. The color of your jumper cables, but I prefer to color-code my circuits so that they're easier to troubleshoot--red for power, black for ground, and yellow for the signal (pin 9).


You can either connect directly to your Arduino or use a breadboard/breakout board as an intermediary between the Arduino and motor. (I would recommend doing the latter if you're planning on expanding this circuit to include more components, such as LED lights, sensors, or more Servo motors.)


(Diagram created using this free browser-based tool.)

Create Turntable

368024936_1076549630428867_3615180346604902400_n.jpg
371538023_741572241126282_3188936079506056863_n.jpg

For the turntable, I used a scrap lasercut gear, which already came with a hole in the center. If you are using a circular found object (i.e. jar lid), mark its center and drill a small hole as precisely as possible. If you are using stock material, cut out a circle of roughly 3.75" diameter and drill a small center hole.

Center one of the included servo attachments (I used the X-shaped attachment for more contact area) about the center hole and attach it to the underside of your disk with masking tape or another adhesive of your choice, making sure that the hole for the Servo's drive shaft is still exposed.

Flip your turntable assembly over and attach it your Servo motor's drive shaft.

Compile Code

openhardware_drawingmachine_ide.png

Connect your Arduino to your computer using the required USB cable and open the Arduino IDE.

Create a new sketch file, paste in the following code, and compile it to your Arduino. When the sketch is successfully compiled, your turntable should start turning automatically.


#include <Servo.h>


Servo myservo;
int currentPos = 90;  // Start at the middle position (90 degrees)
int targetPos = 90;  // Initialize the target position to the same as the current position


void setup() {
  Serial.begin(9600);
  myservo.attach(9);
}


void loop() {
  // Update the target position randomly
  targetPos = random(0, 180);


  // Move towards the target position smoothly
  for (int pos = currentPos; pos != targetPos; pos += (targetPos > currentPos ? 1 : -1)) {
    myservo.write(pos);
    delay(10);  // Adjust the delay for the desired speed
  }


  // Set the current position to the target position
  currentPos = targetPos;


  // Add a longer delay before the next movement
  delay(random(500, 2000));
}

Attach External Power Supply

368067467_881562553586664_3669203888569448288_n.jpg

This step is optional, but is recommended so that you can untether the drawing machine from your laptop.

Unplug your Arduino from your computer. Now, you can attach the 9V battery to the snap-on connector and plug it into the DC jack on your Arduino. Now that it's being powered independently of your computer, the Arduino will automatically run the last code that was compiled onto it.

Draw!

F097ZNTLOBHEM8D.jpg

Now, you can adhere any drawing surface of your choice onto the top of the turntable. (I used Post-It notes because of their convenient size and built-in adhesive.)

Uncap your desired mark-making tool (again, I used a standard Sharpie marker) and fit it into the through hole on the drawing arm. (Again, if this hole is too small, you can use a slightly larger drill bit to make a larger hole. If the hole is too large for your marker of choice, you can always drill a smaller hole slightly offset from the original one or wrap your marker in masking tape until it fits snugly.)

As the turntable spins automatically, you can manually reposition the drawing arm to create more variation in your drawing. Try moving the arm at different speeds to see what kind of marks you can make in collaboration with your simple drawing machine!

-

As a bonus challenge, try to wire the drawing arm to another Servo to create an entirely hands-free/automated drawing experience. Alternatively, add in some sensors to create a more responsive output! (You will have to modify your code accordingly.)