H17F - programmable driver with full thermal regulation

259 posts / 0 new
Last post

Pages

DrJones
DrJones's picture
Offline
Last seen: 1 year 4 months ago
Joined: 01/05/2011 - 13:30
Posts: 1044
Location: Frankfurt, Germany
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. Smile

Edited by: DrJones on 02/02/2016 - 15:13
Dallas
Offline
Last seen: 4 months 1 week ago
Joined: 11/11/2015 - 22:12
Posts: 116
Location: TX

Sweet driver.
Was it FloTHERM?

ReManG
Offline
Last seen: 5 hours 13 min ago
Joined: 04/25/2015 - 22:52
Posts: 2528
Location: Between the Mexico's

DrJones,

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

I will guess Sinda for your thermal simulations…

ALL of my links are non-affiliated for your pleasure...

My Reviews

Lithium Ion Battery Safety 101

 

You bought yourself some good lights, now  go buy yourself some great pants... Bluffworks

I have no affiliation with Bluffworks, except as a very satisfied customer...

 

 

saypat
saypat's picture
Offline
Last seen: 2 hours 30 min ago
Joined: 07/13/2011 - 20:32
Posts: 2531
Location: Calif

ACSL

radioshaq
Offline
Last seen: 1 day 21 hours ago
Joined: 11/06/2015 - 02:26
Posts: 255

Modelica?

MRsDNF
MRsDNF's picture
Online
Last seen: 45 sec ago
Joined: 12/22/2011 - 21:18
Posts: 11313
Location: A light beam away from the missus in the land of Aus.

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.Smile

My current and or voltage measurements are only relevent to anything that I measure.

Budget light hobby proudly sponsored by my Mastercard and unknowingly paid for by a hard working wife. 

djozz said "it came with chinese lettering that is chinese to me".

old4570 said "I'm not an expert , so don't suffer from any such technical restrictions".

Old-Lumens. Highly admired and cherished member of Budget Light Forum. 11.5.2011 - 20.12.16. RIP.

 

pilotdog68
pilotdog68's picture
Offline
Last seen: 5 days 6 hours ago
Joined: 05/30/2013 - 23:31
Posts: 6346
Location: Held against my will in IOWA, USA

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!

My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

DrJones
DrJones's picture
Offline
Last seen: 1 year 4 months ago
Joined: 01/05/2011 - 13:30
Posts: 1044
Location: Frankfurt, Germany

Thanks! Embarassed

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

 

 

bmwsancho
bmwsancho's picture
Offline
Last seen: 5 days 2 hours ago
Joined: 05/08/2015 - 12:56
Posts: 446
Location: California, USA & EU

Matlab, Simulink

djozz
djozz's picture
Online
Last seen: 9 min 34 sec ago
Joined: 09/07/2012 - 17:04
Posts: 10627
Location: Amsterdam

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

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

M4D M4X
M4D M4X's picture
Offline
Last seen: 17 min ago
Joined: 03/19/2014 - 05:17
Posts: 5311
Location: Austria (GMT + 1)

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

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

find all available items in this list

i launched my new blog - all deals for members without MAP B$ Wink

find a short description about my idea here

 

if you want to buy a flashlight or battery for a better price: just send a mail - i will try to save you money!

bugsy36
bugsy36's picture
Offline
Last seen: 9 months 2 weeks ago
Joined: 07/11/2014 - 18:15
Posts: 2475
Location: Florida USA

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

It's the simple things that we take for granted that cost us the most

Ευκαιρία λέει πιάσε με από το μέτωπο γιατί μόλις έχω περάσει δεν θα με πιάσειs

raccoon city
raccoon city's picture
Offline
Last seen: 12 hours 58 min ago
Joined: 10/06/2010 - 02:35
Posts: 9218
Location: रॅकून शहर Palm Desert CA USA

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

threat_blocked

totilde
totilde's picture
Online
Last seen: 1 min 54 sec ago
Joined: 12/27/2012 - 12:22
Posts: 1144
Location: spain

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

Mooooooo

hank
hank's picture
Offline
Last seen: 1 hour 20 min ago
Joined: 09/04/2011 - 21:52
Posts: 7056
Location: California

Ada.

