Wednesday, August 9, 2017

BetaFlight 3.2 remappable resources and soft serial inversion!

It is awesome. From an F4 flight controller I was able to output smartport telemetry to soft serial 1, invert it, and map it to the ppm input pin. Even on the F3 boards I still had to run a wire from a second uart to the RX. Now the smartport pin can be almost anywhere. I'll elaborate on this later. No more FrSky smart port inversion hack needed.

Hooking up a serial GPS and I2C compass

I have a few "PX GPS with Compass" which is a Ublox neo7 nano with HMC5883L compass.

Hooking up the gps was simple. rx, tx, 5v, and ground and it works. My flight controller, the HGLTech "F4 V5PRO Flight Controller" AIO, doesn't have i2c pins. Specifically I needed SCL and SDA. I read that those are after shared with UART3 on boards like the Omnibus F4. After many hours of trying every betaflight cli command I could research, I discovered I needed 1-10k pullup resisters on both i2c lines. So I hooked up 2 2.2k resisters from the i2c lines to 5v and it works! Some compasses might burnout eventually with the 5v pull-up instead of a 3.3v pullup. Whatever, it works for now. I have more.

Wiring the resistors neatly seems nearly impossible. I need a barometer also. Since the barometer and compass share i2c lines... I ordered a barometer that has built-in pullups. It works! No need to add my own pullup resisters.



The baraometer I got is a BMP280:
https://www.amazon.com/Adafruit-BMP280-Barometric-Pressure-Altitude/dp/B013W0RR6Y/ref=sr_1_1?tag=quadconfig-20