Kind of OT: Any thoughts on running an XM-L2 via Qlite from 3x nimh? I haven’t done extensive testing yet but I’m wondering if it’s just not going to be enough voltage. I may end up going strictly 2x 26650 (1s2p) for my mag upgrade kit.
OL has commented on it a couple of times I think. Sounds like 3xNiMH just isn’t enough. 4x is good though, so if you don’t mind doing a quick boring operation to each host…
I haven’t tried it, but I’ve been meaning to. I expect to find that OL is exactly right, so I’m not sure what I’ll do then. Use old XM-L emitters maybe? Or for mag builds the 3xNiMH, XHP50, and a DQG 26650 boost driver might be OK.
Without making changes to the code, with the clicky version you can't turn the 7135 on to 100% (which is what would be needed for no PWM) and leave the secondary FET output off. With the momentary version it is easy to do that.
What confuses me is that you're talking about two completely different things. At first you're talking about moonlight and low (maybe also medium), then in the next sentence you're talking about turning on the 7135 with no PWM while keeping the FET off.
For the clicky you just set your modes, as normal, then set the threshold PWM level to where you want the secondary output to turn on.
I’m pretty sure that, yes, STAR could be modified to support that. It probably just hasn’t been yet.
I got a Moonlight Special recently and am planning to make a fairly generic off-time clicky firmware for it. Not sure what the exact feature set will be, but it should at least allow independent control of the 1x7135 vs the FET or Nx7135 pins, and should have both a battery check mode and the ability to do short/med/long presses to do three different actions.
I just have to put a test host together first and make some time to write the code. (fortunately, Monday is a holiday so it might happen very soon)
Thanks for posting. I will take a look at this soon!
In the meantime I see that your UI description is very similar to what akv was asking for over in this thread: akv - looking for a good value flashlight so I am going to post a link over there. This sounds very good for akv.
Thanks for the link. I took a look and Baton.c and see a lot of similarities with my code.
I compiled the code and ran it on my test breadboard and found one quirk. The first press from off results in a dim light which then switches to either the last mode or moon depending on the duration of the press. I think this is because you used FAST PWM always. Changing PWM_MODE to PHASE eliminated this quirk.
Indeed. That’s why the comment at the top of the file says “FAST has side effects when PWM=0, can’t shut off light without putting the MCU to sleep”.
Unfortunately, PHASE has some downsides too — it’s often audible (high-pitched whine), and it flashes slow enough that it kind of bothers my eyes. So I usually go with FAST instead, if I use only one.