clicky

momentary

custom PCB

DrJones' Custom Firmware Drivers

Flashlight drivers with modes use a micro-controller (MCU) to handle those modes and the user interface.
Fortunately a few drivers come with an Atmel ATtiny13 MCU which can be reprogrammed with custom firmware,
namely the NANJG105C (8*AMC7135, 2.8A or 3.04A), NANJG105D, the NANJG101-AK1 (4*AMC7135, 1.40A) and the NANJG-AK47A (3*AMC7135, 1.05A).
This became a hobby for me, and here I gather info on my firmware variants.

However, I'm not active in this hobby any more; this page is just a collection of manuals for my firmwares
as a reference for people who have one or some of these.
For users of my firmwares it's probably a good idea to copy this page or the according section (e.g. a screenshot), as this server might go down any time.

Privacy statement: No data is collected at this website, not even a log of your IP.

All those drivers are for input and output voltage of 3-5 V (lower brightness at 3V),
best suited for one Li-ion cell or multiple Li-ion cells in parallel, and one XM-L or similar.
Slave boards could be connected for driving multiple XM-Ls, see at end of page.

luxdrv 0.3 was my first firmware.
It features short-cycle memory, ramping, battery monitoring (reduces brightness when batt is low, and has a battery level indicator).
It's source code is available here,
License: CC-BY-NC-SA (non-commercial use only, derivative works must be under the same license).

MiniDrv is a minimalistic firmware, it demonstrates how simple and small a firmware can be.
No blinkies and no battery monitoring though. See MiniDrv/MiniMo page.

NLITE is a free firmware with similar features as the original NANJG105C, i.e. it has some mode groups, selectable via solder bridges at the stars.
It has 8 groups though, none of them with blinkies, instead you can have 3 or 4 modes (with ot without moon mode), low-to-high or high-to-low mode order, memory or no memory.
Also PWM is 18kHz, not visible, not audible.
Firmware download and more details below.

luxdrv 0.4 is it's successor.
Key features: Short-cycle memory, Ramping, programmable (i.e. modes are configurable by the user, by a number of taps),
the number of modes can be changed, too. Has low-batt step-down (reduces brightness when battery is low) and battery indicator.

guppydrv is not programmable, but it has mode groups, so you can have different modes for different situations, for example
a mode group for outdoors (High, Med, with memory), one for indoors (moon, low, med, high, no memory), one with just high (for tacticool and signaling purposes), one with special modes, ...;
ramping is available as a mode, too.
Memory is a per-group setting, i.e. can be different for each group (no-memory, classic memory, short-cycle memory).
Reduces brightness when battery is low, and beacon mode includes a battery level indicator.

guppy2drv is not fully programmable, but it has a lot of mode groups to choose from, each with it's own memory setting.
The major improvements above guppydrv are the bigger number of possible groups and the more direct way of choosing between them,
as well as the highly configurable turbo timer and off-time memory. No ramping though.
Also has battery voltage indicator and low voltage step-down.

lupodrv is a very flexible firmware for lights with a clicky.
Key features: Programmable (change, add, delete a mode) with a nicer UI than luxdrv,
and the memory type can be changed, too (no memory, classic memory, short-cycle memory).
Also a mode can be locked for signaling or tacticool purpose.
Has low-batt step-down (reduces brightness when battery is low) and battery indicator.

lucidrv is my most flexible firmware for lights with a clicky.
It is very similar to lupodrv, but the UI is a bit different and it additionaly has two mode groups.
Key features: Programmable (change, add, delete a mode), has two mode groups,
the memory type can be set for each group (no memory, classic memory, short-cycle memory),
also a mode can be locked for signaling or tacticool purpose.
Has low-batt step-down (reduces brightness when battery is low) and battery indicator.
Note: Since 2015, lucidrv/FT (lucidrv with off-time memory) will be sent as default.

lucidrv/FT (ofF-Time memory) is a variant of lucidrv that can distinguish between
being off for a short tap (half-press) on the clicky and being switched off for a longer time. This is called off-time memory
and may require (depending on hardware) a small hardware modification (soldering an additional capacitor).
lucidrv/FT also offers an extra mode reached by a double-click (double-tap) as an option.

