Hello all, I could use some help. I am trying to flash a driver I assembled, a FET zener driver for 2 cells in series. It’s one of those driver kits I bought from Richard, and the moon mode wouldn’t work. Well, I thought I’d try flashing some of my own firmware to it so I tried flashing star off time. It mostly works fine but behaves a bit weird. If I leave it on on my test circuit, it sometime changes modes by itself- almost like a cap is dumping voltage into the circuit or something. Also how to I get LVP set for 6v on this setup?
Anyone know of good firmware for 2 series clicky lights for say an MT-G2?
Can anyone provide any guidance on setting low voltage protection for this application? I got star off time to work but would like the LVP to kick in when needed.
Adjust your LVP voltage divider resistor and/or values in the firmware. Try doubling the resistor value first, then fine tune in firmware if needed. Go with something 38k-39ish.
Sorry for being stupid, but can you explain what you mean by doubling the value? Ohms?
I adjusted the #define ADC_LOW and #define ADC_CRIT to approx double the prior value. That did nothing but delete what batt checking function there was.
These are usually defined as 8-bit values. Values larger than 255 will do funny stuff.
The MCU compares the cell voltage against an internal 1.1 V reference. The purpose of R1 and R2 is to divide the cell voltage to a value lower than 1.1 V. Leave the smaller ohm-value resistor (R2?) as it is and just increase the value (ohms) of the higher-ohm resistor (R1?).
The ADC value = Vcell * R2/(R1+R2) * 255/1.1 ….assuming your driver has the resistors upstream of the reverse polarity protection diode.
So if you have R2 = 4.7 k, and change R1 to 47 k, at 8.4 V:
ADC = 177 (less than 255, so we are good on the high end)
and at 6 V:
ADC = 126
These values will vary a little from MCU to MCU, depending on the calibration of that 1.1 V internal reference. If you are using the off-time capacitor the values of R1 and R2 may affect timing related to the OTC.
Essentially leave firmware alone and replace R1 with a resistor that is close to double the initial value. Then adjust ADC values in firmware if needed.