Henk4U2
Henk4U2's picture
Offline
Last seen: 3 hours 56 min ago
Joined: 02/13/2014 - 17:52
Posts: 1593
Location: The heart of the Netherlands (GMT+1)
hank wrote:
Ada.

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

I always think long and hard before I say something really stupid.

DrJones
DrJones's picture
Offline
Last seen: 1 year 4 months ago
Joined: 01/05/2011 - 13:30
Posts: 1044
Location: Frankfurt, Germany

Thanks! Smile 

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.

Hestbech
Hestbech's picture
Offline
Last seen: 1 week 5 days ago
Joined: 01/21/2015 - 19:40
Posts: 332
Location: Denmark

Hmmm ... must be Plankalkül

It would be dandy if birds pooped candy ::
emarkd
emarkd's picture
Offline
Last seen: 1 hour 53 min ago
Joined: 04/14/2015 - 22:04
Posts: 1368
Location: Georgia, USA

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

hank
hank's picture
Offline
Last seen: 1 hour 20 min ago
Joined: 09/04/2011 - 21:52
Posts: 7056
Location: California

mmmfff. One guess per person.

DEL
DEL's picture
Offline
Last seen: 4 hours 2 min ago
Joined: 06/28/2015 - 08:35
Posts: 534
Location: Canada

Has to be Fortran?

I like the idea of 1+X drivers. Apart from the low moon mode the single 7135 provides well regulated low and low-medium modes due to the low Vf at 350 mA.

Buwuve
Buwuve's picture
Offline
Last seen: 3 months 4 weeks ago
Joined: 02/11/2011 - 14:49
Posts: 1975
Location: Germany

I have no clue about progarmming. Maybe you used Node (don't know many programming languages and most others where named before).

Light up the darkness.

SIGShooter
Offline
Last seen: 16 hours 21 min ago
Joined: 07/14/2013 - 02:10
Posts: 945
Location: northern california

How about C

viperbart
viperbart's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 07/22/2014 - 15:17
Posts: 444
Location: Toronto ON CA

Java?
I know nothing of programming languages. Totally stabbing in the dark.

raccoon city
raccoon city's picture
Offline
Last seen: 12 hours 58 min ago
Joined: 10/06/2010 - 02:35
Posts: 9218
Location: रॅकून शहर Palm Desert CA USA

Commodore BASIC FTW!   Big Smile

sandalian
sandalian's picture
Offline
Last seen: 1 year 2 months ago
Joined: 05/05/2012 - 19:23
Posts: 507
Location: Indonesia

I’m guessing that you’re using Assembly to program the board.
This, I believe, make you able to put a lot of features into a single and limited capacity of board.

I'm switching my BLF account into LumenZilla. Thanks!

Gunga
Gunga's picture
Offline
Last seen: 1 day 22 sec ago
Joined: 11/28/2014 - 16:56
Posts: 1584
Location: Vancouver, Canada

No idea. C? Will these go up for sale?

Boaz
Boaz's picture
Offline
Last seen: 2 months 1 week ago
Joined: 11/07/2010 - 09:31
Posts: 6147
Location: Birthplace of Aviation

shell

καὶ τὸ φῶς ἐν τῇ σκοτίᾳ φαίνει καὶ ἡ σκοτία αὐτὸ οὐ κατέλαβεν

KeepingItLight
KeepingItLight's picture
Offline
Last seen: 1 week 6 days ago
Joined: 06/15/2015 - 14:52
Posts: 608
Location: California

Let's try Delphi.

Jubeldum
Jubeldum's picture
Offline
Last seen: 1 year 6 months ago
Joined: 11/02/2014 - 09:20
Posts: 2057
Location: Michigan

Perl?

MountainKing
Offline
Last seen: 1 week 5 days ago
Joined: 12/01/2011 - 03:20
Posts: 2249
Location: Lost Islands ™

I have absolutely no clue what the hell you wrote this beauty with. I don’t care. Nor do I care about winning. Thanks for being back Smile

I’ll go something with c++ …..

Never ever forget and forgive. Niwal**er new kid on the block trying to act tough.
http://budgetlightforum.com/node/24847
Do not support this brand.

DINODIRECT – SCAM COMPANY. DO NOT BUY
http://budgetlightforum.com/node/11324?page=2#comment-254983

Pages