drivers for lights with momentary buttons (electronic switch)

MiniMo is a minimalistic firmware for momentary (electronic)switches.
No blinkies and no battery monitoring though. See MiniDrv/MiniMo page.

mobydrv, intended for cycling, where you need to change modes more often than to switch the light on or off.
Key features: easily change modes up or down, programmable, hidden strobe, battery indicator, low-batt step-down.

mobydrv/Q, a mobydrv variant that allows switching the light off much more quickly and thus is better suited for flashlight use.

simodrv, a momentary switch UI that partly mimics classical clicky UIs.
A short tap switches to the next mode, a long click (press&hold for 0.5s) switches off.
However when off, a short click switches it on to using last used mode (memory), while a long click switches it on using the first mode (no-memory),
so you can decide between memory and no-memory each time you switch it on.
Has a battery indicator, a hidden strobe (triple-click), and the brightness levels are configurable (programmable).

mokkadrv, a momentary switch UI with some tactical tendencies.
When off, a short click always switches to HIGH, a long click (press&hold for 0.5s) to low. A double-click activates strobe.
A short click also switches off. Press&hold to cycle through the 3 modes.
Has a battery indicator, and the brightness levels are configurable (programmable).

moppydrv, sort of guppy2drv for momentary switches, with basic operation similar to mokkadrv.
Like guppy2drv, there are many mode groups to choose from, selectable by the user.
When off, a short click switches to on the last used mode (memory), a press&hold to the first mode of the mode group (no-memory).
When on, a short click switches off, press&hold cycles through the modes.
A double-click leads to an extra mode (from off or on).
Has a battery indicator, low voltage step-down and a configurable turbo timer.

Short-cycle memory is a special UI that allows to have memory and many modes without the need to cycle through all of them.
With classic memory you have a few modes, and 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 (i.e. if the light is switched off an on again, it comes on in that previously used mode),
but 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.
This combines memory with the advantages of a no-memory-UI.
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 call it "short-cycle" in contrast to the classic cycle-through-all-modes memory, but it was actually invented by sixty545 at BLF.

This is the successor of lupodrv with a somewhat more intuitive programming UI; it also features two mode groups.

Note: Since 2015, lucidrv will be sent with off-time memory as default (actually lucidrv/FT).

Two mode groups: You can have two mode groups for different situations (e.g. one for indoors with moon and low modes, and one for outdoors with high/med).
Each group is fully configurable with up to 7 modes and it's own memory type (see below).

Mode locking: Select any mode and use it for a second, then activate mode lock (see below).
Then that mode is locked, it won't change to next mode any more (unless you unlock it again). Good for tactical or signaling purpose.

Programming: You can change any mode to a different brightness, strobe or beacon;
you can change the number of modes (1-7) in each group,
and you can change the memory type for each group (see below)(no-memory, classic memory, short-cycle memory).

Configuration menu (programming mode):
Select a mode and use it for at least a second. That mode is then the selected mode for some of the actions below.
Then enter programming mode by 8 rapid taps (half-presses; the light must be <0.2s on each time).
You have to be quite fast, however it's no problem if you tap a few times more.
Shortly after those rapid taps a blinking signal will be shown. This serves two purposes:
It indicates that the light is now in its configuration menu (programming mode) and awaits further input,
and it also serves as battery level indicator:
The number of blinks indicates battery voltage, about one blink for every 0.1V above 3.0V without load (~12 is full, ~4 is pretty empty).
If you let them pass without tapping the button again, the config menu is exited without any change.
If you want to change the configuration, you need to 'input' more taps while the blinking signal is active, the number of taps specifies the action.
Note that the timing is more relaxed in the config menu; you have to be swift and uninterrupted, but by far not as rapid as the 8 taps above.
However you must hit the exact number of taps.
Once you entered the config menu (by 8 rapid taps) and see it's signal, tap the button a number of times to do the following:

3 taps: Set brightness. The light will ramp the brightness up and down twice in 16 visually linear steps (the output doubles/halves every 2 steps).
Tap once when the desired brightness is reached to change the selected mode to this brightness (constant brightness).

4 taps: Change the selected mode to strobe.

