Saturday, April 30, 2016

New quadcopter under development (Linux/Neo/OrangePI)



Finally have a new quadcopter design:

estimated cost: $215.00

If you notice, there is no Flight Controller; the last one was a Teensy 3.1 with BaseFlight; well this time it will be Linux as Flight Controller OS with micro-controller decoding PPM/PWM and generating the PWM out for the ESC.

Which board?  Udoo Neo will be the first one, the second board will be a Orange PI.  The goal is to use Linux with PREMPT enabled.  Did some initail testing with OrangePI with 4.6-rc4 and was able to generate a 50Hz square wave while running stress-ng, with no issues! 

Using the Neo first because has a A9/M4 the Orange PI will need an external micro-controller.  

So, how to port BaseFlight to Linux?  
  1. Basics
    1. I2C: will use /sys/class/i2c
    2. SPI: Not supported yet; will get into that little latter
    3. PWM: (M4 Neo, OrangePI micro-controller)
    4. PPM/PWM deocde: (M4, OrangePI micro-controller)
    5. Software/Framework
      1. Boost ASIO
        1. asio offers as async/event loop
          1. High performance timers
          2. Support for serial events
          3. Support for network events
          4. Add support for DIO interrupts
      2. Boost logging
        1. integrated
      3. BaseFlight
        1. has a single poll loop to process events
          1. Will move each of these events to asio event:
            1. Serial: for GPS / Baseflight configurator
            2. Timer: process loop for FC
            3. Network: External WIFI (NEW)

Why not use use Ardcopter or TauLabs?  This is a first pass and will be moving to one of them on the next round. Already have ported BaseFlight to Teensy 3.1; so already familiar with the code.

Which Kernel?  Right now, the Udoo Neo is 4.5 with some patches for RPMSG.  OrangePI, did some testing with 4.6-rc5; but waiting for more patches to go into mainline; so, 4.7.

BaseFlight has been ported to Linux; just debugging I2C; then pull apart main.c /loop and move to boost asio.  Will post the modifications in a few weeks.  Right now, getting Udoo Neo RPMSG working in 4.5.  

Thursday, April 21, 2016

Udoo Neo booting mainline v4.5

I've several projects going on with the Udoo Neo that required new version of the kernel; i.e adding several wifi adapters to create a router on different channels and mesh network.

Anyway, to get mainline working, need to move several of the udoo_neoo dt files and edit them.

Using mainline several issues arise:
- Support for HDMI driver; rpmsg, NTSC camera, etc.

For this project I just need rpmsg and NTSC camera.  So, over the next few weeks will be posting how and creating patch files using buildroot to create a bootable Linux image.