Wrote myself a flight stability controller for a drone I built - used an ultrasonic sensor for altitude so it should've maintained a constant altitude, but I had the throttle increments too high...
Hooked up the battery - off it fucked, hit the ceiling, bounced off a wall, and broke 2 props before I could grab it and yank the battery off.

Protip - if you're building a drone, tie it to a heavy fucking rock for your first flight test!

  • 1
    Lol, link to git?
  • 2
    You cant get good control with just proportional increments, you need to implement P&ID...the math is actually quite simple, easier if you know laplace domain
  • 4
    Protip: ALWAYS take your props off when you're working on the drone! You never know when the motors might start spinning. Be glad you didn't chop your fingers off.
  • 0
    @endor yeah, this was the first flight test, so having the props attached was a necessity really. Prior to that, all my testing was done with the props off, but it's tough to test automatic altitude control when the thing can't fly
  • 1
    You could try tying between tables with some slack on the string. Lets you test without breaking stuff
  • 0
    @xPunxNotDeadx I am also referring to the order in which you do things.

    The correct order is:
    1) turn on remote, make sure throttle is at 0
    2) attach battery
    3) turn on stuff
    4) if nothing weird has happened on step 3, attach props

    From the way you described it, it sounded like you had the props on *before* attaching the battery, and when you did, stufg went wild. But maybe I have misunderstood :)
  • 0
    @endor ah, yeah. Should've mentioned that there's no remote in this setup - it's 100% automated (or at least it will be when I've finished)
    There's a Pi on board that will handle GPS waypoint navigation, and an arduino that handles the rotor speeds, altitude and stability control. I powered everything on, and all was fine, so I had the pi issue an altitude command. The flight controller jacked up the throttle a little too quickly and off it fucked!
  • 0
Add Comment