STAR Firmware by JonnyC - Source Code and Explanation

Did you load BattCheck.hex or did you compile your own version?

I can't believe there is a problem with the MCU, but I've never heard of this problem you're having. I guess its possible an ESD hit took out the ADC and left all else intact...

I got nothin'

If you do replace the MCU, and that works, I'd be pleased but puzzled.

Is there am maximum number of modes that can be put into STAR Momentray? Momentary

It appears to be limited only by available RAM and ROM. With alt PWM enabled, you’re probably limited to about 15 modes, and without that you might be able to get 20 or 25 modes.

If you want enough modes to make a smooth ramp though, you might want to look into Ferrero_Rocher/Ramping_UI_table.c instead.

Thanks! I really only need 7-8 for a driver I’m giving away, so it looks like I’m golden.

Just FYI - It hasn't been announced "officially", but the TheStar FW has been available in TK's repository for some days already (both on- and off-time versions are there).

Feel free to try it and report your findings to me. Thanks in advance.

If this is too much OT for this thread, the discussion can continue in the old TheStar thread.

I just replaced the mcu and everything works fine .now. Thanks

That was a weird one, but I'm glad you fixed it. Enjoy!

Do I still use the 200 resistor (after replacing diode) along with R1 & R2?

Dear zeremefico,

I should better to edit VCC to B+. Don’t be confused with the VCC of the MCU. The VCC of the MCU ( Pin 8 ) must not higher than 5.5V.

The voltage divider R1 and R2 are employed to lower the B+ voltage into the ADC reading range of 1.1V reference. I was confused what 200 resistor and which driver you are talking about.

Would you please post the schematic of your driver.


This is my design:-)

Oh, I see. The solder pads of the diode was replaced by a 20K ( 2002 ) resistor. Then the resistance of the voltage divider R1 is 20K + 19.1K ( 1912 ) = 39.1K and the R2 is 4.7K ( 4701 ). When the battery is 6.1V, the ADC value is 152.

ADC=(6.1*4700*255)/((39100+4700)*1.1)
ADC=152

May I ask how to supply power to the MCU of your driver?

.

Would someone be kind enough to tell me what is being written to EECR when it says 32+4+2.
.
Is it binary or hex or something
.
I’m used to doing EECR |= (1<<EEMPE); etc
.
Just can’t figure out how the numbers relate to the register
.
.
EDIT: ok, got it, ignore me. It’s binary

With 8.4v using ZY-T13 driver as contact board.
Thank you for your help with the voltage!!!

Do you guys believe 5.6v & 8.4v is the low voltage limit for 2 & 3s cells?

You need to be careful here, because you aren't monitoring each cell individually. You need to account for the very real possibility of one cell dying before the other. If you assume that the typical cell voltage to be 3.7V and the lowest you want a cell to go is 2.8V then perhaps 6.5V might be the cutoff for two cells and 10.2V for three. Of course you can always plug in different numbers and recalculate. I can't say those are good values or not, and certainly not in all situations. I just think it is best to error on the high side; leave a little juice in the cells rather than risk damaging them, or worse, damaging yourself (or the trusting soul that is holding the light for you).

As was stated, always use identical cells in series and/or parallel arrangements.

So let’s say I want my cut-off voltage to be 6.2v. If I use a 22kohm resistor for R1, a 2.2kohm for R2 should get me in the right vicinity, correct? Close enough that I can then use TK’s battcheck to get the exact ADC values I need?

(Using the calculator that wight linked in a different thread)

Is there 1 mode-100% ( or star choosable 1 mode) 105c firmware awailable guys? Currently i am bypassing the atttiny13 in order to achieve this :~

For 2S cell configuration I’ve been using 47.7K and as R1 with 4.7K as R2, but I would have no issues with trying your values, they should work.

Not to my knowledge. Star would have to be re-written a little, as with 1 mode there is no mode to step down to on low voltage. Ask here, it’s a more general firmware thread: Flashlight Firmware Repository