I just found out that all my INR18650-30Q cells have only around 3,40-3,50V. Now they are all in charger.
Will report back if this will fix the problem. Most likely it will.
Another way of looking at this phenomenon is by analysing what exactly current is. 1A = 1 Coulomb of electrons/sec, which is an amount of particles per unit time.
This should mean that if the FET is opened 50% of the time, then only half the amount of electrons pass through. This should result in half of the current, hence 7.5A, hence voltage sag when 7.5A.
Edit:
Analogue. It’s actually the same thing with why PWM is used in the first place. Max output of let’s say 1000 lumens, and if we use PWM to reduce output to 500 lumens, then the max output is still 1000 lumens, except we see only 500 lumens. 500 lumens is the effective value, although max output is 1000 lumens.
Therefore max draw with PWM is 15A, but it alternates between this and 350mA so fast that the effective valuer is 7.5A.
You are right, sadly buck drivers all have big inductors, I don’t think it is possible to replace the driver with a buck in D4, unless putting shorter batteries in tubes meant for longer ones.
Half hour into the test, output is back to 175 lumen, resting battery voltage is 3.27 V now.
I have reset the output at 210 lumen (sorry, setting an exact output using ramping is not easy).
I have to leave in 10 munutes (family related stuff: dinner in restaurant ) so next report is then. Further testing later this evening.
Have to go, at this monent no LVP has kicked in yet, the D4 is down to 193 lumen, with a rested battery voltage of 3.18 V. A li-ion at 3.18 V is as good as empty (less than 5%? Who knows exact values?).
Hold on, maybe I’m not getting it, but we want to know what voltage sag is when output is a fairly low 200 lumens, and whether LVP is going to kick in or not right? The question is whether voltage sag is the same high value when current draw is 15A or not (and I claim it’s not: much lower)?
Ok, so why not just measure voltage directly? Let’s say resting voltage is 3.3V (example), and we connect battery to D4’s head without battery tube using low resistance wire. Then we measure voltage directly when output is around 200 lumens, so we know voltage sag immediately or not?
That requires a DSO.
Edit: Even if we can see the voltage, we don’t know how the protection circuit works, maybe it is triggered with one low voltage measurement, maybe it is triggered when seeing consecutive measurements for who knows how long. Wait, my bad, its open source.
Of course. This is the kind of mistake I would have made if I were testing… ugh… :person_facepalming:
Edit:
It’s frequency/algorithm related that the DMM is likely not able to give the correct value (I think). But would an analogue volt meter give the correct value?
To see the voltage fluctuation under 15kHz PWM, we need something with sampling frequency higher than 30kHz, store the samples, and show the curve on a screen.
Yes we do, and I see you figured that out. The most relevant section of the code is here
To sum up for those who don’t read C, it checks for low voltage every 16ms and steps down if it detects low voltage four times in a row. That’s many times slower than the PWM and should be sufficient to prevent spurious stepdowns.
Ok, but the next question is what exactly is observed: what exactly does the hardware see? In reality you can have high frequency fluctuation of voltage due to PWM, but what does the voltage sensor read? Is it able to extract the peak low voltages in a tiny interval, so LVP kicks in, or maybe it only sees an average, so LVP does not kick in? So, something checks voltage, but the voltage is not a fixed value (PWM)…
That will do it! I find a couple of spare ready to go 30Q’s work with this light………….does not take long to get the V down into the mid 3’s. Swap out and carry on the fun
What would work better is having 3 x D4’s , that way the spare cells are housed for instant WOW
Assuming the PWM and measurement is not synchronized. So, sometimes it samples at FET off, sometimes samples at FET on, the probability is the duty cycle.
At 50% duty cycle, the expected number of samples to get 4 consecutive FET ON measurement is 14 times, ~0.22sec.
At 10% duty cycle, the expected number of samples to get 4 consecutive FET ON measurement is 11110 times, ~3mins.
At 5% duty cycle, the expected number of samples to get 4 consecutive FET ON measurement is 168420 times, ~45mins.
Hmmmm……
May I suggest to use moving average on the sampled voltage.
If measurement and PWM are exactly synchronized, it could alway be measuring at ON or OFF.