Generic Battery + Arduino = Happy Solo

Truly awesome!

Great idea to add solo plug to the board and the xt60 plug.

The neopixel brightness can be adjusted in the code. I know on the ground it is very bright but was thinking in the air it would be ok. Also I thought I would use a lead and mount it under or on the back of the solo.

I haven't seen any voltage dividers with caps on them but they could help. We could also introduce a filter into the code to smooth out some of the noise.

Is the 4.57V enough to power the arduino?

The dip switch was to allow for some selection including a serial number for the battery so Solex can keep track of the batteries used.

Let me know if you are happy to mod the code for the brightness and filtering the voltage values otherwise I will have a look.

Great work and some great improvements to the board design.
 
I have added in a filter for the voltage, a value of 1 will not carry out any filtering. The smaller the value the more filtering that is done.

I have also added a brightness setting for the NeoPixels. 0 - 100 which is 0-100%

I have just updated the code for the cell calculations to use the the actual value read for cells 1, 2 and 3 when doing the maths with the voltage divider and not the filtered value.
 

Attachments

  • Solo_SMBus_V3.zip
    5.9 KB · Views: 23
Last edited:
Truly awesome!

Great idea to add solo plug to the board and the xt60 plug.

The neopixel brightness can be adjusted in the code. I know on the ground it is very bright but was thinking in the air it would be ok. Also I thought I would use a lead and mount it under or on the back of the solo.

I haven't seen any voltage dividers with caps on them but they could help. We could also introduce a filter into the code to smooth out some of the noise.

Is the 4.57V enough to power the arduino?

The dip switch was to allow for some selection including a serial number for the battery so Solex can keep track of the batteries used.

Let me know if you are happy to mod the code for the brightness and filtering the voltage values otherwise I will have a look.

Great work and some great improvements to the board design.
Hello webbs,
4.57v is not VCC but just reference voltage generated by LM4040. but it was wrong value. eagle library i used for lm4040 had reversed connection. lm4040 was dead and i have no more. I used reference voltage from regulator like you did.
Regarding board's size, I prefer smaller and simpler. I will upload 2 versions of 'neopixel' and '0805 leds(8pcs)' to make everybody happy. I attached photo showing real size of board and battery mounted in solo.
Now i am struggling with i2c communication. simply there were none of i2c connection to be made with solo. I checked all wire connection and pin layout. I found no mistake. Can you give me any clue? It need pull up resistor??
 

Attachments

  • IMG_20190901_123741.jpg
    IMG_20190901_123741.jpg
    3 MB · Views: 71
Hello webbs,
4.57v is not VCC but just reference voltage generated by LM4040. but it was wrong value. eagle library i used for lm4040 had reversed connection. lm4040 was dead and i have no more. I used reference voltage from regulator like you did.
Regarding board's size, I prefer smaller and simpler. I will upload 2 versions of 'neopixel' and '0805 leds(8pcs)' to make everybody happy. I attached photo showing real size of board and battery mounted in solo.
Now i am struggling with i2c communication. simply there were none of i2c connection to be made with solo. I checked all wire connection and pin layout. I found no mistake. Can you give me any clue? It need pull up resistor??
Looking at the picture the board is quite tall compared to the bay of the Solo. I had planned on using wires to the solo plug so could locate the board on the bottom or underneath. You idea of adding the plug to the board is great so it is a case of how to lay out the board to work with that. Maybe turn the arduino 90 deg and have a longer board?

I didn't use any pull up resistors in my test circuit and it worked ok. The on board LED should change state each time the solo requests data from the arduino. Make sure the arduino in on before you power up the solo. Does the balance plug power your arduino board? The solo will try and communicate for a few seconds with the battery (arduino) and then stop if it doesn't get any response.

Which version of the code are you using?

Can you check the SDA and SCL are around the correct way, this caused me a lot of problems when i first started testing as i had it wrong.

I can see the Neopixel is green so it has read the voltage and updated the battery status (it starts off blue).

If there is still a problem could you connect up your serial programmer while the board is installed and then we could look at adding some debugging code? If not i could look at writing some code to use the Neopixel LEDs for debugging.

Let me know how you get on.
 
Looking at the picture the board is quite tall compared to the bay of the Solo. I had planned on using wires to the solo plug so could locate the board on the bottom or underneath. You idea of adding the plug to the board is great so it is a case of how to lay out the board to work with that. Maybe turn the arduino 90 deg and have a longer board?

