Thank you.Maybe one of the solution is to add in settings "Wire resistane" (Rshunt + Rmosfet + Rwire) and correct voltage using the U = I*R. I know that this solution is using in patched genuine firmware (but the resistance for correction is in firmware and you can't change it without reflash).
The other solution maybe is to calibrate discharge voltage on different current and calculate correction.
This two solutions for use only power plug without balance port."but for that you will have to change also this part:
Sorry, but I don't know programming language and can't change code myself. But if you can tell me what must I change I can try it and build hex.
As I understand if I use third balance port (connect battery to pins 3-4) I can't use it for balancing as usual?
It's not a big problem for me, but it will be better if I can select in battery setup use port 3 for measure battery voltage or use balance port as usual.
This two solutions for use only power plug without balance port."but for that you will have to change also this part:Sorry, but I don't know programming language and can't change code myself. But if you can tell me what must I change I can try it and build hex.here you go, I didn't tested this code so be careful (previously, I missed the lines ;) ):diff --git a/src/core/AnalogInputs.cpp b/src/core/AnalogInputs.cppindex 9ef6861..2fbca03 100644--- a/src/core/AnalogInputs.cpp+++ b/src/core/AnalogInputs.cpp@@ -506,8 +506,10 @@ void AnalogInputs::finalizeFullVirtualMeasurement()uint8_t ports = getConnectedBalancePorts();- for(uint8_t i=0; i < ports; i++) {- balancer += getRealValue(Name(Vb1+i));+ for(uint8_t i=0; i < MAX_BANANCE_CELLS; i++) {+ if(isConnected(Name(Vb1+i))) {+ balancer += getRealValue(Name(Vb1+i));+ }}setReal(Vbalancer, balancer);
here you go, I didn't tested this code so be careful (previously, I missed the lines ;) ):diff --git a/src/core/AnalogInputs.cpp b/src/core/AnalogInputs.cppindex 9ef6861..2fbca03 100644--- a/src/core/AnalogInputs.cpp+++ b/src/core/AnalogInputs.cpp@@ -506,8 +506,10 @@ void AnalogInputs::finalizeFullVirtualMeasurement()uint8_t ports = getConnectedBalancePorts();- for(uint8_t i=0; i < ports; i++) {- balancer += getRealValue(Name(Vb1+i));+ for(uint8_t i=0; i < MAX_BANANCE_CELLS; i++) {+ if(isConnected(Name(Vb1+i))) {+ balancer += getRealValue(Name(Vb1+i));+ }}setReal(Vbalancer, balancer);
here you go, I didn't tested this code so be careful (previously, I missed the lines ;) ):diff --git a/src/core/AnalogInputs.cpp b/src/core/AnalogInputs.cppindex 9ef6861..2fbca03 100644--- a/src/core/AnalogInputs.cpp+++ b/src/core/AnalogInputs.cpp@@ -506,8 +506,10 @@ void AnalogInputs::finalizeFullVirtualMeasurement()uint8_t ports = getConnectedBalancePorts();- for(uint8_t i=0; i < ports; i++) {- balancer += getRealValue(Name(Vb1+i));+ for(uint8_t i=0; i < MAX_BANANCE_CELLS; i++) {+ if(isConnected(Name(Vb1+i))) {+ balancer += getRealValue(Name(Vb1+i));+ }}setReal(Vbalancer, balancer);I had test this code. You lost one } but I add it.
I got a problem with this code - I can't calibrate voltage. I use battery 25.79V and resistor divider fo 6 ports of balance plug. I calibrate from Vb1 to Vb6 but at the end V1-6 show 49.318V and Vout show 0V. Before calibration V1-6 show about 52V and Vout show 25V.
Maybe I can calibrate pot 5 for lower voltage and port 6 for higher voltage for compensation? In real life I don't use balance pot, but even if I use it I never use port 5-6.
As I can understand from code I can use any balance port? So I check voltage accuracy. Now difference is not depend of current! Perfect! 4-wire connection is the best solution! But the difference is :( . On port 3 I have difference of 20 mV, on the port 5 16 mV (on the battery higher voltage than on the screen). Why? I make precise calibration so every channel calibrated +/- 1 mV, but I get difference 15-20 mV (of course on the port 1-2 much more on high current).Also I go to voltage calibration with 1S battery and connect balance wire to port from 1 to 5 and get difference V1-6 and Vout when I connect balance wire to port:Port 1: 3 mVPort 2: 1 mVPort 3: 22 mVPort 4: 29 mVPort 5: 10 mVThe good news is that I can select o.charge and o.disgarge in settings and it's independent of current. But mayby there are other way to correct the difference? And why do I get the diference?Thank you.
I have one question: maximum voltage for balance port? For example if I want to connect Pb 12 V battery can I do this? Or 2S LiPol wothout balance plug (battery from camera, for example)?
hmm... how do you measure the error?
I'm also not sure if a resistor divider is the best choice for calibration,
what kind of resistors are you using?
hmm... how do you measure the error?By multimeter. Also difference is between power output and balance port when the current is 0.
I'm also not sure if a resistor divider is the best choice for calibration,
what kind of resistors are you using?100 Ohm for every port.
100 Ohm for every port.are you measuring the voltage on each resistor and typing this value into the charger?you should.
100 Ohm for every port.what tolerance have these resistors?
It's strange that you have a bigger accuracy on first 2 port inputs,than on 3-6, I would rather expect the opposite.I have no idea why this is so.