Appropriate UAV Autopilot for Dual-Deployment, Air starts, telemetry and guidance

Discussion in 'High Power Rocketry (HPR)' started by Serac, Oct 28, 2019.

Help Support The Rocketry Forum by donating:

  1. Oct 28, 2019 #1

    Serac

    Serac

    Serac

    Well-Known Member

    Joined:
    Aug 6, 2019
    Messages:
    47
    Likes Received:
    11
    Location:
    Tucson, Arizona
    Hi all,

    After getting my L-1 last weekend (yay!), I’m already thinking about future builds and flights. I naturally start combining my other interests, one of which is FPV radio controlled the radio planes.

    The ArduPilot open source code base is easily adapted for custom purposes. I see no reason why it could not be used to fire a squib, record position and velocity, transmit telemetry, and even guide the rocket.

    That last bit about guiding is not trivial, and is my intent. But, that is for another thread. And honestly, I am not too concerned about that part because I do that professionally.

    However, adapting an autopilot for data collection purposes and dual deployment should be very straightforward. The latest versions of ArduPilot (that do not run on Arduino) utilize full strapdown IMU GPS aided navigation.

    Things possible:
    1. Record data for download
    2. Transmit telemetry over HAM or non-HAM frequencies and/or provide landing GPS coordinates.
    3. Use the AUX ports to fire a squib for dual deployment.

    All these possibilities exist in high power rocketry already. But, each of these systems is fairly expensive. And not one does all. A board capable of running ArduPilot costs less than $50.

    Has anyone done this or investigated this? There is an old ArduRocket branch of ArduPilot. But, it seems to have generated little interest.

    Thoughts?
     
  2. Oct 28, 2019 #2

    mikec

    mikec

    mikec

    Well-Known Member

    Joined:
    May 9, 2009
    Messages:
    2,219
    Likes Received:
    202
    AFAIK the Ardupilot code base is not suitable for rockets, at least the gyro stuff uses the gravity vector to calibrate itself continuously and all of that would have to be disabled.

    I've found it easier to start from scratch myself. YMMV.
     
    Serac likes this.
  3. Oct 28, 2019 #3

    Serac

    Serac

    Serac

    Well-Known Member

    Joined:
    Aug 6, 2019
    Messages:
    47
    Likes Received:
    11
    Location:
    Tucson, Arizona
    Agreed that the gravity initialization would need to be relooked. And, much of the code could be simply removed.

    However, the executive, navigation filters, GPS interface, and such could stay much untouched.

    So, have you done something like this before? If so, I’d love to hear more.
     
  4. Oct 28, 2019 #4

    mikec

    mikec

    mikec

    Well-Known Member

    Joined:
    May 9, 2009
    Messages:
    2,219
    Likes Received:
    202
    Many people have done IMU, GPS tracking, telemetry, etc. A few (Jim Jarvis, mainly) have done active stabilization. AFAIK nobody has used the Ardupilot code base. When I did my IMU I started with the Sparkfun Razor code from https://github.com/sparkfun/9DOF_Razor_IMU and interfaced it to a GPS and an XBee for downlink.
     
    Serac likes this.
  5. Oct 28, 2019 #5

    Nytrunner

    Nytrunner

    Nytrunner

    Master of Rivets

    Joined:
    Oct 15, 2016
    Messages:
    5,920
    Likes Received:
    1,518
    Gender:
    Male
    Location:
    Huntsville AL
    As far as "guiding", what is your intended goal? Active stabilization to maintain vertical ascent? Guided flight path?
     
    Serac likes this.
  6. Oct 28, 2019 #6

    Serac

    Serac

    Serac

    Well-Known Member

    Joined:
    Aug 6, 2019
    Messages:
    47
    Likes Received:
    11
    Location:
    Tucson, Arizona
    Very interesting. Thanks for the link. I'm still in the "literature review" phase, and this is great info.
     
  7. Oct 28, 2019 #7

    Serac

    Serac

    Serac

    Well-Known Member

    Joined:
    Aug 6, 2019
    Messages:
    47
    Likes Received:
    11
    Location:
    Tucson, Arizona
    Active stabilization for starters. Probably in a phased approach: roll rate stabilization first, and then full attitude position and rate stabilization later. Any guided flight path would require the above. Conservative tuning of PID feedback on attitude and attitude rate would probably be sufficient. I don't happen to have a wind tunnel in my back yard, so any solution would have to be simple and not aggressive.

    A perfectly vertical ascent is only optimal for zero wind. The bigger goal would be for a wind-corrected trajectory (within limits) to minimize horizontal downrange drift. But, since most of the drift occurs during descent, and wind is difficult to predict, it may be a lost cause. All of this would be for maximizing safety and stability and minimizing the chances of losing the rocket.

    I'm not looking to add "guidance" per se. If I do anything beyond vertical guidance or GPS only navigation, it probably won't get posted here. I have no intention of bumping into any ITAR restrictions.
     
  8. Oct 28, 2019 #8

    Serac

    Serac

    Serac

    Well-Known Member

    Joined:
    Aug 6, 2019
    Messages:
    47
    Likes Received:
    11
    Location:
    Tucson, Arizona
    Ah, I thought the Git link was for your code base. Do you have specifics on what you did? You sent GPS position and IMU measurements via XBee for telemetry? Did you fuze the IMU and GPS into a navigation solution?

    After I replied the first time, I remember seeing active stabilization (by Jim Jarvis, maybe?) using the EagleTree RC stabilization controller (not the EagleTree Vector - something simpler). If this worked, then I would think that the open-source ArudoPilot codebase could be adapted to work - and do a lot more besides stabilization.
     
  9. Oct 28, 2019 #9

    mikec

    mikec

    mikec

    Well-Known Member

    Joined:
    May 9, 2009
    Messages:
    2,219
    Likes Received:
    202
    No, yes, and no. :) My code is just a hack on the Razor code to send the GPS, orientation, and accel/velocity/altitude data down to the ground in real time.

    I think you should read all of Jim's messages about what he's done. I think it's fair to say that this has proven to be a very challenging task and complete solutions have yet to be demonstrated. One issue is that the affordable commercial GPS and IMU solutions are not intended for rocketry and may not be suitable under such challenging conditions.
     
    Evilash and Serac like this.
  10. Oct 28, 2019 #10

    JimJarvis50

    JimJarvis50

    JimJarvis50

    Well-Known Member

    Joined:
    Jan 18, 2009
    Messages:
    2,316
    Likes Received:
    487
    I initially looked at using the Eagle Tree Guardian, but I never flew a rocket with it. Eagle Tree didn't want to have anything to do with rockets. They did confirm that gravity will update the gyros (not good for rockets), but they would not comment on the rate at which this correction occurs. Fortunately, I found a better but not perfect alternative.

    Jim
     
  11. Oct 29, 2019 #11

    OverTheTop

    OverTheTop

    OverTheTop

    Well-Known Member

    Joined:
    Jul 10, 2007
    Messages:
    3,243
    Likes Received:
    736
    Gender:
    Male
    Location:
    Melbourne Australia
    I have flown a Vertical Trajectory System using a commercial RC autopilot. Stabilised nicely to a vector.
    Https://forum.ausrocketry.com/viewtopic.php?f=56&t=5324

    OnWallOnHold.jpg

    Due to the differences between rocketry and aircraft the next step will be to hack something like Cleanflight for a more tailored solution. I will also be attempting to scale it, hopefully, to a 38mm airframe.
     
    saadzmirza and dhbarr like this.
  12. Oct 29, 2019 #12

    Chad

    Chad

    Chad

    Well-Known Member

    Joined:
    Jul 23, 2018
    Messages:
    217
    Likes Received:
    72
    Gender:
    Male
    Location:
    Dallas
    i've wanted to do something like this but with drone flight controller boards. Basically, the concept for holding a drone in hover is the same thing you'd want to do with a rocket (no roll, pitch, or yaw). However, the acceleration in a rocket is pretty extreme compared to a drone. Typical accelerometers on drone flight controllers are going to be pegged prior to burnout. Then, after burnout, they're going to be very confused.

    take a look at flightsketch, their boards and software are open source and can give you a place to get started
    https://github.com/flightsketch
    https://flightsketch.com/about/

    Also, these guys have systems about as feature complete and advanced as I've seen. I would contact them and see what they think of your ideas
    https://altusmetrum.org/
     
    Serac likes this.
  13. Oct 30, 2019 #13

    Serac

    Serac

    Serac

    Well-Known Member

    Joined:
    Aug 6, 2019
    Messages:
    47
    Likes Received:
    11
    Location:
    Tucson, Arizona
    Jim, I'm flattered you joined the thread. I'm busy re-reading your epic "I could use just a little guidance" thread. Fascinating stuff!
     
  14. Oct 30, 2019 #14

    Serac

    Serac

    Serac

    Well-Known Member

    Joined:
    Aug 6, 2019
    Messages:
    47
    Likes Received:
    11
    Location:
    Tucson, Arizona

    Extremely interesting! It looks like you are down the path I am considering. Keep us updated!

    Agreed on the CleanFlight tailoring. CleanFlight (or one of its many siblings) or ArduPilot could be adapted. As others have said, adjustments would have to be made, but I think it could be a good start.
     
  15. Nov 3, 2019 #15

    gtg738w

    gtg738w

    gtg738w

    FlightSketch - flightsketch.com TRF Sponsor

    Joined:
    Dec 27, 2018
    Messages:
    200
    Likes Received:
    133
    Gender:
    Male
    If anyone is serious about contributing to an open source platform, please don't hesitate to contact me. Active controls are not currently on our list but I would be interested in making some compatible hardware. I'm also considering porting our firmware to the Arduino Nano Sense for a more hacker friendly platform - https://store.arduino.cc/usa/nano-33-ble-sense

    -Russ
     
  16. Nov 3, 2019 #16

    Serac

    Serac

    Serac

    Well-Known Member

    Joined:
    Aug 6, 2019
    Messages:
    47
    Likes Received:
    11
    Location:
    Tucson, Arizona
    Ah, yes. Good old acceleration saturation. Any acceleration saturated and not correctly passed to the navigation will be navigation error that cannot be corrected out. So it goes.

    This is ok for guidance. Because my intent is only active stabilization, acceleration saturation is ok because I am depending on the gyro. If I was not passing zero commanded acceleration in the outer loop of the autopilot, then acceleration saturation would be an issue. But, I’m not trying to hit anything a la missile guidance - just go up!

    Very interesting. I hadn’t seen them. Thanks.

    I had noticed Altus Metrum’s stuff. It looks really nice. It looks well thought out and well spec’d. It also costs about what it should. [emoji6] I‘m trying to go cheaper.
     
    Nytrunner likes this.
  17. Nov 3, 2019 #17

    Serac

    Serac

    Serac

    Well-Known Member

    Joined:
    Aug 6, 2019
    Messages:
    47
    Likes Received:
    11
    Location:
    Tucson, Arizona
    Do you have an ETA for your boards?
     
  18. Nov 6, 2019 #18

    Chad

    Chad

    Chad

    Well-Known Member

    Joined:
    Jul 23, 2018
    Messages:
    217
    Likes Received:
    72
    Gender:
    Male
    Location:
    Dallas
    I wanted to reiterate my opinion on drone flight controller boards. They pack a lot of features on a board at a low price point. The open source code bases out there like CleanFlight can get you started but you would probably want to develop a rocket codebase... maybe call it CleanLaunch hah.

    $30 gets you a 32bit CPU, high quality IMU, plenty of PWM outputs, flexible power inputs, a USB interface, bus access, etc in a small 35mm x 35mm package.

    https://www.amazon.com/Upgrade-NAZE...naze32&qid=1573082083&s=toys-and-games&sr=1-4
     
    Serac likes this.
  19. Nov 7, 2019 #19

    OverTheTop

    OverTheTop

    OverTheTop

    Well-Known Member

    Joined:
    Jul 10, 2007
    Messages:
    3,243
    Likes Received:
    736
    Gender:
    Male
    Location:
    Melbourne Australia
    You can even get some of those boards with the F4 processor onboard, for faster processing. They are less common than the F3 variants.
     
    Serac likes this.
  20. Nov 7, 2019 #20

    Serac

    Serac

    Serac

    Well-Known Member

    Joined:
    Aug 6, 2019
    Messages:
    47
    Likes Received:
    11
    Location:
    Tucson, Arizona
    Yes! The boards designed for drone flight controllers offer tremendous value for the money, weight and footprint.

    I like the Omnibus F4. Powerful, cheap, and it runs CleanFlight or ArduPilot.

    On my next rocket build, I am going to send one of these boards up with it powered on, booted up, and tracking GPS. I want to look at the operation of the board and GPS receiver in a high-G environment. This should give me a starting point on modifying the initialization/configuration of the accelerometer and gyros.
     
  21. Nov 7, 2019 #21

    Serac

    Serac

    Serac

    Well-Known Member

    Joined:
    Aug 6, 2019
    Messages:
    47
    Likes Received:
    11
    Location:
    Tucson, Arizona
  22. Nov 7, 2019 #22

    Chad

    Chad

    Chad

    Well-Known Member

    Joined:
    Jul 23, 2018
    Messages:
    217
    Likes Received:
    72
    Gender:
    Male
    Location:
    Dallas
    please keep the forum posted on progress :)

    this would be super useful to a lot of people on the forum. it's like serial-to-SD, send it down the wire and it gets written to disk. very useful for analyzing sensors. I know some boards come with it built in

    https://www.readytoflyquads.com/rtf-blackbox-flight-data-recorder-cleanflight-openlog
     
    Serac likes this.

Share This Page

Group Builder