iNav: Waypoint Mission

This video was taken few weeks ago during my tests of Waypoint Mission implemented in iNav.

Hardware setup:

  • Transporter Q7.6 600mm quadcopter frame
  • SPRacingF3 Acro with BMP085 external barometer
  • Beitian BN-880 (ublox Neo-M8M)
  • 10×4.5" APC props
  • EMAX GT2218/08 1100KV motors
  • 5000mAh 3S battery

Software setup:

  • iNav pre 1.1
  • Default navigation PIDs
  • Slightly tuned FP-PID, quite close to default values
  • GPS nav model: HIGH_G set gps_nav_model=HIGH_G
  • Velocity calculation done by GPS module set inav_use_gps_velned=ON

Mission plan:

  1. Take off in Angle model
  2. Follow 3 waypoints on total distance of about 300m, constant altitude of 10m
  3. At last waypoint goto Position Hold mode
  4. Manually engage Return To Home mode
  5. Automatic RTH and land

Read More

iNav: RTH with land mission

This video was taken last weekend during tests of latest changes implemented in iNav, as well as new GPS module Beitian BN-880 I shortly described here.
Mission plan:

  • Take off in Angle mode,
  • Engage 3D Position Hold
  • Fly away 100m
  • Return to Position Hold
  • Engage Return To Home mode

Summary:

  • Beitian BN-880 performed well. Quadcopter returned home with 1m accuracy. Constant fix on 15 sats all the time and HDOP at 1.2
  • No problems with magnetometer inside GPS module
  • No bigger problems during whole mission. I still have to work on yaw behavior. At the moment FP-PID and linear mixer from Betaflight can cause some strange yaw behavior on bigger quads. Fix should be available soon

Read More

Hands-on: Beitian BN-880 GPS module

Looking for a decent replacement for my u-blox NEO-6M GPS modules I came by super cheap, Chinese, Beitian BN-880 modules from Banggood. According to information found in the internet, it’s build based on u-blox Neo-M8N and is capable of receiving signals from GPS, GLONASS, Galileo, BeiDou, QZSS and SBAS. Plus integrated magnetometer module. Yesterday package finally arrived and here are my first impressions:

  • It’s not single board, but 2 boards glued together
  • There is not casing, and cases for popular Neo-6M wont fit. BN-800 is much taller
  • It accepts both 5V and 3.3V voltage and 5V UART level is safe, nothing burned
  • It connected to Cleanflight and iNav without any problems at 38400bps
  • Quick windowsill test showed that indeed it works not only with GPS, but also other positioning systems. When GPS Neo-6M was barely able to acquire 4 satellites, Beitian BN-880 found 9 and a solid 3D fix
  • I did not tested magnetometer yet

Beitian BN-880

Beitian BN-880 Antenna

Beitian BN-880 Side view

Hopefully I will be able to perform more tests next few weekends and provide more info on this module. For now it looks very promising.

Read More

iNav: Cleanflight learned how to do missions

In my recent post I mentioned that iNav flight controller software (fork of Cleanflight) introduced missions. Missions are preprogrammed waypoints that drone will fly to in specified order and/or do specified action at each of them. For example, if pilot wants to make a video on specified route, he does not have to pilot his drone all the time. He enters waypoints and lets machine do everything else. In this entry I will show how to configure iNav to do missions.

Requirements

  • iNav compatible drone flight controller flashed with iNav software. Currently supported boards are: Naze32, Flip32, CC3D, SPracingF3, Sparky, RDMO
  • GPS module connected to flight controller board. This example shows how to do it for Flip32, but it will work for all other boards, only UART pins might be different
  • Magnetometer connected and properly calibrated
  • Barometer connected
  • EZ-GUI Ground Station Android application that will act as Mission Planner. Official Cleanflight Configurator does not support this function yet
  • Bluetooth telemetry. Some time ago I have written how to do it for Flip32, but it will work almost the same for all other flight controllers, only UART pins might be different

Continue reading “iNav: Cleanflight learned how to do missions” »

Read More

Better GPS for Cleanflight: iNav

Cleanflight is an awesome piece of software for STM32 based flight controllers. But Cleanflight has one very serious flaw that makes its usage on bigger drones at least problematic. Cleanflight sucks in GPS and barometer support. Sucks a lot. It can handle Position Hold (somehow), Return To Home (barely) and Altitude Hold (oh man, up and down, up and down) but if you at least one tried that, you should know that is not only not reliable, but also not precise and hard to tune. Personally I gave up after few tires. It was not worth it. Comparing to Pixhawk (not talking even about Naza) it might as well not exists at all. But it has changed recently…. Continue reading “Better GPS for Cleanflight: iNav” »

Read More

Cleanflight 1.12 is coming to town…

