Hardware reason for worse moonlight in Hank dual channel lights?

Could difference between single and dual channel models be that the dual channel one is basically two single channel ones built in one board? As an example: if single channel one could go to 1 lumen then two drivers with same capabilities should give twice the amperage in lowest mode. As far as I know that is the case with higher moonlight in dual channel driver lights.

On the lowest level with only one channel active you have the same current as for for LEDs on the single-channel version, but with only two LEDs. But four LEDs are more efficient than two LEDs, so in total four LEDs should be (minimal) brighter than two LEDs at the same total power.

Another data point:

I’ve got a 2-channel D4V2 with 219B’s purchased in December. The SW45K channel measures in at 0.6lm. For comparison, Cheule has a KR4 single-channel with SW45K’s purchased in June. At my request, e measured the moonlight on his and got 0.03-0.04lm.

True. I’m not so fluent in electronics terminology, but for me it seems that input to the MCU that controls the output might be limited to higher value to improve the stability of the moonlight mode.

Only if the level is set to a higher level like the default 11/150. Level 1 is always “zero” which also causes the instability because the opamp cannot regulate the output to zero without some fluctuations.

Given all the component shortages it is quite possible that the PCB manufacturer substituted the opamp with another, similar model. This can easily cause such a changed behavior, although the specs might be very close.

If we want reliable ultra-low output, we need drivers with multiple sense channels and quality components. That will be more expensive to design and manufacture.

If you have not tried it yet… properly set up jumpstart! It fixes the slow start and wonkiness on modes 1/150 and 2/150! The latest TK firmware has it in it. At least, it fixed my 3 lights that had the issues. Jumpstart provides an extremely short pulse to the amp circuit to stabilize the circuit. If jumpstart is set to high, you will see a preflash, so it really needs some fine tuning and it varies per light or at least per led flavor.

As to higher output on 2 versus 4 led’s… It would make sense that this would happen. The delivered current is powering less emitters, thus more current per emitter and more output. Until there is more granularity of steps, more than 150, I think this is something we will have to live with. This and this alone has kept me out of the tint ramping lights. I have been hyper sensitive to light when waking my entire life and running at more that 1/150 with SST-20’s or 2/150 with E21A’s causes me some pain and night blindness.

It’s true that each individual led will be brighter, but the total output should be similar with half the emitters. Efficiency only drops at higher currents.

Im fully aware of this feature, but it doesn’t fix all of the problems of using the regulator outside its specs. For example there are still some fluctuations and the output depends on the temperature and voltage.

Just for fun I placed this in front of my light detector (solar cell, low impedance, not linear and slow, but OK for PWM measurements). There are quite some interesting results.

Here is a plot from dark, 1H (you’ll see the spike of the jump-start) and then 1/150.

Of course there is some noise from the low input, but you can see the baseline on the left. When the light is on, there is actually quite some ripple! Here is just the ripple of level 1/150:

Around 60 Hz. No, that’s not the line frequency, I’m in Germany and we have 50 Hz. It is the consequence of using dynamic pwm_top value to get higher resolution. Most people should not have any issues with the ripple, but it makes it hard to see the much slower fluctuations.

Here is an example of a higher level. You can see the increase in frequency, 373 Hz.

The 150 levels just define the number of equidistant steps in the ramp, but not the possible minimum and maximum output.

Nice work, good quantification of residual from the code work.

It’s a known issue in all of Hank’s new linear drivers as described above and by TK in the past re: the KR4 and such. Old, good 7135s could get pwm’d pretty low. It is either harder to find, or they’re not made as well, or something, but even Hank’s old 7135 drivers will probably have issues with the lowest lows these days.

All the dual-channel drivers will have the same stuff going on as the other new linear drivers.

Constant current regulation is done by the op-amp which maintains in+ (pin 1) and in- (pin 3) at the same voltage.

You adjust in+ and you get the same voltage at in-, and with a 10m resistor you get 1A/10mV, cool, except Op-Amps are not perfect and they they might see the same voltage at the input when it’s actually not exactly the case, the spec that determines this is ”input off-set voltage”, for the TLV333 used in those drivers it’s 15uV max.

So with in+ = 0V you might get at worst 15u x 1000 / 10 = 1.5mA, you’re supposed to get zero but you don’t.

Here is the off-set voltage distribution :

So it’s going to vary between parts (also a bit from heat).

A lot of this is going over my head, but are you smarter guys saying that there is just a lot of variance in the lowest possible moonlight from linear driver to linear driver, and it doesn’t actually have anything to do with the firmware or the dual-channel drivers?

