Maker Pro
Maker Pro

Controlling Goteck Linear Servo Micro Analog 1.5g GS1502

eng343434

Jun 26, 2018
6
Joined
Jun 26, 2018
Messages
6
Hi,

I am having some trouble controlling the Goteck micro linear servo (GS1502), and wanted to confirm that it can be controlled as a servo using the Arduino servo library, for convenience. Accordingly, shouldn't the pulses sent to the motor be between 1000-2000us? This range does not move the servo to either extreme. A datasheet apparently doesn't exist for this motor for reference.

Thank you kindly for your time and help!
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
It should be simplicity itself to modify the timing loop in any Arduino servo driving library so regardless of its suitability I reckon you should throw it together and try!
 

eng343434

Jun 26, 2018
6
Joined
Jun 26, 2018
Messages
6
Thanks for your help @kellys_eye! I did try it out and found that the motor moves, but jitters towards either of its limits to the far right or left. Any ideas?
Also if the "servo" contains a potentiometer to measure position (voltage feedback), why are microseconds specified to the motor via the Arduino servo library 'writeMicroseconds' command to move it?
And might this linear servo not in fact contain a potentiometer? It accepts only between 600-2800 microsecond ('us') signals, which is odd (servos typically take 1000-2000us).

Thanks so much!
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
Why are you quoting 1000 and 2000μs what is wrong with 1 and 2 ms?
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Why are you quoting 1000 and 2000μs what is wrong with 1 and 2 ms?
Because the position requires fraction parts of mS to be accurate.

but jitters towards either of its limits to the far right or left. Any ideas?
Are you sure you're sending the correct type of signal i.e. a variable WIDTH rather than a variable POSITION pulse?
 

eng343434

Jun 26, 2018
6
Joined
Jun 26, 2018
Messages
6
I presume I am sending PWM signals (as opposed to PPM) as I am using the Arduino servo library, simply.

Relevant lines of code:
servo.writeMicroseconds(2100);
delay(2000);
servo.writeMicroseconds(900);
delay(2000);

How does specifying microseconds impact the average voltage communicated by the PWM signal? A particular average voltage corresponds to a particular position, correct?
Could the signal frequency have something to do with it? I'm not sure what the default frequency parameters of the Arduino servo library are. The linear servo I'm using operates between 50-330Hz.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
The servo is not operated by average voltage, is is operated by pulse width. The pulses must be repeated at 20msec intervals. If you are late with a pulse you will get jitter.

Bob
 

eng343434

Jun 26, 2018
6
Joined
Jun 26, 2018
Messages
6
@BobK The digital signal (pulse) modulated quickly enough will appear as an average voltage. For ex. 100V PWM signal, 50% duty cycle will give a 50V (average voltage) signal to a motor which will rotate continuously.
Is a pulse 'late' if the frequency of the PWM signal is outside the working frequency of the motor (50-330Hz in this case)?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
It is not the average voltage that controls the servo. If you give 1.5 msec pulses at 50Hz that is a much different average voltage than the same pulses at 330Hz, but the servo will go to the same position.

Bob
 

eng343434

Jun 26, 2018
6
Joined
Jun 26, 2018
Messages
6
@BobK Makes sense what you're saying. Thanks for your insights. If that's the case, than how is the position of the linear servo regulated? I mean to say, what is the feedback that says 'yes, the motor has made it to the specified position'?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Presumably, it is from a potentiometer, same as rotary servos. You have the servo, can you not tell by inspection?

How the signal is encoded has no bearing on the question of how the position feedback is done.

Bob
 

eng343434

Jun 26, 2018
6
Joined
Jun 26, 2018
Messages
6
@BobK It's very compact, I cannot tell by inspection. Your point about the signal is also well-taken. Now, if the manufacturer states that the motor will accept signals between 900-2100us, why do they not correspond the end-limits of the motor? The motor makes it all the way to its left- and rightmost positions between ~600-2800 rather.
Would the default frequency at which the signal is sent via the Arduino servo library need adjustment, hence? Thanks for your help.
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
Try sending a pulse of 1.1ms to 1.0ms every 20ms which is the normal frame rate for R/C although that is not set in stone and can vary but, it is the principal that is important.
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
Try sending a pulse of 1.1ms to 1.0ms every 20ms which is the normal frame rate for R/C although that is not set in stone and can vary but, it is the principal that is important.
Above comment should have read 1.1ms to 1.9ms. My finger trouble!!
 
Top