Spectrum Linear servo.

Hi,

I’ve worked with a variety of servos in the past (Futaba and Hi-tec) without problems and I’ve just taken delivery of spectrum linear servo…
http://www.ebay.co.uk/itm/Spektrum-SPMSH2040L-2-9G-LINEAR-LONG-THROW-SERVO-/380581300862?_trksid=p2054897.l4275

I’m using the standard servo library on a mega2560. But so far I’ve got no signs of life out of it. I’ve connected the brown lead to ground, the red lead to 3.3v and the orange lead (which I assume is the control lead) to pin 3.

The spec says the voltage range is 3.2 - 4.2v with a maximum current of 40ma - so the 3.3volt supply on the mega should be fine.

I’ve no idea what range of pulse widths it’s expecting, but I guess it’s similar to other servos, I could be wrong.

Here’s the full sketch…

#include <Servo.h>                      // Low level servo library
Servo _servo;                           // servo

void setup() 
{
  Serial.begin(115200); 
  Serial.println("start");
  _servo.attach(3);
}

void loop() 
{
  delay(2000);
  Serial.println("Width 1500");
  _servo.writeMicroseconds(1500);

  delay(2000);
  Serial.println("Width 500");
  _servo.writeMicroseconds(500);

  delay(2000);
  Serial.println("Width 3000");
  _servo.writeMicroseconds(3000);
}

The code compiles and runs (i get the expected output on the screen) but the servo itself doesn’t respond. I can’t help feeling I’m missing something obvious, but just can’t put my finger on it!

thanks

"Similar to other servos" would be 1000 to 2000 microseconds, not 500 to 3000.

Where did you get the 40 mA Maximum Current specification? I didn't see that anywhere and other servos can run as high as 1000 mA.

I wouldn't power an inductive load like a servo from the 3.3V rail, its not designed for inductive loads (on old Uno's it could destroy the FTDI chip).

A separate 3V battery pack, or a separate regulator (to limit the risk), might be safer.

That servo also needs at least 150mA to perform to its published specs(*) at 3.3V, just from the speed/force product - in reality I'd expect more like 0.5A peak. Nowhere do I see a 40mA figure.

(*) speed 13.5mm/0.13s = 0.1m/s force = 330gf = 3.3Nm power = force x speed = 0.33W (more like 0.6 to 1W allowing for friction loss)

"Similar to other servos" would be 1000 to 2000 microseconds, not 500 to 3000.

Yes - I started with a range of 1000 to 200ms, but widened the range as I got more desperate.

Where did you get the 40 mA Maximum Current specification?

Good question, I can longer find the link. I think it was from a discussion form somewhere, but I can't find it on any datasheets.

The servo is very small and lightweight so I doubt it draws a massive current. I have checked the voltage of the 3.3 pin and it doesn't alter when I plug in the servo so I think it's ok. I will however try it with a higher current source just in case.

40mA sounds like a no-load current.

If in doubt with a small servo assume 1A, more for larger servos.

MarkT: force = 330gf = 3.3N~~m~~

You mean 3.3N not Nm, but clearly typo since you used the figure as force in next step 8) to get power.

And the power of 0.3W would give a current of about 100mA at 3 or so volts. That would be under load, when asked for that force and at that speed, but wouldn't account for start up current which would be significantly more.

OhMyCod:

Where did you get the 40 mA Maximum Current specification?

Good question... I can't find it on any datasheets.

Servo makers do seem strangely silent on the issue of current, I've noticed.

OhMyCod: The servo is very small and lightweight so I doubt it draws a massive current. I have checked the voltage of the 3.3 pin and it doesn't alter when I plug in the servo so I think it's ok.

I'm sure it draws very little current, until you try to spin the motor. :)

ok, got it work!

Here's what I learnt, firstly, the spec is fibbing, it doesn't start to work at 3.2 volts as claimed, it doesn't show any sign of life until 3.6 volts. Secondly it has a very tight pulse width range about 1200 to 1800us. Thirdly, if you give it a pulse width outside of the suggested range it seems to sulk for about 20 seconds before responding to any other commands.

Just a final point, the figure I quoted of 40ma seems to be about right under no-load conditions, although I admit that I've just spotted a calibration certificate dated 1986 on my Avo.

Thanks for your help guys.

Hi,
I dont suppose you have your code that worked?
I cant get it going?
Cheers
Tom