I started using Arduino a few weeks ago, and recently wrote some code for a sculpture I'm doing involving a servo. I tested it with the little servo in my starter kit, but the actual application requires a much larger servo.
I purchased one from http://www.servocity.com/html/hs-805bb_mega_power.html#.VAqa5GRdU7E, and combined it with a gearbox to achieve 10 ft-lbs of torque. I can't get it to work at 4.8v, with the exact same code that worked with my little servo. There is a small clicking, but no motion whatsoever.
Currently, the servo is connected to the 5V, Gnd, and Pin 9, directly to the Arduino. I'm not sure if it's a power issue, or if the servo isn't getting the proper signal from the sensorpin, but it works flawlessly with my little servo. I'm not very experienced with wiring or electrical engineering, but I think I might need one of these : http://www.servocity.com/html/180o_servo_stretcher.html#.VAqbdWRdU7E
The code I'm using is below. Any experts care to take a stab at what I'm doing wrong? Any and all help is appreciated!
#include <Servo.h>
Servo servo1;
void setup()
{
servo1.attach(9);
}
void loop()
{
int position;
int timeMultiplier = random(0,10);
for(position = 0; position < 180; position += 10)
{
servo1.write(position); // Move to next position
delay(20); // Short pause to allow it to move
}
delay(timeMultiplier * 1000);
// Tell servo to go to 0 degrees, stepping by one degree
for(position = 180; position >= 0; position -= 10)
{
servo1.write(position); // Move to next position
delay(20); // Short pause to allow it to move
}
}
Where is the arduino getting it's power ? (USB or ext dc barrel jack (what is the input voltage?)
If you have a meter and measure the 5V pin of the arduino with and without your servo connected you can see how much it is loading down the 5V bus. The onboard regulator can't support that servo.
Control System: +Pulse Width Control 1500usec Neutral
Required Pulse: 3-5 Volt Peak to Peak Square Wave
Operating Voltage: 4.8-6.0 Volts
Operating Temperature Range: -20 to +60 Degree C
Operating Speed (4.8V): 0.19sec/60° at no load
Operating Speed (6.0V): 0.14sec/60° at no load
Stall Torque (4.8V): 274.96 oz/in. (19.8kg.cm)
Stall Torque (6.0V): 343.01 oz/in. (24.7kg.cm)
Operating Angle: 45 Deg. one side pulse traveling 400usec
Continuous Rotation Modifiable: Yes
Direction: Clockwise/Pulse Traveling 1500 to 1900usec
Current Drain (4.8V): 8mA/idle and 700mA no load operating
Current Drain (6.0V): 8.7mA/idle and **830mA no load ** operating
Dead Band Width: 8usec
Motor Type: 3 Pole Ferrite
Potentiometer Drive: Indirect Drive
Bearing Type: Dual Ball Bearing
Gear Type: All Heavy Duty Nylon Gears
Connector Wire Length: 11.81" (300mm)
Dimensions: 2.59" x 1.18"x 2.26" (66 x 30 x 57.6mm)
Weight: 5.36 oz. (152g)
You need an external 5V , 1A power source. Look online.
But look at the current too: raschemmel's quote indicates 830mA under no load, which is pretty hefty. I wouldn't be surprised if it pulls 2-3A with some load on. Presumably your work moves, I'm guessing maybe lifting something or moving a limb?
So iiwy I'd look for a 6V 3A supply.
If you have an ammeter, it would be prudent to measure what the actual current is, under the worst conditions. Worst condition is when the motor stalls, ie it can't move because the load is too much.
Simple calculation(*) shows the servo is ~20W mechanical, so assuming about 50%
efficiency (not unlikely) then 6A might be a safer value for a supply, allowing 36W in.
You don't want the supply dropping out every time it seeks
(*) torque = 2.5Nm, speed = 7.5 rad/s, power = torque x speed ~ 19W
MarkT:
Simple calculation(*) shows the servo is ~20W mechanical, so assuming about 50%
efficiency (not unlikely) then 6A might be a safer value for a supply, allowing 36W in.
You don't want the supply dropping out every time it seeks
(*) torque = 2.5Nm, speed = 7.5 rad/s, power = torque x speed ~ 19W
Good point: I should have thought of doing that calc