Close
0%
0%

dRehmFlight VTOL

Teensy Flight Controller and Stabilization

Similar projects worth following
dRehmFlight VTOL is a simple, bare-bones flight controller intended for all types of vertical takeoff and landing (VTOL) vehicles from simple multirotors to more complex transitioning vehicles. dRehmFlight was created with those of us in mind who may not be proficient at coding, but want to get an advanced VTOL platform requiring custom mixing in the air relatively quickly. The goal is to have an easy to understand flow of discrete operations that allows anyone with basic knowledge of coding in C/Arduino to peer into the code, make the changes they need for their specific application, and quickly have something flying. The Teensy 4.0 board used for dRehmFlight is an extremely powerful microcontroller that allows for understandable code to run at very high speeds: perfect for a hobby-level flight controller. Download the complete code and documentation here: https://github.com/nickrehm/dRehmFligh

  • Code modifications and compiling done within the Arduino IDE with Teensyduino add-on.
  • Default code supports 6 ESC outputs using OneShot125 Protocol, and 7 conventional PWM outputs for ESCs or servos, with the ability to modify the code for extra outputs for custom setups.
  • Support for conventional PWM, PPM, or SBUS receivers.
  • MPU6050 and MPY9250 IMUs supported.
  • Easy to use control mixer with stabilized axis variables and ability to pass direct, unstabilized commands to the motors or servos direct from the transmitter.
  • Three PID controller types including rate and angle-based setpoint.
  • Simple variable fading, with support for more advanced options planned in the future.
  • Default hardware setup (Teensy 4.0 and MPU6050 IMU) costs less than $30 and weighs less than 15 grams.
  • Comprehensive documentation with explanation of every function and variable, as well as tutorials for setting up the hardware and modifying the code for your application.

Feature Requests and/or Planned Updates:

  • More fading options
  • Many more!

dRehmFlight VTOL Documentation.pdf

Tutorials, How-To's, and general overview of the code

Adobe Portable Document Format - 10.17 MB - 10/10/2020 at 23:56

Preview
Download

View all 7 components

  • Test Platform + Data Logging

    Nick Rehma day ago 0 comments

    Hi all,

    I've been very busy lately, but have managed to get a test quadcopter thrown together to test new features and improve the code:

    I am using the SparkFun OpenLog to print data to a spare serial pin on the Teensy, which is then dumped into an SD card as a .txt file onboard. Super simple!

    Here is some sample data showing the control response. Overall, I am very happy, but this data is already giving me ideas on how to squeeze out even more performance!

  • Radio Connection Tutorial Video

    Nick Rehm10/12/2020 at 15:47 0 comments

    Here is the next tutorial in my series for dRehmFlight VTOL: Setting up your radio connection. dRehmFlight VTOL currently supports PWM, PPM, and SBUS type receivers of any brand. My goal with these videos is to provide a resource that I wish I had when first starting off. Let me know if this helps you in any way!

  • Beta 1.2 Released!

    Nick Rehm10/01/2020 at 13:56 0 comments

    Hey Everyone,


    I've been working hard on getting 1.2 put together and documented. I had a few setbacks over the past week or so, but now we're here. Some updates:

    • SBUS receiver support
    • MPU9250 support
    • New IMU/radio selection: simple defines in beginning of code
    • IMU gyro and accelerometer scale selection: up to +/-2000 deg/sec and +/-16 Gs
    • Added switchRollYaw() function (see documentation for details)
    • Added printServoCommands() function
    • Switch between controller types with a logical statement in the main loop
    • Minor bug fixes & tidying up

    https://github.com/nickrehm/dRehmFlight

    I highly recommend you check out the updated documentation. For expedited setup, check out the "General Instructions for First-Time Setup" tutorial at the end of the document to get up and running as fast as possible.

    The MPU9250 integration was difficult to say the least, but I think I finally got it working. The MPU9250 requires some special attention when it comes to soldering up with the Teensy as well as adjusting some filtering parameters for it. You'll also have to do some calibration, but that is as simple as uncommenting a function at the end of the void setup() and performing the calibration by rotating the IMU for a minute or so. Check out the "MPU9250 Integration" tutorial for more information on everything to do with the MPU9250. I will still HIGHLY recommend sticking to the MPU6050, as that is the IMU that this code was originally built around.

    There were some small bugs that were fixed. You can now seamlessly switch between controller types (angle or rate) in the main loop with a logical statement should you code that in. Also fixed an error/bug with processing the IMU data.

    Speaking of the IMU data, I need to thank jihlein on RcGroups for his amazing help overhauling the IMU data gathering (enabling MPU9250 use too). He is responsible for the new define section at the beginning of the code that makes selecting IMU, IMU data scales, and receiver type extremely easy to do. So big thanks to him!
    One thing you will now need to do is copy the required libraries (included in the dRehmFlight download) and paste them in your Arduino libraries folder. More details in the 'Software Setup' section of the documentation.

    Looking forward to seeing some of you get flying!

  • Default Hardware Tutorial Video

    Nick Rehm09/17/2020 at 18:54 0 comments

    Here is the first of (hopefully) many tutorial videos rolling out for dRehmFlight VTOL: Setting up the recommended default hardware. This video will show you how to solder the board together for full i/o capability with the default code.

  • Rcgroups Support Thread

    Nick Rehm09/14/2020 at 20:12 0 comments

    Hi all,

    Here is the Rcgroups forum thread for all things dRehmFlight: https://www.rcgroups.com/forums/showthread.php?3706571-dRehmFlight-VTOL-Teensy-Flight-Controller-and-Stabilization

    Feel free to ask questions here, share your setup, or get more information from other people sharing their experience with dRehmFlight.

  • 9/11/2020 - Beta 1.1 Released!

    Nick Rehm09/11/2020 at 23:28 0 comments

    Today marks the first official release of the dRehmFlight code and complete documentation. I look forward to seeing what you all can do with it with your flying creations!

