We use the Odroid U3 to control a quad-rotor (no microcontroller-based flight control, just plain Linux control code). As a Linux distribution on the ODROID we use Gentoo, and of course our quadrotor natively compiles all of its software (kernel, userspace) :D
Please have a look at our first operating prototype:

A more detailed picture with annotations is provided here:

As you can see, on top of the U3 we use the IO shield from ODROID. The U3 io shield is programmed with a simple firmware similar to FirmataC, which:
- parses PPM RC receiver signals and sends them to ttySAC0
- reads pwm outputs from the autopilot via ttySAC0 and generates the PWM signals.


Some additional electronics, including power supply, logic level converters and a I2C IMU (MPU9150 + MS5611) sensor are placed on top of the IO shield. The GPS receiver is connected via USB and we have WiFi and a Webcam connected to USB as well.

The software for controlling the UAV is called PenguPilot. It is freely available via Github here, but the documentation is in an early stage: https://github.com/PenguPilot/PenguPilot


Stay tuned for the next update (in-flight video) and do not hesitate to contact me.

Views: 3163

Tags: Linux, Odroid, PenguPilot, Quad-Rotor, U3

Comment by Tom Pittenger on June 24, 2014 at 8:33am

nice to see Linux running the control loops. Was there anything special you had to do to Gentoo to lower scheduler switching latency to improve PWM accuracy, or does the IO shield handle all that for you?

Comment by Tobias Simon on June 24, 2014 at 8:46am

Hi!.

We do not create PWM output on the odroid directly; that's handled by the io shield. we just send the pwm values via serial port the the io shield. we also could have used a I2C-PWM converter, as we do it on our Raspberry PI copter (that's another story).

The main loop runs at approximately 200Hz. If you need more details about scheduling accuracy, I can provide a histogram of our control loop timings.

Regarding Gentoo... there is not so much to do. We use the standard Odroid Linux Kernel with PREEMPT and set up static scheduling priorities via SCHED_FIFO. However, PREEMPT_RT testing would be interesting as well.

Comment by Tom Pittenger on June 24, 2014 at 8:51am

I've never seen Linux run a thread reliably at 200Hz, that's comforting to know Gentoo will do that.

Comment by Tobias Simon on June 24, 2014 at 8:58am

I'm not sure if this is really Gentoo-specific... It's more about the Kernel configuration and about getting the process priorities right.


Developer
Comment by Kevin Hester on June 24, 2014 at 10:25am

Very nice!

Comment by Tobias Simon on June 24, 2014 at 10:56am

Thanks Kevin!

Comment by Tobias Simon on June 24, 2014 at 11:11am

Here comes the video... https://vimeo.com/99051187
- first, the netbook shows the 4 idle CPU cores
- second, I start the autopilot program; two cores are in use, as shown on the netbook
- third, I fly a bit around... but my flight skills are not that good :(

Comment by Tom Pittenger on June 24, 2014 at 11:15am

Does the video show a VNC link into the quad?

Comment by Tobias Simon on June 24, 2014 at 11:26am

It's a ssh shell via WiFi; so I'm working on the quad's system.

Comment by Tom Pittenger on June 24, 2014 at 11:38am

right. vnc, ssh, whateva. Looks good!

Comment

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

Join DIY Drones

© 2014   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service