sofirn IF25A - flashing new Andúril 2 - success!

21 posts / 0 new
Last post
flashburn
flashburn's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 09/21/2020 - 14:18
Posts: 48
Location: Italy
sofirn IF25A - flashing new Andúril 2 - success!

So fired up by this thermal thing, I decided to flash the IF25A with the latest Andúril 2.
But there is a problem. After taking out the switch PCB I realized that on the two-stack driver the Attiny is on the battery side PCB, facing inward.
Positively enough, it sits right next to the hole for the switch PCB, right angle, pins 1/8 inward and 4/5 outward.

The issue is now, how to contact these.

I’ve already tried with long pogo pins, but they just do not all fit at a usable angle. I’ve found Yamaichi CT4649-Y, these could be soldered onto a PCB to form a programming adapter that reaches though the opening in the IF25A’s head and contacts the Attiny.
Actually, it does not make sense to me to spend the minimum 50 Euros on ordering these pins, plus spinning a PCB

There needs to be a cheaper approach. Any ideas?
I did not take out the driver, so the rest of the board is unknown. Did anybody disassemble the IF25A? (not the IF25, which according to some other website has a completely different PIC based driver)

Edited by: flashburn on 10/06/2020 - 12:40
SammysHP
SammysHP's picture
Offline
Last seen: 1 hour 1 min ago
Joined: 06/25/2019 - 14:35
Posts: 497
Location: Germany

You could permanently solder some thin wires to the attiny. Small interface board with pads or a tiny connector glued to the PCB so that it is accessible.

flashburn
flashburn's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 09/21/2020 - 14:18
Posts: 48
Location: Italy

Yes, I’ve considered this option as well, but for this I would have to break off the glued-in driver and desolder the joint between the two “decks” to be able to properly solder to the Attiny. This is too risky considering the chinese quality PCB and the unavailability of a spare in case the operation goes wrong.

I thought of a programming clip that is sideways instad of upright. With this could just use the switch opening to contact the Attiny, but I could not find any cheapo solution.

river345
Offline
Last seen: 5 days 11 min ago
Joined: 07/07/2020 - 03:07
Posts: 132

It’s so sad to learn that it’s difficult to flash the IF25A. I brought mine direct from sofirn, but it came with older firmware. I don’t like how the low mode comes on. I wish it had the same version of Anduril that the SP36 came with. Their website saids it did, but that’s not true.

flashburn
flashburn's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 09/21/2020 - 14:18
Posts: 48
Location: Italy

It is so firmly glued together, would definitely break the driver in the effort to take ist out. So I am giving up on this. It is so disappointing they make a non-repairable product like this.

What has sofirn to say about this?

flashburn
flashburn's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 09/21/2020 - 14:18
Posts: 48
Location: Italy

So I was about putting it all together, when suddenly I found the driver is loose. What? Hmm. When I tried to pull it out or press it out, it did not move and I had to stop trying in order not to break anything. Looks like the glue later gave way to tensions built up in that process. So I pulled the driver with pliers gripping the brass center contact. Then I unsoldered the top deck and connected fine teflon wires to the Attiny85 and a JST SHT connector, for which I have a mating breakout to connect to the programmer. This tiny connector and thin wires can be pulled out and put back in through the pushbutton opening in the lamp head without having to disassemble the IF25A for any Andúril update.

Flashing was a breeze. I use a Feather32u4 running Arduino ISP and AVRDUDE 6.3 for this job, because it does not require any ZADIG driver hack.

So after adding the two missing 5k1 resistors to the USB-C and soldering on the top deck, I reassembled the lamp.

SUCCESS!!!

This is an IF25A with Andúril 2020-09-27 running nicely.

Here is the call of avrdude on Windows to test connections (COM9 as example, put port of your Feather32u4 instead) to the Attiny85 of the IF25A:

Quote:
avrdude.exe -c Arduino -p t85 -n -P COM9

And flash the new firmware file “anduril.2020-09-27.sofirn-sp36.hex” from http://toykeeper.net/torches/fsm/anduril2/ or http://toykeeper.net/torches/fsm/
Important: Select a firmware with “sofirn-sp36” in the name for IF25A!
Quote:
avrdude.exe -c Arduino -p t85 -u -P COM9 -Uflash:w:anduril.2020-09-27.sofirn-sp36.hex

Here is the changes to the ArduinoISP.ino to make the Feather32u4 work as Attiny ISP:
Quote:

// The standard pin configuration.
#ifndef ARDUINO_HOODLOADER2

#define RESET 18 // Use pin 18 to reset the target rather than SS for Feather32u4
#define LED_HB 9
#define LED_ERR 8
#define LED_PMODE 7

// Uncomment following line to use the old Uno style wiring
// (using pin 11, 12 and 13 instead of the SPI header) on Leonardo, Due…

#define USE_OLD_STYLE_WIRING

#ifdef USE_OLD_STYLE_WIRING

#define PIN_MOSI 16
#define PIN_MISO 14
#define PIN_SCK 15

#endif

thefreeman
Offline
Last seen: 2 hours 24 min ago
Joined: 01/06/2020 - 09:56
Posts: 176
Location: France

Great that it worked out. Personnaly I solder a solid wire to the base of the spring and pull on it, the IF25’s driver (same construction) came off easily this way.

Now I wonder if I could flash Anduril on it (the stock firmware is proprietary with tint ramping), but I’m stil a bit clueless about firmware flashing.

flashburn
flashburn's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 09/21/2020 - 14:18
Posts: 48
Location: Italy

Sorry, I do not know about the IF25, without the A. In this post http://forum.fonarevka.ru/showpost.php?p=1245148&postcount=13 I can see the driver of this IF25 is significantly different to the driver of my IF25A.
Andúril has tint ramping, if configured so, but you will have to compile your own version. Also, the IF25 may have a different MCU, so all build options need to be adjusted as well.
So for the time being, I can not help you with that, because I do not have IF25 and have no intention to buy one. Sorry.