I didn't use any pull up resistors in my test circuit and it worked ok. The on board LED should change state each time the solo requests data from the arduino. Make sure the arduino in on before you power up the solo. Does the balance plug power your arduino board? The solo will try and communicate for a few seconds with the battery (arduino) and then stop if it doesn't get any response.

Which version of the code are you using?

Can you check the SDA and SCL are around the correct way, this caused me a lot of problems when i first started testing as i had it wrong.

I can see the Neopixel is green so it has read the voltage and updated the battery status (it starts off blue).

If there is still a problem could you connect up your serial programmer while the board is installed and then we could look at adding some debugging code? If not i could look at writing some code to use the Neopixel LEDs for debugging.

Let me know how you get on.
Thanks for response.
Here are what i tired for last couple of hours.

- Insert debugging code. Problem is that there were no receive/request event at all.
- Check SDA/SCL wire connection.(A5:SCL, A4:SDA) even i tried to cut pcb trace and used hard wires.
- Adding pullup resistors(4.4K) to i2c wires.
- Tried another 2 pro-mini.
- Tried another 4s battery.
- cleaning pcb......

All come same result. I have done all things i can think.
Solo are giving expected battery info when mounting stock battery.
There are no problem with measuring voltages and driving neopixel.
I'm under arduino ide 1.8.9 and using stock Wire library.
I've tested both of your v2 and v3. no difference.
arduino was powered from balance plug and on before connect to solo.
As i mentioned, Problem is there are no receive/request event.
SDA/SCL line remained LOW after connection to solo. I doubt i2c connection has not been made. but why? all 3 pro-mini i have are defected??
 

Attachments

  • serial_debug.jpg
    serial_debug.jpg
    114.3 KB · Views: 38
Last edited:
I will check which wire library I am using but I think it is the standard one.

I am not at my computer at the moment but just thinking there might be a difference in the I2C bus pins between the arduino boards. Can you check the code isn't assigning these pins to anything else?

The voltage values look good but your current value looks high 24 amps.

Is there an earlier version of the code in one of my posts?
 
The solo is looking for a -ve current value (which it changes to +ve to display) so you might need to change the code to send the value as -ve.
 
I have had a look through the code and A4 and A5 are not used in the code. I am using the default Wire library which turns on the internal pull up resistors when it is started.

Are you using the 5v or 3.3V version of the pro mini?

I will check if i have a pro mini the same as yours (there are a lot of different pin layouts for these) and will set it up and do some testing. Hopefully i can do this tomorrow night.

Banggood Arduino Mini Pro

I have ordered 3 of the above which look the same as yours and they should be here early next week.
 
I have just been looking at the logs from some of my flights in mission planner and can see the pack voltage (CURR - Volt) and Total Current (CURR - CurrTot) used. Is there a way to export just these values from the logs so i can then look to create a better formula for working out pack capacity rather than the current linear one? Also if anyone wants to post this data from their flights along with their thoughts on the battery condition (new, ok, dying etc.) i can get a bunch of data together and use this site Online curve-fitting at mycurvefit.com or similar to generate the formula.
 

Attachments

  • Current and Voltage.jpg
    Current and Voltage.jpg
    92.2 KB · Views: 29
I have had a look through the code and A4 and A5 are not used in the code. I am using the default Wire library which turns on the internal pull up resistors when it is started.

Are you using the 5v or 3.3V version of the pro mini?

I will check if i have a pro mini the same as yours (there are a lot of different pin layouts for these) and will set it up and do some testing. Hopefully i can do this tomorrow night.

Banggood Arduino Mini Pro

I have ordered 3 of the above which look the same as yours and they should be here early next week.
Mine is 5v. I think you used nano. It might be same 5v? You have any info about Solo's I2C bus? is it 5v or 3.3v?
What you ordered from banggood is exactly same as mine.
I tried previous version of arduino ide. no difference so probably it's not because of wire library.
Regarding pcb shape, long and slim one should be better as you wrote. will change design this weekend.
 
Last edited:
I have just been looking at the logs from some of my flights in mission planner and can see the pack voltage (CURR - Volt) and Total Current (CURR - CurrTot) used. Is there a way to export just these values from the logs so i can then look to create a better formula for working out pack capacity rather than the current linear one? Also if anyone wants to post this data from their flights along with their thoughts on the battery condition (new, ok, dying etc.) i can get a bunch of data together and use this site Online curve-fitting at mycurvefit.com or similar to generate the formula.
The logs are text files....

