Driver giveaway: Constant current 17mm 1S drivers, current fully adjustable by firmware.

185 posts / 0 new
Last post
HarleyQuin
HarleyQuin's picture
Offline
Last seen: 7 months 2 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 580

Always great to see your work, Mike C, nice to have a chance to see what you have in the making.

I’m not in for the giveaway, for a reason you might understand more than anyone else: I don’t use what I can’t program myself Big Smile
And it would be a pity just to have such a great driver lying here, knowing that someone else might have use for it.

But I’m happy to chime in on your UI question.
I don’t want wrap around – ever. Which rules out about every stock clicky firmware in the repository…

1. clicky lights
- 2 to 7 modes, evenly spaced in brightness
- usually 4 mode groups: 7 modes, 6 modes w/o turbo (for muggles), 4 modes, 2 modes
- short press (tap): brighter mode
- medium press (1sec): darker mode
- no wrap-around = no accidental moon after turbo, no accidental turbo after moon (you know: wham! ugh! here goes my dark adaptation) and several short presses in a row always reliably result in highest mode
- 12 short presses to battcheck
- 15 short presses to config mode (modegroup, memory, turbo timeout and LVP can be toggled)

2. momentary lights
a)
similar as the clicky UI (modegroups, battcheck, config mode) with
- no memory
- short press from off = moon
- long press from off = turbo
- long press from on (any mode) = off
- short press: brighter mode
- medium press (1sec): darker mode
- no wrap around
b)
- short press (tap): on/off with memory
- hold when on: ramping up and down and up and down and…

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

Mike C
Mike C's picture
Offline
Last seen: 6 hours 17 min ago
Joined: 01/22/2014 - 08:03
Posts: 2296
Location: Sweden

Schoki wrote:
Maybe we can use an e-Compass to create a pretty unique UI.

Interesting idea, thinking out of the box, that’s for sure. I don’t think I would use it myself though, I mostly use my lights when moving underground and a simple UI with a few clicks will always be easier.

HarleyQuin wrote:
I’m not in for the giveaway, for a reason you might understand more than anyone else: I don’t use what I can’t program myself Big Smile

Oh yes, I understand completely! Be it a headlamp, bike light or hand held, if I can’t stick one of my own drivers in it I’ll either make a new driver for it or bin it Smile

HarleyQuin wrote:
- no wrap-around = no accidental moon after turbo, no accidental turbo after moon

I haven’t thought about it like that. It’s a good idea indeed, in particular for clicky lights. I’ll make a user setting for it. Thanks for that one.

ImA4Wheelr wrote:
Medium Length Hold – Off

Sirius9 wrote:
Long (0,5 seconds or so) press from any mode to turn it off.

HarleyQuin wrote:
- long press from on (any mode) = off

This differs some what from most people. Almost everyone seems to prefer short press from any mode to be off, regardless of UI type. I used to prefer long for off myself but thought I was alone so I made some UIs with short off to see what the fuss was about. I had to put some effort into thinking about the other button sequences and ended up being converted myself, now I prefer short for off too. I did have multiple UI options for off selection in some older firmware, I might bring that back to life. In any case, it is refreshing to see other options than short for off. Apparently I wasn’t alone like I thought.

Thanks for the input!

Barkuti
Barkuti's picture
Offline
Last seen: 32 min 58 sec ago
Joined: 02/19/2014 - 14:46
Posts: 3795
Location: Alhama de Murcia, Spain

Short press from any mode to OFF? WTF?  And how the hell do you switch modes? Pretty ill-suited if long press or whatever, imho. Facepalm

 

Cheers 

Flashy Mike
Flashy Mike's picture
Offline
Last seen: 1 month 4 days ago
Joined: 01/14/2016 - 16:38
Posts: 1166
Location: Germany

Mike C wrote:
I used to prefer long for off myself but thought I was alone so I made some UIs with short off to see what the fuss was about. I had to put some effort into thinking about the other button sequences and ended up being converted myself, now I prefer short for off too.

Same here. After adapting my UI to short off I like this type more. And short off doesn’t confuse muggles if they get their hands on my lights.
Agro
Agro's picture
Online
Last seen: 3 min 8 sec ago
Joined: 05/14/2017 - 11:16
Posts: 4284
Location: Ślōnsk

Schoki wrote:
Nice drivers, here’s a new idea:

Maybe we can use an e-Compass to create a pretty unique UI. Click for on and off (with double click for turbo, and all the other fancy shortcuts), but then hold, and rotate the light to control brightness. Clockwise for more, counter-clockwise for less output. Something between 90°-120° from low to high could be great. Involves communication between MCU and magnet field sensor though.


Interesting, though it needs a tail switch. Otherwise locating the switch during the next use would be a problem
I love QTC twisties and this very much reminds me of one.
Among the things that QTC does well is the ability to fine tune the output easily. I’m afraid that preventing accidental output change during regular user movement could interfere with that. I’ve spent a while looking for solutions, I find nothing satisfactory.
So…I’m afraid it wouldn’t work as well as I wish it would, but I surely miss many implementation options and maybe I’m just exaggerating the impact of regular hand movements.
Zig
Offline
Last seen: 7 months 3 weeks ago
Joined: 11/29/2018 - 08:20
Posts: 1
Location: Los Angeles

My Driver Setup For Single LED EDC

*Press and hold when OFF= Moonlight

*Single Click = ON

*Single Click = OFF

****Press And Hold When ON****RAAAMMMMMPIIIINNNNG!!! (I think that the way you setup these drivers the ramping would be super smooooth!!

*Double Click = 1st of 3 BRIGHT modes

*Double Click = 2nd of 3 BRIGHT modes

*Double Click = 3rd and BRIGHTEST mode

*Triple Click = Enters into mode 1 of 3 separate modes. (Bicycle Flashing Light)

         -Single Click = 2 of 3 separate modes. (Battery Check 1 blink low * 5 blinks full *

        -Single Click = 3 of 3 separate modes. (S.O.S.)

        -Single Click = OFF

* When OFF, Double Click Then Press And Hold On 3rd Click = Lockout

* I REALLLY WANT ONE OF YOUR DRIVERS PLEEASE! I know Im new here but I really want to build a sweet Thrower with one of these drivers!!

-Zig-

Barkuti
Barkuti's picture
Offline
Last seen: 32 min 58 sec ago
Joined: 02/19/2014 - 14:46
Posts: 3795
Location: Alhama de Murcia, Spain

A well defined set of proportionately scaled modes is a most standard configuration which can fit everyone. For a 2.5x order of magnitude and 5 modes total (4 plus moonlight) that would be, in percentage: 0.2, 6.4, 16, 40 and then 100% (2.5x-fold the previous mode driving current ensures at least doubling the light output). And bullshite anything else LoL! Big Smile

 

Agro
Agro's picture
Online
Last seen: 3 min 8 sec ago
Joined: 05/14/2017 - 11:16
Posts: 4284
Location: Ślōnsk

I noticed that no light serves my major use pattern well…
With e-switch lights I use physical lockout a lot. Light is on, I unscrew the tailcap to turn it off. When I want it back on I screw the tailcap back, find the button, turn the light on.

If the light turned on as soon as I screwed it back I could avoid the last 2 steps.

OTOH it would prevent using shortcut to moon and blast me and everyone around with whatever the default mode is.

I had literally 1 e-switch light where I didn’t use physical lockout. Not that it had one….but even if it did I wouldn’t have to.
Nitecore Tini. It has that annoyingly long click to turn on. I hated that. And it would turn on by itself from time to time anyway.
But maybe a more elaborate turn-on sequence would serve as well as a lockout? 2-click on?

Mike C
Mike C's picture
Offline
Last seen: 6 hours 17 min ago
Joined: 01/22/2014 - 08:03
Posts: 2296
Location: Sweden

I have lock out feature in my firmware, and with the ATtiny1634 I have the parasitic drain down to 1uA which is theoretically over 3000 years with a 3000mAh cell. I haven’t checked if the CN regulators leak any current yet though, but if they don’t there shouldn’t be a need for physical lockout.

I do detect weather power is back after cell replacing in E-switch only configuration. Currently I have it set to blink a confirmation that the cell is back, then the light goes back to sleep. I haven’t decided weather it would be better to just have the light turn on again, but just as you mention it could blast everyone around.

For the actual lockout I am considering multiple options. One full lockout that requires full unlock sequence, another partial lockout that requires simple sequence on each startup until full unlock is done. I had to have lockout on my BMF SRK because it almost started a fire in my backpack during a mine exploration, but it’s tedious to have to do full lock/unlock each time I take it out of the backpack for photo shoot (it’s off-switch light), so a semi-lock feature would really be helpful in these situations.

Mike C
Mike C's picture
Offline
Last seen: 6 hours 17 min ago
Joined: 01/22/2014 - 08:03
Posts: 2296
Location: Sweden

Also, an update on the drivers. I have built them now but bumped into an issue for clicky switch lights that I’m trying to solve without new driver design. Doesn’t effect E-switch configuration though.

Also, still working on putting together the firmware. I’ve implemented support for quite a few of the suggestions here, and it’s required me to re-write how my firmware works to support these options, so the suggestions have been appreciated! Keep ‘em coming.

Barkuti
Barkuti's picture
Offline
Last seen: 32 min 58 sec ago
Joined: 02/19/2014 - 14:46
Posts: 3795
Location: Alhama de Murcia, Spain

Suggestions? 

Keep it simple, or as much as you feel fine keeping it. I understand certain people may be accustomed to a lot of driver features but that poses extra work which could pose a serious development hurdle which the majority of users won't really care about. I prefer it Haiku style, it already annoys me grabbing a C8T/C8F and needing to go to Sofirn's website or this forum with my smartphone because I do not @#$%ing know how to switch the group modes or whatever.

In any case, do it as you feel up to.

 

Cheers Party 

Mike C
Mike C's picture
Offline
Last seen: 6 hours 17 min ago
Joined: 01/22/2014 - 08:03
Posts: 2296
Location: Sweden

Barkuti wrote:
I understand certain people may be accustomed to a lot of driver features but that poses extra work which could pose a serious development hurdle which the majority of users won’t really care about.

Ahh, but the whole point of this giveaway is to get suggestions that I like, and then see if I can make them… for myself…

I’m not making these drivers for the masses, I’m making them for me… This thread is only about a driver development junkie looking for a fix, and paying for product with a few drivers Big Smile

Barkuti
Barkuti's picture
Offline
Last seen: 32 min 58 sec ago
Joined: 02/19/2014 - 14:46
Posts: 3795
Location: Alhama de Murcia, Spain

Wellp, optimize then access and operation of functions in order of frequency of use. A well scaled mode set and battery check already does for me. Plenty of room for other's suggestions. Innocent

 

Cheers Party 

Agro
Agro's picture
Online
Last seen: 3 min 8 sec ago
Joined: 05/14/2017 - 11:16
Posts: 4284
Location: Ślōnsk

Woke up today and got idea of how to avoid seeking the button while avoiding turning on when it’s not needed.
But it’s one of those things that user won’t figure out by themselves within 2 minutes of playing with light. A bit of hidden complication.

The idea is: implement a simple twisty / reverse clicky UI. Unlike most clicky UIs – don’t turn on when the power is on but upon short disconnection. Bonus feature: add more than 1 shortcut like that and or allow more control of the light with just a clicky.

Mike C
Mike C's picture
Offline
Last seen: 6 hours 17 min ago
Joined: 01/22/2014 - 08:03
Posts: 2296
Location: Sweden

So you have a lighted tailcap that is on while the light itself is in sleep mode? I’d see this more of a lockout feature that only requires a short tap to unlock. I could certainly implement that as one of the lockout modes.

Agro
Agro's picture
Online
Last seen: 3 min 8 sec ago
Joined: 05/14/2017 - 11:16
Posts: 4284
Location: Ślōnsk

That comment was a followup on http://budgetlightforum.com/comment/1425840#comment-1425840
Unless I expect that I will use a light again soon I turn it off by unscrewing the tail to physically lock it out. I’d like to be able to turn it on by the tailcap only w/out having to seek the e-switch. As discussed, just turning the light on upon screwing back would be a disproportionate response as it prevents f.e. going directly to moonlight to minimise disturbance.

I believe that with dual-switch lights it would work the same – you normally have the light clicked off. You click it on. What happens? With a regular clicky-only firmware the light turns on. Quite a few dual switch lights do the same. But that’s just the unwelcome choice for e-switch only lights.
But user could click on and then make a short tap to turn on. That’s not something obvious but once you learn it – should be easy to remember.
And would enable basic operation with just the tail switch. Or just the tail cap.

I don’t know how are lighted switches affected.

Mike C
Mike C's picture
Offline
Last seen: 6 hours 17 min ago
Joined: 01/22/2014 - 08:03
Posts: 2296
Location: Sweden

Oh, so you mean turn on the light by emulating an off press by quickly tapping the entire tailcap?

Agro
Agro's picture
Online
Last seen: 3 min 8 sec ago
Joined: 05/14/2017 - 11:16
Posts: 4284
Location: Ślōnsk

With tail reverse clicky – just tapping the clicky.
With solid tail cap – quick quarter-turn to break connection and quarter-turn back.

Mike C
Mike C's picture
Offline
Last seen: 6 hours 17 min ago
Joined: 01/22/2014 - 08:03
Posts: 2296
Location: Sweden

I don’t think I’m fully understanding… why would you need it with tail reverse clicky?

Agro
Agro's picture
Online
Last seen: 3 min 8 sec ago
Joined: 05/14/2017 - 11:16
Posts: 4284
Location: Ślōnsk

Same use case: avoid having to find the e-switch when I have a finger on the clicky already.

Tom Tom
Offline
Last seen: 3 months 3 weeks ago
Joined: 09/10/2017 - 08:30
Posts: 1163
Mike C wrote:
I have lock out feature in my firmware, and with the ATtiny1634 I have the parasitic drain down to 1uA which is theoretically over 3000 years with a 3000mAh cell.

Ahem, no, that would be about 342 years, if you check your maths.

But whose counting ? Wink

Mike C
Mike C's picture
Offline
Last seen: 6 hours 17 min ago
Joined: 01/22/2014 - 08:03
Posts: 2296
Location: Sweden

Agro wrote:
Same use case: avoid having to find the e-switch when I have a finger on the clicky already.

Oh, so this case is for dual switch lights, not single switch clicky.

I basically have this done, just have to add it to dual switch configuration and have it as a setting. I would not make this default standard behavior but rather an option that can be enabled/disabled.

Agro
Agro's picture
Online
Last seen: 3 min 8 sec ago
Joined: 05/14/2017 - 11:16
Posts: 4284
Location: Ślōnsk

Yes, it’s for e-switch lights with either reverse clicky or solid tail.

Mike C
Mike C's picture
Offline
Last seen: 6 hours 17 min ago
Joined: 01/22/2014 - 08:03
Posts: 2296
Location: Sweden
Tom Tom wrote:
Mike C wrote:
I have lock out feature in my firmware, and with the ATtiny1634 I have the parasitic drain down to 1uA which is theoretically over 3000 years with a 3000mAh cell.

Ahem, no, that would be about 342 years, if you check your maths.

But whose counting ? Wink


Oops, missed a zero and a point… Attiny1634 draws 0.1uA in sleep mode, not 1uA. The years are right, the amp draw wasn’t. My mistake.
gchart
gchart's picture
Online
Last seen: 9 min 46 sec ago
Joined: 03/19/2016 - 11:57
Posts: 1618
Location: Central IL

Mike C wrote:
Also, an update on the drivers. I have built them now but bumped into an issue for clicky switch lights that I’m trying to solve without new driver design. Doesn’t effect E-switch configuration though.

Great work, Mike! Did you get the issue with clickies figured out? What was the issue?

And may I ask where you sourced the CN5710/5711 from?

Mike C
Mike C's picture
Offline
Last seen: 6 hours 17 min ago
Joined: 01/22/2014 - 08:03
Posts: 2296
Location: Sweden

Just got back from more traveling, things have been still for a while but I’m back at it. Still working in clicky functionality. I have the major issues worked out but still doing stress tests. I really can’t stand issues that sometimes might happen, I wan’t full reliability on off time presses.

The initial issue is that the more pins I have outputting to the strings of regulators, the faster the OTSM cap is drained. 47uF was fine when only one or two regulator strings where on, but more and the OTSM functionality started to fail. Took a while to figure out what the issue was. I’ve gone up to 100uF and that issue appears solved but I am still working on the OTSM code for some circumstances.

I get the CN571x regulators from here: https://lcsc.com/ So far they have been nothing but fast and reliable. Gotta tip my hat to Schoki, he was the one who tipped me off about these regulators and where to get them Beer

gchart
gchart's picture
Online
Last seen: 9 min 46 sec ago
Joined: 03/19/2016 - 11:57
Posts: 1618
Location: Central IL

Thanks for the update, Mike. I hope your travels were pleasant.

I did see them at that website but I had never heard of them up to that point Thumbs Up

gchart
gchart's picture
Online
Last seen: 9 min 46 sec ago
Joined: 03/19/2016 - 11:57
Posts: 1618
Location: Central IL

Sorry, not firmware related… just studying the driver design. But I was looking for your voltage dividers, but it looks like most of the resistors are for pull down or current setting. Am I missing them? Or does the 1634 have a fancy way of reading voltage?

Mike C
Mike C's picture
Offline
Last seen: 6 hours 17 min ago
Joined: 01/22/2014 - 08:03
Posts: 2296
Location: Sweden

There is a voltage divider on board, it’s 3K / 1K divider, you can see 302 and 102 marked resistors. I don’t use it for voltage measurement though, to read voltage on 1S drivers I use MCU VCC as voltage reference, then connect internal reference voltage (1.1V) to the ADC and measure it. Essentially I don’t need the divider, at least not one of the resistors, but as it is now I use it for OTSM power off detection.

I put in a divider in case it would of be use, like for future 2S versions. However, there certainly won’t be 2S versions. I just did a test with a CN5711 and a MT-G2 LED. They are rated for 6V but I thought perhaps the thermal throttling might save it, but nope, it fried with accompanying smoke signals just shy of 8V. They simply aren’t suitable for 2S.

Schoki
Schoki's picture
Offline
Last seen: 3 weeks 3 days ago
Joined: 03/27/2017 - 15:34
Posts: 213
Location: Germany

On the positive side, the CN5711 connects to the positive side (I’m just repeating myself Wink ) of the LED, which makes the CN5711 itself suitable for LEDs with a grounded thermal pad (like black flat).

Pages