Connect with us

Controlling Goteck Linear Servo Micro Analog 1.5g GS1502

Discussion in 'Sensors and Actuators' started by eng343434, Jun 26, 2018.

  1. eng343434

    eng343434

    6
    0
    Jun 26, 2018
    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!
     
  2. kellys_eye

    kellys_eye

    4,289
    1,143
    Jun 25, 2010
    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!
     
  3. eng343434

    eng343434

    6
    0
    Jun 26, 2018
    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!
     
  4. WHONOES

    WHONOES

    564
    111
    May 20, 2017
    Why are you quoting 1000 and 2000μs what is wrong with 1 and 2 ms?
     
  5. kellys_eye

    kellys_eye

    4,289
    1,143
    Jun 25, 2010
    Because the position requires fraction parts of mS to be accurate.

    Are you sure you're sending the correct type of signal i.e. a variable WIDTH rather than a variable POSITION pulse?
     
  6. eng343434

    eng343434

    6
    0
    Jun 26, 2018
    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.
     
  7. BobK

    BobK

    7,385
    1,562
    Jan 5, 2010
    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
     
  8. eng343434

    eng343434

    6
    0
    Jun 26, 2018
    @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)?
     
  9. BobK

    BobK

    7,385
    1,562
    Jan 5, 2010
    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
     
  10. eng343434

    eng343434

    6
    0
    Jun 26, 2018
    @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'?
     
  11. BobK

    BobK

    7,385
    1,562
    Jan 5, 2010
    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
     
  12. eng343434

    eng343434

    6
    0
    Jun 26, 2018
    @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.
     
  13. WHONOES

    WHONOES

    564
    111
    May 20, 2017
    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.
     
  14. WHONOES

    WHONOES

    564
    111
    May 20, 2017
    Above comment should have read 1.1ms to 1.9ms. My finger trouble!!
     
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.