Driver giveaway: Constant current 17mm drivers, winners (finally) announced, post #2.

I read the data sheet again. Page 6. Maximum recommended PWM is 2 kHz. Which is fine by me, for low levels where my eyes don’t respond fast.

I only really notice slow PWM when it is raining, or looking at waterfalls, or waving the torch around madly, light-painting etc. and becomes almost psychedelic. However my dog does see it, and averts his gaze on night-time walks, if I bring the wrong torch.

Otherwise just a resistor from an output pin (do you have any left ?) could do the job, DC or fast PWM, if you have enough timer-counters left.

Page 7 also worth a read.

Sounds good. Up to the point that the cell voltage dips (under load) into the region where full gate drive is questionable.

But why does anyone still use a Schottky to protect the MCU from reverse polarity ?

You can do the same thing with just one tiny cheap Pfet, no other components, and have essentially zero voltage drop to the MCU.

And perfect calibration of e.g. V-bat readout by the MCU without dodgy variable components at the buyer’s whim, their temperature sensitivity etc. getting in the way.

This also indirectly knocks on to temperature readings as well.

My only caveat is that, whilst the Pfet is conducting, it conducts in both directions. Yes they do. Not generally taught. So any decoupling on the MCU side is actually still directly connected to e.g. the LED +V rail, with all the glitchiness and spikes that might entail. A slightly more sophisticated filtering network than a 4R7 resistor and a cap. might be needed. Or not.

Very nice looking drivers!
Good to have some new designs.

Im not that familiar with all the firmware’s out there and Im not that picky on a firmware. But what I would like to see is both ramping and set modes available.
For example for a electronic switch (or combination), regular mode operation. Single click start low, and use single clicks to move upwards. Click and hold to ramp from current mode up -> when max reached ramp down -> when min ramp reached ramp back up. When single click withing this ramp feature, proceed to next level thats higher than current level. (when max go to min)
From on double click to go down.
From off click and hold to go to max or a custom set level.

This is just something I just though about.
Yes Im in, would like to use the slim-4 with a white flat for a nice throwy light.

Things really do get worse with age. :frowning: :blush:

Thanks!

Archeon had a great ui . Starts in mode 1 always .....3 modes Each mode ramps by holding button from bottom 1 lumen to 100%. Release it sets the output a click advances modes if you click quick e nuff if not back to mode 1 each mode ramps to any output you want . Simple and brilliant

fat3

The holes are used for programming “acupuncture style”.

Interesting, I didn’t know TK was looking at the 1634. Hard to follow everything that’s going on here. Nice to hear, I’ve been using the 1634 for quite some time now but no one else seemed interested in using it. I made some 1634 drivers back in March 2017: Mike C drivers: v8 series, ATtiny1634 based.

Aha, I didn’t know that. I’ve built a few and they all turn on lower than 2.7V, but probably not fully as you say. I’m all ears when it comes to these things. Do you have another suggestion? In regards to it’s PWM characteristics, I don’t care at all because I don’t use PWM on it. I only use it for full blast on, I have the CN571x regulators for lower modes.

It actually isn’t there for reverse polarity protection, even if it does that too. It’s there for the OTSM cap. But once again, I’m all ears for these things. Will a Pfet prevent OTSM cap drain? No reverse leakage? The diode does a good job of it. In my calibration and voltage reading I have a simple compensation routine for the voltage drop over the diode. Sure, it’s not perfect calibration, but during my tests with other methods of calibrating voltage, perfection is not easily obtained anyway. I have about 5% tolerance, I’m totally fine with that. Still, interested in the Pfet solution, I’d surely need to test it to make sure it doesn’t leak the OTSM cap. If it’s just a simple component replacement and I can fit it, no reason not to implement it in future versions.

The Pfet is a great solution for reverse polarity protection, but as I said it conducts both ways, so current can flow either way, as long as the FET has gate drive.

To use it for reverse protection, you actually connect it “backwards” so the body diode is conducting when in the correct configuration (i.e. source and drain reversed from what you might conventionally expect).

E.g. see http://www.ti.com/lit/an/slva139/slva139.pdf

And https://www.infineon.com/dgdl/Reverse-Batery-Protection-Rev2.pdf?fileId=db3a304412b407950112b41887722615

Page 7. For a more detailed explanation of how it is typically used in e.g. automotive electronics.

Problem is, for e.g. OTSM, is that, unlike a diode, the Pfet will continue to conduct in either direction as long as it has gate drive, meaning that in a typical torch, even when the drive to the LED is disconnected by the MCU, there is a “reverse” (actually forwards, in the usual sense) current path back through the Pfet, which will instantaneously discharge the OTSM cap into the LED. Whether e-switch or clicky. Until it ceases to drive the gate.

I haven’t thought about your high-side drive arrangement, there may be some better possibilities with that.

My only concern about using a simple Schottky instead is because of the concerns with previous Attiny versions, in standard, and selected low voltage versions, and the experiments with BOD, possible flash corruption whilst saving settings in particular circumstances etc. Where a few more 100 mV supply might help.

I’ll look into it, but I don’t think you need to worry particularly, with your choice. It’s easy for me to look at data sheets and do “design review” at a distance and question edge cases, but your practical experience counts for much more.

