Needing do_set_servo command on a Pixhawk rover help

I have a Dimension Engineering "Doubleswitch" R/C relay on my Pixhawk controlled rover. I need to turn this relay on at a waypoint during the rover's mission.

So far I've done the following;
1) Set the BRD_PWM_COUNT to 2.

2) Plug the 3 pin cord from the DE Doubleswitch into location 50.

3) Added a do_set_servo command between two waypoints. Set the Servo number to 50 and the PWM to 1900.

I run the mission, but the relay doesn't activate at all. Did I miss something?

Thanks

Bill

 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hello Bill, were you able to resolve this issue? I have the very same problem.

    I have a Pixhawk with 2 servos connected to pin 50 and 51. Power to the servos is coming from the +/- pins associated with pin 50. I set the following commands in my Mission planner:

    DO_SET_SERVO   50   1900

    CONDITION_DELAY 2

    DO_SET_SERVO    50   1100

    Seems that nothing happens. I'm testing in my office with the props off. I tried putting a waypoint before the first command with a lat/lon of my office with no luck.

    It also seems that the servo rail power is 0.37V which seems REALLY low. I was expecting around 5V. I tested voltage in one of the existing servo slots that is controlling one of the motors on my hex copter (DJI F550). It showed .37V as well. Strange. The copter flies normally if I put the props back on.

    Any help would be appreciated!

    Best regards,

    Chris

    • Hi Chris,

       

      Yes I was able to get the servo part to work after lots of newbie like fiddling. I discovered the SERVO tab on the Mission planner Flight Data screen. There I could manual switch on and off servos # 5 thru 11. Once I figured out the servo I was connected to, I put that number in the "Ser No" column... in my case 9 and 10 (instead of 50 and 51) and of course the 1900 or 1100 under the PWM column. So Yes the pin numbering system is very confusing

      And No I was not able to get any delay stuff to work. That was some time ago and maybe they've fixed that... but as of a few days ago, even the simple waypoint delay still didn't work for me

      Maybe someone familiar with all the delay stuff will bring us up to date.

      Best,

      (Robo) Bill

    • For anyone that is really good at multiple DO_SET_SERVO commands, and delays between those commands without moving to a new WAYPOINT in between, please read the BACKGROUND below followed by the QUESTION.

      BACKGROUND

      Thanks Bill, that is funny... I newbed (is that a word?) my way through very similar stuff and figured out that 9 and 10 were the ones that I needed, and also that the servo power rail doesn't come powered at 5V all by itself. The RC servo pins do have 5V which connects to my remote control receiver. Since all 8 channels on the receiver were busy doing remote control stuff, I noticed that the BIND pins on the receiver also have 5V on the +/- pins. I wired the BIND pins back to my Pixhawk on MAIN Servo 7 (I have a hexcopter so 7/8 are free) and that fed 5V back to the servo rail.

      Then I was able to get the servos to move around... kinda...

      You had a question on how to bench test this stuff. What I did was set my WP Radius to 5m and set a WP exactly on my office in my house. So I something like the following:

      WAYPOINT Lat/Lon=myhouse

      DO_SET_SERVO 9 1100

      WAYPOINT Lat/Lon=myhouse

      DO_SET_SERVO 9 1900

      WAYPOINT Lat/Lon=myhouse

      DO_SET_SERVO 9 1100

      This was an attempt to get the servo to cycle a couple of times... I had some luck getting it to move a few times, but it wasn't very consistent.

      QUESTION

      Here is what I really want to do with some pseudo code (go to a waypoint, hold in place while making multiple manipulations of two different servos on pins 9/10).

      WAYPOINT Lat/Lon=Interesting place #1

      DO_SET_SERVO 9 1100

      Delay about 2 seconds

      DO_SET_SERVO 9 1900

      Delay about 1 second

      DO_SET_SERVO 10 1100

      Delay about 2 seconds

      DO_SET_SERVO 10 1900

      Delay about 1 second

      WAYPOINT Lat/Lon=Interesting place #2

      DO_SET_SERVO 9 1100

      Delay about 2 seconds

      DO_SET_SERVO 9 1900

      Delay about 1 second

      DO_SET_SERVO 10 1100

      Delay about 2 seconds

      DO_SET_SERVO 10 1900

      Delay about 1 second

      and so on for about 22 interesting waypoints.

      Bill thanks again for your comments! If anyone else has insight in to this, I'm all ears!

      Best regards,

      Chris

    • WARNING! Maximum waypoints is 127. Any more and you will have to completely reset and recalibrate your PIXHAWK. Learned that twice the hard way. How do I formally request more waypoints to the development team?

      I'm getting closer. However, on power up the 2 servos are defaulting to the wrong position. I don't have an option to reposition the servos to get them to reverse.

      No amount of fiddling with the following parameters seems to make a difference.

      RC9_REV (forward or reverse)

      RC9_TRIM

      RC9_MAX

      RC9_MIN

      I've played around with these parameters and they don't seem to have any effect on PIN 50.

    • Hi Chris

      I too am concerned about the 127 waypoint limit. I did find several discussions regarding this topic... likehttp://ardupilot.com/forum/viewtopic.php?f=21&t=6530&p=2023...

      Again... hopefully someone will jump in and give us the latest scoop.

      RoboBill

  • While I'm able to manually operate the servos from the Servo Tab on the flight data screen, I still can't get them to operate during a mission.....

    Here is my tiny log

    Failsafe ended
    ArduRover v2.45 (6b5d27ef)
    PX4: 7f1aa4fd NuttX: ed45e813
    PX4v2 26003800 18473235 32303436
    command received:
    command received:
    Non-Nav command ID updated to #255
    flight plan received
    Non-Nav command ID updated to #255
    Reached Waypoint #1 dist 1m
    Executing command ID #183
    Non-Nav command ID updated to #255
    Reached Waypoint #3 dist 1m
    Non-Nav command ID updated to #255

    ANY suggestion would be appreciated 

This reply was deleted.