The inspiration for doing such an upgrade, was willing to try new open source video stabilization tools (find out more https://www.facebook.com/groups/fpvtools/) , which make possible improve footage virtually from any camera. Not all of my flying machines are equipped with the latest FC having SD card slots, so i decided to build stand alone, betaflight gyro logger and attach it to any camera I want. I found an old, not used but working AirBot F4 board, which is more than enough for that.
If you want to build the same, please follow the guide below.
The mod is quite easy to do, there is no secret, that SD card and flash chip used for storing log data use the same serial bus, called SPI. So your FC should be equipped with a flash chip. Usually it is a small 8 pin chip which should be desoldered. You will not need it any more 🙂
After the desoldering operation it should look like the following.
Then you need to find an SD card adapter which will be used as an sd card slot. You simply need to solder thin wires to it’s connectors and then use it instead of just removed flash memory chip.
Following connection diagram may help you.
So it’s almost done, now you can use self adhesive tape to put the adapter on the top of FC.
Now it’s time to play with betaflight settings, you need to go to CLI and type dump. Then you need to find out pin number and SPI bus number which was used to talk to the flash chip.
It would be something like this:
resource FLASH_CS 1 B03 set flash_spi_bus = 3
It means that pin B03 and SPI bus 3 should be use to communicate with our new just soldered sd card. First you need free the resources (chip select pin and SPI bus).
resource FLASH_CS NONE set flash_spi_bus = 0
Now assign them to be use by the SD card.
resource SDCARD_CS 1 B03 set sdcard_spi_bus = 3
And let the FC know, to use SPI to talk to SD card, use DMA, and store black box to SD card just after powering up the FC.
resource SDCARD_DETECT none set sdcard_mode = SPI set sdcard_dma = ON set blackbox_device = SDCARD set blackbox_mode = ALWAYS save
Now you should disconnect the board connect again go to CLI and type status. You should see that SD is detected and filesystem is ready.
# status ... SD card: Manufacturer 0x0, 3855360kB, 06/2014, v0.0, 'APPSD' Filesystem: Ready