Skip to content

cvetaevvitaliy/Smart-Power-Case

Repository files navigation

Smart Power Case for FatShark, Skyzone, DJI fpv goggles

Build Status contributions welcome

Smart Power Case for FatShark goggles
Powered by a single Li-ion, stable output 8.2V or 12.6V (switching from menu)
Support QC 2.0/3.0, FastCharge charges 5V, 9V, 12V - max input 18W (BQ25895)
Shows operating time, remaining battery capacity, remaining charging time (BQ27441)

How to build

Depends

You need install gcc-arm-none-eabi compiler and CMake
for Ubuntu
sudo apt-get install gcc-arm-none-eabi cmake
for MacOS
brew install gcc-arm-none-eabi cmake

How to build project for STM32F103TBU
    git clone https://github.com/cvetaevvitaliy/Smart-Power-Case
    cd Smart-Power-Case
    mkdir build
    cd build
    cmake ..
    make -j8

default build for MCU STM32F103TBU (128kb flash ), if you need change type MCU - STM32F103T8U (64kb flash), please use option -DTYPE_MCU=F103TBU
P.S. if you run cmake .. and want to use -DTYPE_MCU=F103T8U You have two steps:
First: you need delete build dir
Second: remove CMakeCache.txt use rm CMakeCache.txt in build directory

How to build project for STM32F103T8U
    git clone https://github.com/cvetaevvitaliy/Smart-Power-Case
    cd Smart-Power-Case
    mkdir build
    cd build
    cmake -DTYPE_MCU=F103T8U ..
    make -j8

Or use Clion IDE and load CMakeLists.txt file

After a successful build, such files will be created
🍺 firmware-x.x.x.bin update for flash GUI flasher
🍺 FullFW.bin for flash via SWD flasher ST-link or Jlink
🍻 FullFW.bin has bootloader, firmware and default eeprom data

Flash memory map for STM32F103TBU (128kb)

0x8000000 0x8000800 0x801FC00
bootloader firmware eeprom

Flash memory map for STM32F103T8U (64kb)

0x8000000 0x8000800 0x800FC00
bootloader firmware eeprom

✅ Since the data is not saved often, it made no sense to use an external eeprom

another options: -DDEBUG=ON for debug firmware via USB virtual comport, speed 115200, you can use printf and send out to console

*update project, added support fw update from bootloader, use HID bootloader (https://github.com/cvetaevvitaliy/STM32_HID_Bootloader)
*update project, added cross-platform command line flasher (https://github.com/cvetaevvitaliy/Flasher_USB_HID)

*update project, added cross-platform GUI flasher (https://github.com/cvetaevvitaliy/Smart-Power-Case-GUIFlasher) Linux MacOS Win

YouTube link
https://www.youtube.com/watch?v=Y0oo7hjzqtc
https://www.youtube.com/watch?v=4TmXY8NL-vo



Download Schematic.pdf
Download Gerber X2.zip

Download STL for 3D printing
MID https://github.com/cvetaevvitaliy/Smart-Power-Case/blob/master/HW/STL_File/mid.STL
TOP https://github.com/cvetaevvitaliy/Smart-Power-Case/blob/master/HW/STL_File/top.STL

BOT

TOP

BOT

Altium

BOT

BOT

BOT

BOT

SolidWorks SolidWorks SolidWorks

See 3D model in the browser
MID https://github.com/cvetaevvitaliy/Smart-Power-Case/blob/master/HW/STL_File/mid.STL
TOP https://github.com/cvetaevvitaliy/Smart-Power-Case/blob/master/HW/STL_File/top.STL