Generic Battery + Arduino = Happy Solo

Do you plan to sell this PCB/BMS ? if so - can you estimate the price?
I see no opamps for each cell, no balancing. Do you plan to measure cell voltage reliably by voltage dividers only? (I see no schematic, just guess by the PCB)
Is some/all meant to be open soft/hardware ?
The hall effect current sensor will increase the price/weight more than an opamp+shunt.
You should really have serial/USB programming/config interface, is there something I don't see ?
 
Do you plan to sell this PCB/BMS ? if so - can you estimate the price?
I see no opamps for each cell, no balancing. Do you plan to measure cell voltage reliably by voltage dividers only? (I see no schematic, just guess by the PCB)
Is some/all meant to be open soft/hardware ?
The hall effect current sensor will increase the price/weight more than an opamp+shunt.
You should really have serial/USB programming/config interface, is there something I don't see ?
Hi VCD,

This is just a board to send SM Bus data to the solo and not an actual BMS. You would charge your battery via a standard charger/balancer, lipo or li ion etc and then plug the battery into this to send cell and current info to the solo. You would only need 1 of these for all your batteries (lipo and li ion).

There is code and schematics/designs posted for each of my development steps (back on other pages).

There are a few designs, using 2 different arduino boards, one with usb and the other with the serial programming option. The all in one board can still be programmed via serial. I have had no feedback from the designer of this pcb as to the success of his all in one board.

I am still working on designs. If I come up with a working pcb I will post the files so anyone can make them or if I get a batch made can sell them.

I currently have limited time for this project so progress is slow. I only fly every few months and still have a few good batteries so it isn't a top priority.

I am happy for anyone to take this idea and code and develop it further. I did look at op amps but have no experience with them and found you need a lot more resistors in the circuit so calibration would be required. If you have experience with op amps and have a circuit in mind I am happy to improve my design.
 
It sounds very similar. There isn't any detail on what is being used as the BMS. Would be great to get the battery curve to add to my code. Is that a forum you can ask questions on?
I'm not sure. I learnt about it via the Facebook 3dr Solo Forums below - which you have to join, but this is straightforward:



But I will give it a try...
 
I'm not sure. I learnt about it via the Facebook 3dr Solo Forums below - which you have to join, but this is straightforward:



But I will give it a try...
I'm no help with Facebook. Let me know how you get on.
 
Hi Everyone,

I've taken the design from webbs, and built my own version. I nearly opted to have a PCB made - but for my first prototype I just glued the components together, and wired it up by hand, and really it wasn't that hard.

I used a 0.49" OLED rather than neopixels, as I thought it could be more flexible, and possibly a bit lighter to do it this way.

Also I used an APM power module (very cheap off ebay - less than 5USD) to give me a 5v supply, plus also the current sensor (as have used these with my pixhawks).

