Close

Enclosure

A project log for Feiyu gimbal firmware

Better firmware for the mighty Feiyu mini 3D

lion-mclionheadlion mclionhead 12/08/2021 at 22:570 Comments

This thing got used maybe once in 5 years, but with the number of gootube videos made with brushless gimbals on the rise, it was due for an upgrade.  The brushless gimbal movies dominate real estate videos & they manely use the DJI Osmo pocket series. 

The mane need is an updated handle with battery compartment.  There's also a need to increase the accelerometer weight to try to level the horizon more.  Finally, there's a need to switch I2C to software since I2C crashes are now a well known bug in the STM32.

It also needs a follow mode for yaw.  There's still no plan for pitch.  Pitch is better served by using a gopro 7 & beyond.  Without a viewfinder, it was quite difficult to aim pitch.  The soldering & 2 axis joystick for the factory firmware was still present, but would be taken out for a new enclosure with only a yaw stick.  

A key need was to enclose the battery & make it as small as possible.  Previously, duct taping the battery was stressing the battery & never got it very snug.  Salt water proved to be a huge problem with exposed battery connectors.  The next solution ended up still being duct tape, but duct taping a lid.  There was no printable battery cover as compact as the duck, but it wouldn't stress the battery.

The gopro got a long needed cap in 3 attempts.  The trick is using stringers to allow the PLA to flex & using the springiness of PLA to hold it on.

Tight squeeze in there.  It would be easier if lions invested in flat flex cables & modern connectors, but it would rapidly approach osmo pocket cost.  The 1st osmo pocket is down to $200 but was terrible.  The 2nd osmo pocket is $350.  A

https://www.sparkfun.com/products/9426

 thumb joystick would save a lot of space.

Interestingly, the original firmware was programmed with an AMD Phenom at a slower clockspeed.  The newer AMD Ryzen required adding delays to the serial port writes even though the serial port is a USB dongle.  There was a slight decrease in USB latency which overloaded the bootloader.

The follow mode revealed new problems in the firmware.  The mane problem seems to be when the handle is centered, the yaw motor only affects roll.  As the handle moves to the side, the yaw motor contributes more to pitch than roll.  The problem wasn't as obvious before follow mode because the lion tended to keep the handle centered while panning with the joystick.  When moving the handle to the side is the user input, it's more obvious.

It has a motor mixer which calculates the contribution of the yaw & roll motor to roll & yaw.  The motor mixer doesn't calculate the contribution of the handle motor to pitch.  It's been relying on the PID controllers to compensate automatically when the handle is on the side.  This causes pitch to oscillate.  The oscillation seems to throw off pitch sensing.  It really needs to mix all 3 motors.  

A quick test of pitch/yaw mixing only degraded results.  Moving only 15 deg/sec helps.  Other gimbals are capable of much faster slew rates without glitching.  Can't remember the slew rate with the factory firmware.  There could be a better motor mixing model, but it might just require a better micro.

There might be firmware  examples which solve these problems by now.  Continuing to invest in a home grown gimbal these days is like investing in a TI 58 ROM to calculate loans.  The smaller gopros which fit it aren't made anymore.  There weren't any clones with matching picture quality, years ago.  Lions only used it once in 5 years, only for night footage where digital stabilization is disabled.

Discussions