BOE-Balancer Program

13»

Comments

  • JasonDorie wrote: »
    This is the LSM9DS1 on the Elev8 flight controller. I've had similar results with an ITG3200 in the past.

    Thanks. I was thinking really hard about whether or not I should spring for the LSM9DS1... I guess I should have :). I'll move forward with the L3G though and see where it gets me in terms of real-world stability. The upgrade to the LSM9DS1 shouldn't be hard in the future if I decide it's not good enough. Thank you for all your help!
    David
    PropWare: C++ HAL (Hardware Abstraction Layer) for PropGCC; Robust build system using CMake; Integrated Simple Library, libpropeller, and libPropelleruino (Arduino port); Instructions for Eclipse and JetBrain's CLion; Example projects; Doxygen documentation
  • JasonDorieJasonDorie Posts: 1,918
    edited August 4 Vote Up0Vote Down
    I used an ITG3200 on a quad *without* an accelerometer or any auto-leveling and it was freakishly stable.
    Watch around the 40 second mark:


    That's just integer integration, and stabilizing each of the three axis independently, like having a heading-hold gyro on each axis.

    Remember that you're integrating these values, so noise is fine as long as it's relatively low and not biased in a particular direction. Your orientation estimate will look more like a moving average of your numbers. I suspect it'll be fine.
  • JasonDorie wrote: »
    Remember that you're integrating these values, so noise is fine as long as it's relatively low and not biased in a particular direction. Your orientation estimate will look more like a moving average of your numbers. I suspect it'll be fine.

    Oh that's a very interesting point I hadn't thought of. The accelerometer is more important to be filtered/averaged (though at only 2% weight, maybe not?) but the gyro is inherently a rolling average filter.... so perhaps running a higher sampling rate (such as the 250Hz you're using) rather 100 Hz + averaging would be better.
    David
    PropWare: C++ HAL (Hardware Abstraction Layer) for PropGCC; Robust build system using CMake; Integrated Simple Library, libpropeller, and libPropelleruino (Arduino port); Instructions for Eclipse and JetBrain's CLion; Example projects; Doxygen documentation
  • JasonDorieJasonDorie Posts: 1,918
    edited August 4 Vote Up0Vote Down
    The quad in the video above had a PASM loop running at 2KHz, accumulated samples at that rate, divided by 8, and passed the result to the main integration loop running at 250hz. Then I just made the sampling loop run at 250hz and don't think I could tell the difference. :)

    The accelerometer is an interesting one - I use a median filter to remove spikes from the samples, but the complimentary filter handles the averaging. I adjust the weight of the accelerometer vector based on how long it is, too. If it's one G it gets filtered in at 1/512 per iteration. If it's longer or shorter than one G, the fraction is even smaller. That means that if it gets bumped, the accelerometer vector doesn't contribute to the orientation estimate for a couple updates, which helps keep the accuracy up. I also start the weighting at 1/64, and switch it to 1/512 after a second or two. That means that on startup (when it's at rest), the accelerometer pulls the IMU into the correct orientation really quickly, but then the gyro takes over after that.
  • Do you update the motor speeds at 250Hz, or only your angle? I was planning to do motor speed updates and angle sampling at the same rate, and figured any faster than 100 Hz was unnecessary due to mechanical limitations.... but perhaps they should be running out-of-sync. 100 Hz motor refresh but 250 Hz sampling rate.
    David
    PropWare: C++ HAL (Hardware Abstraction Layer) for PropGCC; Robust build system using CMake; Integrated Simple Library, libpropeller, and libPropelleruino (Arduino port); Instructions for Eclipse and JetBrain's CLion; Example projects; Doxygen documentation
  • I update the motors on my quad at 400Hz. On the balancer it was probably only 250. Probably excessive, but being too fast isn't really hurting anything. For a quad, I want the latency low, because small quads can be freakishly agile.
  • Wow, you guys have been busy while I was gone! Now that Robothon is done I am free to go back to working on my BOE-Balancer.
    One big change though, it now has the new Feedback 360s servo on it.
    1340 x 1011 - 461K
    Carol Lynn Hazlett
    carolhaz391@gmail.com

    In the birthing of any machine there is that moment when it actually works. It is always fresh and astounding for me...............Red Whittaker

  • Welcome back! Your bot is looking good, for sure. I had to put mine on hold, despite being very close. The day after I got back from initial testing, my wife and I decided to up and move from Omaha to St. Louis and change jobs. Needless to say, August and September were crazy months, and October will be to.
    David
    PropWare: C++ HAL (Hardware Abstraction Layer) for PropGCC; Robust build system using CMake; Integrated Simple Library, libpropeller, and libPropelleruino (Arduino port); Instructions for Eclipse and JetBrain's CLion; Example projects; Doxygen documentation
Sign In or Register to comment.