Ordered the high torque servos from the Digital Products Company

Servo Specs:
Speed: .18 sec/60degrees at 4.8V, .16 sec/60degree at 6.0V
Torque: 213 oz-in (15.5 kg-cm) at 4.8V, 231 oz-in(16.8 kg-cm) at 6.0V
Weight: 2.1 oz (60 grams)
Price: $24.95 per servo ($31.01 with S&H and Tax)

More Specs and measurements can be found at following link: http://www.dpcav.com/xcart/product.php?productid=16491&cat=255&page=1

Servo Testing
12/5/09


Clock: .05 ms



Time(ms)
Angle
Degrees from center
Count
0.5
>180
>90
10
0.75
160
70
15
1.00
130
40
20
1.25
110
20
25
1.50
90
0
30
1.75
70
-20
35
2.0
50
-40
40
2.25
20
-70
45
2.50
<180
<-90
50

The clock on the FPGA is a signal that runs at 50 MHgz, we divided this down to make a slower clock that sends a signal at 0.05ms. The chart shows the "Time(ms)" which is the time period that a high signal is sent to the servo followed by a low signal for the rest of the 20ms refresh time. All servos use a 20ms time period, so a high signal lasting 1.5ms will be followed by 18.5ms of a low signal. 1.5ms is a standard that will bring the servo to the center, however not all servos follow this rule so we did a little bit of testing and confirmed the center mark manually using this tutorial.

The FPGA counts the length of high signals from the 0.05ms clock, so after a set amount of counts the signal will change from high to low and remain low for the 20ms refresh time. The column "Count" represents this amount, so 15 counts of 0.05ms is .75ms (15 X 0.05) and a high of .75ms moves the servo to 160 degrees. Note: The last column times 0.05ms equals the first column. The angles we found simply by testing different time periods and found corresponding angles using a protracter. The servo appears to be able to go around 170 degrees, we can not get it to go the full 180 degrees. The timing 1.50ms centers the servo so from the center we measured the degrees at each timing period.


Cutting the holes to fit the servos into was a bit of a challenge. We used a dremmel to cut the approximate width and lenth of the servos into the top of the housing and the arm then used a file to finish with a nice snug fit. We decided to keep the screw holes on the top rather than beneath the plastic (see pictures in housing). One of the screw holes on our servo broke so the bottom servo only has 3 screws keeping it in place.

Here is the first part of the code:
Begining with the first few lines are the ports. We have 7 switches labelled BTNS, one pulse output labelled Pulse, and a clock labelled Clock. The clock is a 50MHgz clock so we divided this clock down to .05 milliseconds. The constants will change the signal length and give us different angles, they are labelled simply by the timing in milliseconds, so Constant Pulse_075 will have a high signal of .75ms. Note that .5 milliseconds has been commented out, this is because the servo can not turn that much and causes the servo to make weird noises.

Next is the code that creates the clock. Basically we have a counter that counts down from 2500 at each rising edge of the 50MHgz clock. Each time this counter reaches 0 a new signal titled 'Slowclock' is switched from high to low, or low to high -creating a signal that has a rising edge each .05ms.

The program then takes the constants and sets them as the pulse count, the counter will count down from those numbers to 0 using the new Slowclock. Once the counter gets to 0 the signal will be turned low and will continue to be sent for the remaining part of the 20ms, this is done with 'Sync' which counts down from 20ms then repeats. All servos use this 20ms refresh period.
entity Servo_Timing is
    Port ( Clock : in  STD_LOGIC;
                BTNS : in STD_LOGIC_VECTOR( 6 downto 0);
                Pulse : out  STD_LOGIC);
 
 
end Servo_Timing;
 
architecture Behavioral of Servo_Timing is
 
signal Slowclock : STD_LOGIC := '0';
 
--Constant Pulse_050 : integer := 10;
Constant Pulse_075 : integer := 15;
Constant Pulse_100 : integer := 20;
Constant Pulse_125 : integer := 25;
Constant Pulse_150 : integer := 30;
Constant Pulse_175 : integer := 35;
Constant Pulse_200 : integer := 40;
Constant Pulse_225 : integer := 45;
 
 
begin
 
 
 
    process(Clock)
        Variable Pulse_Count_Start : integer;
        Variable Pulse_Count : integer;
        Variable Sync : integer := 200;
        Variable Sync_Start : integer;
        variable Counter : integer := 2500;
 
    begin
        --create slowclock at .5ms
        if( rising_edge(Clock) ) then
            Counter := Counter-1;
 
            if( Counter = 0 ) then
                Counter := 2500;
                Slowclock <= not Slowclock;
 
                if( Pulse_Count = 0) then
                    Pulse <= '0';
 
                    if( Sync = 0) then
                        --this was used when we had just a single servo
                        Case BTNS is
                            when "1000000" => Pulse_Count_Start := Pulse_075;
                            when "0100000" => Pulse_Count_Start := Pulse_100;
                            when "0010000" => Pulse_Count_Start := Pulse_125;
                            when "0001000" => Pulse_Count_Start := Pulse_150;
                            when "0000100" => Pulse_Count_Start := Pulse_175;
                            when "0000010" => Pulse_Count_Start := Pulse_200;
                            when "0000001" => Pulse_Count_Start := Pulse_225;
 
        Pulse_Count := Pulse_Count_Start;
         else
            Sync :=Sync-1;
         end if;
 
        else
             Pulse_Count := Pulse_Count-1;
             Sync_Start := 200 - Pulse_Count_Start;
             Sync := Sync_Start;
             Pulse <= '1';
        end if;
 
   end if;
 
  end if;
 
 end process;
end Behavioral;


A few tips:
1. When buying servos make sure that whichever ones you choose will be adequate for your project. Using servos that are do not have enough torque is a bad idea. To avoid this start by estimating how much the arm and gun will weigh and shoot for a servo that has torque about twice the weight you are trying to move.
2. The servos are sold by torque so if you are moving something heavy and want to do so quickly then those servos will be pretty expensive. To save money try to keep the arm and gun as light as possible, we did this by removing the excess plastic from the gun and using only the necessary parts.
3. Broken servos are not fun, keep your servos safe.