Hi Pavel,
Thanks for the hard work!!
I'm missing 2 key points:
1. PID bug for ARM on Error/A
2. Great implementation of dynamic power from Iggnus! :(
Please!
Thank you!
--
You received this message because you are subscribed to the Google Groups "cheali-charger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cheali-charge...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
1. PID bug for ARM on Error/A
2. Great implementation of dynamic power from Iggnus! :(
Iggnus, what do You think, can I merge the "dynamic power" code?I need your permission.
#define SOFT_SERIAL_IRQ_PRIORITY 0 |
// decrease priority need for TxSoftSerial |
#define TIMER_IRQ_PRIORITY 2 |
#define HARD_SERIAL_IRQ_PRIORITY 2 |
#define ADC_IRQ_PRIORITY 2 |
#define ADC_C_DISCHARGE_IRQ_PRIORITY 2 |
#define OUTPUT_PWM_IRQ_PRIORITY 1 |
Hi Pawel,
Today I compile your last version for may ARM charger. Most of time I played with ST-LinkV2 trying to remove unlock bit, but without success :(
Also I found that for TxSoftSerial it is necessary to adjust irq for all handlers.
SOFT_SERIAL_IRQ_PRIORITY must be higher priority. When PWM_IRQ & SERIAL_IRQ are same we have sporadic error in serial communication.
With this configuration TxSoftSerial work as expected.
#define SOFT_SERIAL_IRQ_PRIORITY 0// decrease priority need for TxSoftSerial #define TIMER_IRQ_PRIORITY 2 #define HARD_SERIAL_IRQ_PRIORITY 2 #define ADC_IRQ_PRIORITY 2 #define ADC_C_DISCHARGE_IRQ_PRIORITY 2 #define OUTPUT_PWM_IRQ_PRIORITY 1
How acurate PWM_IRQ timing must be?
Hi all,
Hi all,I updated my B6AC to 0.99 and started first tests (will get deeper into it this weekend - I don't want the charger run without monitoring it closely). The charging curve looks pretty good now, I like that!
A little improvement could be done with a Kalman filter which is used for Drones or in robotics pathfinding, I think: http://bilgin.esme.org/BitsBytes/KalmanFilterforDummies.aspx
Thank you for implementing a negative offset for the discharge end! This will also be part of my tests during the weekend. :)I noticed the charger now beeps every now and then while charging; I didn't take the time, but is that wanted behaviour? I think it beeps every minute, even when I disabled beep in the options.
if(!balance && !v_out && Keyboard::getPressed() == BUTTON_START) {
ok_++;
}
if(!balance && Keyboard::getPressed() == BUTTON_START) {to charge the batteries run down to 0V?
ok_++;
}
Maybe changeif(!balance && !v_out && Keyboard::getPressed() == BUTTON_START) {
ok_++;
}toif(!balance && Keyboard::getPressed() == BUTTON_START) {to charge the batteries run down to 0V?
ok_++;
}
And correct CoIDE project...
I don't know why my B6 nuvoton can't calibrate discharge. Maximum value calibration is 1561 and discharge ~52 amp
Strange. But with last firmware my nuvoton don't want calibrating discharge ( with default value 68 on 100ma menu i recive ~5ma and 431 value ~16.5ma. Maybe hardware is damaged?
After flashing device show reset eeprom and i choose yes. Then i'll try calibrating.
Pawel can we increase accuracy of resistance measuring by doing it at specially generated swings of current?
(measuring at small dI and dV gives us a very inaccurate results - up to two times difference... and sometimes much more)
Pawel you switched DelayStrategy to the seconds
but did not modify Time:diffU16().. I think it can fail after 18 hours of work
And a question about dV charging with enabled Dynamic Max Power -
What happens if input voltage (and output current) will be decreased during charging NiXX?
I finally jumped from the 0.32-njoszef branch to this 0.99. The Amperage reporting seems to be improved (more closely matches Fluke inline). However, just like Nagy 0.32, it won't charge greater than 1.3A on 6S (approximately 30W). Hardware is Accucel-6 50W 6A but with imaxB6 original ""SK6000A 10/10/2009" board inside. Stock FW will charge to 50W/6A without an issue.
It's getting better, I like this pre-release, thank you guys! Seems to be realy good, very acurate readings(voltage and current), with turnigy accucell 6 6A( sk6000a pcb) and imaxb6 orig. firmware, I can charge and discharge with 10 mA!
very acurate! usefull for small lipo's. Measurements on battery out, at low voltage, are less acurate, about 30 mV less, than multimeter readings (I suppose, it's a hardware issue) . It would be great, to add on the fly ajustments, Igon features.
Regards
--
that's right, so I set "min Iout" down to 10 mA and it works good. What about lower end voltage readings on batt out? if i calibrate it right(in expert calibration) on lower end( ex. 1 lipo or nimh cell) then it reads wrong on high end and vise versa. Any ideas?
Pawel, can you check an issue - charger does not show data screens if battery disconnects while D/C cycling process.may be this line https://github.com/stawel/cheali-charger/blob/master/src/core/strategy/Strategy.cpp#L147
must be changed to that one -- if(!run && exitImmediately && status != Strategy::ERROR) {
btw, why did you decide to disable D/C cycling for NiZN and LiXX?
The main reason was that I couldn't find any research that would saythat cycling does anything good to the battery, especially in case of LiXX.It looks like it only shortens the batteries live.
+1
Format D/C was my very way to get an idea of the real capacity and age of my batteries.
Please re-add!
Thx
--
+1
Format D/C was my very way to get an idea of the real capacity and age of my batteries.Please re-add!
Thx
Okay, if you have so much objections then rename it to "capacity check" feature and you are fine ;-)
Okay, if you have so much objections then rename it to "capacity check" feature and you are fine ;-)
--
Of course, formatting is senseless for Lixx batteries, my 100% ack!Well if you agree with that feature, you can slim, shrink and make it simplier and regain some storage if you hard code it back to 3 steps:1. charge full2. discharge --> meassure capacitiy3. charge --> meassure intake power consumptionThis gives you a nice overview of the quality of a battery!
Hello Pawel!I think, if you make reduce number of cells for battery profile, in result it's may be 20 cells anough. That's give more memory for store settings of battery.
That option "enab dV", "NiMH dV", "NiCd dV", "NiMH VCO", "NiCd VCO", "force bal" go to battery profile settings. It's my humble opinion.
Hello Paul, my name is Sergey. I have Nuvoton M0517LBN and want to upgrade I can not compile your projects, I work with Windows XP, CoIDE_V2Beta, gcc-arm-none-eabi-4_9-2014q4-20141203-win32 tried 4.8 , 4.7. Can you tell what is wrong. Syntax errors, there are many supposedly needed a non-standard compiler. But the projects sasam compiles all but one in Linux is not. The programmer I'm weak but I want to master this craft.I would be very glad if you will help me to understand what is wrong and it would be nice if it told how better to learn C/C++ .Thanks in advance.
yes... -dV can mistakenly occur at an old batteries at first 5-10 minutes of charging process
(I think it will be fixed)
And about "force bal" you are not right, simply try to charge 3 LiIon bateery in series connectionn without balance wires, only "+" and "-" from charger, option "force bal" is "on", the charge will not start, then turn option "force bal" is "off" and voila...
Well if you agree with that feature, you can slim, shrink and make it simplier and regain some storage if you hard code it back to 3 steps:1. charge full2. discharge --> meassure capacitiy3. charge --> meassure intake power consumptionThis gives you a nice overview of the quality of a battery!
That option "enab dV", "NiMH dV", "NiCd dV", "NiMH VCO", "NiCd VCO", "force bal" go to battery profile settings. It's my humble opinion.
Also it will be great if you add to battery profile o.charge, o.discharge, force discharge and min I out (stop charging (discharging) when current is lower than Ic/X (Id/X)) because different current, different wire resistance, different batteries need to define this setting for every battery profile.
speaking of wire resistance.. does anyone of you understand how this works? I'd assume Rcell is calculated from voltage drop under Load measured over balance port (whose wires are assumed to be 0 Ohm). Then the whole battery has also a resistance as measured by voltage drop under load, measured by the output connector. The difference is wire resistance.. Does that make sense?
Well if you agree with that feature, you can slim, shrink and make it simplier and regain some storage if you hard code it back to 3 steps:1. charge full2. discharge --> meassure capacitiy3. charge --> meassure intake power consumptionThis gives you a nice overview of the quality of a battery!Perfect function, but when I select in settings D/C cycles to 1 or 2 I get 2 cycles (1 charge 2 discharge-charge). Maybe first charge will name 0 cycle, then discharge-charge will be 1st cycle, next discharge-charge will be 2nd cycle, etc.
Of course. You must measure difference of voltage on the charger screen and on the battery directly by multimeter. If you know current (you know it) you can easy calculate wire resistance (and it don't depend of battery resistance). R = |Vbat-Vscreen| / ISo if charger know resistance of wire (and internal shunt resistor, MOSFET, etc) it can compensate voltage to show on the screen voltage on the battery.
I have to assume that readings of individual cells are without wire resistance, then it (kinda) works.
voltage of individual cells and charger output are measured by different OpAmps
Yes Vladimir, I will move all of the batteries settings into the battery profile,
but this will take some time.
which of the settings would you like to be globally settable?
but:- Temperature (most batteries do not like temperature over 60 degrees)- dT/dt- NiMH / NiCd VCO (because it's emergency values)- D/C cycles- D/C rest- cap COFF- bal errorthese settings really look like they should be in a battery profile,I'm not sure if it's really a big problem to change them N times.
I have a question: how can I save my settings, especially battery profiles, during reflash new firmware? After flashing I must reset all of settings and enter again 12 profiles take many time. Chasnge 2 roes in sourse code, reflash and again manual enter batteries profiles. brrr.
definitely dislike VCO - lower than 1.8V it is useless, higher - dangerousthere is no o.charge, o.discharge and aggressive discharge at battery settings.. I and Maksym were forgotten.. sadly...
definitely dislike VCO - lower than 1.8V it is useless, higher - dangerous
there is no o.charge, o.discharge and aggressive discharge at battery settings.. I and Maksym were forgotten.. sadly...
there is no o.charge, o.discharge and aggressive discharge at battery settings...
Is it possible to add setting fo Imax (C/xx) for agressive discharge? Now this setting is for charge and discharge, but in real life I like to charge up to C/25 and if I need agressive discharge, I like to dischatge up to C/10.
Pawel what can I use instead of the disappeared ProgramData::changeId/changeIc?
Quite bulky alternative to "nolimit" time-limit setting %)
void ProgramData::AutoTime()
{
uint32_t bat_ch = battery.Ic * 77; // 130% of charge
bat_ch /= battery.capCutoff;
uint32_t bat_dis = battery.adaptiveDis * 20;
bat_dis += 100;
bat_dis *= battery.Id;
bat_dis /= 110; // 110% of discharge
bat_ch = min(bat_ch, bat_dis);
bat_dis = battery.capacity * 60; // *60min
battery.time = bat_dis / bat_ch;
}
And another problem. In the profile settings NIMH battery tune "Ch"=nolimit, "Time"=nolimit, "Ic"=100mA, "Id"=100mA. In the basic configuration "capCOff"=100%. When the discharge and in "D>C format" current of discharge = 125mA. Any value of "capCOff" does not change the real current of discharge.
hmm... right, I forgot that you are using it,
I would probably use just this:change0ToInfSmart(&ProgramData::battery.Ic, direction);ProgramData::check();or we can restore the previous ProgramData::changeId/changeIc methods.
I'm not really sure if the time limit is so important,the capacity cutoff limit does exactly the same thing,
Oh, sorry, I asked my question a bit wrong - I mean - need I use some new function or just restore old?
(at first StaticEditMenu::editItem looks compatibly, but at second it looks too complex)So, I restored old functions
Pawel what do you think about such calculation? -
AnalogInputs::ValueType Thevenin::calculateI(AnalogInputs::ValueType v) const
{
int32_t i;
i = v;
i -= VLast_; // difference between present and desired voltage
i *= Rth.uI;
if(Rth.iV != 0) i /= Rth.iV; // dV / R = amount of current error
else return UINT16_MAX;
i += ILast_; // adding correction to main current
if(i > UINT16_MAX) return UINT16_MAX;
if(i < 0) return 0;
return i;
}
Thevenin::calculateVth(AnalogInputs::ValueType v, AnalogInputs::ValueType i) - is it open-circuit voltage of a battery?
I need the memory because I will probably try to implement a power supply it the (far) future.
when we are charging for example with 2A:1. we first start with 10%*2A = 200mA,
2. we wait until the voltage stabilizes,
3. we measure the voltage at this point (this is VLast_)
is this not the same?
I need the memory because I will probably try to implement a power supply it the (far) future.It can be not possible without hardware modifications :(
when we are charging for example with 2A:1. we first start with 10%*2A = 200mA,
2. we wait until the voltage stabilizes,
3. we measure the voltage at this point (this is VLast_)strange.. because if I try to charge overdischarged LiXX (0V at terminals due to overdischarge protection)
the current stops its raising at 50-90mA. calculated resistance also is very big - 10 ohms and more
(wow! Rth.iV=3137 Rth.uI=35 R = 24092 xmm.. 16bit.. )
is this not the same?no! - my variant is easier ;) It don't need Vth subroutine
Mathematically? - may be
Practically - if(v < VRth) Vth_ = 0;(without modification firmware is not suitable for 2-cell protected LiXX without balance-port)
I have a question.o.discharge voltage correction - must I enter this voltage per cell? Or for the whole battery?
---lcdprint_opt
Unknown battery has a logical problem with voltage * cells and Vc_per_cell (Vd_per_cell)
And it hasn't its own #define COND_Unknown at ProgramDataMenu so Vc_per_cell and Vd_per_cell <= 5V
Keyboard.cpp
Original speedFactor was like an unpredictable rocket - 1 2 3 4 5 6 7 8 10 20 1000!
gentle version: static const uint16_t speedFactor[] PROGMEM = {1, 1, 10, 10, 10, 10, 100};
or {1, 1, 10, 10, 10, 11, 100} - it even warn you before final acceleration