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

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+

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