Emisar D18 introduction

PWM v. Current Control

  • Efficiency - Both Current Control and PWM should have the same efficiency at maximum power. However at lower power settings, Current Control is more efficient. This is because LEDs get more efficient in terms of lumens per watt the less power you put into them. Current Control actually lowers the power to the LED. PWM runs the LED at full power all the time but just switches on and off rapidly. This increased efficiency at lower power can be substantial and is the main advantage of Current Control.
  • Tint shift - Tint does not change even when going to lower power or moonlight modes. This is an advantage over Current Control. With Current Control, the tint may become more orange and greenish on lower power settings. True “tint snobs” should prefer PWM over Current Control because of this.
  • Strobing from low frequency PWM - If the LED doesn’t pulse on and off fast enough the pulsing can be visible to the eye and creates an unpleasant strobing effect. You can tell if a light has low frequency PWM by turn it to an intermediate power setting and then quickly swiping the beam over a wall. Instead of a smooth blur you’ll see multiple copies of the hotspot. You can also tell if low frequency PWM is present by turning a light on in intermediate brightness and pointing it at a blowing table fan. Many cheap budget lights use low-frequency PWM. Most of the hostility people have against PWM is because they experienced low frequency PWM and do not realize that high frequency PWM exists.
  • High frequency PWM - if the PWM is high enough frequency it becomes impossible to see with the naked eye. There is no unpleasant strobing effect and the PWM isn’t visible even with the ceiling or fan test. Without the strobing, high frequency PWM looks just as good as Current Control. Most good quality lights, and all BLF enthusiast drivers with PWM use high-frequency PWM.

Interesting, thank you!

So nobody knows yet if the D18 has PWM?

If it does, it sounds like the SST-20 4000K with it’s greenish low level tint wouldn’t be an issue at all then

Ahh, of course it does, except at max 7135, bank or FET.

TK could explain it better, but I believe we use ~15.6K PWM - pretty high. Think Anduril can use lower rates at the low end. Only lights our drivers don't use PWM's on is the buck driver setup like for the BLF GT, but technically we still use PWM's to control output levels, but believe there's no flicker... Or something like that.... Sorry, no time to research it all out..

Basically any 7135 and/or FET driver with levels uses PWM's - we use like 150 levels, so PWM's is definitely used. This goes back to the Nanji driver days - no buck, or boost, but amp regulators and FET's.

There was a time when 1K PWM was super high. I've had lights that were like 150-300 I believe back then. Our early Nanji custom firmware for 13A's went to 2K or 4K I believe - that was considered amaz'n.

No that’s not how a buck driver works, it does not “shed off” the higher voltage. It is a DC-DC converter that converts the cell voltage to the lower one required by the LED, typically with good efficiency, 90% or more is possible. The output to the LED is smooth DC, with a little ripple. They control the LED brightness by measuring the current through it, usually through a low-value sense resistor, and regulating it to the desired level by modulating the operation of the conversion electronics. Basically they are a mini switch-mode power supply with variable current regulated output.

Buck converters work the same way, but boost the voltage. Necessary to e.g. run a higher voltage LED from a single cell, or a chain of LEDs in series.

Boost-buck converters can operate either way, useful for e.g. a torch designed to accept a variety of cells, such as a single 1.2V NiMH, 1.5V alkaline, 1.7V primary lithium, 3-3.2V primary lithium, 4.2V secondary LiIon, etc. in one cell, two cell or greater multiples using extension tubes.

Being mini SMPS they are complex, require bulky specialised magnetic components, and require considerable skill, and good expensive test equipment to design.

BLF derived drivers such as this one are far simpler things, that just do one job, with one cell type.

7135 constant current drivers are used at the lower levels. Each supplies 350mA. These are PWMed at high (invisible) frequency to reduce the output for lower levels.

There are limitations on how fast they can be PWMed, at very short pulse widths the rise and fall times of the output become significant. Some makes, even batches, are much better than others.

This design uses two banks of 7135s. A single one for the lowest levels, down to moonlight, and a set of 14 for the higher ones (it does have 18 LEDs).

For continuous use, without over heating, that is sufficient.

