Anduril ... 2?

I posted earlier in a different thread about trying to get this firmware to work with a Texas Avenger 3 channel driver. I don’t own any of the lights that Anduril is set up for; I’m building my own using this 3 channel driver. Are there any precompiled hex files that should just work if I flash it? I’m not familiar with any of these lights so I don’t know what kind of drivers they have. Or if someone (“Tom E” mentioned it) could compile a triple channel hex I would really appreciate it! Or show me what to change in the code.

You have to provide the pin layout. We don’t know what is connected to which pin on your driver.

If you do a bit of searching in the TA thread you’ll come across this. I’ve used it to reflash one of Lexel’s drivers to run Anduril and I believe these are “just” TA drivers in disguise (with a bit more bells and whistles but most importantly the same pinout).

As for the PWM values, if you’re building a FET+7+1 you should be able to use the values for the FW3A. Some of the `cfg` files in the fsm repository have comments on the hardware the respective lights use, so you may be lucky in case you’ve got a different setup.

I re-flashed two of my lights (FW3A and FW4A) with the newest Anduril 2 (2020-09-27) from here and I think I’ve noticed two bugs:

  • Thermal regulation doesn’t kick in at all when going 2H from off (momentary turbo). After I held it on for about 20 seconds on the FW4A, I measured the temperature at above 70*C. I have calibrated the temperature sensor and the thermal regulation is set to 45*C. Now I’m a bit scared to use it when the light is already a bit hot as I don’t know if it’s going to bake itself - especially when I’m wearing gloves. I think it might be a good idea to enable thermal regulation even in momentary turbo, just in case.
  • The order of blinkies is Battery Check > Beacon > Temperature Reading, which is contrary to what’s in the manual (Battery Check > Temperature Reading > Beacon).

I also built my own ISP programmer because I didn’t have one at hand and couldn’t wait a month or two for it to arrive. I’ve used a NodeMCU (ESP8266 development board) as an ISP programmer that would wirelessly program the attiny85 using avrdude network upload.
Thought it might be useful for somebody else as well, so here’s how I did it:
You need: A NodeMCU (or any other ESP8266 dev board), 6 thin wires, a soldering iron and a disassembled flashlight so you have access to the microcontroller.
Please note that this method is potentially destructive as you’ll be soldering wires directly to the ATTINY85 while it’s on its PCB so I’m assuming you have decent soldering skills, are familiar with Arduino and have no other options :smiley:

  • In Arduino IDE, open Examples > ESP8266AVRISP (assuming you installed ESP8266 Arduino core)
  • Change the WiFi credentials in the code to fit your WiFi network credentials
  • Connect your NodeMCU to your computer via USB and upload the Arduino sketch to it
  • Open Serial Monitor in arduino to check if it’s connected to WiFi and to see the IP address and the port of the device.
  • Disconnect NodeMCU from your computer
  • Solder the following NodeMCU pins to the ATTINY85 pins in FW3A/FW4A/FW1A/etc:
ATTiny85 NodeMCU (ESP8266)
1 - RESET D1 (GPIO5)
4 - GND GND
5 - MOSI D7 (GPIO13)
6 - MISO D6 (GPIO12)
7 - SCK D5 (GPIO14)
8 - VCC 3v3
  • Connect NodeMCU (with the attiny85 wired to it) to power (and maybe check if the IP address has changed)
  • Open terminal (MacOS) and run the following command to check if you’ve wired everything correctly:
    ./Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C /Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -c arduino -p t85 -n -P net:YOUR_NODEMCU_IP:YOUR_NODEMCU_PORT
  • You should see the attiny85 identified in your terminal
  • Now download the firmware .hex file that you want to use
  • Use the following command to upload the firmware:
    ./Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C /Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -c arduino -p t85 -P net:YOUR_NODEMCU_IP:YOUR_NODEMCU_PORT -Uflash:w:/PATH/TO/YOUR/ANDURILFIRMWARE.hex
  • Now carefully desolder the wires from attiny85 and make sure that there’s no solder shorting any two pins on it.
  • Assemble your flashlight and you’re done!

If you’re on PC, you’re going to have to change the paths, but it shouldn’t be too much of a hassle.
I’m also here if anybody who tries this needs some help.
Cheers!

In momentary turbo the thermal regulation is disabled by design. I also wish it had thermal regulation, but that’s not easy without huge refactoring of the code and another reason is to always have full turbo available if you need it.

2020-09-27 is not the latest version (just no binaries published afterwards). The order was changed later and you used the latest documentation.

It’s a TA driver, pretty well known around here I think. This will probably show you what you need to know: Texas Avenger "TA" Driver series - Triple channel + Bistro or Narsil + Clicky or E-switch - The Ultimate open source driver!

Thank you, I had missed that post. I flashed the ROT66 file and it seems to work, except the light will shut off immediately after releasing the e-switch when ramping. I’ve also flashed a few versions of Narsil and other Anduril files and the same behaviour occurs. On Anduril, it can’t seem to get into the direct drive mode either; the top of the ramp is the 2nd channel on the 7135s. Kind of unsure about what to do next…

That sounds like a mechanical problem then. Are you sure it’s a regular electronic switch you’re using?

Does 2C (two quick clicks) from there take you to full FET? If yes, then it’s a matter of configuring the top of the ramp differently. If no, can you post the `cfg` file you’re using to compile?

I don’t think it’s a mechanical problem…the driver’s behaviour is odd. If I double click on the switch it goes to the peak of the regulated channel and slowly starts pulling current right away. It’s not very visible but using my power supply that’s what it does. It’s almost like thermal protection is kicking in right away. And in about the middle of the ramp if I stop it, the light turns off most of the time. On the low settings it’s fine.

I’m not using a hex file I compiled myself - I’ve been using the ROT66 file since that seemed to work for Lexel.

Edit: So, I found the problem: I had soldered a 19.1K instead of a 220K resistor in the R1 spot. For the e-switch drivers, you need the 220K resistor and I forgot to use the right one. All good now! And my SRK is bonkers.

Andúril 2 is really good on the NOCTIGON K9.3, really good, starts in normal ramping UI and no silly ramp to max first then 2 taps for Turbo. I hope this is just about the finalised version.

Please please please don’t disable being able to turn off from Turbo!!!

Hhmm. That's exactly how I configure all my Anduril 2 mods.

You don’t need to ramp to max before double tapping to turbo, the light just needs to be on otherwise double click from off goes to ramp ceiling, which coincidentally can be set to turbo.

I know but Anduril 2 was designed to be double tap from max ramp to turbo as a safety feature. Toykeeper stated it was what the manufacturers wanted. Hank must have seen the light and requested otherwise.

So basically Astrolux want Anduril 1, Hank wants our ultra badass version of Anduril 2, so who the hell wants Toykeeper’s vanilla version?

Everyone else?

I do. I prefer the way turbo is handled in Anduril 2.

Was ramping up intended to be disabled in sunset mode? It seems like I can only ramp down in sunset mode or double click to turbo.

Could you consider putting regular ramping in sunset mode so I can ramp up just a bit to see around me? Or even have the ramping up be half speed so you don’t accidentally turn it up too high.

1H is used to “bump” the timer if it is almost expired.

A few months ago, I was about to buy a Sofirn SC31 Pro until I saw this thread. From what I can tell, reflashing that light is a bit beyond what I’m interested in doing and I would like Anduril 2 so I’m waiting for now. Any thoughts about when this light or something like it (I like the onboard charging, side clicky, and size of the Sofirm SC31 Pro) will come with Anduril 2?

For the price, nothing yet. There’s a chance you could get a modded one with anduril 2 for a slight price premium from someone on this forum. Anduril 2 likely won’t be coming to most lights from the manufacturer anytime soon. The only ones that have it so far are manufacturers who have paid toykeeper to customize a version for them as far as I know.

I have one I’d be willing to let go of but I’ll have to see how tricky it would be to remove the driver to reflash as I understand it’s held in by glue