Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: Teensy Flight Controller

  1. #1
    Senior Member onehorse's Avatar
    Join Date
    Apr 2014
    Location
    Danville, California
    Posts
    920

    Teensy Flight Controller

    I just though I would show off my latest creation. It is designed to be a Teensy (K20)-based motor controller specifically for UAVs. Here is the "bottom":

    Click image for larger version. 

Name:	TeensyFlightControllerTop1.jpg 
Views:	252 
Size:	126.7 KB 
ID:	6328

    and this is the "top":

    Click image for larger version. 

Name:	TeensyFlightControllerBottom1.jpg 
Views:	120 
Size:	125.0 KB 
ID:	6329

    The Teensy is on the bottom along with a 5 V boost converter to provide 5 V for the R/C radio and a 3.3 V LDO to provide power to the rest of the board. In use the board will be powered by a single-cell LiPo battery. The diodes, 5 V boost converter and LDO are all sized to provide a maximum of 450 mA of current even though the draw is likely to be much less than 50 mA at all times.

    The top of the board has an rgb led, an EM7180 sensor hub as master to a slave MPU9250 IMU and a slave BMP280 altimeter, and brushed DC motor drive circuitry.

    The board has I2C, SPI, UART and 5 PWM pins broken out. The ports are useful for diagnostics and to add additional sensors or radios, and the PWMs for the R/C radio and to drive brushless motors without a design change.

    In fact, the board is surprisingly general purpose since the motor driver and inertial navigation functions as well as the available ports for expansion allow it to serve a variety of applications. I am trying to get my son interested in using the board as a replacement for his Sparkfun RedBot controller, for example.

    A previous version of this board was successfully flown in a quadcopter, and I expect to fly this one soon too.

    I have no plans to make this available for sale at Tindie, but the design is posted on the share space at OSH Park for anyone to use as they will.

    I made similar flight controllers based on the nRF51822 and ESP8266. The latter seems the most promising for a small, inexpensive UAV control board with embedded connectivity.

    I really should thank Phil Schuster, whose design I started with and heavily modified. Some aspects of his design survived in the "final" product.

    Also thanks to Constantine for providing the bootloader footprints, even though I misused them at first.

    And thanks to Paul for making the schematics available and for creating the Teensy all in the first place.

    Despite the tremendous help I received by these people and others on this forum, any mistakes in the above design are mine; if you find some please tell me.
    Last edited by onehorse; 02-10-2016 at 05:38 PM.

  2. #2
    Awesome job.

    Did you design in Eagle?

  3. #3
    Senior Member
    Join Date
    Nov 2015
    Location
    Wales
    Posts
    579
    Are you using the standard quaternion based Kalman filter approach for position prediction?

  4. #4
    Senior Member onehorse's Avatar
    Join Date
    Apr 2014
    Location
    Danville, California
    Posts
    920
    Yes, there is an Eagle design package available here.

    I am using the sensor fusion developed by PNI Corp and programmed into the 10 MHz FPU ARC processor that is embedded in the EM7180 sensor hub (motion co-processor). It uses an EKF as well as a variety of sophisticated filtering to provide 2-degree heading accuracy (using the MPU9250 as data source) even in the presence of strong magnetic fields like encountered in the presence of brushed DC motors on a small UAV controller board.

    You can buy a breakout board with this sensor fusion solution here if you want to test it yourself.

    We don't predict position per se, we use absolute orientation and scaled linear acceleration and derived velocity for motion control.

  5. #5
    Junior Member
    Join Date
    Oct 2015
    Posts
    13
    Very neat! I've actually used some of your information on the BNO-055 to build my own little flight controller... except mine's for rockets!
    Unfortunately I got lazy and screwed up the BNO-055 footprint and couldn't get the GPS off the old board. Expensive little mistake. I have the new boards right next to me, but school first projects after

    https://imgur.com/a/HSw6Q

  6. #6
    Senior Member onehorse's Avatar
    Join Date
    Apr 2014
    Location
    Danville, California
    Posts
    920
    The little mistake might be a blessing in disguise. The BNO055 can't do this.

  7. #7
    Junior Member
    Join Date
    Oct 2015
    Posts
    13
    I'll have to read it when I get home. I've read through most of Kris' stuff (are you he?) But I haven't seen that post. I'm not worried about EMI on a rocket, handily enough. I did look into the EM7180 but at the time Kris didn't have anything for me to use as a design guide

  8. #8
    Senior Member onehorse's Avatar
    Join Date
    Apr 2014
    Location
    Danville, California
    Posts
    920
    I notice you have vias under the BNO055 package; not the best practice for MEMS sensors...

    The EM7180+MPU9250 solution can achieve sub-2-degree heading accuracy from power on using the warm start functionality. The design is open source and posted at OSH Park (or see above post for link to the flight controller with the same circuit).

  9. #9
    Junior Member
    Join Date
    Oct 2015
    Posts
    13
    I see what you're saying now. I thought you meant your flight computer was good for 2DOF (pitch/roll), not 2 degree accuracy lol. And yeah, I just got lazy with the vias. The 9DOF sensor and servo outputs are actually the least important part of the whole board - the GPS, 200g accelerometer, barometric pressure sensor, and high current outputs are the important parts. Unfortunately the previous boards ALSO had the TX/RX lines on the GPS mixed up. Amateur mistake

    Sounds like your solution would be a lot better in the long run. I'll definitely read up on it, thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •