Servo Driven Automatic Vice
You will need:
- Parallel Gripper Kit - https://www.sparkfun.com/products/13178
- Standard Size Servo - (See Note)
-
Base - I show a couple of ideas
To build it on a breadboard you will need:
- Arduino - (I used an Uno)
- Breadboard
- Jumper Wires
- 10k Linear Taper Potentiometer - http://www.adafruit.com/products/562
- Long Male Headers - https://www.sparkfun.com/products/12693
To build the permanent version you will need:
- Adafruit Perma-Proto Breadboard - http://www.adafruit.com/products/1606
- 2.1mm barrel jack http://www.adafruit.com/products/373
- 2 - 10mf electrolytic capacitors https://www.sparkfun.com/products/523
- 7805 Voltage regulator http://www.adafruit.com/products/2164
- Heat Sink for Voltage Regulator (see note)
- 330-560 Ohm 1/4 Watt resistor (purchased locally)
- Red 5mm LED (purchased locally)
- 22 gauge hookup wire (Red, Black, Yellow, and Green, purchased locally)
- 10k Linear Taper Potentiometer - http://www.adafruit.com/products/562
- Potentiometer Knob - http://www.adafruit.com/product/2046
- Long Male Headers - https://www.sparkfun.com/products/12693
- 28 Pin IC Socket - http://www.adafruit.com/product/2205
- ATmega328 - https://www.sparkfun.com/products/10524 (see note)
- 16 MHz Ceramic Resonator - http://www.adafruit.com/product/1873
- 9 Volt Power Adapter - http://www.adafruit.com/products/63 (see note)
Servo note: On the page with the gripper they show a few different servos that will work. I chose a more expensive servo with metal gears. Sparkfun lists standard size servos for $12.95 and $13.95. These might be good enough. That said, I like metal gears better than plastic.
ATmega328 note: The chip is to replace the chip in your Arduino after you take it out to use in your project.
Voltage Regulator note: Purchased locally, if you cant find one use a small machine screw to bolt a piece of aluminium to the voltage regulator.
Power Adapter note: It works better with a plug in power source than with a battery.
I wish it was possible to purchase all these parts from one supplier to save on shipping but that is not the case. Many of these parts are only available from one of the parts suppliers.
Assemble the Gripper and Vice Base
Assemble the gripper and the servo.
This link shows how to assemble the gripper:
https://www.youtube.com/watch?v=YOMERTOhVqI
In this example I am using a Panavice base with the jaw assembly removed.
Put the gripper assembly in the Panavice base. I used an eraser that is about 3/8" thick as a spacer.
Build It on a Breadboard
Follow the diagram to build the circuit.
Use a piece of the male headers with three pins to connect the servo.
The positive and negative wires to the potentiometer can be reversed to adjust the direction.
The Program Code
Copy/Paste this sketch into the Arduino IDE and upload it to your Arduino:
#include <Servo.h>
Servo myservo; // create servo object int pot = 0; // analog pin used for pot (A0) int val; // value from analog pin int lastVal; // prevoius value long LastChange; void setup() { myservo.attach(9); // attaches the servo on pin 9 } void loop() { val = analogRead(pot); // reads pot 0 - 1023 val = map(val, 0, 1023, 1, 179); // scale it to servo 0 - 180 if (val < (lastVal-5) || val > (lastVal+5)) { myservo.write(val); // sets servo position delay(15); // waits for servo to get there LastChange = millis(); lastVal = val; } else if (millis() - LastChange > 500); { myservo.write(val); } }
Permanent Version: the Power Supply
The first part to solder is the 2.1mm barrel jack. In order for it to fit it is necessary to cut off the lead on the side of the part. (see picture) Solder the barrel jack into holes A-1 and A-3.
Next solder red and black wires for the capacitors and voltage regulator as shown in the diagram.
Solder the capacitors like in the diagram. The longer positive lead goes in the column with the red wire. The negative lead is shorter and there is a stripe on the side.
Now solder the voltage regulator as shown.
Finish the power supply by soldering the power on LED circuit and the bridge wires to the other set of power rails. The longer lead on the LED is the anode, it goes in the column with the resistor.
Plug in the battery to test your work. The LED should light and the voltage regulator should not get hot.
Permanent Version: the Potentiometer
Drill a 9/32 to 5/16 hole in the printed circuit board as shown.
Break off the little tab on the potentiometer so it will mount flat.
Solder the wires onto the pot.
Mount the pot
And solder the wires to the board. The middle wire is soldered into hole A18.
Permanent Version: Finish the Circuit
Solder the chip socket, it goes in the middle of the board in holes 26 through 39. The alignment notch points away from the power supply.
Solder the male headers for the servo. The pins go toward the back, in holes B21 - B23.
Attach a black wire from A21 to the ground rail and a red wire from A22 to the positive rail.
Attach a yellow wire from D23 to D26. This connects the servo to digital pin nine.
Attach a yellow wire from C18 to C34. This connects the pot to analog pin zero.
Solder the ceramic resonator into holes H22 through H24.
Solder the wires for the resonator: G22 to G31, I24 to I30, and J23 to the ground Rail.
Final Assembly
Upload the program is step three onto the Arduino.
Pull the chip out of you Arduino and insert it on the circuit board, the alignment notch points away from the power supply.
Replace the chip in the Arduino with the new chip.
Place the gripper and the circuit board in the base.
In this picture and the picture on the introductory page I am using a Mitutoyo Micrometer Stand for a base.
I already had the part. I searched for it of Amazon.com, they sell it but it is expensive, $60.00. And it is heavy so the shipping will also be expensive.
You can use either of the bases I used or use an idea of your own.
When you close the vice on a part close it just enough to hold the part, closing it farther does not increase the torque holding the part.