5 taps: Change the selected mode to beacon (a blink every ~10s)

6 taps: Delete the selected mode.

7 taps: add a mode; the new mode is inserted at the position of the selected mode.
Example: If you have 3 modes, L/M/H (with M selected), then add a mode, the result is L/M/M/H, i.e. the selected mode is doubled,
and the first of them is selected. It can then be changed by entering the config menu again.

8 taps: Set the memory type for the active group to no-memory.

9 taps: Set the memory type for the active group to classic memory (cycle through all modes).

10 taps: Set the memory type for the active group to short-cycle memory (after memory kicked in, skip to first mode; see above).

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.
PWM frequency is 18 kHz.
Note: The brightness ramp hast 16 steps, from #16(100%) downwards the output halves every 2 steps.
The lowest modes however deviate from that due to limited PWM resolution, also the actual output on the lowest modes depends on hardware variations like 7135 internal capacitance and LED forward voltage.
The levels (in %) are: ~.2 .7 1 1.5 2 3 4 6 9 13 18 25 35 50 70 100

New features for lucidrv drivers sent since September 2013:Disable programming (proglock):
Solder a connection from the 4th star (the rightmost one on the images below) to the outer ring to disable programming (some conductive paint etc. might work, too).
Mode locking and switching between mode groups (1 or 2 taps in the config menu) will still work, but all config options below that won't.
Remove the solder bridge to enable configuration changes again.
Option: 5 taps for mode lock: You need to tell me if you want that option before I send the driver.
A driver with that option will switch mode locking after 5 quick taps (like lupodrv) instead of one tap in config menu.
The latter will then just be ignored and may be used to abort the config menu.
This option might be useful for those who use mode locking often.

lucidrv/FT (ofF-Time memory) is a variant of lucidrv that can distinguish between
being off for a short tap (half-press) on the clicky (to change to the next mode)
and being switched off for a longer time (so that memory kicks in, or no-memory if configured that way).
This is called off-time memory.
It may (or may not, depends on hardware) require a small hardware modification (an additional capacitor of 1uF soldered between star 4 and the ground ring).
ProgLock moved to star 3.

Option: Double-Tap: A quick double-tap leads to an additional (programmable) mode, e.g. high or strobe.
It can also be activated fromm off by a tap immediately after clicking on (click-tap; for reverse clickies),
or by a tap immediately before clicking the light on (tap-click; for forward clickies)
You need to tell me if you want that option before I send the driver.

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:
A number of blinks indicates battery voltage, about one blink for every 0.1V above 3.0V without load (~12 is full, ~4 is pretty empty).

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.

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.
PWM frequency is 9 kHz.

Change mode group: Enter the config menu by 8 (or more) fast taps, wait for the blink signal (battery indicator).
If you want to change the mode group, you need to 'input' more taps while the blinking signal is active, the number of taps specifies the group number (see mode list).
Note that the timing is more relaxed in the config menu; you have to be swift and uninterrupted, but by far not as rapid as the 8 taps above.
However you must hit the exact number of taps.

Set turbo timer: Enter config menu by 8 (or more) fast taps, wait for the blinking signal, then enter turbo config mode by the according number of taps (see mode list).
The light then runs at full power. Let it run for the desired time (e.g. until it gets hot; use a full battery), then tap or switch off. That time is now set for the turbo timer.
Setting a time below 4 seconds disables it. The turbo timer has a maximum of about 19 or 20 minutes (this is also the default).
It applies to all modes above 50% and smoothly ramps them down to 50%.

Low voltage protection: 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.

Connecting star 2 to ground (e.g. solder bridge to ground ring) activates group lock: The battery indicator still works, but groups cannot be changed any more.
Connecting star 3 to ground changes classic memory to short-cycle memory (for every group with memory).
Note: There are some variants of guppy2 availabe elsewhere which may or may not have that feature.

guppydrv has it's modes organized in mode groups, the user can switch to the next group by 8 quite fast clicks (<0,25s).
The number of blinks then indicates the current group.

You could have a mode group for outdoors (High, Med),
one for indoors (moon, low, med, high),
one with just high (for tacticool and signaling purposes),
one with special modes,...;
ramping is available, too.

Memory is a per-group setting, i.e. can be different for each group.
Options are no-memory, classic cycle-through-all-modes memory, and short-cycle memory (see above).

Starting at high, starting at low, strobe or not, memory or not - you can have a mode group for each situation.

guppydrv has battery monitoring with automatic step-down on low battery level, and the beacon mode starts with a battery indicator (a number of blinks); see lupodrv.

When switching on, you start at the beginning of that list, but that's the memory (previously used) mode.
Mode 1 is omitted if the "memory" mode already was mode 1. (short-cycle memory)

If you select any mode and use it (>1s), and then switch the light off and on again, it'll be in the same mode (memory).
But when you switch to the "next" mode, instead of always advancing to the next mode in the mode order, it starts from the mode 1 again.
e.g. use mode 2 (>1s) -(tap)-> mode 2 (memory) (for <1s) -(tap)-> mode 1

In the above mode order list, modes 1-3 are user configurable, and their number is configurable, too.

Change a mode:

Select one of these modes as made to be reprogrammed and use it for >1s (mode lock time),

Unfortunately there's no feedback (I didn't have program space left for that).
Note that the lock time is increased to 3s while programming for a more relaxed procedure.
Note that you have to find the desired mode/level within another 14 taps, or else you'd delete a mode (see below).
Shouldn't be a problem with the longer lock time though.

Add a mode:

Switch to any non-programmable mode (a ramped level or any mode behind it) and use it for >1s (mode lock),

quickly tap the button >30 times (without locking a mode),

--> an additional mode is added after the other programmable modes (before ramping),
and you can now program that new mode like above from step 3.
You can have up to 6 programmable modes.

Delete a mode:

Select any programmable mode (before ramping) and lock it (use >1s),

quickly tap >30 times,

--> the last programmable mode (the one directly before ramping) is removed.
(You can't delete a mode from the middle of the programmable ones, because again I didn't have program space left for that.)
You can even delete all programmable modes, then the 1st mode is ramping. That's actually an interesting setting, too.

Since you can't backup the original NANJG firmware (it's protected, you only get garbage if you try), you can't restore it's functionality if you flashed a new firmware to it.
Here's a firmware that is somewhat similar (i.e. the mode group is selected by solder bridges between stars and the outer ring),
but with more and different groups that seem to be needed more often (no blink modes).

It's levels are 5%-33%-100% and optionally a moon mode (a few milliamperes, depending on hardware variations like LED voltage).

star

open

closed (soldered)

1

The 1st star is a dummy and not connected anyway.

2

3 modes L/M/H

4 modes, additional moon level

3

ascending mode order (moon/)L/M/H

descending mode order H/M/L(/moon)

4

classic memory

no memory

Any combination is valid, so these are 8 groups in total and should meet most people's needs.
Example: Moon/Low/Mid/High, no memory: Solder stars 2 and 4 to ground (the outer ring).

It also has a PWM frequency of 18kHz, which is not visible and not audible (no whining noises).

moppydrv is like guppy2drv for momentary switches; like guppy2drv, it offers a lot of mode groups to choose from, trying to accomodate various needs and preferences.
The basic UI is similar to mokkadrv (click-on, click-off), but you can choose to switch the light on with (tap) or without (press&hold) memory.

A short tap switches the light on (in the previously used mode, memory) and off.

A press&hold cycles through the modes in the selected mode group; a press&hold from off switches the light on in the first mode of the selected group (no memory).

A double-click (from off or on) leads to an extra mode (see mode list).
In some groups that is one of the main modes, a double-click can then be considered a short-cut to that mode.

A triple-click toggles lock-out: The light doesn't react on pressing the switch any more - except for another triple-click to reactivate.

8 fast clicks lead to the config menu, indicated by a blinking signal. These blinks also serve as the battery indicator.
Count the blinks: It's one blink for each 0.1V above 3.0V, so 12 blinks is full, 3-4 blinks is quite empty.

If you want to change the mode group, enter the config menu (8 fast taps), wait for the battery indicator blink signal, then 'input' more taps while the blinking signal is active,
the number of taps specifies the group number (see mode list).
Note that the timing is more relaxed in the config menu; you have to be swift and uninterrupted, but by far not as rapid as the 8 taps above.
However you must hit the exact number of taps.

To configure the turbo timer, enter config menu by 8 (or more) fast taps, wait for the blinking signal, then enter turbo config mode by the according number of taps (see mode list).
The light then runs at full power. Let it run for the desired time (e.g. until it gets hot; use a full battery), then tap to switch off. That time is now set for the turbo timer.
Setting a time below 4 seconds disables it. The turbo timer has a maximum of about 19 or 20 minutes (this is also the default).
It applies to all modes above 50% and smoothly ramps them down to 50%.

Low voltage protection: 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.

When off: Tap to get to the previously used mode
(optionally: no-memory, always start at 1st mode).

Tap again within 1s (can be configured) to change to the next mode.

When on for >1s (mode is locked), next tap switches off.

When off: Press for >0.5s to start ramping up from lowest level; release: use that level.

When on: Press for >0.5s to start ramping from current level; release: use that level.

Press again for >0.5s: Ramp in the other direction. This allows to fine-adjust the brightness to your wishes.

The ramp has 34 visually linear steps (except for the lowest levels).

There's a short blink at each end of the ramp.

If you continue to ramp up for 1s while already at max, you reach the extended mode group.

Long press in an extended mode gets back to main mode.

Main mode group and extended mode group can contain up to 8 modes each.

Available are 34 levels of brightness, plus strobe and beacon.

Beacon has a battery indicator at it's start (a number of blinks, one blink for every 0.1V above 3.0V, without load).

Switches down when battery is low.

If you continue to ramp down for 1s while already at min, you reach momentary mode, i.e. it's on whenever you press the button ('tactical').
Return to normal operation by locking out (disconnect power) or 9 very fast clicks.
Momentary uses the brightness level you has last used and switched off (!).

multi-click modes: A double-tap, triple-tap, quadrupel-tap, quintuple-tap point to additional modes;
a double-tap for example can lead high, regardless which mode is currently active (except momentary) or if the light is off.

Programming (i.e. you can reconfigure the modes):

Use a mode (a main mode or double/triple/quad-click) for >1s, click to switch off (!). This mode will be reprogrammed.

Press and hold the button for ~12s; the ramp will start again.

Do whatever necessary to get the desired brightness level or extended mode (but do not switch the light off until finished).

Use the wanted new level/mode for >1s, click to switch off.

--> The mode from step 1 will be reprogrammed with the mode from step 4.
Note that those mode changes are non-permanent: A lock-out or a battery change will reset the light to it's default modes.
The new version allows permanent changes though (see below).

170\B5A drain when off, mostly due to the battery sensing voltage divider on the board (the MCU only takes 6\B5A then). This will drain a 2200mAh cell within 1.5 years.

New version 1.1 (applies to drivers sent since September 2013)

The new version allows to permanently store a changed mode configuration:

Make changes as described above (programming). Those changes are still temporary (i.e. will be lost on a lockout or battery change); try them out.

When you are pleased, you can make them permanent by quickly clicking 20 or more times in a row.
You don't need to count precisely, but be sure to perform a steady series of at least 20 quick clicks.
The light will stop reacting when the 20 have been reached to indicate success.

Then the new setup will be stored in EEPROM and thus kept beyond a power disconnect.

Note: The number of modes can not be changed.
Warning: You can overwrite a special mode (strobe/beacon) with a different setting; once you make that change permanent, that special mode is lost forever!

This firmware is intended for cycling, where you change modes more often than you switch the light off.
Thus changing modes up or down is very easily accessible, while switching off takes relatively long to prevent accidental sudden darkness.

Features:

Easy mode changing up and down: short tap to get to a higher mode, longer tap to decrease the mode.

"Programmable", i.e. the brightness levels and the number of modes are configurable by the user.

Two oscillating strobe patterns for being seen, but these are not just blinking on and off, but instead oscillate between high and low brightness (so the light is never off then).
They come in two patterns (regular: oOoOoOoO and double-pulse: oooOoOoooooOoOooo) and can be adjusted in brightness (just like the constant brightness modes).
Not going off allows better estimation of your position/distance, while the blinking catches attention.

