Anduril ... 2?

(moved details over to the FSM thread here: https://budgetlightforum.com/t/-/47204/1020 )

Requesting a change to the FSM to be more flexible for ATtiny85 pin I/O selections for output channels for Anduril2 builds. Thanks!

me too. First things I do with every new Anduril 1/2 light:

  1. set bottom of ramp 1/150
  2. set bottom stepped mode 10/150
  3. set top stepped mode 149/150
  4. set # of steps to 5
  5. set thermals to ambient temp
  6. set thermal cut at 50 (edc), 60 (thrower)
  7. set auxiliary lights to match body color if applicable :))

I switch between stepped and ramp almost every time I use every light. I use ramping only if I'm indoors and stepped only if I'm outdoors. Steppped setup like I describe is perfect for me outdoors, and it ensures all of my lights operate the same exact way. No need to double click for turbo, can turn on in turbo, and no need for ML outside.

Hhmm. Yea, the 150 step, 2.4 sec ramp was something that seemed just right to me, but will be too fast for some. I think I was the one that came up with 150 entries, 2.4 secs ramping in Narsil for the Q8, with input from BLFers. TK though originated the first smooth ramping firmware though

TK developed a great tool to generate those 150 element ramping tables (Python script: level_calc.py), but also will support ramping tables of just about any length. So maybe the easiest way to lengthen the ramp time is to grow the table, but still maintain the 16 msec update rate. so a table of 200 will be 3.2 seconds, 240 would be 3.8 secs, etc.

If you want it just a little slower, say at 2.8 seconds, then 2800 / 16 = 175 steps. Unfortunately though, tweaking the table length is not user configurable (wouldn't you love to see that in a UI configuration mode, clicking 175 numbers in? ). There's a few settings that would need to be tweaked of course, like the channel transition points, etc., but we do have spare memory in flash available with the 1634 (Hank uses) or 1616 (1-Series) ATtinys.

So bottom line, it's fairly easy to do in a 1634 or 1616 MCU based driver, and keep everything else in tact as standard Anduril 2. Actually the ramp table and all associated settings are in the driver/light specific configuration file (cfg file), so the firmware is designed to accommodate this kind of change.

Ahh, found the post introducing the Q8 ramping table: https://budgetlightforum.com/t/-/39069/1391

and here little earlier: https://budgetlightforum.com/t/-/39069/1380

way back when...

Whew, Tom, that’s really reaching back… FIVE years ago!

Yea, seems almost generations ago. Funny, got a text from a friend/neighbor begging for a light when "Henri" hits us Sunday. First light I thought of was a Q8, but of course should be running Anduril 2

The 4 3500 mAh cells, decent size to handle a bit of heat, or many hours on low -- just can't beat it no matter what has come out over the past 5 years.

Ohhh - the Q8 thread still holds 2nd place all time on BLF in # of posts: https://budgetlightforum.com/recent-posts?order=comment_count&sort=desc

I’d definitely be down for a Q8 refresh with a driver that has CC or buck channel and new emitter options, just saying. :wink:

Don't get me wrong, I love the ramping feature and how well it's executed, it of course just doesn't always fit all of my needs. It is an awesome tool to have . I just wish some of this hardware crap coming out recently could handle it better, I guess is what I mean, with Super Fast ramping on the low end modes.. makes it impossible to stop appropriately

Wait, are you talking about Narsil/Anduril1/Anduril2 ramping too fast at the low end? Some of those attempts to clone our ramping are super fast at the low end, and super slow at the high end - that's for sure.

Maybe I missed it but I haven't heard much about slowing down the ramping over the last 5 years. This is the first I'm aware of.

I'm with you there. Converting to 3x21700's would also be on my list.

Has anyone else had issues with the size of Anduril 2 lately? I have stock rev 610 and it wouldn’t compile the unmodified FW3A software (attiny85) and gave me overflow errors until I removed a few functions like candle mode.

Edit: I optimized for size as according to this post by MikeC and it is now working. I haven’t had to do this before for attiny85s so I reckon the code as gotten larger unless I’ve always been optimizing for size without knowing it using the build all script

I always use/have used -Os, also you need -fwhole-program. This will reduce the size further.

The size depends on options/config. for the 85, worse case is 3 channels, indicator/aux LED support, and then including all features/functions. I generally drop SOS, though that might be the default now.

What’s this and how do I use it?

From the gcc documentation:

I only use Studio (Atmel and Microchip Studio), so you plug in that option in the "Other optimizations flags:" field

Thanks, enabling it reduced the size from 21.9kb to 21.4kb. Every bit is valuable when you’re at the brink!

Wait what do you mean about 21.4kb? The attiny85 only has 8kb and last I heard it is almost entirely full. The d4v2, which has a attiny1634 processor with 16kb flash, uses about 9k of it in its anduril build. That said it should be possible to squeeze at least a few hundred bytes from the code at the possible cost of needing a little refactoring of FSM client code.

I meant that the hex file’s size is just a tad smaller. I haven’t tried flashing it yet to see how many bits it actually is.

Oh, I see. There should be some way to get the linker to report the exact size.

How are the ramp values created for a limited FET? (eg in d4v2 with 5A driver). level_calc.py does not seem to give a limited-fet option, […removed]

level_calc.py 5.01 2 149 7135 1 0.3 1740 FET 1 10 3190 —pwm dyn:64:16384:255
you can change 255 for eg 126 (50%) and the PWM2 ramp is what I was looking for. This pwm2 ramp can be used with dynamic pwm, but be sure to set the last value of PWM1 to 255 so the CC driver does not turn off like it does when it goes full-FET.
———————————————-

Amax = Ch1 + FETmax = Batt_short
Alim = Ch1 + FETlim
FET% = FETlim/FETmax

FET% = (Alim - Ch1) / (Batt_short-Ch1)

so thefreeman posted an interesting calculator last year LED direct drive current calculator
Now I’m guessing the FET limitations are mostly determined through testing…. so anyone know what %FET to use for a d4v2, 5A, osram yellow (CSLNM1.FY)?? Datasheet says they can take 3A max, 4A pulse, but I have now idea how to guess the %FET max pwm to stay safe.

Unfortunately, it’s not vacation. I kinda broke my spine, and it’s hard to get much done while I recover. Gotta spend a lot of time horizontal. :frowning:

So I’m pretty behind on everything, and trying to catch up when I can.

Oh NO!!!

Get well soon.