I had my first actual flight today (with a 9000maH Sanyo lipo 4s3p DIY battery pack), and it worked. (I didn't correctly set the right lipo voltage pre-arm levels) - but by disabling the checks in the field I got it up in the air.

Attached is my code - really just webbs' code with some modifications on top. It contains a list of the components I used, and how I wired it up - basically enough detail for anyone to make their own.

Here it is in the air - The solo is beeping crazily because of the battery presets being incorrect.

Video of solo in hover

71244964_10162664112745188_7084983235507126272_o.jpg
 

Attachments

  • oled_software_pro_mini-3.zip
    7.9 KB · Views: 46
  • Like
Reactions: webbs
I'm not sure. I learnt about it via the Facebook 3dr Solo Forums below - which you have to join, but this is straightforward:



But I will give it a try...
I just sent a note to Madhacker via his webpage contact me link - suggesting he might want to join in this thread and collaborate.
 
Hi Everyone,

I've taken the design from webbs, and built my own version. I nearly opted to have a PCB made - but for my first prototype I just glued the components together, and wired it up by hand, and really it wasn't that hard.

I used a 0.49" OLED rather than neopixels, as I thought it could be more flexible, and possibly a bit lighter to do it this way.

Also I used an APM power module (very cheap off ebay - less than 5USD) to give me a 5v supply, plus also the current sensor (as have used these with my pixhawks).

I had my first actual flight today (with a 9000maH Sanyo lipo 4s3p DIY battery pack), and it worked. (I didn't correctly set the right lipo voltage pre-arm levels) - but by disabling the checks in the field I got it up in the air.

Attached is my code - really just webbs' code with some modifications on top. It contains a list of the components I used, and how I wired it up - basically enough detail for anyone to make their own.

Here it is in the air - The solo is beeping crazily because of the battery presets being incorrect.
Awesome to finally see something in the air.....

Did you get the right data showing up on the controller and/or Solex? I had used the Neopixels so you could see the battery status while in the air. Great idea to add the OLED and this would be be very handy when setting up and testing..... How did you go about the calibration of the current reading from the APM module?

Great work again finally seeing this idea in the air!!!
 
  • Like
Reactions: Professorpip
Hi Everyone,

I've taken the design from webbs, and built my own version. I nearly opted to have a PCB made - but for my first prototype I just glued the components together, and wired it up by hand, and really it wasn't that hard.

I used a 0.49" OLED rather than neopixels, as I thought it could be more flexible, and possibly a bit lighter to do it this way.

Also I used an APM power module (very cheap off ebay - less than 5USD) to give me a 5v supply, plus also the current sensor (as have used these with my pixhawks).

I had my first actual flight today (with a 9000maH Sanyo lipo 4s3p DIY battery pack), and it worked. (I didn't correctly set the right lipo voltage pre-arm levels) - but by disabling the checks in the field I got it up in the air.

Attached is my code - really just webbs' code with some modifications on top. It contains a list of the components I used, and how I wired it up - basically enough detail for anyone to make their own.

Here it is in the air - The solo is beeping crazily because of the battery presets being incorrect.

Video of solo in hover

View attachment 10661
The components I used (and the sources of these), plus some more photos (it's a bit messy, I'd agree)IMG-0051.jpgIMG-0052.jpgIMG-0053.jpgIMG-0054.jpgIMG-0055.jpg

Code:
1x Arduino Micro (328p at 3v3v) - Approx 4USD  E.g. https://www.ebay.co.uk/itm/Leonardo-Pro-Micro-ATmega32U4-3-3V-8MHz-Replace-ATmega328-Arduino-Pro-Mini/153421088908?epid=1488926334&hash=item23b89c088c:g:0W0AAOSw5npckF-a
1x 0.49" 4Pin OLED Display Module SSD1306 Resolution128*32 I2C IIC Interface 3.3~5V - Approx 4USD - E.g. https://www.ebay.co.uk/itm/312702799974
1x 3DR solo 'battery side' connector - bought USD 12.99 from http://iron.irixmedia.com/~vo/connectors/ 
1x APM compatible power module (approx 5USD) - E.g. https://www.ebay.co.uk/itm/3DR-Power-Module-APM2-2-5-APM-Flight-Controller-ARDUPILOT-MEGA-APM2-6-Quadcopter/163967520080?hash=item262d39cd50:m:mq95dHDY6hbUh_4o0RjiJaw
4x 3296 Multiturn Variable Resistors 100k - Potentiometer, Preset, Trimmer, Pot - Approx 2 USD - E.g. https://www.ebay.co.uk/itm/391438094231
1x XT60 connector (Male) - to connect to the the battery's XT60 connector
1x Lipo Balance Extension Lead Cable JST-XH 20cm - 4s - to cut in half and use to connect to the battery balance lead.
1x FTDI cable (to program the arduino)
Total component cost âpprox 30 USD (excluding solder, glue, and hook up wire)
 
Awesome to finally see something in the air.....

Did you get the right data showing up on the controller and/or Solex? I had used the Neopixels so you could see the battery status while in the air. Great idea to add the OLED and this would be be very handy when setting up and testing..... How did you go about the calibration of the current reading from the APM module?

Great work again finally seeing this idea in the air!!!

I got the right pack voltage in the Solex screen (and it matched what I saw on the OLED)

Re the current calibration - I used two approaches. 1st was a 10A current meter in my general purpose multimeter (and I had a dummy load to get up to 9amps). 2nd was an old turnigy ''in line' voltage and current sensor from hobby king which can go up to 20+ amps.

I have since further modified my code so I can see how much max current is in flight - as my Sanyo Lipo battery shouldn't go above a 30A max draw.

I haven't yet seen the individual cell voltages come through correctly (and they also don't look right on my 3dr solo battery tester either) - but the overall pack voltage is fine.
 
I got the right pack voltage in the Solex screen (and it matched what I saw on the OLED)

Re the current calibration - I used two approaches. 1st was a 10A current meter in my general purpose multimeter (and I had a dummy load to get up to 9amps). 2nd was an old turnigy ''in line' voltage and current sensor from hobby king which can go up to 20+ amps.

I have since further modified my code so I can see how much max current is in flight - as my Sanyo Lipo battery shouldn't go above a 30A max draw.

I haven't yet seen the individual cell voltages come through correctly (and they also don't look right on my 3dr solo battery tester either) - but the overall pack voltage is fine.
Are you running Open Solo 4 or one of the other versions? Only Open Solo 4 (or 3 with a green cube) requests the cell voltages, the others just request the total so this could be a reason the cell voltages are not correct.

The variable resistors are a good idea for the prototype board as they can be all the same and adjusted. I will have to get some from RS for testing.

Have you managed to get any more flights with you pack?
 
Are you running Open Solo 4 or one of the other versions? Only Open Solo 4 (or 3 with a green cube) requests the cell voltages, the others just request the total so this could be a reason the cell voltages are not correct.

The variable resistors are a good idea for the prototype board as they can be all the same and adjusted. I will have to get some from RS for testing.

Have you managed to get any more flights with you pack?
Hi

I'm running open Solo 4 - and I do get cell voltages on solex when using my stock 3dr batteries.. I did one more flight with the DIY pack since my last post.. It showed my current measurement calibration is way off (It captured a peak of 40 amps in a hover, yet I'm sure (based on flying with stock batteries, the peak is 30 amps or less). I'm going to add a small microSD module to the prototype board so that I can log what's going on in flight from the perspective of the arduino. Hopefully I'll be able to do some more tests over the weekend, and will post my results.
 
Further update - the battery cell voltages are showing up correctly (in mission planner) now.

So main thing to sort still is the current amps calibration, as I need to somehow rig up a 20-30 amp load (which is more representative of flight conditions). Would really like to try a çolomb-counting approach along side a voltage-curve approach... Measuring State-of-charge - Battery University

I put my battery contraption on the scales:

  1. The DIY battery adaptor / BMS emulator = 37 gram
  2. My DIY 4s3p Sanyo NCR18650GA Li-ion 10050 mAh pack = 631g
For reference (on the same scales) - Stock 3dr solo 5200mAh battery = 493g

So my total DIY battery setup is 668g
- ie +175g (+35%) heavier than stock.

But mAh capacity (in theory at least is) increased by +93% (I note this doesn't equate to mWh as the Li-ions run down to 2.5v to get their full capacity)

To help try to partially offset the current draw because of the extra weight I have put on larger 11x4.5 props. I really like them - although I didn't measure it precisely I get longer flight times with my stock batteries. Others have also had the same experience. It certainly flies very smoothly and quietly.

2 x #APCLP11045MR-ST - APC 11x4.5 Multirotor Self-Tightening Propeller (cost GBP £7.58)
2 x #APCLP11045MRP-ST - APC 11x4.5 Pusher Multirotor Self-Tightening Propeller (cost GBP £7.58

The proof of the pudding will be a stock vs DIY battery hover endurance test. I will try to do this over the weekend.

Has anyone else tried this BMS alternative mod - apart from those already posted in this thread... Would be great to hear more experiences.



Hi

I'm running open Solo 4 - and I do get cell voltages on solex when using my stock 3dr batteries.. I did one more flight with the DIY pack since my last post.. It showed my current measurement calibration is way off (It captured a peak of 40 amps in a hover, yet I'm sure (based on flying with stock batteries, the peak is 30 amps or less). I'm going to add a small microSD module to the prototype board so that I can log what's going on in flight from the perspective of the arduino. Hopefully I'll be able to do some more tests over the weekend, and will post my results.
 
  • Like
Reactions: yarrr
Further update - the battery cell voltages are showing up correctly (in mission planner) now.

So main thing to sort still is the current amps calibration, as I need to somehow rig up a 20-30 amp load (which is more representative of flight conditions). Would really like to try a çolomb-counting approach along side a voltage-curve approach... Measuring State-of-charge - Battery University

I put my battery contraption on the scales:

  1. The DIY battery adaptor / BMS emulator = 37 gram
  2. My DIY 4s3p Sanyo NCR18650GA Li-ion 10050 mAh pack = 631g
For reference (on the same scales) - Stock 3dr solo 5200mAh battery = 493g

So my total DIY battery setup is 668g
- ie +175g (+35%) heavier than stock.

But mAh capacity (in theory at least is) increased by +93% (I note this doesn't equate to mWh as the Li-ions run down to 2.5v to get their full capacity)

To help try to partially offset the current draw because of the extra weight I have put on larger 11x4.5 props. I really like them - although I didn't measure it precisely I get longer flight times with my stock batteries. Others have also had the same experience. It certainly flies very smoothly and quietly.

2 x #APCLP11045MR-ST - APC 11x4.5 Multirotor Self-Tightening Propeller (cost GBP £7.58)
2 x #APCLP11045MRP-ST - APC 11x4.5 Pusher Multirotor Self-Tightening Propeller (cost GBP £7.58

The proof of the pudding will be a stock vs DIY battery hover endurance test. I will try to do this over the weekend.

Has anyone else tried this BMS alternative mod - apart from those already posted in this thread... Would be great to hear more experiences.
Have you used a 3p version to give you the 30A current draw (10A from each set of 4 cells)? Having 2p would reduce the weigh to the same as the original pack but with 6,700mAh.

I did think about including some code that calculated the power used (V * I) with each reading and then sum it. This would give another way to calculate the remaining capacity but would require the same pack size used each time and that defined in the code.

I have ordered the variable resistors and some surface mount ones from RS which should arrive next week and i will be getting a 4s lipo pack in the next week or so will try and get something rigged up for testing.

I have had a look through your code and if you are happy will look to include yours into mine and set some switches to turn on and off the different selections (like they do for the 3D printing firmware - I will need to do a bit of research to get it right).

So glad this idea has gotten into the air.
 
Hi Webbs,

Firstly thank you to you and the other contributors on the thread who did the work on this so far. I am more than happy if you want to put parts of my code into yours.

Have you used a 3p version to give you the 30A current draw (10A from each set of 4 cells)? Having 2p would reduce the weigh to the same as the original pack but with 6,700mAh.

I did think about including some code that calculated the power used (V * I) with each reading and then sum it. This would give another way to calculate the remaining capacity but would require the same pack size used each time and that defined in the code.

I have ordered the variable resistors and some surface mount ones from RS which should arrive next week and i will be getting a 4s lipo pack in the next week or so will try and get something rigged up for testing.

I have had a look through your code and if you are happy will look to include yours into mine and set some switches to turn on and off the different selections (like they do for the 3D printing firmware - I will need to do a bit of research to get it right).

So glad this idea has gotten into the air.

I did use 3p exactly because the max current draw from the Sanyo Li-ion 3350mAh 18650 cells is rated at 10A per cell. I am aware of some Samsung cells (Samsung INR18650-30Q 3000mAh - which can do 15A each) which would probably be ok in a 2p configuration. But I really was interested to see what a "10000mAh" pack (albeit heaver) would be able to manage (in terms of flight duration), when used with the slightly larger props.

The 4s3p configuration was a bit tricky to make - so as to make it fit into the solo battery bay - but not hit the props due to being too tall - But it was possible (and I used the car-battery spot welder approach to assemble the pack).

In terms of the calculated power used approach (V*I) - this is basically the Coulumb-counting idea I had in mind. Due to the potential integration errors (which could become really big over the course of a flight), it only makes sense if there's a decent (i.e. very well calibrated) current reading, but nevertheless I am still keen to explore it.

The tiny DS18B20 Digital Temperature Sensor chips have just arrived (as I think would be nice to be able to have indication of battery temp, and they don't add much mass) - so I will try this also - and see if I can mod your code to provide this to the solo to be able to see on Solex or Mission Planner.

Attached is a photo showing Solex (with the cell voltages), right next to the solo (with the small 0.49" OLED display on the battery) - everything is consistent. Yay!!

1578047572216.png

I think between us (and Madhackers work on a similar approach), it's very clear this is a viable pathway to using generic batteries of any type+capacity with the solo. I would love to see a 'plug and go' solution which people can buy (e.g. via Madhacker), but also a 'tinkerers/DIY' option (i.e. schematics, some PCB designs which people can have easily fabricated if desired, with supporting source code) for people like me to be able to build their own and which can be adapted. I think we are well on the road to having achieving the latter.
 
  • Like
Reactions: DJMc
Hi

I did a quick check to dump the SMBUS requests coming from the Solo to the "BMS'" (running Opensolo 4) (via the serial port on the Arduino pro mini). This is what I captured - and hence what appears to be necessary to fully mimic a real BMS in terms of what data the solo requests from the smart battery. For example - temperature is one of the missing data points:

Captured from Solo (Opensolo 4)
Hex Request from SoloMeaningCurrently Handled by "BMS emulator"
0x28cell voltage registerYes
0x2acurrent registerYes
0x10full capacity registerYes
0x23ManufacturerData No
0x08temperature registerNo
0x1cserial number registerYes
0x0fRemainingCapacity Yes
Expected - but not captured from Solo (Opensolo 4)
0x09Total Battery voltage
 
Hi

I did a quick check to dump the SMBUS requests coming from the Solo to the "BMS'" (running Opensolo 4) (via the serial port on the Arduino pro mini). This is what I captured - and hence what appears to be necessary to fully mimic a real BMS in terms of what data the solo requests from the smart battery. For example - temperature is one of the missing data points:

Captured from Solo (Opensolo 4)
Hex Request from SoloMeaningCurrently Handled by "BMS emulator"
0x28cell voltage registerYes
0x2acurrent registerYes
0x10full capacity registerYes
0x23ManufacturerDataNo
0x08temperature registerNo
0x1cserial number registerYes
0x0fRemainingCapacity Yes
Expected - but not captured from Solo (Opensolo 4)
0x09Total Battery voltage

That is what i found when i originally started (not in a nice table like that though :) ). It appears that if it gets a reply to a request it will keep asking but if nothing is returned it stops asking after a few tries. Earlier versions of the Solo firmware requested the Total Battery Voltage but the Green Cube and Version 4 now takes just the cell voltages.

A temperature probe would be easy to include, analogue or digital (I2C) but wasn't sure how it would be used. I will need to look at the source code and see what exactly the temperature request is expecting back and can then add that as an option to the code.

You could include one in each pack and then have a plug on the board to connect along with the balance plug or have it on a lead and insert it into the each pack. Since the arduino is programmable i though things could be added as the Firmware was updated and new requests were added.

Once a board design is finalised they could be produced and calibrated ready for sale along with the design and code for people to make their own. The battery connector will be the challenge to get at a good price. What is the shipping from your source as it wasn't mentioned on their site?

I'm currently busy commissioning a project in our factory (during our Xmas shut) so hope to get back into this in a weeks or so once it is bedded down.
 
  • Like
Reactions: Soy Sancho
Hi

A quick update. On Sunday (19 Jan 2020), I did a duration test flight using the BMS 'emulator' and a 10,000mAh li-ion 4s3p pack. The solo had slightly larger than stock props 11x4.5", and was carrying the 3dr gimbal and gopro hero 4 black.

I got over 25 minutes of flight time - which I think is excellent. I landed when one cell bank was showing just under 2.5v - but the other 3 cell banks were still at around 2.7 or 2.8v per cell (and the Sanyo cells in question can discharge down to 2.5v according to the datasheet). The current reading didn't show up correctly in solex (but I can see it in mission planner). But the voltage cell readings worked ok (and that is the most important bit of information).

i think maybe I either had one bad cell (they were refurbished cells, not brand new), or a dodgy spot weld in my DIY pack. Had it not been for that I could have probably got to 27 or 28 min flight time in a hover before getting to down to 2.5v per cell.

Anyway - really exciting as shows my goal of getting 25-30 minute flights (with gimbal) are possible, and only a couple of tweaks needed to get the 'BMS' emulator fully working.

youtube video of whole flight is below

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Last edited:
I had been looking for something like this for a few days and finally saw a post on Facebook :)
I saw above you don't manage manufacturer data yet. The button in the battery pack seems to be reported thru a bit in the manufacturer data, isn't it?

Regarding reading the individual voltage of the cells, what are you finally using? I saw in previous posts about the resistors acting as dividers, but won't that cause a slow drain in the battery pack that could eventually kill a battery if stored for a while? I also saw some post about a TI cell voltage monitor, but they seem expensive. Not sure what you are using right now, but using opamps seems like it should consume very low energy, and could even be switched on and off as needed with a mosfet.
 
Last edited:
Hi,

The resistors will limit the current draw to under 1mA per cell. This device will be left in the Solo and the battery will only be connected when you want to fly so won't drain the battery when not in use.

I am happy for someone to design an op amp circuit to add to the mix. When I looked into this it required more resistors, your example uses 14 compared to 8 for the voltage and would still require calibration. Also there is the op amp ICs to add to the circuit increasing the circuit complexity.

The chips I looked at could be used and I now have some to test. With the OLED using a software I2C these chips can be added to that. I paid NZ$7 for 3 of them so not too expensive.

I hope to get back into some circuit design work over the next few weeks and see how that goes.
 
Last edited:

New Posts

Members online

No members online now.

Forum statistics

Threads
13,094
Messages
147,748
Members
16,057
Latest member
Motoxxx1986