Generic Battery + Arduino = Happy Solo

Joined
May 9, 2017
Messages
51
Reaction score
24
Age
44
With this code the voltage of each individual cell is sent through to the Solo (which then adds them to give total voltage) as that is now what is requested rather than the 3DR firmware which requested just total voltage. The remaining capacity is worked out as a 0-100% of 5200mAh based on the total voltage. The 0% and 100% voltages are programmed so can set as required before programming the Arduino.

I am not sure if there is individual cell set points for RTL in the 3.7 version.
 
Joined
May 6, 2015
Messages
399
Reaction score
224
Age
58
I am not sure if there is individual cell set points for RTL in the 3.7 version.
Not to my knowledge.
But you may trigger action from the Arduino, eg by setting Solo to RTH via mavlink when a cell is going down. Or to trigger the LEDs, or buzzer,...
 
Joined
May 9, 2017
Messages
51
Reaction score
24
Age
44
Hi fpvsteve,

The Arduino board in this setup is just pretending to be a Solo smart battery and delivering data to the Solo from a standard battery. Currently all it does is respond to the requests from the Solo. I have tested a set of 8 Neopixel LED's to give battery level by dropping LED's and changing colour as the voltage drops. There are plenty of outputs available so could add external buzzers etc if the difference between cells gets too large or voltage drops below a certain level.

Once i have this setup running delivering the basics of being able to use any 4S lipo battery on the Solo i am happy to look to add features if people would like.
 
  • Like
Reactions: Wetstone
Joined
May 9, 2017
Messages
51
Reaction score
24
Age
44
I took to the circuit board from my opened battery and cut it just past the plug. (It looks like the +ve is always on and the negative is switched when the battery is turned on). I sanded back the -ve section of the board and soldered on a lead to an XT60. I moved the -ve lead (after the photo) to the same position as the +ve lead (with a better soldering job this time) so it as a better fir in the case. I also removed the +ve lead i cut and then soldered in the other lead for the XT60. I then added 2 wires for the I2C bus. I iwll then glue this back into the case once i finish my voltage divider board and program up my Arduino. Steps forward........

10151
10154
10152
10153
 
Last edited:
  • Like
Reactions: Derriell
Joined
May 9, 2017
Messages
51
Reaction score
24
Age
44
I have joined all my code I have been testing together.
SMBus communication
Voltage divider for cell measurement
Neopixel LEDs for remaining capacity.

I have allowed the high and low limits of the cells and the actual values for the voltage divider resistors to be set before down loading the code.

I have also been testing an OP amp as a differential voltage monitor so I can connect each cell directly and get a reading. This may work but looks like it could involve a lot more resistors and a cheap LM324. This will make a bigger circuit so may just stick with the voltage divider.

I have ordered another current monitor with express delivery so hope to get that early in the week and can then finish off my program and get some testing under way.
 
Joined
May 9, 2017
Messages
51
Reaction score
24
Age
44
I have managed to get some time and have done a test powering up the solo.
Picture 0
I have installed a voltage regulator to provide the Arduino with 7V from the 14.8V battery. I was having issues with accurate readings of the cells powering the Arduino from the PC's USB. The voltage regulator fixed that and will be needed as part of the install.
Picture 1
I am using a 5S battery to provide 4 cells for the voltage divider and this is the reading that the Solo is getting. I am using a power supply set to 15v to provide the power to the Solo (and voltage regulator).
Picture 2
Voltage divider. I have used a 5 pin plug for the voltage divider (to connect to a standard 4S battery) and then added a 6 pin plug to connect up my 5S battery with a lead to connect the first 4 cell to the divider.
Picture 3
I am using an Arduino Uno with a shield to make connections easy for testing. Once the current monitor is here and tested i will solder all the connections to an Micro or Pro Mini.
Picture 4
The Neopix indicating the battery level. Battery is 64% so 5 Orange are on.
>90% - 8 Green
>80% - 7 Green
>70% - 6 Green
>60% - 5 Orange
>50% - 4 Orange
>40% - 3 Orange
>30% - 2 Red Flashing
<30% - 1 Red Flashing
Picture 5
Power supply set at 15V and Solo drawing 718mA.
Picture 6
Solex showing 15.09V (from the 4 cells connected to the voltage divider) and 64% remaining (based on high (4.2V) and low (3.0V) battery levels. The low level can be set an any value. I set it at 3V for testing.
Picture 7
Solex showing the battery disconnected. The current is fixed at 2A as i don't have the current unit yet for testing.

Good progress has been made. I have tested this with original 3DR firmware, Open Solo 3 and the 3.7 Dev and all work as expected.

I am just waiting on the current module which i should get this week (fingers crossed) and can make a final push to finished setup.
 

Attachments

Joined
May 9, 2017
Messages
51
Reaction score
24
Age
44
My ACS758LCB-050B current module arrived and i have got it up and running.

Attached is the code I have used for my Arduino.

I have tested this with the above setup and all the data is coming through in Mission Planner.

I just need to make myself a small circuit board for the voltage divider and may look to add in the current chip as well to make the setup as small as possible.

For a "real world" test i just need to see if i can borrow a 4S lipo and strap this all in and see if i can get my Solo up in the air.....

I am happy for any help in refining the code or adding anything that might be missing.

I am looking at adding a set of dip switches so the serial number can be set for each battery so Solex can log each one. This is a nice to do rather than a requirement.
 

Attachments

New Threads

Members online

Forum statistics

Threads
11,945
Messages
139,990
Members
13,826
Latest member
Paulypluga