It should be no problem to use Awk to filter it down to just those lines, Even Grep would do it. This assumes access to a linux command line.

PM me for an email address if you don't have the knowledge or access to a linux command line. I can take your logs and spit out just the lines with CURR in them for you....
 
Mine is 5v. I think you used nano. It might be same 5v? You have any info about Solo's I2C bus? is it 5v or 3.3v?
What you ordered from banggood is exactly same as mine.
I tried previous version of arduino ide. no difference so probably it's not because of wire library.
Regarding pcb shape, long and slim one should be better as you wrote. will change design this weekend.
When people were looking at talking to the Solo battery there was discussion around the bus being 3.3V. I did use a level shifter when i first started talking to the Solo battery but since then after some more research i have just used 5V.

I have been using version 1.8.9. Initially when i had the issues i thought it was the wire library that was causing the problem and spent a lot of time trying to understand how it worked and looking at the Solo's I2C code as well. It turned out it was missing the PEC and the wire library worked fine.

When testing with this your Solo powers up OK and connects to the controller?

Do you have a way to connect a stand alone arduino to the Solo's I2C connection (not worrying about getting real voltage values etc - you can hard code something in) and then powering the solo? The big thing is to have the arduino GND connected to the 0V of the battery (again i learnt this when trying to get things to work).

I will hopefully get a chance to get things out and do some testing with a pro mini tonight.
 
The logs are text files....

It should be no problem to use Awk to filter it down to just those lines, Even Grep would do it. This assumes access to a linux command line.

PM me for an email address if you don't have the knowledge or access to a linux command line. I can take your logs and spit out just the lines with CURR in them for you....
Thanks just_bruce

I do have a virtual machine using linux but will see if i can have a look at the file in windows first. If i run into problems i'll let you know.
 
Thanks just_bruce

I do have a virtual machine using linux but will see if i can have a look at the file in windows first. If i run into problems i'll let you know.
I have copied and changed extension of the log to CSV and opened it in excel. I have filtered by CURR and have all the values for total current and voltage.

I will have a play with the data and see what i can come up with and then will see what sort of graph i can generate.......
 
When people were looking at talking to the Solo battery there was discussion around the bus being 3.3V. I did use a level shifter when i first started talking to the Solo battery but since then after some more research i have just used 5V.

I have been using version 1.8.9. Initially when i had the issues i thought it was the wire library that was causing the problem and spent a lot of time trying to understand how it worked and looking at the Solo's I2C code as well. It turned out it was missing the PEC and the wire library worked fine.

When testing with this your Solo powers up OK and connects to the controller?

Do you have a way to connect a stand alone arduino to the Solo's I2C connection (not worrying about getting real voltage values etc - you can hard code something in) and then powering the solo? The big thing is to have the arduino GND connected to the 0V of the battery (again i learnt this when trying to get things to work).

I will hopefully get a chance to get things out and do some testing with a pro mini tonight.
PEC shouldn't be issue as i'm using your code. I was testing under common ground of solo and arduino. connection between solo and controller was normal. everything was fine but lack of battery info from mission planner. will investigate more with direct connection to solo's i2c later.
about regulator. it really need 1.5A TL780? I guess needed supply current for arduino and acs758 is about 50-100ma more or less. any other reason to use TL780? if not it's better to use much smaller 0.5A one. If it's for accuracy. voltage reference like lm4040 can save space. I have no idea about current sensor. but smaller is better. Thickness of solo battery is about 40mm. so height of pcb should be shorter than this. actually 20mm is best. but practically impossible as long as using pro-mini.
 
The Neopixel will draw around 480mA and the arduino around 100mA so i was looking for about 1A to give some breathing room, next i looked at accuracy and the TL780 was 1%. I was also looking at the cost of getting them from RS and this one came in a packet of 5, others were cheaper but came in lots of 1,000 etc. I found this AZ1117H-5.0TRE1 surface mount one rated at 1A which i had on my surface mount version.

I was thinking if you got just the arduino talking to the Solo without the circuit board then that will give you a starting point to trouble shoot.

The pro mini is 18mm so yes having a board of only 20mm would be hard. It would require a long board but with the solo plug and XT60 at the start then it might work....
 
