Monitoring a second battery with the APM

Hi all,

I'm currently setting up the Ardupilot on a Skywalker, and as always I will use a separate battery for camera/OSD/VTx. I am flying with a 4S LiPo and am trying to avoid step down converters and filters.

Are there any plans to add monitoring of a second battery to the APM code? I have seen people mention that it will be implemented, but those posts are over 6 months old. I have also looked at the MinimOSD Extra source code and there are lines with "osd_vbat_B" commented out.

It shouldn't be that hard to implement, but if someone else has already started coding it it would be nice to know.

The obvious way to connect a second battery is through a voltage divider to a free analog input port on the APM.



You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Have the Pixhawk @ Plane 3.4.0. How to set it to monitor the second battery and current via MP. It seemed that it works only for one battery. I tried to play with BATT_VOLT_PIN, put the 14 and 15 values and it reads from ADC 6.6 and ADC 3.3, it works, but if to configure the same way the BATT2 parameters - zero in MP. Does the second battery monitoring is implemented at the moment or no?

  • Guys, I'm having the following situation:

    I have separate FPV 2S battery and I want it to be monitored. 

    I made voltage divider (1:10 with 1.2kOhm resistor as minor) which gives me in result 0.88V divided voltage.

    I connect it to A1 pin (A0 is used for RSSI) of analog input pins (tried also pins 2,3 and 7), set BATT_VOLT2_PIN to 1 (also tried playing around with values). 

    Set BATT_VOLT2_MULTIPLIER (something like it) to 10. 

    MP shows me Bat2: 0

    NOTICE: I _DO_ have APM Power Module connected and in use.

    What should I do to get things moving?

    Board: APM 2.6

    Firmware: 3.2

    Type: Copter

  • Is anyone able to display the second battery voltage in an OSD? I see the BATT_VOLT2_PIN and BATT_VOL2_MULT in mission planner (and configured it), but I failed to display it in my minimosd-extra.

    Any ideas?

    • Yes sir
    • Well, I'm back.
      Ive been sick a few times and distracted by my new 3d printer.
      Last time i looked at this i had my first attempt at displaying the 2nd battery voltage compiled. I had problems with character sets following that and got discouraged and distracted.
      I will attempt another go at it this weekend.
      of course if the more knowledgable minimosd coders want to take a stab then im more than happy to bow out.
      Incidently i did need to remove some functionality (rose) in order to provide more code space.
      i did decide on the cheap frsky voltage divider board to make things simple. I connected it to two pins on the pixhawk. (Ill have to check which ones when i get home).
    • Noone has modified minimOSD yet to display it.

      I asked one of the developers a week ago, with no response yet.


      I may just do it myself next week since the feature is mandatory for my FPV conquests.


      I'm still trying to find where to find the latest ardupilot:plane beta.

      • Dirk,

           If you do this change to the minimOSD could you please post the code changes?

        Also are there code changes that need to be done to the APM firmware to read the second voltage?

        • What hardware would we need to add a second voltage readout to a Pixhawk, I guess a voltage devider?

          Can someone post a shematic if you know how to?

          As I understand correctly the minimOSD does not support a second battery readout at the moment.

          Mabe we can ask the minimOSD-Extra developer to add this feature.


          If you want this feature in minimOSD-EXTRA

          Please go to:

          Here you login and click on the star!

          If each person here who want this feature please login and click that star, only this way they see the many interests for requesting this feature.

          Keep in mind:

          Each comment triggers notification emails. So, please do not post "+1 Me too!".
          Instead, click the star icon.

      • In the mission planner under updates there is a check for beta versions button. 

        Like you I am hoping that the code to display the second voltage is added to the MinimOSD.

This reply was deleted.


DIY Robocars via Twitter
RT @a1k0n: @DanielChiaJH @diyrobocars @circuitlaunch Here's my car's view of that race. About 8.4 second lap times for laps 2 and 3... both…
DIY Robocars via Twitter
RT @DanielChiaJH: Great racing against @a1k0n today at @diyrobocars! Pretty cool to both break sun-9s at the track today I think I got very…
DIY Robocars via Twitter
Broadcasting the @circuitlaunch race live now at Races begin around 2:00pm PT
DIY Robocars via Twitter
RT @a1k0n: ran a huge number of hyperparameter tuning experiments yesterday; now I can train a new policy, far with better quality, in 15 m…
DIY Robocars via Twitter
RT @a1k0n: Did I get rid of hand-tuned parameters? Yes. Am I still hand-tuning more parameters? Also yes. I have a few knobs to address the…
Sep 26
DIY Robocars via Twitter
RT @a1k0n: I'm not going to spoil it, but (after charging the battery) this works way better than it has any right to. The car is now faste…
Sep 26
DIY Robocars via Twitter
RT @a1k0n: Decided to just see what happens if I run the sim-trained neural net on the car, with some safety rails around max throttle slew…
Sep 26
DIY Robocars via Twitter
Sep 24
DIY Robocars via Twitter
RT @SmallpixelCar: @a1k0n @diyrobocars I learned from this. This is my speed profile. Looks like I am too conservative on the right side of…
Sep 24
DIY Robocars via Twitter
RT @a1k0n: @SmallpixelCar @diyrobocars Dot color is speed; brighter is faster. Yeah, it has less room to explore in the tighter part, and t…
Sep 24
DIY Robocars via Twitter
RT @a1k0n: I'm gonna try to do proper offline reinforcement learning for @diyrobocars and throw away all my manual parameter tuning for the…
Sep 23
DIY Robocars via Twitter
RT @circuitlaunch: DIY Robocars & Brazilian BBQ - Sat 10/1. Our track combines hairpin curves with an intersection for max danger. Take tha…
Sep 22
DIY Robocars via Twitter
RT @SmallpixelCar: Had an great test today on @RAMS_RC_Club track. However the car starts to drift at 40mph. Some experts recommended to ch…
Sep 11
DIY Robocars via Twitter
RT @gclue_akira: 世界最速 チームtamiyaのaiカー
Sep 10
DIY Robocars via Twitter
RT @DanielChiaJH: Always a good time working on my @diyrobocars car at @circuitlaunch. Still got some work to do if I’m to beat @a1k0n howe…
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: My new speed profile for @RAMS_RC_Club track
Sep 10