Yeah, I was testing that stuff extensively some time ago. I found the post: Attiny25/45/85 FW Development Thread - #1523 by Mike_C
Besides wanting more memory it was the BOD functionality for OTSM that lead me on to the 1634. With the 1634, BOD enabled and a 47uF cap I get about 7 seconds of reliable off time when measuring with 125ms intervals. I could not get anywhere near that with BOD enabled on the 85.

BTW, these drivers won’t fit Emisar D1 because they are double-sided, will they?

I don’t have one so I can’t say. I tried a quick search for a photo showing the spring side of the D1 driver but couldn’t find one. I only found photos showing top side of driver so I can’t see what it is that prevents using double sided drivers in the D1.

I’ve now done some thermal throttling tests on the CN5711 (the 1.5A regulator on Slim-4). I did not test a floating regulator, I did the tests with a Slim-4 driver out on my wooden desk, not mounted in a flashlight host.

The amp measurements are from the power supply display, the volt measurements are with a DMM, the temperature measurements are with the 1634’s internal temp sensor. I set the digi-pot for a value that would regulate current to 0.75A, which is half of the CN5711 rating.

I first tested with power supply measured at 4.35V. Current drawn was 0.74A and voltage over LED was 2.87V. Initial startup the temp reading was 25C, after 5 min 58C, then no more increase after leaving it like this for 30 minutes. Current drawn throughout this test was 0.74A, so no throttling in these conditions.

I obviously have to turn it up a bit… I turned voltage up to a 6.3V, which is a little above max 6V rating. Voltage over LED was still at 2.87V throughout the test.
Initial startup the temp reading was 33C. The higher voltage most certainly impacts result, but it’s the increments that are of interest. Behold, after 20 seconds the regulator started throttling down. Throttling speed decreased as the current dropped.

Startup: 33C, 0.74A (no throttling)
20 sec: 60C, 0.7A
1 min: 81C, 0.5A
2 min: 86C, 0.46A
5 min: 87C, 0.44A
1 hour: 88C, 0.44A

I then lowered voltage to 5V and the current slowly increased and halted at about 0.7A, no change after 10 minutes. I lowered the voltage further down to 4.5V and the current increased back to the initial non-throttled 0.74A, no change after 30 minutes.

10 min at 5V: 82C, 0.7A
30 min at 4.5V: 73C, 0.74A (no throttling)

So in my books the temperature throttling of these regulators appears to work as advertised. With them I don’t really see the need of a temperature throttled mode as they appear to take care of it well enough themselves. I’ll still have overheating protection, especially with the Fat-3 on full blast, but for now my plans of implementing a thermal throttling routine appears to be unnecessary. Of coarse the temp measurements themselves have to be taken with a few buckets of salt but I trust them enough to be able to determine weather the temperature is increasing, decreasing or stable.

Edit: Edited so results are somewhat easier to read.

Very encouraging :smiley:

Here is D1S, I think they are the same:

I was afraid that D1 was too much optimised for size and that the extra 1mm would prevent battery contact.
But I can always make the contact ring a little higher…so it would work.
So I have a host. And I have a LED - White Flat. I would love to win a Slim-4. :slight_smile:

Well, my firmware preference is this:

  • I like having visually even spacing of modes.
  • I prefer mode order of Low to High
  • I prefer to have last-mode memory. But I can live without it.
  • If there’s no last-mode memory, then I want no more than 4 modes, including the Moonlight, or low-low mode. But with memory, there can be more middle modes.
  • I like to have access from off to both the lowest mode and the highest mode. These could be special click sequences, like click-hold or double-click.
  • I prefer single-click turn on in last used mode (with mode memory) or lowest mode (without mode memory), and also single click to turn off.
  • I prefer thermal regulation instead of timers.
  • I want LVP with a warning a few mV before cut-off.

I have some lights that don’t meet all my preferences, and I still like them and use them. But, the preferences are cumulative. The closer the lights are to my ideal set-up, the more I like them and the more often I use them.

1) Ramping
2) Levels - No flashy disco modes

3) Light levels ? Depends very much on the lights output capability …

3 Level
1% , 20% , 100%

4 Level
1% , 5% , 20% , 100%

5 Level
1% , 5% , 20% , 50% , 100%

6 Level
1% , 5% , 20% , 50% , 80% , 100%

5 Levels is rather optimum for me …
Though I really like lights that ramp …

Considering the relationship between driving current, related emitter output and the way humans perceive light intensity (sort of logarithmical way), noteworthy increases in output are required for noticeable, practical mode spacing. Starting off high mode (100%) and dividing it each subsequent time by 1/3 is a good way to attain a simple set of well spaced modes which can be rounded off with a super low mode. Let's say 100%, 33%, 11% and then some moonlight (0.1 - 0.5%) mode. Just an example.

Cheers

Count me in. I like the narsil firmware for the option of stepping or ramping, dr jones lucidrv for the ability to set the number of steps and tune the level of each step, and the max current configurability in the firmware used in the led4power ld drivers. For me, option of ramping or configurable steps, max current options, double click turbo, hold for moonlight, configurable thermal step down, configurable pwm fan control, and a jumper configurable 1s/2s would be the ultimate.

Thanks for the suggestions, looking at them all. Keep’em coming!

My firmware has the ability to select number of modes (currently up to 6) and adjust them to your liking. All your other preferences are already in my “normal” firmware, I just have to wrap it all together. It’s basically the setup menu system I am currently working on.

From that photo it looks like it should fit, I can’t see why it wouldn’t.