E-switch UI Development / FSM

Is there a way to dnld a full branch in launchpad? Would like to dnld the fsm branch as-is. Only way I know of getting files is 1 by 1 dnld.

Oh, um, the recommended method is to use bzr branch lp:~toykeeper/flashlight-firmware/fsm to grab the entire repository.

Unfortunately, Launchpad doesn’t have automatic .zip downloads. I bugged them about that feature for a few years, but it was never added. I considered moving the repository to Github instead, which would provide this feature, but in some ways it’s a downgrade so it’s not a clear win. One of these days I may have to move it anyway though, since Canonical hasn’t been good about maintaining Windows versions. I think the most recent is 2.6b1 from here.

Hhhmm, it's crashing. I dnlded v2.6b1-1 and used "Open URL" and pasted in: lp:~toykeeper/flashlight-firmware/fsm

But it appears to start loading then comes up with an error: "Bazaar has encountered an internal error. ..."

Well, that’s unfortunate. It seems Windows support is worse than I realized.

For now, here’s a .zip copy of that branch:

http://toykeeper.net/torches/fsm/fsm.2018-12-22.zip

Under Windows 10, the easiest method may be to install an Ubuntu container and then use it from a bash command line. Doing it that way, the regular “apt” package commands can work and a current copy of bzr can be installed. That’s not an option for everyone though.

I don’t intend this to fufill anyone’s wish of a tint ramping UI (cause I’d like that too!) but I did make this thing. Two drivers, both running anduril, two switches and 2 LED’s (Nitecore CR6 host).

P.S. This is [unintentially] my longest running flashlight project, started 3-4 years ago then walked away from the hobby, came back this summer and just now finished it up. I started if after JohnnyMac sent me his broke Imalent

Is it posibler you could add a 2S config with normal FET+1 channel config?
similar to GT

That’s pretty cool. For tint ramping on a single driver though, the lantern branch has that implemented. I’m waiting for actual hardware and more development before I merge it into a bigger branch though.

It seems to work fine in my tests so far, but the hardware I used has a pretty non-linear PWM response curve so the linear mixing doesn’t quite hit the levels it aims for. I’m hoping the production hardware won’t have that issue, but if it does, I might try to make the mixing compensate for it.

I’m trying to stick to build targets for actual production lights, instead of including hypothetical ones.

thats not hypotetical thats pretty much every 2 cell XHP50&70 driver I have

I make build targets for lights I have, and I don’t have anything like that. In theory, I could make a config based on detailed specs, but I don’t have that either.

If you have one you want to support, it should be reasonably simple to write the build config file. Copy/paste parts of other configs and tweak the numbers inside to calibrate it.

I did modify the GT configs to make it working with ramping

and there is again the problem tweaking the voltage readout
that voltage fudge factor –15 makes the firmware go wtf I quit, and a 182k over the 47k is not really a nice solution

Hello guys. I’m new to the flashlight game and I have a Sofirn SP36 still shipping to me. After some research, it seems like Anduril is much better than the stock firmware. Would anyone help me explain how do I flash it to my sp36 when it’s here? What tools do I need?? Thank you so much :slight_smile:

Been looking at the voltage monitoring code (fsm-adc). I assume you want to do good old voltage divider readings, so USE_VOLTAGE_DIVIDER must be turned on, then the VOLTAGE_FUDGE_FACTOR is irrelevant.

The voltage divider readings is scaled based on ADC_22 and ADC_44, which I assume have to be set according to what resistors you use.

You could probably copy the values from NarsilM.

I'm not sure if anyone tried it this way? Looks like the old voltage_blinks[] arrays in tk-voltage.h are not used in Anduril because fsm-adc has it's own copies. I dunno if TK or others ever tested/used this with external voltage divider resistors?

The "stock" firmware is NarsilM, v1.2. Updated version than what came in the Q8, same baseline as the BLF GT. The UI mostly got outstanding reviews out of 100's posted between Amazon and Banggood on NarsilM, not to mention many accolades in video reviews, so it can't be that bad? Slightly better than the "lo-med-hi-strobe-sos" of an UltraFire?

But if you still do wanna upgrade, first challenge is getting access to the driver, then you'll need the programming clip/USB cable, then the latest hex file, probably from here: http://toykeeper.net/torches/fsm/?C=M;O=D. We mostly use AVRDUDE to do the download. There's some really good info already here on BLF somewhere of how to get the cable and software tools you'll need - hope someone else can chime in.

Ahh I see. Yeah it’s NarsilM is much better than simple old style control haha. Anyways. I’ve heard that the sp36 has glued board? And thanks for your answer !! :slight_smile:

Thanks!! Gonna add this to my bookmark!!

As I said two weeks ago, and as Tom said just now, the fudge factor is not relevant for a light which uses a voltage divider. Use the voltage divider method instead, by setting USE_VOLTAGE_DIVIDER… just like in the BLF GT cfg and hwdef files.

The driver is glued, and not easy to remove. I’d suggest looking in the SP36 thread for info about how to get the driver out.

After that, the firmware part just needs some cheap hardware and free software. Click the Link in my signature for more information.

Ahh thanks for your reply. :slight_smile: