Success! Reading smart battery data

Anyway, eventually, I want to build a multi-battery charging station that will also automatically track the battery SN as well as the number of charging cycles the battery has gone through to help predict longevity. I have about 10 of the male molex battery connectors on the way, but those are still a few weeks out. Those connectors are custom and not easy to get a hold of in quantities under 1,000 (Molex requires 1,000 minimum order). I wish 3dr went with something more standard - I bet we'd be seeing a lot more after market chargers (any?) if that were the case. If you were building a 4 port battery charger, that means you'd have to be able to sell 250 units in order to use up the 1,000 connectors. I'm not sure if the market is big enough for a 4 battery charger to sell that many to make it feasible.

Almost exactly what 3DR told me when I asked if I could purchase one of the 5-slot chargers they had at NAB. They had 3 of them there, and felt they couldn't sell them for the 400.00 retail they'd need to hit.
That said, I'd sure like a few connectors for discharging batteries.
 
I tried it again. Had a fully charged battery powered on, and could not read any data from the battery. I placed the battery on the solo and let it drain to 95% and then put it back on the arduino, and I was able to read data.

Maybe a level issue? Poorly designed power supply on the battery side may be over-driving the arduino inputs when the battery is fully charged?
 
I tried it again. Had a fully charged battery powered on, and could not read any data from the battery. I placed the battery on the solo and let it drain to 95% and then put it back on the arduino, and I was able to read data.

If you power the Arduino from the Solo battery be careful. Many Arduino's use an AMS1117 regulator to drop Vin to 5V. The original/real/non-counterfeit Arduino Nano used a LM1117. The difference is that the AMS1117 has a max Vin of 15 volts, whereas the LM1117 has a max Vin of 35Volts. If the Solo battery if fully charged "right off the charger" it MIGHT exceed the AMS 1117 input rating and "BAD THINGS (tm)" might happen.
I have not tested this out on mine yet. I'll try sometime in the next day or so.
 
If you power the Arduino from the Solo battery be careful. Many Arduino's use an AMS1117 regulator to drop Vin to 5V. The original/real/non-counterfeit Arduino Nano used a LM1117. The difference is that the AMS1117 has a max Vin of 15 volts, whereas the LM1117 has a max Vin of 35Volts. If the Solo battery if fully charged "right off the charger" it MIGHT exceed the AMS 1117 input rating and "BAD THINGS (tm)" might happen.
I have not tested this out on mine yet. I'll try sometime in the next day or so.
Not powering the arduino from the solo battery. Levels would be too high to do that.
 
I was able to charge my Solo Batteries to 100% and tried to read them out. As you reported total garbage..... However if you draw some current from the battery, I tried 1Amp, I could read it out just fine... stop the current --> garbage, wait till discharged a bit (don't exactly know how much) and it's ok too.
I have no clue as to what's going on, but I know that my Solo draws about 1Amp at idle, so the Solo controller may not ever see 100% charged and no current draw.
 
This might explain why solo batteries discharge while sitting idle. Once the battery level drops to about 95% the electronics turn on inside of the battery which continuously draw a small current making the battery deplete over time.
 
Truthfully I'm not really sure and haven't given it too much thought. This is just a fun and challenging project and proof of concept at this point. I've even ordered a 3D printer to build the housing with almost a cubic foot of build area lol (I have many other uses for it as well).

My fear would be on the charger side, and starting a fire and burning someones house down. I am not an electronics engineer (although my father is and is helping a bit when I get stuck). I also only have 10 real Molex battery connectors, and normally you have to order them with a min. qty of 1,000. That's pretty prohibitive for an individual, but I do also have an idea to make my own based on my test rig before the real connectors arrived. I know there is interest in this - so it is in the back of my head.


Good work steve...any chance you would share your code?
 
Sorry if this is a bit off-topic, but is there any way to read the cell voltages while in-flight? I would like to verify the cell voltages against the algorithm being used to compute remaining battery life (percentage).

I've read on a few sites (including this one) that 3dr may have added a buffer so that the normal "land at 20/25% or risk damage to your battery" might not apply as it does to those of us in the hobby world using raw (non-smart) packs.

I'd like to be able to measure loaded(flight) and "at rest" cell voltages for awhile to make my own assessment.
 
@PdxSteve Could you post up your code? I finally got an Arduino Uno and Figured out how to get a 16x2 LCD display working on i2C bus. *Slow hand clap*. Could you please share your code so that I may pick it apart? im trying to read the battery data, and really dont know how to start, total noob.. Thanks for your time Steve!

p.s. also if there are any libraries i should use or need??
 
Last edited:
how/where did you get the power+I2C connectors ? - I had trouble emough getting power-only connectors..
 
@PdxSteve Could you post up your code? I finally got an Arduino Uno and Figured out how to get a 16x2 LCD display working on i2C bus. *Slow hand clap*. Could you please share your code so that I may pick it apart? im trying to read the battery data, and really dont know how to start, total noob.. Thanks for your time Steve!

p.s. also if there are any libraries i should use or need??


These codes will probably require a lot of tweaking, but can be modified to your use.

PX4Firmware/batt_smbus.cpp at master · ArduPilot/PX4Firmware · GitHub

APM2EX/Func.h at master · mtbsteve/APM2EX · GitHub
 
Would love to try a larger capacity LIHV battery such as the following 6600mah pack:
MultiStar LiHV High Capacity 4S 6600mAh Multi-Rotor Lipo Pack

Only 32g heavier than the specifications for the 3DR pack, 1400mah of additional capacity, and... a longer run because of the LiHV technology. I am confident that the new DJI products (Mavic/PP4) are achieving longer flight flight times because they are using the LiHv technology.
 
  • Like
Reactions: Pushjerk
how/where did you get the power+I2C connectors ? - I had trouble emough getting power-only connectors..
Are you meaning the Molex connector with the SMBus ports ? Did not purchase yet as I would need only 10/20. I have a quote to purchase 1000 units... If I find people ready to share, I may order ...;)
 
Last edited by a moderator:
Would love to try a larger capacity LIHV battery such as the following 6600mah pack:
MultiStar LiHV High Capacity 4S 6600mAh Multi-Rotor Lipo Pack

Only 32g heavier than the specifications for the 3DR pack, 1400mah of additional capacity, and... a longer run because of the LiHV technology. I am confident that the new DJI products (Mavic/PP4) are achieving longer flight flight times because they are using the LiHv technology.
Yes, DJI uses HV lipos.
While it's not a problem to "teach" the Solo BMS to a higher capacity battery, I guess it's not possible to adopt the BMS to higher voltage cells since the cell min and max voltage values are permanently stored inside.
 
Yes, DJI uses HV lipos.
While it's not a problem to "teach" the Solo BMS to a higher capacity battery, I guess it's not possible to adopt the BMS to higher voltage cells since the cell min and max voltage values are permanently stored inside.

My thought was to create a "bridge" device and use existing off-the-shelf LiPo/LiHV packs. The bridge would use an Arduino to monitor and communicate voltage levels, capacity and other metrics via the SMBus protocol to the Solo. The bridge device could be used with any LiPo/LiHv battery that fit in the existing tray. The batteries would be charged using your existing LiPo/LiHV charger. I guess you could think of the bridge as a "smart" battery adapter for normal "dumb" batteries. You would only need one bridge device for multiple batteries... it would of course be unable to track battery specific metrics such as hours of use, number of charges, etc.

I am under the impression that it is possible to fly the solo with a battery that does not communicate voltage and capacity to the Solo. I wonder about this since it appears the Solo relies on the batteries BMS to communicate these values without a separate voltage/current sensor. Voltage monitoring can be turned off in Arducopter, so I wonder if folks that are flying without smart batteries have disabled this feature so they can fly.
 
My thought was to create a "bridge" device and use existing off-the-shelf LiPo/LiHV packs. The bridge would use an Arduino to monitor and communicate voltage levels, capacity and other metrics via the SMBus protocol to the Solo. The bridge device could be used with any LiPo/LiHv battery that fit in the existing tray. The batteries would be charged using your existing LiPo/LiHV charger. I guess you could think of the bridge as a "smart" battery adapter for normal "dumb" batteries. You would only need one bridge device for multiple batteries... it would of course be unable to track battery specific metrics such as hours of use, number of charges, etc.

I am under the impression that it is possible to fly the solo with a battery that does not communicate voltage and capacity to the Solo. I wonder about this since it appears the Solo relies on the batteries BMS to communicate these values without a separate voltage/current sensor. Voltage monitoring can be turned off in Arducopter, so I wonder if folks that are flying without smart batteries have disabled this feature so they can fly.
On my DIY (Solo Grande), we are not using any internal voltage reading. We are looking at adding that in the future, but for now just using traditional LiPo alarms.
uc
 
On my DIY (Solo Grande), we are not using any internal voltage reading. We are looking at adding that in the future, but for now just using traditional LiPo alarms.
uc
Jubair, if you have not already done so, I would like to see more postings on your build, maybe new discussion thread
 
On my DIY (Solo Grande), we are not using any internal voltage reading. We are looking at adding that in the future, but for now just using traditional LiPo alarms.
I'm guessing the controller reports 0 volts, 0 amps, and -1%, which I recall is what mine did when I had the SMBUS disconnected. Does it not give you the "Solo battery is too low for flight" message, or flash low battery in those conditions? I would it recognizes the lack of battery data as just that, rather than taking it for zeroes and reporting it as too low. Disabled the battery failsafes? Operationally, just going by a traditional timer based on standard performance, and taking cues from the LiPo alarms if it gets mad?

Also I presume this defeats the pixhawk's ability to scale the motor output to the voltage? Did you change those parameters to disable it or just leave it?
 
  • Like
Reactions: RichWest

Members online

No members online now.

Forum statistics

Threads
13,093
Messages
147,741
Members
16,048
Latest member
ihatethatihavetomakeanacc