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.
When I said âweakâ I meant âlow currentâ, definitely not 30Q. And so I did a test with 18650B charged to 3.6V.
Turn on, 350 mA. Increase slightly, wait short while, no effect, shines OK. Ramp up all the way to turbo - still OK. Gets warm very slowly compared to VTC6. Run fine until thermal protection kicked in, then I stopped the test. It took forever to warm up, like 30 seconds.
So I was wrong, the D4 is fine with a weak cell.