I changed the names cause this is modified from my 5-static modes version (plus moonlight) from a different build, when I needed to have more levels than stock it was just easier for me to number them than to make a "med-high/med-low".
I'm having lots of posting issues, I think its cause I'm using the standard mobile editor from my phone and now the advanced editor here and logged in from both at the same time, I am also having issues with quotes not showing up or just showing up as empty boxes. Lets pretend I'm not computer illiterate for a minute lol.
Later today I'm going to build a second Tiny10 FET for testing and load it up with the same code, maybe try adding a gate resistor somewhere (not sure where I'll fit anything else)
I wasnt aware that was changed, I'm visually comparing it (to the first link here http://www.jcapsolutions.com/flashlights/firmware/) and thought it was the same, I didnt mean to change it, what should it be?
Are you talking about where I changed the turbo timer? I did it like this because I no longer have a definition for "MODE_HIGH_W_TURBO" so I have to physically assign the level I want instead of telling it to use a predefined definition.
#ifdef MODE_TURBO
//} else if (ticks == TURBO_TIMEOUT && modes[mode_idx] == MODE_TURBO) { // Doesn't make any sense why this doesn't work
} else if (ticks == TURBO_TIMEOUT && mode_idx == (mode_cnt - 1)) {
// Turbo mode is always at end
PWM_LVL =185;
#endif
}
I don’t see any code problems in that case, assuming you’ve got F_CPU defined and it didn’t come through in your paste. To make matters a little easier on me I renamed your variables back to the stock names, there are very few changes and they all make sense: Saved diff hv94kqvv - Diff Checker
My TIR came today, the lens seems to be glued into the holder :( I'll get the dremil out later and see what can be done, hopefully I can get it cause I was really excited about the new flood beam pattern.
The TIR came out, not just popped out like I thought but I got it (actually had to melt the holder with a soldering iron). The neutral white 40* beam is very even, no hot spot at all which is about perfect for me in the role this light will fill. I also really like the look of the TIR better than a smooth one, still I’d prefer a reflector but this is more than adequate. Also swapped the XP-E2 for a XP-G2 on a 10mm sinkpad so I could increase the turbo timer up to 60sec, step down was changed to 204 (~80%).
old vs. new
Beam shots coming tonight. The only thing else I’m considering changing is adding one additional mode but i’m not sure, I usually dont like more than 4 modes so I’ll probably just leave it as is, all in all I’m very happy with this whole build, much much better than stock.
Back on the earlier topic of memory: I have now used both on-time and off-time with “no memory” setup. Off-time with no memory is what you want, it behaves exactly as you would expect a light with no memory to act: half presses while the light is on do advance modes, but leaving the light off for a few moments causes it to start in the first mode when turned back on.
Sorry for the delay in checking this out, it ended up not happening until I had a need for it. Go figure right? 0:)
Wait so you can just flash off-time without adding the extra cap?
Damn I hate my broken programmer, I want to play…ordered a set of 40 breadboard jumpers at the same time as my new programmer from the same seller, jumpers came today, programmer won’t be here till Wednesday, WTF…
You guys are getting confused. You can convert any nanjg based, non-eswitch driver to offtime instead of ontime by adding a capacitor to physical Pin2 and flashing the STAR offtime firmware. For no memory you comment out “#define MEMORY”. THE CAPACITOR IS REQUIRED for this firmware to operate.
Adding the capacitor is simple and easy and you’ve got tons of space for it in this build. Flash the firmware with desired settings and then add the capacitor, it will block your clip. It goes straight from pin2 (star4) to ground.
Good news, after messing with it for DAYS, I’ve got my old programmer up and running again (no clue what was going wrong but last night I decided to give the old girl one more try and it worked!).
I’ve gotta build and program two more drivers for a guy here in a bit but then I’ll be getting back to this. First goal is to lower moonlight more but then I’ll start working on off-time.
Sounds good! While it’s on my mind, you’ve got some wiggle room on the cap spec if you need it. Look in the STAR firmware discussion thread for HarleyQuin’s post on the subject, but it sounded like anything from 0.5uF to 1.0uF would be fine. A bit more probably won’t hurt anything either.