String Drawing Machine Using an Arduino Uno
327 Views, 0 Favorites, 0 Comments
String Drawing Machine Using an Arduino Uno
This machine is based on the Arduino Uno starter kit, specifically their unit on how to run a DC motor. As well as the Sphereograph and the circular movements and unknown shapes that can be created. This is meant to be a fun exploration of the interesting forms that can be made from the chance operations of spinning.
This piece is the first iteration of creating dynamic kinetic sculptures with a simple motor and a little ingenuity. So please adjust and recreate in ways that could further it.
Supplies
Arduino Super Starter Kit Uno R3 Project
Specifically
(1) x Elegoo Uno R3
(1) x 830 tie-points breadboard
(1) x L293D IC
(1) x 3-6v motor
(5) x M-M wires (Male to Male jumper wires) (1) x Power Supply Module
(1) x 9V1A adapter
Arduino IDE
String of some kind
Thin aluminum tubing
wooden for the base ( I used .5” X 1.5” X 9”, but anything should work)
Screws
Tools
Needle nose pliers
Saw
Drill
Set of drill bits
Measuring tool of some sort, I used a combo square
pencil
Setting Up Motor and Code
Setting up the Arduino motor
The Arduino Uno Kit has a CD and PDF to teach you how to set up and run a DC motor. I could re-iterate everything said and displayed, but they have a great description and definition of how to get the unit to run.
Code
The code I used is as follows. This is meant to be uploaded into the Arduino IDE and then onto your device. A DC motor Arduino library needs to be installed into the program for it to work the best.
//www.elegoo.com
//2016.12.12
/************************
Exercise the motor using
the L293D chip
************************/
#define ENABLE 5
#define DIRA 3
#define DIRB 4
void setup() {
//---set pin direction
pinMode(ENABLE, OUTPUT);
pinMode(DIRA, OUTPUT);
pinMode(DIRB, OUTPUT);
Serial.begin(9600);
}
void loop() {
// Spin clockwise for 15 seconds
digitalWrite(DIRA, HIGH); // Set the motor to spin clockwise
digitalWrite(DIRB, LOW);
analogWrite(ENABLE, 204); // 80% of 255 (full speed)
delay(15000); // 15 seconds change this to change how long it spins in a specific direction
// Stop for a moment
digitalWrite(ENABLE, LOW);
delay(1000); // 1 second
// Spin counterclockwise for 15 seconds
digitalWrite(DIRA, LOW); // Set the motor to spin counterclockwise
digitalWrite(DIRB, HIGH);
analogWrite(ENABLE, 204); // 80% of 255 (full speed)
delay(15000); // 15 seconds change this to change how long it spins in a specific direction.
// Stop for a moment
digitalWrite(ENABLE, LOW);
delay(1000); // 1 second
}
Building the Base
The base uses a wooden block of aluminum tubing. The tools needed are a drill and a saw.
To build the base
- Cut two .5 X 1.5 X 4” pieces. Save the final cut. This will be used later as a handle.
- On one of the larger pieces, drill a hole in the thickness of the aluminum tubing. one inch from the top and centered from the sides. If the aluminum is not fitting through the hole, roll the drill around to widen the hole slightly.
- Drill a hole that does not go all the way through the scrap piece of material and is equal in size or a bit smaller than the aluminum. Push it onto the end of the aluminum. This will be a cap and a handle that allows you to rotate the motor.
- Screw your two larger pieces together at a 90-degree angle. The pieces do not need to be perfectly square, but the closer, the cleaner the piece will look. Make sure to predrill your screw holes for there not to be splitting.
- Once the wood is finished, cut a piece of aluminum that is 6” Long. Don't worry about the closed end that will be hidden. With your aluminum tube, bend and form it around the DC Motor. As shown. It should sit snuggly within the aluminum so it can be flipped and does not fall. This can take some time and needs some adjustments. I have the bent end, so I can remove the motor by bending only one part of the base.
- Now slot the aluminum through the wood base and cap the other side with the cap that was made from the cut-off.
Congratulations, you have finished the base!!! The hard part is now done! The next part is making the attachments for the motor. The fun part about this next part is mostly a suggestion from what I have found has worked well rather than exact rules to follow.
Building the Attachments
The spinning attachments use the string and aluminum rod. These pieces are where you expand, have fun, and get to explore with what you make. All you have to do for it to work is twofold.
- You have to form the bottom of the metal to fit snuggly onto the Motor. This is done by gently squeezing the aluminum around the motor's tip. Squeeze it from both sides so the attachment is mostly centered over the motor. This step is very necessary for the spinning to work.
- The second is that you should flatten and drill holes through the aluminum. This is a great way to hold the strings in place when they are spinning. Make sure to tie a stopper knot like a figure eight onto the end of the string to keep it from flying off.
The rest is up to you for what you want to make. Some pieces of advice that are not necessary to follow are as follows. I found that upright spinning attachments work best when it's longer. Also, you do not want the string to hang down past the aluminum you cut because it can get caught in and stop the motor. If you want to spin something inverted, shorten it so the string starts sooner. These are both things of personal preference. Have fun experimenting with the different things that you can make. One fun thing to play with is how the knot's location can change how the string moves.
Problem Solving
Have your breadboard and everything else rest on top of the base so the movement of the attachment counter balances better. I recommend putting some other random heavy object on the back to help with that counterbalance.
Keep in mind that when you are rotating the motor from an upright position to an inverted one and vice versa, you are not wrapping the cables continuously, as this can cause them to be pulled loose from either the breadboard or the motor.
If you find that the motor is spinning, but the attachment is not, there can be two main things causing it.
- If you did not squeeze the aluminum tight enough when fitting it to the motor, there is not a strong connection.
- The other option could be that the string is catching on something while it is spinning, and this can stop the motor because it is not super strong.