H17F - programmable driver with full thermal regulation

Over a year ago, Mattaus and I started to develop a new driver, something like a better NANJG105C. Mattaus took some time off, so I designed my own board, and later wrote the firmware for it. I had already thought about a 3 channel driver with 1*AMC for lower lows + 7*AMC for med&high + FET for Turbo for my F6 board (#181) nearly 2 years ago, but decided against the FET then in favour of having 2 status LEDs (the early F6 had a window for that, and I found the F6 too small for a DD then). However for this driver i wanted that 1+7+FET setup (hence the name H17F).
The firmware and the driver prototype have lain around on my desk only partially tested for months now (I had a leisure and motivational low-point for a while, didn't even read the forum or answer PMs) - but recently I found time for it again and finally tested it (and fixed a glitch).

So what's new? It's basically a 17mm driver with a single 7135 for lower lows plus a FET for direct drive turbo modes - in my test setup (no switch, but with longer wires and a current measurement shunt) I got 5.8A with an XM-L and an XM-L2, but only 4.4A withe an XP-L HI I had lying around, and 10A with a Nichia219C-triple in a host (tailcap measurement).
Having moon and turbo results in a quite high dynamic range (~12bit, ~4000:1). The firmware is similar to lucidrv (i.e. 2 fully programmable mode groups, mode lock, battery monitoring etc.), but with some more flexibility (blinky modes can have any brightness, and there's a bike blink mode like in mobydrv). Also very short power interruptions (e.g. from bumps while riding a bike) are ignored. The manual is here.

And I wanted thermal regulation in it - not just a step down when the light gets too hot, but a full thermal regulation as in PID controller, like a few newer lights feature, i.e. the power continuously adapts to (changing) cooling conditions to keep the (user configurable !) temperature at a certain value, while avoiding overshoot and oscillations.
I had quite some fun with that: I learned about PID controller theory, I wrote a thermal simulation for flow and dynamical behaviour of heat in a simplified model of a typical flashlight, implemented the normal PID algorithm and chose some suitable parameters, and it looked really fine. Then I adapted the PID implementation to MCU conditions: integer math and limited temperature resolution with some inaccuracy - and things went mayhem. Don't get me wrong: PID controllers are known to work well in much worse conditions, and indeed the temperature (process variable) was held very well, but the heating power (control variable) jumped around a lot; that's not a problem for a simple heating element, but quite unpleasant for a flashlight, where heating power corresponds to LED current and thus brightness. I played around for hours to make an algorithm that keeps the temperature constant by smoothly adapting the power (i.e. brightness) without overshooting or oscillations for hosts of various sizes until I finally was pleased.


There's also a little giveaway: Guess what programming language I used for the thermal simulation. The first to guess right will win a H17F driver. Only one guess per person, posted here, only users with 100+ 50+ posts.

EDIT: It seems I underestimated the difficulty of this question, programming languages were mentioned that I never heard of...
However, a third round starts: Everyone again has one guess. Also now open for everyone with 50+ posts.

Hints:
It's a programming language, and it's not specialized on (thermal or other) simulations.
It's a programming language, not an IDE/application.
I use a text editor to write the code.
It does run on my PC.
It's actually quite common, though that hint might be misleading...
It's well older than 15 years.

And another edit:
Clearly more difficult that I anticipated. I didn't intend to push up this thread over and over with this little giveaway. Sorry!
It has to end... so: next (and hopefully last) round.
It is in this list: Timeline_of_programming_languages
It's several years older than Java, but younger than Modula-2. More precisely: It is more older than Java than it is younger than Modula-2.
It still is quite common in some way. However: While it runs on my PC and I code in it, both is quite uncommon, the latter even rare.
While quite many computer-related people know about it, few know about it's full potential.
It is usually not used for simulations of any kind (nor for programming in general), but it has quite some capabilities regarding graphics.

and EDIT again: That was quick, the answer is PostScript, and the giveaway is closed. :)

1 Thank

Sweet driver.
Was it FloTHERM?

DrJones,

Not only is the driver interesting in function, but it looks great too…

I will guess Sinda for your thermal simulations…

ACSL

Modelica?

You sir are an amazing fellow. Your abilities and what you do I do not understand but do benefit from. Thanks for the effort and welcome back.

I had started working on a similar pcb accomplish the same effect, but you “beat me to market”! Though I wouldn’t have had the fantastic fw to accompany it anyways. Nice!

Thanks!

So far, no hits on the giveaway question. Hint: The programming language I used is not specialized in thermal simulations or similar.

Matlab, Simulink

Very nice driver, and I agree with pd68: it looks good too!

Since I have no programming knowledge whatsoever, my guess is: BASIC

i am no programmer (any more) but i used basic and turbopascal once…

but my first (and guess for that post) was LOGO

I am not a coder but I can honestly say that you do great work Sir!

Every time I open this thread I get this Avast warning:

my vote goes to C, since basic is already posted
your firmware and driver looks amazing

Ada.

You beat me to it. So I’m stuck with Cobol.

Thanks! :)

Ah, some good guesses... But no hit yet.

Stupid Avast... URL:MAL seems to refer to a URL blacklist, it probably blacklists all nerdcamp.net, which actually is only a dynamic DNS hoster. Probably some other nerdcamp.net user got infected and Avast blocked the whole domain.
That image is just an image (h17f.jpg). And my site does not contain any active code at all, just static HTML. It might be a good idea to report a false positive.

Hmmm ... must be PlankalkĂĽl

Looks awesome, I’m gonna want one to play with whether I win it or not, but let’s guess python.

mmmfff. One guess per person.