For the highest levels a FET switch is used to directly connect the cell to the LED, PWMed or DC. There is no current control, the LED has to burn off any excess power as heat, within its junction. Commonly the LED is than operating beyond it’s peak efficiency, or manufacturer’s current and power ratings. PWMing it doesn’t alter this. Still they work. FET lifetime may be reduced, but that’s not usually significant for most. And those that care about fading will probably already have swapped the LEDs for newer ones before then.

When the FET is in use the brightness is un-regulated, and tracks the cell voltage as it discharges, sometimes becoming lower than what is achievable by the 7135s, well before the cell is substantially depleted.

E.g. on this, the LEDs are driven at 290mA each by 7135s. Under FET operation, that will be far higher. Cell internal resistance and peak current capability now become important factors.

Hence our keen interest in the LED transfer characteristics and evaluations posted here by some experts. Cell, springs, wires, FET choice, improving current path, thermal path from the LED, DTP copper MCPCBs, tail current measurement etc.

Boost/Buck drivers can overcome some of these concerns by compensating for many of these losses, controlling LED current through the cell discharge, and, done well, being more efficient (better run time).

These are selling points for commercial torches, where tables of Lumens vs. run-time are studied by consumers.

The MF01 for example has a sophisticated boost driver, though the new version is to have a BLF architecture, which will doubtless reduce manufacturing costs, which should be good for the consumer.

This is a tried and tested architecture that works well, is friendly for firmware developers, uses the minimum of inexpensive readily available, components, understandable, assembly is practical for DIY builders, modders and repairers even with the minimum of tools, and can be easily copy-pasted by any aspiring PCB layout engineer or manufacturer to develop their own variants, using a basic 2-layer PCB.

PS: some actively seek out torches with low frequency PWM, e.g. for light-painting effects.

Now there’s a thought, add a light-painting configuration to the firmware, so they can adjust it down.

Thanks Tom Tom,

I’m going to do some much needed deeper research on drivers and try to cross reference your very long and informative post.

Appreciate you taking the time to help a muggle see the light

Mattadores, it helps to understand the mysterious inductor and it’s magical properties. Lol

It can increase voltage if you short the output to ground very quickly or decrease voltage as you pulse it’s input quickly which is why you see them in both Boost and Buck drivers. It’s all really complicated and I don’t fully understand it.

FET drivers are easier to understand as they are more or less on/off switches. With them it’s a matter of modulating the width of the “on” signal pulses from the mcu to it’s gate or Pulse Width Modulation (PWM).

Drivers are really complicated, unless you’ve actually studied electronics. I’m just barely teaching myself thanks to this new flashlight hobby. Don’t expect to pick this stuff up quickly because it’s so dense. I’d start by trying to understand the FET driver. It’s the simplist and fairly common around here. I’ve got some Texas Avenger FET driver schematics if your interested.

I know Tom Tom is going to hate these videos, but check out these Louis Rossman basic electronics videos. He mainly deals with laptops, but all the same basic principles apply. Laptops use FET’s, Buck and Boost circuits plus everything else you see in flashlight drivers. Hope this helps.

You are correct. He may be a decent laptop tech, able to identify failed components and replace, which is a worthy skill. But he soon exceeds his understanding and spouts tripe. His description of a buck driver for example was so pitiful, and wrong, that I couldn’t bear to watch it all the way through.

Not one to listen to. Many many far better resources out there to educate yourself, and not fill up your brain with, frankly, nonsense.

E.g Google “Free online ee course” and choose something like basic circuit theory to start with. Dip in and out and take it at your own pace.

It’s a FET+13+1 driver, so it uses PWM. However, with 4.9A spread between 18 emitters, that’s ~272 mA per emitter on the regulated modes, which isn’t enough to push a green-tinted SST-20 into the pink zone. So it might be greenish, depending on the tint bin used. I’m not really sure; my test hardware has 5000K emitters with no optics, and it looks pretty good that way.

FWIW, here’s how the ramp shape is defined:

  • Levels 1 to 50: 1x7135 (0.1 to ~150 lm)
  • Levels 51 to 100: 1+13x7135 (~150 to ~2000 lm)
  • Levels 101 to 149: 14x7135 + FET (~2000 lm to ~13500 lm)
  • Level 150: FET only (direct drive, ~14000 lm)

So, in the low third, the LEDs actually turn on and off very quickly. Above that, they never actually turn off… they just oscillate between two levels. And at levels 50, 100, and 150, there is no PWM at all. It’s just on, at a steady level.

