lupodrv - custom driver, programmable

I just finished a new custom driver firmware for the NANJG105C or NANJG101AK1: lupodrv

Just like normal drivers it has some modes and memory, but it has two additional features:

Mode locking: Select any mode and use it for a second, then quite quickly tap (halfpress) the button 5 times (so it's on for only <0.2s each time), then the mode you started with is locked; it won't change to next mode any more. Good for tacticool or signaling purpose. Return to normal operation by quickly tapping 5 times again.

Programming: You can change any mode to a different brightness, strobe or beacon; you can change the number of modes (1-7), and you can change the memory type (no-memory, classic memory, short-cycle memory).
Select a mode (use for a second) and enter programming mode by 8 rapid taps (<0.2s on each time); then the driver goes through all options (see below), just tap again at the right moment to choose the one you want.

  • Programming mode signal, also serves as battery indicator (number of blinks indicates battery voltage)
  • Ramps through 16 visually linear levels of brightness up and down two times; just tap to reprogram the above selected mode with that new brightness
  • blinks 4 times (* * * *) and repeats that once: strobe (tap to select strobe as new mode)
  • blinks 4 times in a bigger interval (*___*___*___*): beacon
  • Morse signals "a" (* ---) twice: add a mode; the new mode is inserted before the above selected mode. Tapping here automatically starts programming mode again for that new mode.
  • Morse signals "d" (--- * *) twice: delete the selected mode
  • Morse signals "n" (--- *) twice: Set to no-memory
  • Morse signals "m" (--- ---) twice: Set to normal memory
  • Morse signals "s" (* * *) twice: Set to short-cycle memory (see below).
  • Then the light exits programming mode without any changes and returns to normal operation, 1st mode.

Battery monitoring: Whenever the battery falls below 3V under load, brightness is reduced (about half). The reduced load usually brings up the voltage a bit. When it drops below 3V again, brightness is halved again - and so on, down to a very low level. It will not switch off and leave you in complete darkness though.

Short-cycle memory combines the advantages of lights with memory and those with no-memory:
Usually with memory you have a few modes, but if you want to go back to the first mode, you have to cycle through the remaining modes. With no memory, you always start at the 1st mode and don't always have to click through all the modes, but you have no memory.
With Short-cycle memory, a mode is memorized after 1s, but if you when you change modes again, it will restart in the first mode instead of the next mode, so you don't have to cycle through all the modes. It actually was sixty545's idea. You can have memory, lots of modes, but no need to cycle through all of them. It effectively hides every mode behind all it's predecessors and is very effective if you have your favourite modes in front and blinkies or other rarely used modes at the end.
I actually use that short-cycle memory all the time (luxdrv uses it, too) and don't like normal memory any more.

PM me if you want one.

Related threads: Tido's thread -- custom driver thread -- luxdrv

Nice job, where can we found it?

That’s an impressive functionality you have put into the ATtiny13. I think it will take some practice to master such a light.
Thanks for being fair and mention where some of the ideas came from. If anyone is interested my thoughts can be found here and with implementation here.

I like your creativity for names. :P

Very nice, I highly appreciate your work! I’m sure this is going to be widely used as it is very functional and there is no need to compile own program with this one. Keep it up! :slight_smile:

Wow! that is truely impressive!
this driver program seems to be of such a great flexibility, that everyone should get what he likes in an UI!

…there is only one thing, what I can think of, that could be a problem: the number of taps to enter the programming and mode locking.
8 taps to get to the programming mode could maybe be too little, especially when you hand the light to someone, but since the maximum amount of modes is 7 it should be ok if I count my clicks.
But the 5 clicks seem really be to little: If I use at least 5 modes and want to go from the first to the last, I will always lock the first mode, or am I misunderstanding something?

Wow. This is great. Sounds fun to program too. Would be a great time killer. While everyone else plays with their phones I’ll be reprogramming my flashlight. I hope they will be available for purchase.

Wow….kinda gutted cause I was working on something very similar. Any chance we can get our hands on these? Love to see a video showing how it works as well :slight_smile:

- Matt

Awesome driver! I just wish there was an easy way to program the 105C to function as a memory on power down instead of memory on power up.

Can’t be programmed… but a resistor, diode and capacitor could be added pretty easily… That’s all it would take…

Philipp: The special timing makes it different: Those 0.2s are quite fast and it’s unlikely to do that “accidentally” while switching modes.

Lothar: I meanwhile got quite used to it and don’t find it disturbing, but of course it’s a matter of taste.

If anyone is interested in such a driver, pm me. I have a couple of NANJGs left.

That Short-cycle memory is indeed very usefull with more modes! Good to know this feature has a name. Excellent idea sixty545, and thanks for the implementation in luxdrv Dr.Jones.

I was thinking of using normal memory and implementing the UI using one and two short clicks:

OneShortClick - (wait few ms) and move forward,

TwoShortClicks - (wait few ms) and move backward.

By now short-cycle memory proved to be very good, so I'm staying with it.

I just got a couple of drivers from the good Dr. a couple of days ago with the lupodrv programming, and after installing and playing around with it, I have to say…this is some amazing programming.

It’s one thing to read about it and an entirely different experience using it. The driver’s capabilities just make so much sense and I wish all my lights could do the same. My favorite features by far are Mode Locking and the ability to add/delete modes.

My sincere thanks to DrJones and anyone else who contributed to the development of the code. I’m not putting it lightly when I say that this is a breakthrough in flashlight user interfaces.

Received today!
Soldered immediately, to get it running :smiley:

Nice driver, really. It takes a short while to get the hang of it but not more than 10 minutes anyway.
You need pretty short presses but not anything superhuman :wink: IMO the press speed is thought well, you do not do programming by accident easily.
I could say, a common person would probably never even notice the feature hidden in driver.

I like it. I like it alot…
The PWM is almost invisible at, what was it, 9KHz? I can only see it in flowing water or when I shake the flashlight very hard and that´s very nice.
I bet 9/10 of users will ever notice it nor be annoyed of it. More than 9/10 probably.

This is about the only feature I could add to this.
Not sure, if I need it though since the driver can be set to any selection and arrangement of modes.

I will probably use one of these in my good ol´work light. I use it mainly on High for short bursts, so 2 modes descending with short cycle memory or no memory should do it pretty well.

Just think about it:

Almost Any light you have that uses one cell can be converted mode~~, arrangement~~, memory-, and PWM-wise to a perfect one!

Even the pretty un-usual full-power one-modes are possible, or 2-modes with Lo~~Hi or Hi~~>Lo, with memory or without, as low as YOU want!

Could not have said it better myself (Thus the quote )

My cheap C8 Q5 now is my favorite light. Seriously contemplating to upgrade my TF A8 with it too

Highly recommended! Thanks DrJones!

Have Fun

Dr Jones, I got my drivers and oh WOW! I LOVE the multiple level options! PWM is GREAT! Low with my 4x7135 driver and 4C XPG is around 2 lumens. I have 5 brightness levels set for this light with one strobe. With the 8x 7135 driver powering a 3C XML, the lowest output is just a tiny bit above 3 lumens. I have this light set to 4 brightness levels.

One question I don’t see answered in the first post: Do the drivers still have low voltage warning? Is it the same as the original nanjg drivers? Thanks.

PM’d

eebowler: Thanks for the hint, I updated the first post.

Also thanks for the kind words everyone :shy:

Pavithra_uk: PMed back :slight_smile: