ActivityBot non-parallax servo testing issue

Hey all,

Any assistance on the following problem would be greatly appreciated.

Problem: Cant get a non-Parallax digital servo to be controlled with the Parallax Propeller Activity Board WX. I would simply like to control the servo and position the servo horn at 0 degrees, 90 deg and 180 deg.

The example code I am using is:

/*
Standard Servo Position.c

Moves servo to 0, 90 and 180 degrees. Holds each position for 2 s.
Connect servo to P16 port on Propeller Activity Board.

http://learn.parallax.com/propeller-c-simple-devices/standard-servo
*/

#include "simpletools.h" // Include simpletools header
#include "servo.h" // Include servo header

int main() // main function
{
servo_angle(16, 0); // P16 servo to 0 degrees
pause(3000); // ...for 3 seconds
servo_angle(16, 900); // P16 servo to 90 degrees
pause(3000); // ...for 3 seconds
servo_angle(16, 1800); // P16 servo to 180 degrees
pause(3000); // ...for 3 seconds
servo_stop(); // Stop servo process
}

Observations:
- Only rotates to 1position (ie I assume 0 deg), does NOT further rotate to , 90 deg and 180 deg

Things I have tried / my current set up:
- Set starting angle to be approx 0 deg by rotating the servo horn manually so its in middle of travel potential.
- All other projects eg Navigation Basics etc which included rotation from continuous rotation parallax servos operated as expected
- Supply voltage is at 6.8V from 5 x 1.5V AA batteries. Voltage regulated to 5V to suit non-parallax servo voltage spec which is 4.8V-6V.
- Reinstalling SimpleIDE, USB drivers and updated to latest ‘learn‘ folder

What I would like to know please:
- How do I control a non-parallax standard servo (between 0-180 degrees)? Is it possible?

Comments

  • 7 Comments sorted by Date Added Votes
  • Helps to know the make/model/part# of servo you are using.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • Try commanding the servo to not go to the extreme positions. When I had tried a Radio Shack servo and commanded to either 0 or 180 degrees the servo would jam trying to get to either 0 or 180, and exhibit behavior like what you described.

    First try commanding 10 degrees and 170 degrees to see if that works, and if it does, try closer to the extreme positions.

    Tom
  • Thank you for your comments.

    I am testing two types of 0-180 deg standard non-parallax digital servos (so I can rule out if its just 1 servo problem):

    1 x Align Digital Servo DS410M (refer to https://servodatabase.com/servo/align/ds410m), product #: HSD41002

    1 x JX HV2060MG Digital servo (refer to https://hobbyking.com/en_us/jx-pdi-hv2060mg-metal-gear-high-torque-xtra-large-digital-power-servo-62kg-0-13sec-200g.html?___store=en_us)

    I took onboard what you suggested twm47099 with both servos using the following code:

    #include "simpletools.h" // Include simpletools header
    #include "servo.h" // Include servo header

    int main() // main function
    {
    servo_angle(16, 0); // P16 servo to 0 degrees
    pause(3000); // ...for 3 seconds
    servo_angle(16, 100); // P16 servo to 10 degrees
    pause(3000); // ...for 3 seconds
    servo_angle(16, 1700); // P16 servo to 170 degrees
    pause(3000); // ...for 3 seconds
    servo_stop(); // Stop servo process
    }

    Results:

    Align Digital Servo DS410M (initially manually placed at approx in middle of potential travel ie. it could have the potential to rotated either + 90 deg or - 90 deg if energised) just rotated to 90 deg and did no further rotations.

    JX HV2060MG Digital servo rather oddly rotated to 0 deg, 90 deg, 0 deg, 90 deg.

    I then also tested with the following code just to see what else both servos would do:

    #include "simpletools.h" // Include simpletools header
    #include "servo.h" // Include servo header

    int main() // main function
    {
    servo_angle(16, 0); // P16 servo to 0 degrees
    pause(3000); // ...for 3 seconds
    servo_angle(16, 300); // P16 servo to 30 degrees
    pause(3000); // ...for 3 seconds
    servo_angle(16, 600); // P16 servo to 60 degrees
    pause(3000); // ...for 3 seconds
    servo_stop(); // Stop servo process
    }

    Results:

    Align Digital Servo DS410M just rotated to 90 deg and did no further rotations.

    JX HV2060MG Digital servo horn again rather oddly rotated in the following fashion to 0 deg, 90 deg, 0 deg, 90 deg.

    ie.



  • 1. Check that the jumper next to pin 16 is set to Vin and not 5V.

    2. Also I took a look at the servos you linked and from what I can gather it looks like they're continuous rotations servos, but you are using code for a standard servo.

    Try running code for a continuous rotation servo and to see if helps https://www.parallax.com/downloads/continuous-rotation-servo-propeller-code

    Miguel Rodriguez
    Parallax Tech Support
  • Thank you for your comment Miguel.

    1. The jumper next to pin 16 was set to Vin for the JX servo and 5V regulated for the Align DS410M servo when testing. I assume you damage servos if you supply a higher voltage than what is rated in the specs. My voltage supply (Vin) is still 6.8V, Align DS410M is rated for 4.8-6V and JX servo is 6-7.4V (just reading the tech specs).

    2. I can confirm both servos I selected are standard servos (I rotated the horn manually and reached the mechanical stops).

  • Great catch Miguel..
  • Any other ideas anyone?
Sign In or Register to comment.