The default config values for the ramp are:

  • Smooth ramp: 1 to 100, plus turbo.
  • Stepped ramp: 25 to 100 in 7 steps, plus turbo. Steps are: 25, 37, 50, 62, 75, 87, 100

You are correct on all counts. Most of this runs at ~15.6 kHz. It drops the speed only on the lowest few levels, in order to increase runtime and improve stability.

The BLF GT uses a buck driver which converts extra voltage into current, and maintains constant output. From 10% to 100% power, it has steady output with no flicker. From 0% to 10, it sets the buck chip to 10 power and uses PWM to adjust brightness by quickly turning the LED on and off. This increases the resolution and stability of the low modes, and there is no visual indication when it changes methods. It happens so smoothly it’s invisible.

TK, can you explain a bit more how the mcu controls the 7135 channels? You say it oscillates between 2 levels without turning off. What 2 levels?

Interested. I want in. Thanks

I believe it’s between the next lowest level. So 1x and off, 14x and 1x, then FET and 14x

My understanding: Levels 1-100 7135s only, PWMed up to to that point.

2000 lumens by then, sufficient for me.

Levels from there to to 149, 7135s continuous, plus FET PWMed all the way to level 149.

At 150, FET turned continuously on, full turbo.

Hence “oscillation between two levels without turning off” description for this upper region. 7135s continuously on, FET doing it’s PWM thing.

Where did I get the idea it was FET + 14 1 ? instead of FET 13 + 1 ? Surely I read it here somewhere…

There are four levels without PWM:

  • 0
  • ~150 lm
  • ~2000 lm
  • ~14000 lm

Between each of these, it oscillates between the two nearest levels. So, for 500 lm, it oscillates between 150 and 2000 lm… but it does not actually shut off. The oscillation is reasonably close to a square wave, except for a bit of rounding on the leading and trailing edges. Same method I’ve been using since the BLF-A6.

The numbers are very rough; I can’t measure it properly when I don’t even have optics… and my measurement equipment isn’t great anyway. But they’re at least in the ballpark.

I guess it is good idea even for D4. For example:

SST-20 3000K CRI95
SST-20 4000K CRI95
219C 5000K CRI90
219B 5700K CRI92

Another way to describe it:

The torch hardware is capable of quite a few different combinations of discrete levels without PWM. All levels in-between are done using PWM.

The strategy here is to only PWM one thing at a time.

The progression through the ramping-up is, if I have remembered correctly:

1) PWM 7135x1 until at 100%. Say 0-150 lm

2) Keep 7135x1 at 100% and then PWM 7135x13 until also at 100% Say 150-2000 lm

3) Keep both 7135 banks at 100% and start PWMing the FET, up to 100% (full turbo) say 2000-14000lm, or thermal back-off.

So you can see that from 0-150 lm there is on-off type PWM. Completely off (dark) between pulses.

From 150 to 2000 it oscillates between the two values, never going fully dark between pulses.

Likewise from 2000 to 14000.

For some insight into how the Attiny85 hardware can be used to generate PWM outputs, you could see Technoblogy - Four PWM Outputs from the ATtiny85

Starting from the BLF A6 with it’s Attiny13, CPU resources were more limited then and less well understood by developers, the hardware design less refined, and driving one 7135 and one FET used them all.

Thanks Tom Tom, nice descriptive of how it all plays together. :wink:

I’ve sold my ROT66 literally for this particular reason.

I got it now, I couldn’t really understand how the levels between 0 and 150 LM (channel 1 I believe) could cycle between two levels without turning off. It actually does turn off because it’s PWM.

It’s just the higher channels above $150 (channels 2 and 3) that don’t ever turn off completely. They do actually, but the channel below it stays fully on, so the led stays fully on. It makes sense now.

When I was looking at the Atiny85 data sheet it looked like it only had 2 outputs that could do PWM. Obviously we have drivers like this D18 which has 3 outputs that all do PWM.

Can this MCU do 3 PWM outputs simultaneously or only 2 at a time?
(Tom Tom’s link is over my head)

I’m probably getting too technical for my own good. I’m just glad to understand the basics.

It can do 3 with full hardware support, or 4 with sort of a software hack, or up to 6 with even dirtier software hacks. But channels 4/5/6 aren’t stable enough for lighting… the resulting signal is dirty. So for our purposes, it’s limited to 3.