How to add SD card to your old flight controller

The inspiration for doing such an upgrade, was willing to try new open source video stabilization tools (find out more , 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

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

The END.

10 thoughts on “How to add SD card to your old flight controller

    1. The first pin is marked on the PCB. You can see a white dot on the circuit board on the pictures

  1. Hello,
    I have a problem, I cannot get my sd card detected.
    FC: Minicube Betaflight F3 6DOF Flight controller built-in OSD

    1. Make sure your adaper is not faulty. Had many of them that were not functional. Also it might be, that your card is simply not compatible. I believe there are limitations concerning size and card type

  2. Hi, thanks for nice quide, I would like to replace my 8MB flash with 16MB (32MB) flash on FC JHEMCU GHF420AIO. Do you have specification of original 8MB chip or which one should be used for replacement?

  3. “Then you need to find out pin number and SPI bus number which was used to talk to the flash chip”
    How i can found the pin and spi bus number? In other board…
    Omnibus f4 nano v6.1


  4. You should also mention that when connecting an SD card via SPI pull-up resistors are required. If you run into trouble, try adding them, or buy a Microsd to SPI adapter for a few bucks.

    1. Could that explain why my card is detected, writes logs but they are useless? Like no data is stored in the logs.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.