Here's a great post from RMM on the voltage divider equation: https://budgetlightforum.com/t/-/27210/125
Back in the day I didn't understand much, well, I understand slightly more now.
here it is:
For starters, here is the voltage divider math you use to figure out which ADC value to tell the software:
ADC = ((V_bat - V_diode) * R2 * 255) / ((R1 + R2 ) * V_ref)
IF DIODE PRESENT
So for our typical 125 or so ramp down at about 3V at the battery, we get this:
126 (rounded) = ((3V-0.25V)*4700*255)/((19100+4700)*1.1)
OK, now take a look at a picture of your standard 105C driver or even the regular BLF17DD. You will see that the voltage divider circuit positive input runs through this sequence:
BATTERY-->SCHOTTKY DIODE-->VOLTAGE DIVIDER-->MCU
The Schottky diode drops the voltage by about 0.25V (it's forward voltage). So, we compensate and tell the software that we want to ramp at about 0.25V lower than what the divider seeing and converting into the lower voltage for the MCU to check against its 1.1v internal reference voltage.
If you take the diode out, you get this sequence:
BATTERY-->VOLTAGE DIVIDER-->MCU
There is no longer the 0.25V drop across the diode, so no compensation is needed.
With the zener mod on the normal circuit, here is what we get:
BATTERY-->RESISTOR-->ZENER DIODE (parallel)-->VOLTAGE DIVIDER-->MCU
Since the zener diode is going to be regulating at a constant 4.1V (the 2S input voltage will always be far above that) the voltage divider will only ever see 4.1V. If you bypass and just go BATTERY-->VOLTAGE DIVIDER-->MCU you don't have that problem.
Again, voltage cut off really isn't a big deal on anything except for buck drivers as long as you are monitoring the light, since you will see it getting very dim before the batteries get too low.
You can use a wide variety of divider resistors, as long as the ratio is correct for what you want. Higher value resistors are generally better. Let's do a quick example for 6V with a R1 of 30K and R2 of 4.7K:
188 = (6V*4700*255)/((30000+4700)*1.1)
The higher the value of resistor the less loss you get through the divider. You also want to end up at a higher ADC value such as 180 vs. a value like 50 for better resolution.
Important to note the constant: 255 is for 8 bit AToD's. This was back when we worked out that the voltage divider has to be before the diode, specially important for 2S or 4S battery setups.