Two mode groups for more flexibility. Each mode group has it's own memory, so if you toggle groups it will return to the previously used mode of that group.

and so does a press&hold: H >> M >> L >>>>>>> OFF >>>>>>> battery level indicator

which additionally allows switching off (~2s hold)

If you continue to hold or press and hold when already off, you get a battery level indicator:
A number of blinks shows the battery status; about one blink for every 0.1V above 3.0V without load (~12 is full, ~4 is pretty empty).

If you do a short tap immediately followed by a long tap (tap-taaap), you switch between mode groups.

Quickly tap 8 times to get into programming mode, a dim oscillating signal indicates that.
It now awaits your command, which is another series of fast taps:

2 fast taps: Change the brightness of the mode in which you started the programming mode (with 8 taps). This applies to constant brightness and strobe modes.
The light shows that mode's current brightness, use press&hold to ramp up and down (alternating). You can use press&hold as often as you want.
When you found your desired new brightness, double-tap (2 quick taps) to store it (single tap to abort).
Note that when you change the brightness of a strobe mode, the brightness shown while programming is constant and corresponds to the brightness of the bright pulses.
The low brightness in between is about 25% of that.
The ramp consists of 12 steps with lots of choices in the mid/high range to suit your brightness-vs-runtime preferences (see below).

3 fast taps: Switch current mode between constant brightness, regular strobe, double-pulse strobe and from there back to constant brightness.
(To get from regular strobe back to constant mode, you have do the whole procedure twice.)