My guess is that the run of components that went into the dual channels are on one end of the above bell curve. But these same parts are used on the single channel lights. Hopefully someone who has a newer and older single channel model can see the difference and post about it.

Dual-channel lights have a brighter minimum level for a few reasons.

On a 1x7135 driver…

  • … it emits no light while the chip is powered up but sent a signal of zero. It’s off unless you’ve got a leaky, damaged chip. The lowest level is then determined by PWM and rise time. It uses 8-bit PWM, so there are 256 different levels, and the rise time is roughly half of a PWM clock cycle… so the brightness of each level is approximately 350mA * (N - 0.5) / 255. The brightest level for that chip is about 130 lumens. So moon on a 1x7135 driver is about 0.25 lm: 130 lm * 0.5 / 255.

On a linear (or dual linear) regulator…

  • … simply powering up the regulator causes it to emit some light, even when sent a control value of zero. This base level varies quite a bit from one light to another, and sometimes even with temperature or voltage. The value is typically about 0.3 lm +/- 0.4 lm. So… 0 to ~0.7 lm. It’s not guaranteed to light up at “zero”, but most lights do.
  • … and that’s per channel. So on a single-channel light, the minimum is typically about 0.0 to 0.7 lm, while on a dual-channel light, the “zero” value would be about 0.0 to 1.4 lm… very approximately.
  • Then add PWM on top of that. The lowest level on a single-channel light is 0/16383, and on a dual-channel light it’s 2/16383. This is multiplied by the total output for that channel, which on a 9A light can be like 2000 lm. This works out to about 0 lm extra on a single-channel light, or 0.24 lm on a dual-channel light. 2000 lm * 2/16383 = 0.24 lm… plus whatever the “zero” baseline is.
  • On dual-channel lights, the PWM value per channel is used to determine whether to turn that channel’s regulator on or not. With a value of 0, the regulator is off, while a value of 1 or higher turns it on. This makes it possible to turn one set of LEDs off at the extreme ends of the tint ramp. This raises the minimum brightness slightly, from ~0.3 lm per channel to ~0.4 lm per channel.
  • The lowest total PWM value on dual-channel lights is 2, to make it possible to get a moon mode using the middle tint. It’s divided, so each channel gets 1/16383. Otherwise, moon could only be one tint or the other.

I hope this makes sense. On average, the bottom level for a good FET+1 driver is about 0.25 lm, while the current Noctigon linear drivers are often about 0.3 lm, and a dual-linear is about 0.8 lm… ish.

Measuring a single-channel KR4 vs a dual-channel D4S, I’m seeing ~0.28 lm on one and ~0.67 lm on the other. Most of that is a matter of having two slightly-leaky regulators vs one, but some is also that it’s using 2/16383 vs 0/16383 for its lowest PWM value.

To get significantly better moon modes, it would need a second regulator for each channel, with a much lower limit. Like, instead of a 9A chip having N steps from 0 to 2000 lm, or a 350mA chip having N steps from 0 to 130 lm, it could have a 20mA chip with N steps from 0 to 8 lm… Much more precise control. But this is difficult or impossible to fit onto small drivers, especially dual-channel drivers, because there is no physical space left on the circuit board.

1 Thank

This is the exact answer I was looking for, thank you for the detail!

I had suspected that the lights were being driven a bit harder to enable tint ramping, even changing from the default floor to 1/150 made everything flickery and unstable. My k9.3 fades in faster than my old d4v2. In future updates, would it be possible to use the lower pwm value when the light is put into channel switching mode? That would enable the user to pick ramping or lowest moon through the 9h menu as needed without reflashing. Or is that how it is already?

Either way, many thanks for getting this firmware running at all! The Hank lineup now has so many more use cases covered as a result.

1 Thank

Thank you for the incredibly detailed explanation, TK!

So that roughly matches with the current error I mentionned above due to the Offset voltage of the op-amp used.

Or two sense resistors as SammysHP mentionned previously in the thread, the solution I use on my drivers, same as Loneoceans, MikeC, Zebralight and I think Armytek as well. And I already mentionned this, but there is enough space on a 22mm board (D4v2) for a dual channel driver with 2 sense resistors, this is also less costly than using a second power channel per LED channel. It would take even less space with a small MCU with two DAC outputs, but unfortunately I don’t think there are AVR MCUs with more than one DAC output.

Does someone know if Hank/Emisar is in the IOSS tax system.

You should ask over in Hank’s thread.

Nice job explaining TK. It has been almost 38 years since I went thru the basic digital and analog electronics classes and when you don’t use it everyday it becomes much less clear. I always loved working with opAmp circuits, but have not had to build one in a couple of decades!