sweeping with a spektrum linear server

I’m trying to make a little device with the rc micro linear servo from Spektrum.

A regular servo works great. The sweep happens as expected.

When I plug in the linear servo ( same 3 wires, not 5 ) it just twitches ever half second or so.

Any ideas?

I’m of course hoping to control the linear servo back and forth.


int servoPin = 9;
int pulse = 1000;

void setup() {
pinMode(servoPin, OUTPUT);

void loop() {

digitalWrite(servoPin, HIGH);
digitalWrite(servoPin, LOW);


digitalWrite(servoPin, HIGH);
digitalWrite(servoPin, LOW);



This is some code i've found, but it does not work. it does not look complete.

I'd say explain it like i'm 5, but i'd say 3 or 4.

I'm in deep

#include <Servo.h>

Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0; // variable to store the servo position

void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object

void loop() {
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position

this is the default sweep code.

my signal is on pin 9
ground is ground
hot is 3.3 ( or 5 ) neither do anything different.

Please provide a link to details on the hardware you are talking about.

Thank you for the reply!

This is the exact servo

and I'm using the arduino diecimila

Thank you!

I'm new to this and i'm in deep.

I would expect one of those to work when plugged in in place of a regular servo.

Have you any other means to test it so you can be sure it is not faulty?

You should not really power any servo from the Arduino 5v pin as it is not intended for the currents required by motors. Give servos their own power supply with a common GND with the Arduino. A pack of 3 or 4 AA cells should be suitable for testing. After reading Reply #6 this may be wrong. I was assuming it used the standard servo supply voltage.


In general those servos work normally with the same signals as a standard servo...but they are quite fragile. If you're isn't doing anything then it's probably broken. Check if the motor seems to be trying to turn but the slider isn't moving. They do sometimes stick and just moving the slider a little can free them up.

OTOH if you've been running it on 5V with it stalled you may have burnt it out. They're only intended for a single lipo - 4.2V max.


ok, so i'm using the original sweep code.

Tried a new identical servo with the exact same result.

Plugging in a regular servo, it sweeps fine.

little micro linear servo above just grinds for about 1/3 the time with a second off.

No movement at all, but i can feel the motor jittering.

Are you sure you haven't fastened the servo to something that is preventing the cog on the end from moving? Trying to stick those servos down with double sided tape or similar will often stop them dead because of that.

One thing you can try is turning the bigger white cog on the end manually and checking that the slider can move freely. If not you need to look for why.

BTW I've just checked one of my Spektrum linear servos (older 1.5g version with smaller motor) with Sweep and it works fine.


That looks like its using a tiny slotless coreless motor, they can take 2A at stall, you need a supply
that's good for that. This is the sort of motor used in micro quad-copters and has a very high
power rating for its size. It will be easy to burn it out.

The servo is not attached to anything, just dangling on it's wire. Turning the wheel when no power is applied lets it go back and forth with no issues.

Slipstick, are you using external power for the servo?

Thank you MarkT, I'll get a power supply setup externally and try. 2A???? that thing is as big as my thumbnail.

OK, so I got the servo setup on it's own 3.7v 1s lipoly 25c battery.

The servo and the battery are 3.7 volts.

I get the same momentary grinding from the servo as soon as I plug the battery into the servo, even though the arduino isn't plugged in yet.

plugging in the arduino does not change anything.

As a further test, I plugged the battery into the servo with no signal wire connected and it does the same momentary grinding.

both of the brand new linear servos I have are doing this. traditional servos work ok.

Thanks for the help!

Are these the brand new servos that you supplied with higher voltage than their spec?
I do not know if 5v will damage them but it might.

O.K. I checked mine again and I can't even guess what's happening with yours. You say the slider moves freely back and forth when you turn the end cog, which implies that the motor pinion is also turning freely. But when motor is powered it makes a grinding noise and doesn't turn the pinion/cog i.e. nothing moves.

The motors on both servos must be dead in some odd way so maybe 5V will kill them even more rapidly than I thought.

I've had problems with those linear servos both standalone and on the receiver boards but always something physically jamming the slider or something else or else a wire breaking. Yours is an odd one.


@deezle, have you shown us a wiring diagram? I would like to see how you have the servos wired, powered and such.
Pencil, paper and a camera is good enough if you include details like pin numbers where wires attach.

Here's the pix and a video. This is of a brand new servo that has never touched the power pins of the arduino.

same issue.

I also tested the servo on my blade mcpx heli. The servo appears to be identical to the ones on it.

new servo does nothing when plugged into heli

heli servo does nothing when plugged into battery and signal wire from arduino.

( larger traditional servo works fine doing the sweep code on arduino )

I busted out my multi meter and it looks like my hot ( red ) and signal ( orange ) are showing 0 ohms across them on the servo. Shorted?

is that normal?

I'm feeling like this project is pranking me somehow.

Thank you for the help!!

inlining images

Your first image does not show the servo and the arduino sharing a common ground.

So connect ground on arduino to black battery wire?

So there would be 3 things wired to that, arduino ground, ground on servo, and black battery wire?

Sorry i'm a super noob.

new servo does nothing when plugged into heli

Wait, what? I would have expected that a good servo, hooked into a known good RC radio system, would perform as expected.
Is your blade a known good system? Do you have any servos that work with that receiver?

And yes, your ground will be connected to 3 things, battery, servo and arduino. You conveniently have a pin on that black wire that can be inserted into the header for GND on the arduino.