ODROID + Flip32 Mini Quadcopter, Part II: Mounting and Flying the ODROID

In 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:

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:

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

Here's the ODROID mounted on the vehicle:

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

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

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!

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!

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:

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.

Views: 3618

Comment by Bim on September 1, 2015 at 3:15am

Ouch, that looks painful..

May I ask how did you control the FCU with the ODROID? Did you send 'RC override' messages?

By the way, Hard Kernel are selling the ODROID XU4, which is a bit bigger than the Raspberry Pi but much more powerful.

Comment by Alex Wright on September 1, 2015 at 6:21am
What bim said. Odroid xu4. I'm trying to get it going with raspilot and the level shifter kit. I also have the u3.
Comment by Simon D. Levy on September 1, 2015 at 11:21am

@Bim -- yeah, I sent MSP_SET_RAW_RC (#200) messages from the ODROID to the Flip32.  Our MSPPG library (for Python, Java, C++) automates the parsing and generation of the messages, so you can focus on the algorithm.

@Bim @Alex -- yeah, ODROID XU4 for the win!  Probably too big for the little 250 quad, but definitely gonna get one for the bigger birds.  Not sure how easy it is to exploit the octo-core using ARM NEON instructions, but worth a shot for the raw clock speed in any case.  I'm interested in the RPi 2 for the low price, camera, and form factor.  I think I can solder off the USB and RJ45 (ethernet) connectors and 3D-print a slim case to mount it on the bottom of a vehicle for optical flow and the like.

Comment by Gary McCray on September 1, 2015 at 12:07pm

Great results,

Also, definitely looking forward to your experiences with the RPi2.

I will probably use the 2 BBB's I have with Mirkos BBBMini as Pixhawk replacements, but I wanted a more powerful basis for SLAM additions so I got an Odroid U3 but I have not yet used it in a system.

The RPi2 while slightly slower than the U3 has way more capability than the BBB and should be around for a while and RPi has a great following so I will be going that direction too.

Best Regards,

Gary

Comment by Alex Wright on September 1, 2015 at 12:12pm

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.

Comment by Simon D. Levy on September 1, 2015 at 12:30pm

@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:

@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.

Comment by Simon D. Levy on September 1, 2015 at 12:31pm

Sorry, I meant "drives down PRICE!"

Comment by Gary McCray on September 1, 2015 at 2:45pm

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.

Comment by Jack Crossfire on September 1, 2015 at 8:27pm

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. 

Comment by Simon D. Levy on September 2, 2015 at 12:42pm

@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.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2017   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service