View all 6 project logs

  • 1
    Download The Docs

    Everything you need to know is included in the dRehmFlight VTOL Documentation.pdf document!

View all instructions

Enjoy this project?

Share

Discussions

Elliot Williams wrote 10/01/2020 at 16:15 point

This is crazy awesome.  And I really like your emphasis on the bare-bonesy code, made for hacking.

Can't wait to get some time to dig into it.

  Are you sure? yes | no

Nick Rehm wrote 10/04/2020 at 18:28 point

Glad you enjoy that aspect. Don't hesitate to reach out once you get started 

  Are you sure? yes | no

Kevin Roach wrote 09/27/2020 at 20:29 point

What jet is that in the pictures? Is there instructions to build one?

  Are you sure? yes | no

Nick Rehm wrote 09/27/2020 at 21:18 point

I'll be releasing plans for the F-35 and the slightly modified flight control code used to make it fly in the future. In the meantime, you can find more information on it here: https://www.rcgroups.com/forums/showthread.php?3580135-Profile-F-35-Tricopter

  Are you sure? yes | no

Ted Grant wrote 09/18/2020 at 19:52 point

Awesome, amazing, wonderful work!!!

  Are you sure? yes | no

Jacob David C Cunningham wrote 09/15/2020 at 04:43 point

wtf I did not know those "spinning wing" designs could do VTOL that's rad

  Are you sure? yes | no

Nick Rehm wrote 09/15/2020 at 12:25 point

Yep cyclos are pretty cool and have some unique advantages over conventional rotors because of the uniform velocity field over the blades

  Are you sure? yes | no

Mike Szczys wrote 09/14/2020 at 21:01 point

Bad news for you Nick... despite your assertion in the video, this project shows you are now "a coding guy".  :-D   I think doing a few tutorial videos as you mention at the end is a great way to help get others up to speed quickly with this, I'm glad you've made it open source!

Nice to see someone taking advantage of the 600 MHz clock speed of that Teensy 4. I wonder if @Paul Stoffregen has seen this project yet?

  Are you sure? yes | no

Nick Rehm wrote 09/15/2020 at 03:14 point

Hahah thanks! My code is definitely 'sloppy' and in many places redundant, but the beauty of the Teensy is that it doesn't matter. Tutorials coming soon!

  Are you sure? yes | no

Dan Maloney wrote 09/14/2020 at 20:24 point

Ambitious project, hats off to you for tackling it. Looking forward to seeing this rolled out into all sorts of interesting aircraft.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates