3689664836?profile=originalIn my previous post I had built and flown this little 250mm quad with the Flip32 flight controller on board.  I was waiting for the arrival of a tiny level-shifter I'd ordered from Sparkfun, to connect the 1.8v UART on the ODROID U-3 to the 5v UART on the Flip32.  (I also took some time off to attend "Dronefest", a wondeful day-long event organized by a couple of really cool guys Colgate University, where my students and I presented some of our work.)

Looking more closely at the small UART header on the U-3, I realized that it would take more engineering skills than I possessed to build a robust connection to the flight controller.  Fortunately, the latest Ubuntu release for the U-3 (14.04) supports USB OTG on the U-3's micro USB port, and of course the Flip32 has its own USB port that you use to configure it through Baseflight or Cleanflight.  So all that remained was to find a little USB OTG cable to connect the two devices.  This nifty little cable from 3DR, designed to connect an Android device to a 3DR radio, was just the ticket. (And it'll even let you connect the ODROID U-3's micro USB OTG to a Pixhawk, if you used one of these ingenious little USB/UART adapters!)

To power the U-3, I soldered some female jumpers onto a DC plug sold specifically for it:

3689664982?profile=original

With all the electronic components in hand, it was time to design a plate to support the U-3 on top of the Flip32.  With some help from TinkerCAD, I modified the plate I'd printed in Part I to hold the U-3:

3689665037?profile=original

Here's the vehicle with the plate on it, plus some 20mm M3 nylon hex standoffs from McMasterr-Carr, ready to mount the ODROID:

3689665063?profile=original

Here's the ODROID mounted on the vehicle:

3689665088?profile=original

Another tiny socket-wrench head from Lowes was just right for deez nuts!

3689665114?profile=original

Here's a closeup of the power and USB connections:

3689665162?profile=original

So now it was time to program the ODROID to show a simple proof-of-concept that it could fly the vehicle autonomously. A network cable plus SSH from my Ubuntu laptop (use PuTTY on Windows) made it easy to interactively adapt an example Python program from our MSPPG examples to do something really simple, like pitching the vehicle forward when the channel 5 switch was down.  Remember, the ODROID is a complete computer on a single board!

3689665213?profile=original

Once everything was ready I flew the vehicle and found that it had a weird response in when I flipped the autopilot switch: instead of pitching forward as expected, it pitched and rolled back -- right into my *&^in' arm!

3689665141?profile=original

THIS is why I prefer to experiment with the smallest vehicle possible: imagine what the 9" prop on a mid-sized bird would have done!  

After nearly giving up for the evening, I figured I'd try a flight without the ODROID connected to the Flip32. Sure enough, same behavior -- flip the switch, vehicle lurches.  Again, bad things happen when you aren't thorough: in this case, I'd only configured the Flip32 for horizontal (stable) flight in the topmost switch position, the default being rate mode.  So the configuration of the flight controller was masking the RC-demand messages from the ODROID.  Here's the right way to confgiure it in Baseflight:

3689665188?profile=original

After configuring the modes properly, it flew as expected: flip the switch, it pitches forward; flip it off, regain ordinary transmitter control. Fortunately, the furniture had been removed from "Dronehenge" for floor waxing, so I had a big space in which to fly. Unfortunately, I didn't have any help this time, so you have to take my word for it: when you see the vehicle lurch forward suddenly in this video, it's because I've hit the autopilot switch.  

So, the good news is, the whole crazy thing worked as expected, and you can have the basis for a sophisticated autonomous flight system, using Python, for under $400 ($281 from previous post, $75 for the ODROID U-3, plus a few bucks for cables and fasteners).  

The bad news is, ODROID has discontinued the amazing little U-3 board -- without a doubt the most advanced combination of mini form factor, super processing power, and low price I've ever seen.  So I've switched to working with the Raspberry Pi 2. Although slower (900 MHz) than the U-3 (1.7GHz), the Pi 2 has (1) a similar ARM Cortex quad-core processor to the U-3, supporting parallelization of crucial algorithms like optical flow;  (2) an inexpensive camera module that connects directly to the Pi using the Camera Serial Interface (CSI) protocol cable, instead of bulky USB; (3) a 3.3v UART that may be able to talk directly to the Flip32 and Pixhawk UARTs without an adapter.  In a future post I will report on my experiments using the Raspberry Pi 2 for this sort of work.

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • oh, I forgot, link to my library that achieves those crazy speeds:

    https://github.com/alduxvm/pyMultiWii

    alduxvm/pyMultiWii
    MultiWii Serial Protocol (MSP) API to send and receive data from firmware using MSP - alduxvm/pyMultiWii
  • Join the rpi 2 community... I love it, works great under any condition and its great for computer vision to get you started, some examples of the raspberry pi 2 flying vehicles, either multiwii (test my library, it achieve 300 hz of communication using and odroid) and pixhawks:

    https://www.youtube.com/watch?v=TkYeQ6orN8Y

    https://www.youtube.com/watch?v=XyyfGp-IomE

    and doing computer vision with a raspberry pi 2 and a pixhawk:

    https://www.youtube.com/watch?v=xlQw_mnJtNQ

    and the odroid doing crazy high rates with the naze32: https://www.youtube.com/watch?v=u-XpUyepii0

    give it a go ;)

  • MR60

    +1 for Odroid XU4. Only problem is finding reseller with reasonable price and stock in Europe.

  • Jack are you sure? The xu3 offered HMP though not with the 4.0 kernel with 3.10 that allow it use both big and little cores. Same for the odroid xu4 as it is the same hardware.

  • @Jack only four cores at a time -- disappointing!  They advertise it as an "octo-core", and I was psyched to try to code up some factor-of-eight parallelism on it using NEON.  A 2GHz processor is still pretty appealing, though.

  • Too bad the XU4 can only operate 4 cores at a time & people just aren't willing to spend that much extra money for a minor improvement over the pi 2.0.  At least this was the farthest anyone ever got with an odroid. 

  • The XU4 is a very interesting architecture, basically 2 quad core CPUs running right next to each other.

    Seems like should make some interesting functional separation possible on board say SLAM - Flight Controller.

    Also, seems like the RPI2 should be almost the same as the U3 just slower by the reduced clock rate.

    It also seems like the v2 NEON in the XU4 might be faster than the original NEON in the U3.

  • Sorry, I meant "drives down PRICE!"

  • @Gary -- thanks!  If you want onboard SLAM, the U-3 is the way to go.  I wrote  a little Python / C++ SLAM library that exploits the quad-core on the U-3.  The chart below shows some comparisons running it on various single-board computers, using a Hokuyo URG04LX lidar unit (delivery speed shown as red line). Note that the RPi is first-generation; the RPi2 would be much faster:

    3702084290?profile=original

    @Alex I also have a BBB.  As I see it, these three single-board platforms (ODROID, RPi, BB) are in an arms race (or "ARMs race!"), which drives up processing power and drives down speed -- a big win for our community.

  • I personally do not see the pi2  as having more capability than the beaglebone black. the 2 pru's alone make it better to me. I love flying with my beaglebone black. I use mirkos cape with my beaglebone as well.

This reply was deleted.