Looks like Cleanflight release cycle is speeding up. Last stable version, 1.11.0, was published in the beginning of December 2015, next stable release, 1.12, can appear any day now. Its Release Candidate is available for testing for more than a week now.

So, what can we expect? First of all, bad news: no improved GPS navigation from iNavFlight yet. iNavFlight is not ready and looks like it’s too big to fit all targets, specially F1 processors. So, we will have to wait a while for it. In the meantime, iNavFlight 1.0 RC4 is ready for testing. And it is very promissing. I’ve been able to do only a few test flights on it before winter, but results were very nice.

In Cleanflight 1.12.0 we can expect few quite important new features:

  1. Looptime sync to gyro readouts. This is something that Betaflight users knows very well. No more looptime as we know it. Control loop processes data as soon as it have it from gyros. Approximately every 1000us, since gyro updates with 1kHz frequency. But, that does not mean that we all will be using looptime of 1000. Not all hardware targets with features like GPS have enough computing performance to handle that. This is why CLI command gyro_sync_denom has been introduced. It tells CF every which gyro update control loop should be executed. Value of 1 results of looptime around 1000us, value of 2 give looptime of 2000us and so on. Important note: by default gyro sync is disabled and CLI set gyro_sync=ON command has to be executed to enable it.
  2. Improved task scheduler. Task scheduler in revious versions of Cleanflight was rather simple. This new implementation will allow for better processing of pheripherials like GPS. Users probably will not see much (if any) difference, but this is required for future features like better GPS navigation,

In addition to that: faster computations and better gyro filtering, bugfixes, documentation updates (to which I contributed too) and smaller improvements. See release notes for full list.

Read More

How to add external compass to Flip32

In my last post I’ve showed how to disable internal MHC5883L compass on Flip32+ (10DOF) flight controller board. Now it’s time to fix what we’ve broken last time, and connect external MHC5883L compass with I2C bus.

u-blox NEO-6M with HMC5883L compass

In my case I used very popular setup: u-blox NEO-6M GPS module with integrated MHC5883L compass. So you have both GPS and magnetometer in one case. Pretty nice. I’ve described how to connect NEO-6M GPS few weeks ago, so that part should be covered. The only new thing is compass itself. And hardware setup for it is very simple. In addition to GND and +5V lines you only have to connect SDA and SCL lines to bottom line of connectors right to USB port on Flip32. SDA to SDA, SCL to SCL. In case of I2C we do not have swap lines or do any other kinds of voodoo. Continue reading “How to add external compass to Flip32” »

Read More

How to disable compass on Flip32+

Build in HMC5883L compass/magnetometer is very nice feature of Flip32+ flight controller. Too bad it’s not always working like expected and there is a time, when one have to replace it by external device, positioned as far away from power cables as possible.

I’ve encountered that specific problem two weeks ago when I’ve discovered the reason (or at least I think I discovered) why Position Hold and Return To Home GPS assisted flight modes on my Flip32 and Cleanflight were not working. Or rather were working only sometimes, usually when quadcopter was positioned to the north, north east. On any other case, huge overshoots, going in totally different direction than expected. GPS was more less useless. Finally, during one one flight I kept attention to compass heading displayed on OSD. On the ground, heading was correct. After take off, it was drifting to east. Always east. With that data I’ve concluded: Flip32+ built in compass is too close to power cables and when motors are running magnetic field makes compass readings unreliable. Solution: move compass further away from power cables. But with compass already on PCB it was rather impossible. So the only real solution is: disable internal compass and use external HMC5883L connected over I2C bus.

MMC5883L on Flip32+

Continue reading “How to disable compass on Flip32+” »

Read More

Adding GPS to Flip32+ and Cleanflight

Flip32 and Flip32+ (10 DOF version of Flip32 with built-in barometer and magnetometer) are nice little flight controllers. And cheap. Some call them clones of Naze32, but this is not completely true. Yes, they are very similar, share the same hardware, but they are not identical. I would say they are better than Naze32 since have more features and are easier to extend. But that is not the topic.

One of coolest features of every drone is GPS support. This allows for both Position Hold and even navigation support. I will not explain how to configure Position Hold and navigation on Flip32+ and Cleanfligh today. The reason is simple: I’m still trying to fully understand PID controllers used in those modes: Pos, PosR and NavR. And it is not going very well I must say. Position Hold in low wind is OK, but navigation and PH in wind conditions is unreliable and I’m still unable to configure it to work well. But GPS even without Position Hold has some use. For example, Home marker on OSD when flying FPV.

 

Ublox Neo-6M GPS moduleIn this tutorial I will use Ublox Neo-6M GPS module, Flip32+ 10DOF and Cleanflight 1.9.0.

Continue reading “Adding GPS to Flip32+ and Cleanflight” »

Read More