4 fast taps: Delete the last mode (if there's more than one).

5 fast taps: Append a new mode (max. 7 modes).

The above programming will be temporary, i.e. not be conserved beyond a battery change or lockout.
This allows testing your new setup. But you can make it permanent:

8 fast taps: Stores your current mode configuration permanently, i.e. it will not be lost when the power is disconnected (battery change, lockout).

If you don't tap for 5 seconds or enter a wrong number of taps, programming mode will abort.

Success is indicated by a short blinking signal, abort or error by a longer one.

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.

The 12 levels (in %) are: 1 2 5 10 16 25 32 40 50 63 79 100

170\B5A drain when off, mostly due to the battery sensing voltage divider on the board (the MCU only takes 6\B5A then). This will drain a full 2200mAh cell within 1.5 years.

18kHz PWM frequency, not visible, not audible.

The initial mode setup comes with 3 brightness modes in group 1 (2% - 50% - 100%)
and some strobes in group 2 (low double-pulse, high double-pulse, high regular), but by programming you can change and mix the whole setup.

This UI was intended as a SImple UI for lights with a MOmentary switch, but I couldn't stop, so it is programmable again :)
The idea behind the UI is to mimic classical clicky UIs which switch to next mode an a 'half-press' or 'tap', but switch on/off with a 'deep press' or 'click'.
With this UI, a 'half-press' translates to a short press (or click), and a clicky's 'deep press'/'click' to a long press (press&hold for 0.5s).
There's an additional feature though: By switching it on with a short or long press you can decide wether to have memory or not.

when off

when on

short press

switch on with memory (last used mode)

switch to next mode

long press

switch on without memory (first mode)

switch off

double click

directly switch to high (100%)

triple click

directly switch to strobe

long hold (2s)

battery indicator

Programming:

Quickly click 6 times to get into programming mode.

The light shows the brightness of the current mode (the mode in which you started the programming with the 6 taps),

Use press&hold to ramp up and down (alternating). You can use press&hold as often as you want.

When you found your desired new brightness, a single short click stores this brightness for that mode.

The ramp consists of 16 steps (same as lumodrv).

Note that those mode changes are non-permanent: A lock-out or a battery change will reset the light to it's default modes.

However you can make your changes permanent by quickly clicking 20 or more times in a row.
You don't need to count precisely, but be sure to perform a steady series of at least 20 quick clicks.
The light will switch off when the 20 clicks have been reached to indicate success.
Then the new setup will be stored in EEPROM and thus kept beyond a power disconnect.

Note that the number of modes cannot be changed.

Further features:

Battery level indicator (hold for 2s): A number of blinks shows the battery status; about one blink for every 0.1V above 3.0V without load (~12 is full, ~4 is pretty empty).

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.

170\B5A drain when off, mostly due to the battery sensing voltage divider on the board (the MCU only takes 6\B5A then). This will drain a full 2200mAh cell within 1.5 years.

18kHz PWM frequency, not visible, not audible.

The initial mode setup comes with 3 modes: 3% - 25% - 100%. If you want more or less modes, note that when contacting me.

switch on first mode (LOW), then slowly cycle through the modes (L-M-H-M-L-M-...)

From whatever mode you are in, cycle through the modes.

double click

strobe

long hold (8s)

battery indicator

Note that it doesn't have memory. See new version below.

Programming: (same as simodrv)

Quickly click 4 times to get into programming mode (Note: In versions sold 2013 you had to click 6 times.)

The light shows the brightness of the current mode (the mode in which you started the programming with the 4 taps),

Use press&hold to ramp up and down (alternating). You can use press&hold as often as you want.

When you found your desired new brightness, a single short click stores this brightness for that mode.

The ramp consists of 16 steps (same as lumodrv).

Note that those mode changes are non-permanent: A lock-out or a battery change will reset the light to it's default modes.
This allows to quickly adapt the modes to your situation without changing the permanent programming.

However you can make your changes permanent by quickly clicking 20 or more times in a row.
You don't need to count precisely, but be sure to perform a steady series of at least 20 quick clicks.
The light will switch off when the 20 clicks have been reached to indicate success.
Then the new setup will be stored in EEPROM and thus kept beyond a power disconnect.

Note that the number of modes cannot be changed. See new version below.

Further features:

Battery level indicator (hold for 8s): A number of blinks shows the battery status; about one blink for every 0.1V above 3.0V without load (~12 is full, ~4 is pretty empty).

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.

170\B5A drain when off, mostly due to the battery sensing voltage divider on the board (the MCU only takes 6\B5A then). This will drain a full 2200mAh cell within 1.5 years.

18kHz PWM frequency, not visible, not audible.

The initial mode setup comes with 3 modes: 2% - 25% - 100%. If you want more or less modes, note that when contacting me.

New version since 2015

when off

when on

short press

switch on in last used mode (memory)

switch off

press&hold

switch on in LOW (1st mode), then cycle through the modes

cycle through the modes.

double click

HIGH (3rd/4th mode)

triple click

strobe

long hold (8s)

battery indicator

UI with memory option (star 2)

Configurable turbo timer: Quickly tap 15 times (actually 14 to 16 times) to get to the turbo timer config mode.
The light then runs at full power. Let it run for the desired time (e.g. until it gets hot; use a full battery), then tap to switch off. That time is now set for the turbo timer.
Setting a time below 4 seconds disables it. The turbo timer has a maximum of about 19 or 20 minutes (this is also the default).
It applies to all modes above 50% and smoothly ramps them down to 50%.

4 modes: Soldering a solder bridge etc between star 3 and the outer ring (ground) changes the number of modes to 4.

memory: Soldering star 2 to ground enables memory: When off: Tap to switch on in last used mode (memory), double-tap to switch on in mode 3 (high; mode 4 with 4-mode option), triple-click for strobe.

As default there are two 'standard' levels, 25% and 100%, and a short tap on the mode button switches between them.

Ramping: When you press the button a bit longer (>0.5s), it begins to ramp up (visually linear), starting from the brightness level you just were in.
If you release and press again (>0.5s) it ramps down instead, so it's quite easy to fine-adjust the brightness to your wishes;
if you want it just a tad brighter or less bright, you don't have to start over.
The end of the ramp is indicated by a short blink.

Extended modes: If you press the button even longer (>1s while already at the end), you get the extended modes, where strobe and beacon are.
A short tap switches between the extended modes, a longer tap gets you back to standard mode.

If the main (power) button is a forward clicky, you have a momentary operation (signaling, 'tactical'), too.

If you want to drive multiple LEDs, a master-slave setup might be an option.
In such a setup, the PWM signal from the MCU on the master driver is connected to the slave board(s) which do not have an own MCU, they just hold more AMC7135 ICs.
The wiring is shown in the image; more slave boards can be easily added.
The slave boards do not need to have Batt+ or LED+ connected.