thefreeman
Offline
Last seen: 2 hours 24 min ago
Joined: 01/06/2020 - 09:56
Posts: 176
Location: France

Ah yes indeed, different MCU, I guess I’ll wait for the mini LT1 project.

Tom E
Tom E's picture
Offline
Last seen: 3 hours 48 min ago
Joined: 08/19/2012 - 08:23
Posts: 13380
Location: LI NY

This is a pretty cool setup! Thanks for sharing!! Would be nice to see pics to help visualize, but the description is pretty good.

There were missing 5K1 resistors?

flashburn
flashburn's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 09/21/2020 - 14:18
Posts: 48
Location: Italy

Yes, the USB-C specs require 5k1 resistors on cc1 and cc2 to ground for the flashlight to charge on a native USB-C charger. See:
http://ww1.microchip.com/downloads/en/appnotes/00001953a.pdf
My IF25A did not have them, so charging could only work with a USB-C to USB2 adapter and the supplied USB2 to USB-C cable chained.
It was a bit of microsurgery to solder the tiny resistors by hand, but now it works.
Interestingy enough, the top deck PCB has a lot of space left unused for these two resistors. Is budget so thight, a manufacturer needs to save 0.2 cents and omit the resistors? I don’t think so.

Tom E
Tom E's picture
Offline
Last seen: 3 hours 48 min ago
Joined: 08/19/2012 - 08:23
Posts: 13380
Location: LI NY

The charging problem of missing resistors sounds like the same issue the LT1 had? I didn't follow that issue closely but they fixed it in newer shipped batches, I understand.

I received my IF25A couple days ago and noticed some messy contaminants on the MCPCB and brass contact button. Cleaned it up well with isop. alcohol and added a 20 AWG bypass that gives it a nice bump with a 40T.

I'll be upgrading Anduril as well but don't think I could take on your flashing mod because of parts, etc.

 

 

flashburn
flashburn's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 09/21/2020 - 14:18
Posts: 48
Location: Italy

https://github.com/flashburninspace/anduril2

A cleaned-up repository of Andúril 2, with hex file for IF25A, in case someone needs it.

Tom E
Tom E's picture
Offline
Last seen: 3 hours 48 min ago
Joined: 08/19/2012 - 08:23
Posts: 13380
Location: LI NY

Nice! Look'n at it now. Any functional changes from TK's Anduril 2? What TK version is it based on?

Not sure if she's got a settled down version yet, but do you plan on keeping them in sync?

flashburn
flashburn's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 09/21/2020 - 14:18
Posts: 48
Location: Italy

It is based on ToyKeeper’s Andúrl 2, which is 2020-09-27.

The changes are in the readme.md, but here again in summary:

1. Added 3H momentary turbo form ramp. That is, from any position, be it temporary ceiling, moon, any other intensity setting, a click-click-clickhold instantly activates turbo until you release the button. Then it falls back to the last memorized level.

2. added SOS

3. changed blinkies sequence to:

  • battery voltage
  • strobe
  • temperature
  • SOS

where both beacon and SOS are on last memorized level, so better set this high in case of distress.
It is intentionally not turbo, because this would heat up the light and reduce runtime a lot, because the LED run at quite a bad efficiency in turbo. Ceiling or any other setting you choose is a much better option regarding runtime with only a minor drop in brightness. On sea or mountain, brightness matters less than runtime, because even a less bright flashing light is well visible, while it usually takes hours for someone to come along and see the signal, so preserving runtime while maintaining best possible brightness is the target.
Hiding the SOS behind temperature makes it less annoying in daily use.
Setting the beacon between battery voltage and temperature as a dividing marker makes the two settings more distinguishable from each other, especially if temperature is in the range of 30-40°C, which could easily be confused with voltage blinky.

edit: beacon, not strobe

Tom E
Tom E's picture
Offline
Last seen: 3 hours 48 min ago
Joined: 08/19/2012 - 08:23
Posts: 13380
Location: LI NY

OK, but by strobe you mean beacon? Can both SOS and beacon can be disabled with compile switches?

As long as I can get batt check and temp check directly back to back, and I don't mind losing beacon and SOS.

flashburn
flashburn's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 09/21/2020 - 14:18
Posts: 48
Location: Italy

Yes, look at the source of
cfg-sofirn-sp36.h
At the end you find the switches, just comment off the #define lines of the functions you like to exclude.

vresto
vresto's picture
Offline
Last seen: 20 hours 23 min ago
Joined: 01/25/2011 - 17:49
Posts: 996

can be this flashlight reprogrammed to classical modes configuration?i dont like ramping.thanks:)

EDC-Amutorch X9 XHP50 nw,Sofirn If-25A cw

Headlamp-Thrunite TH30 nw

flashburn
flashburn's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 09/21/2020 - 14:18
Posts: 48
Location: Italy

RTFM
You may easily switch to stepped mode instead of ramping mode by 3C.
Also with this, the 3H momentary turbo works.
If you want the same behaviour of classical clicky mode, please help yourself.

Tom E
Tom E's picture
Offline
Last seen: 3 hours 48 min ago
Joined: 08/19/2012 - 08:23
Posts: 13380
Location: LI NY

Thanks! I use git every day. but locally - github is a good solution.

flashburn
flashburn's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 09/21/2020 - 14:18
Posts: 48
Location: Italy

I think it was not good behaviour to branch Andúril2 away from ToyKeeper’s realm, so I made the github repository private again. Also, ToyKeeper has taken in my mods and done some updates, so my branch is no longer useful. Still, custom versions may be made available in the future.