ArduPilot Open Source Smart Battery

For my aerial photography copter project, I’ve been working with Huibean (from VimDrones) on an open source (software) smart battery. The video above shows the first prototype in action!

It uses the AP_Periph software which is essentially ArduPilot running on peripherals. This software is already very popular and is quietly running on many GPSs, airspeed sensors, etc especially those that support DroneCAN. It allows manufacturers to keep their R&D costs low and focus on making good hardware.

The software side consists of:

  • TIBQ76952 battery monitor driver (.h, .cpp)
  • AP_Periph battery BMS code that handles the button and LEDs (battery_bms.h, .cpp)

.. and it provides all the features you’d expect including main voltage, individual cell voltages, current draw, remaining capacity, state-of-charge %, etc.

The BMS PCB’s hardware definition file can be found here but in short the hardware includes:

The battery connector is 14-pin 2.5mm pitch blade-type battery connector manufactured by Denuowei (深圳市德诺威电子科技有限公司) but there are many similar connectors available on the market it seems. The BMS PCB has female pins and the drone side’s very simple side PCB gets the male pins. The pin mapping is below:

Pin Signal
1 BATT+
2 BATT+
3 BATT+
4 BATT+
5 BATT+
6 5V
7 CAN_H
8 CAN_L
9 GND
10 BATT-
11 BATT-
12 BATT-
13 BATT-
14 BATT-

The case is 3D printed using HP Multi-Jet-Fusion / PA12 HP Nylon and I used JLC3DP printing service. MJF results in really high quality prints that are almost indistinguishable from injection moulding. A company called TezRow designed the case for me using AutoDesk Fusion 360

The battery is a custom semi-solid state 6S 10C 5500mAh battery purchased from FoxTech that I’ve manually soldered to the VimDrones BMS PCB.

For charging I use a simple 25.2V Li-ion battery charger which has been soldered to the same PCB used on the drone side. It provides power to the BMS PCB’s BATT+ and BATT- pins and the BMS takes care of the rest.

The next steps including having a couple of prototypes properly manufactured which should allow the batteries to be properly certified and thus taken on planes, etc. On the software side I plan to add a parameter to allow users to set the maximum charge because the battery will last longer if we don’t charge to 100% every time.

If you’re interested in getting a board it is probably best to first contact Huibean at VimDrones because he spent considerable effort on both on the hardware and software and some aspects were a bit tricky like requiring the button to wake-up the TIBQ device.

In any case, I hope that more manufacturers will take advantage of the work done here and make their own smart batteries using open source software. Let’s move on a bit from traditional “dumb” batteries, let’s standardise the pins and software and stop re-inventing the wheel!

24 Likes

Great Job Randy :slight_smile:

3 Likes

Very nice job from both of you!
Highly curious to give it a try!

For those of us in europe, I higly recommend Weerg in Italy for 3d printing, their pricing and delays are impressive!

2 Likes