Introducing the MELD-X RGBW(uv) flashlight driver!

Update 10/15/2017: I am discontinuing this driver offering due to lack of interest and will no longer keep boards in stock. Feel free to contact me if you have an RGBW application you’d like to discuss. Information below is preserved for posterity but no longer considered current.

Pm sent:)

pm sent. Thanks for offering these!

Looks awesome. I particularly like how it has programming vias exposed for reflashing without disassembly. :slight_smile:

Is there any chance you could speed up the white PWM by a factor of about 10 or 20?

Not by that much. If I drop to 12bit resolution and bump up the processor clock I could get to 8kHz, but it comes with significant tradeoffs. The chip will consume more power, and I think you’d give up a lot on the bottom end of the dimming range from turn-on delay. At that speed, the lowest output is only a 31 nanosecond pulse, which I doubt will even turn on the amc7135. They don’t spec a turn-on time, so I’ll run an experiment.

Ok I wrote some experimental firmware to run the PWM at 7.8kHz. Running the processor this fast bumps the current consumption from 1.0mA up to 2.9mA (non-LED current) while it’s active. To get this speed the PWM resolution is also dropped to 12-bit (4096:1).

It appears the AMC7135 doesn’t start to turn on until somewhere around 120-150 nanoseconds, doesn’t reach the 350mA setpoint until around 1 microsecond, and doesn’t stabilize its output until 6 microseconds.

At 7.8kHz PWM, you give up about 6 steps at the bottom before it will even turn on, and 30-something steps before it behaves linearly and predictably. For comparison, the 976Hz PWM at 13-bit resolution has turned the LED on reliably at 1 count so you get to use all 8191 steps.



What do you think? Is it worth the tradeoff? Ramping still looks pretty good to me. I can’t really perceive the 976Hz so I didn’t see any benefit to going higher; is 1kHz visible to you?

There was a bit of a kerfuffle here recently because the Reylight Pinepple wound up shipping with 2kHz pwm and some folks were unhappy about that. You’re being upfront and open so I can’t see there being an issue here, but I can guarantee theres a contingent of blfers who won’t touch this driver because they say the low pwm bothers them.

Fwiw, I can’t usually see pwm either. I couldn’t see it at 2khz in the Pineapple. I’ll be glad to report back on your driver when I’ve figured out how to use it. :slight_smile:

And by the way, Rey reworked his driver to 9kHz for the next run of lights. Folks seemed to appreciate that.

Isn’t it more the whining with low pwm frequency in some lights which bothers people? As far as I know a even higher frequency is required to avoid this noise.

Usually that’s only an issue in lights with buck or boost regulators, since it’s the inductors that cause audible noise

Yeah, the 7135 chips don’t activate as quickly as a FET. The bottom few PWM levels tend to be “off”. Running right at the edge like that, minimum pulse width, also makes the output more voltage-sensitive. I normally drop the speed to like 8 kHz for moon mode to improve stability, unless I can get some particularly good 7135 chips. Usually the 350mA ones activate faster than the 380mA ones, but it still varies a lot per brand and per emitter type and such.

The 2.9mA MCU current is within the range the attiny uses when it has several features turned on, though I can also get moon mode (including the LED) down to like 1.4mA if I turn off some MCU functions. And you’re using something much more capable than an attiny, so … not bad. :slight_smile:

Yes, 1 kHz is easily visible to me. I generally notice anything below ~8 kHz during normal use, and 1 kHz is slow enough to be pretty distracting.

I have about a hundred lights. If I were to list them in order of PWM speed, the bottom of the list looks something like this:

    96. Reylight Pineapple, ~2000 Hz
    97. CNQG Brass AA, ~990 Hz
    98. MELD 2.9, 488 Hz
    99. Blackshadow Terminator, 188 Hz
    100. Generic UltraFire SK-68, ~130 Hz

Most of the items at the bottom of that list are there only because I haven’t gotten around to fixing them yet, giving them new drivers.

Unfortunately for my MELD light, the PWM speed made the difference between EDC and shelf queen, because all the white modes are so strobey. Here’s MELD 2.9 running at 488 Hz, showing approximately how it looks to my eyes during use: (photo not edited)

… and this is the same test on a $3 nanjg driver at 4.5 kHz:

Some are happy with that speed (4.5 kHz), others still think it’s too slow. I generally aim for the slowest speed which people won’t complain about, which is about 10 kHz for visual purposes… but that often makes an audible whine, so closer to 20 kHz to get rid of sounds in the human hearing range too.

I’d probably be happy with 8 kHz, though it’s still a bit slower than my usual EDCs. The usual is something like this, with the bistro firmware option. I’d be happy to send you one if you’re curious.

I have friends that see it, they don’t know what it is, they are just annoyed by it. I mean some might not even know why they
like another light more than the other, they cannot actually talk about PWM and frequencies, that is not really in their
vocabulary.

For some time there were many displays with seriously low PWM and people started claiming a certain monitor makes their head ache
after a couple of hours, after switching to another display model, their headache was gone. Nowadays most display reviews
measure to see the frequencies so automatically a high frequency like 19Khz is labeled as flicker free, etc.
No respectable monitor review website will ignore or not measure the frequency.

I had 7135 drivers with audible noise, those from KD they all where noisy back in the day, their frequency was around 14Khz
But then not all ears hear the same, I know people that hear worse than me, others better.

I can tell that at some point I also have a forgiving attitude towards low frequency PWM, like with my laptop, I keep seeing it
but I keep saying I cannot buy another laptop, so there’s that reasoning.
When I am half asleep and there is a car chase in a night scene, well at that moment I simply cannot force my set notions of the laptop’s PWM,
is all feelings, meaning annoying.

Mercedes, not a cheap brand, I see certain models taking a corner leaving a trail of LEDs behind them, really obvious PWM,
that is so distracting in traffic and quite frankly Mercedes makes a pretty bad impression on me for that reason, I am
surprised this is not regulated.
Again not all people are the same, some hear better, some see better, some worse, etc. So the decision of using low PWM
should not be made base on the “blind and deaf” (of course, it’s a hyperbole)

For me the 4kHz of the nanjg driver is unnoticable if I don’t look for it, between 4 and 1 kHz is noticable but not annoying, and everything under 1kHz is annoying.

I see low PWM everywhere nowadays, cars, lighting in busses, even street lamps. With flashlights I can change the driver or use another flashlight, but those street lamps may take 20 years before they are replaced.

Ok, I’m on it. I’ll add a user-configurable option in the menu to switch between high and low PWM speeds. I’ll probably do a 1.9kHz low at 12-bit resolution and a 15.6kHz high at 11-bit resolution. Color channels will run at 1.9kHz and 7.8kHz respectively.

The tradeoff will be that you get a higher minimum on the high-speed setting, as well as faster battery drain on very low levels (the minimum level would go from ~550 hours to ~200 hours of runtime on a decent 16340 cell).

Would it be difficult to include a configurable high cri option. Where the user can set the levels of each color in the high cri config menu?

Anyone have suggestions for a cheaper uv led in the xq footprint?

You can get high CRI by using a high-CRI white emitter. Adding narrow-band red/green/blue isn’t likely to improve the tint, even if you can get them to focus on the same spot.

The typical result of having R+G+B+W powered on at the same time is a white spot with three weird-shaped color splashes next to it.

With D.C. Fix on the lens I can mix dr jones driver to a great tint. Far better than any single emitter tint. Really. With xml RGBW, op reflector, and dc fix the beam is nearly perfectly blended.

UV is difficult to do well in such a small space. It’s a really nice extra to have, but it’s not going to look as nice as a dedicated UV light with a bandpass filter lens.

Mine has 385nm UV, which is nice, but the close proximity to other LEDs has an interesting effect. Some of the other LEDs fluoresce when the UV emitter is on, which results in a bunch of non-UV light coming out the front. The green in particular likes to respond to the UV emitter, probably because it gets refracted through the white emitter’s dome.

Here it is again with the other four on:

Interesting…

I’m looking for four xq uv led to use with an mtg2 on that noctigon with the xq pads. But this might see the same problem as you are describing? Think it will light up the mtg2 phosphor?

I really would like a dedicated uv light but I’m afraid I won’t be satisfied with anything less that the 365 nichia that’s $30 a piece. Any cheaper options that might satisfy and work well in a dedicated uv light?