The Neopixel will draw around 480mA and the arduino around 100mA so i was looking for about 1A to give some breathing room, next i looked at accuracy and the TL780 was 1%. I was also looking at the cost of getting them from RS and this one came in a packet of 5, others were cheaper but came in lots of 1,000 etc. I found this AZ1117H-5.0TRE1 surface mount one rated at 1A which i had on my surface mount version.

I was thinking if you got just the arduino talking to the Solo without the circuit board then that will give you a starting point to trouble shoot.

The pro mini is 18mm so yes having a board of only 20mm would be hard. It would require a long board but with the solo plug and XT60 at the start then it might work....
I didn't care of neopixel. yes it consume relatively a lot current. AZ1117 is fine. also i suggest AMS1117-5.0 which has same sot223 package like AZ1117. more popular and easier to find out. one is compatible with the other in design.(same package/pin layout) LM4040-4.1 will be with regulator.(but AMS1117 itself are supporting reference voltage of 1.25v. check it out from datasheet)
I will put DF13 3 pin connector for neopixel and layout 8 pcs of 0805 sized single color leds on the top of board. also I2C connector will be added. It might be useful for connecting i2c devices to solo. so there are no room for dip switch.
one consideration is trace width. solo consume 15-20A. by calculation it need to be thicker than 18.7mm if you choose 1oz copper. 9.36mm in case of 2 oz. this factor affect height of pcb. will see. if you have any thought about pcb design. let me know before weekend.
 
Last edited:
I didn't care of neopixel. yes it consume relatively a lot current. AZ1117 is fine. also i suggest AMS1117-5.0 which has same sot223 package like AZ1117. more popular and easier to find out. one is compatible with the other in design.(same package/pin layout) LM4040-4.1 will be with regulator.(but AMS1117 itself are supporting reference voltage of 1.25v. check it out from datasheet)
I will put DF13 3 pin connector for neopixel and layout 8 pcs of 0805 sized single color leds on the top of board. also I2C connector will be added. It might be useful for connecting i2c devices to solo. so there are no room for dip switch.
one consideration is trace width. solo consume 15-20A. by calculation it need to be thicker than 18.7mm if you choose 1oz copper. 9.36mm in case of 2 oz. this factor affect height of pcb. will see. if you have any thought about pcb design. let me know before weekend.

I have just done a quick chop of your board with a component layout to give the narrow board for the main power part. The board inside the solo battery is very narrow and gets power I2C out. I don't have one anymore as i chopped it for my testing (photos in earlier post). I am not sure what thickness copper they used. Is it an issue using a board with thicker copper other than an increase in price?
1567535370816.png

The AMS1117 is similar and has an accuracy of 1.5% and will work. Having 8 LED's will then require 8 outputs rather than the 1 for the neopixel. If you drop the DIP switch then that will free them up. Would it be possible to have a 3 or 4 DIP package?
 
I have just done a quick chop of your board with a component layout to give the narrow board for the main power part. The board inside the solo battery is very narrow and gets power I2C out. I don't have one anymore as i chopped it for my testing (photos in earlier post). I am not sure what thickness copper they used. Is it an issue using a board with thicker copper other than an increase in price?
View attachment 10438

The AMS1117 is similar and has an accuracy of 1.5% and will work. Having 8 LED's will then require 8 outputs rather than the 1 for the neopixel. If you drop the DIP switch then that will free them up. Would it be possible to have a 3 or 4 DIP package?
thanks for chopping:))) chop chop. i like this english word. it remind me of something. chop chop chop.
LM4040 is 1% accuracy. you don't want to use additional voltage reference ic? then it need to pull one pin header from vcc of regulator. let me know.
one single 0805 led consume about 20-25ma. so 160-200ma.
I checked pins out and allocate them as follow.

led1 -> D6, led2 -> D7, led3 -> D8, led4 -> D1, led5 -> D2, led6 -> D3, led7 -> D4, led8 -> D5

then 4 pins(D4,D3,A7,D13) are still available. but one of them(D13) is allocated to builtin led as we know. if you give up builtin led. it is possible to put 4 bits dip switch within board. if not, 3 bits. and pull down is easier to wiring than pull up in this case. need to change code.

about pcb manufacturing, 2 oz is usually 2-3 times more expensive than 1oz. also they have same pricing policy for size out of 100x100mm. so i will try to stay with 1oz and smaller than 100mm.
 

New Posts

Members online

No members online now.

Forum statistics

Threads
13,094
Messages
147,748
Members
16,058
Latest member
Gabriela