This Instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com).
Want a Machine that does nothing but turn its self off? Well you are in the right place! This Instructable is my version of a useless machine that I made for a course I'm taking at USF. While some may question its purpose, this useless machine makes a great spoof item to decorate a desk or an end table.
I hope you enjoy building your own useless machine! By no means should this be a blueprint for you to use directly, but hopefully it will inspire designs of your own! Have fun!
What I used for my Useless Machine:
- 1x Arduino Mega 2560
- 3x Common Anode RGB LEDs
- 3x Heavy Duty Toggle Switches
- 3x Savox SA1230SG Digital Servo
- Jumper Wires Multicolor
- Padauk Wood (I used an 12in x 1in x 8ft board)
- Duck Tape
- Electrical Tape
- M3 Bolts with Nuts
- M8 Bolts with Nuts and Washers
- Super/Gorilla Glue
- IPad Power Brick
- USB Cord
- Metal Hanger Strap
- Drill Bit Set
- Table Saw
- Soldering Tools
- Sander and 150/220 grit pads
- Router Table with 3/4 inch Round Over Bit
- 3D Printer and PLA Filament
Step 1: Building the Mechanism
All of the parts in this project are 3D printed. In total, there are 18 3D printed parts that make up this project. The STL files will be included in the Instructable. Starting from the bottom, the mechanism is supported by a sub-base that is bolted to the bottom of the box. The sub-base has a circular hole for the base plate, and a bracket to hold the servo that rotates the base plate. The base plate has two rounded slots that hold two parallel arms. It also has a bracket to hold the servo that operates the parallel arms. The servo actuates the arms through a linkage system that connects to the servo and the rear arm. Atop the parallel arms is a straight member that hits the switches.
The 3D printed parts are driven by three high torque servos. The servos I purchased were a bit overboard for my use, but I was unsure about how much torque I would need (my only experience with servos prior to this project was the micro-servo that came with my Arduino kit). You could probably get away with using cheaper servos, as long as they are rated for higher torque. The first servo operates the arm back and fourth. The second servo rotates the base roughly 30 degrees left and right to allow the arm to hit all three switches. The third servo lifts the lid up and down. My original plan was to have the first servo push against the lid to open it. During testing I realized that the position on the servo did not give it enough leverage to lift the heavy lid.
The tolerance on the pieces are fairly tight. You will need to sand away some of the support material on some of the pieces in order to get the parts to fit correctly. All of the parts that have holes in them will need to be finished by running a 25/64 drill bit through them to hollow out the holes. This will give it a perfect fit with the pins.
Also keep in mind that some of these parts are pretty large. Make sure you printer can handle the largest file before beginning.
You will need the following:
- 1x Actuating Cross Member 3 Hole
- 1x Base Plate
- 1x Base Rotating Arm
- 2x Pin
- 1x Servo Arm Short (45mm)
- 2x Servo Arm
- 2x Short Arm
- 4x Short Pin
- 2x Stud
- 1x Sub Base Servo Plate
- 1x Switch Hitting Knob
- Actuating Cross Member 3 Hole.STL
- Base Plate.STL
- Base Rotating Arm.STL
- Servo Arm Short (45mm).STL
- Servo Arm.STL
- Short Arm.STL
- Short Pin.STL
- Sub Base With Servo Plate.STL
- Switch Htting Knob.STL
Step 2: Writing the Code
The code for this project could be manipulated to work with a variety of useless machine projects. You could also add to the existing code to give you project more personality by adding different methods of the switch getting hit. I will include the code that operates my useless machine in the Instructable. The code comment should explain what all of the functions are.
Step 3: Wiring the Controls
I have included a circuit diagram for you to use as a guild when wiring your own useless machine. I decided to use three RGB LEDs to change colors depending on the switch position. Because of this, you will need to invest in an Arduino Mega 2560. This is necessary because the Arduino Uno does not have enough PWM pins to drive the RGB LEDs. Each LED requires three PWM pins in order for it to change color.
The LEDs I'm using are common anode RGB LEDS. This means you can run 5V to the long pin on the LED and use the three shorter pins as grounds to get the LED to turn on. Because I am using PWM pins, I am able to set a value between 0 and 255 that cycles the LEDs on and off faster than the eye can see. This means that I do not need to use a resistor, because the ground wires are not set to zero. There will always be an opposing current on the grounded side that will prevent too much voltage from flowing through the LEDs.
The switches are connected to digital pins that are set to HIGH (5V) and are all connect to a common ground. When the switch is turned on, current will begin flowing through. The Arduino will recognize that the state of the switch is now LOW (0V) and activate a sequence to turn off the switch.
Each servo has three connections. A data pin, a power pin, and a ground pin. Arduinos are not great sources of power for servos, but my code only has one servo operating at a time, so it works just fine.
Power is brought into the box and connects to the Arduino via the USB port. This also allows data updates which is very useful during calibration.
Step 4: Building the Box
Constructing the box to hold your useless machine is where you can use a lot of your own creativity. You can use whatever materials, or designs you want. The only restriction (If use with my part files directly without modifying them) is to make sure the internal measurements are the same, and the opening for the arm is in the same general place.
For my project I used one inch thick padauk boards. I cut the boards to length with 45 degree angles on all the edges. I then glued all 6 sides of the box together with clamps and allowed it to cure for 24 hours. Using a router table and a round over bit, I ran the solid box over the table to round over all the edges to give it a seamless look. after carefully measuring the height of the box and comparing it to my design, I ran the box over a table saw on all for sides to remove the lid from the box. This gave the lid a near perfect fit with the bottom; as long as all of your previous measurements are accurate and your box is perfectly square. After making more measurements to find out where the door needs to be positioned in order for the arm to hit the switches, I ran the lid across the table saw to cut the lid into two pieces, one long and one short.
I then began to work on the short side of the lid. I drilled three holes use a 15/32 drill bit which snugly fit the shank of the heavy duty toggle switches I used (link below). Directly below those three holes, I drilled three additional holes with a 5/16 drill bit to fit the 5mm LED holders I purchased for the project (purchased from Adafruit). next is the hard part. If you decide to use thicker boards like it did, you will need to create a space for the rectangular body of the toggle switch to fit into. I didn't this by flipping the lid over, carefully drilling out two holes next to each of my 15/32 holes, and carving our the extra material with a chisel. This will take a bit of time, and you need to preform this step carefully so you don't crack the wood, or go to deep. From the bottom of the lid, I also widened the 5/16 holes for the LEDs. I did this to allow for more room for my jumper wires to attach.
Next I stained the box, using an oil based stain that contained a poly coat. This gave the orange padauk wood a rich darker finish, and protection from oils and grease that may be on the users hands.
I drilled a small hole in the back of the bottom part of the box. This small hole allowed me to run power and data into the box. You will want to use the same cord type you use with your Arduino. This will allow you to power the controller, and to update the code for calibration.
In the base of the box, I drilled small holes in the front of the box. Those holes, I glued brass spacers from I kit I purchased from amazon to mount the Arduino Mega into the box.
Finally, I assembled the box. I first attached the short lid and the long lid onto the box with hinges I purchased from Home Depot. You can use whatever hinges you like to capture whatever look you are going for. I decide to use hinges for both the long lid, and the short lid. This allows the box to open like a clamshell to give me access to the bottom of the switches and the LEDs. I added two laches to each side of the short lid that lock it in place to the bottom of the box. This keeps it from opening during operation. I then added my switches into the short lid with the OFF position pointing toward the user. With the RGB LED glued into the holder, I inserted them into the lid.
Step 5: Assembling the Box and Calibration
Now for the fun part, you get to put it all together! You can take all of the 3D Printed parts you made and start assembling them. Use the images included as reference. I found that after drilling out the holes, as explained in an earlier step, the assembly snaps together pretty well.
I ordered special servo horn that fit into the 3D printed servo arms and screw arm. The link is below. Use the included wiring diagram to hook the jumpers up. The diagram matches with how the pins are referenced in the code.
Once assembled, you will need to calibrate the movements of the arm. In the code, you will find a section that says the following:
- int Open = 152;
int Closed = 38;
- int Min = 171;
- int Mid = 142;
- int Max = 125;
- int MaxLR = 110;
- int MinBase = 160;
- int MidBase = 115;
- int MaxBase = 70;
These values the positions of the servo. Open and Closed control the position of the lid servo. Min, Mid, Max control the positions of the arm. Mid is a position halfway between that the arm goes to when multiple switches are selected. MaxLR is an arm position for the left and right switches. They need to me a little bit larger, as they are further away. MinBase, MidBase, and MaxBase are positions for the base to hit switch one, switch two, and switch three.
Once its calibrated you are ready to rock and roll!! Enjoy your useless machine!!