Pwm dimming for video appropriate flashlights

The PWM for flashlights are too slow, and with video, which is often shot at 120 or even 240 frames per second, there can be a lot of temporal aliasing, and horrible visual artifacts.

Has anyone made drivers that are 10khz or above?

http://www.ebay.com/itm/172055327012

Works with LEDs that already have current limiting resistors etc. and just take a steady voltage. No way it could work with a cc/cv led driver.

I’m looking for an dimming LED driver and it would be even better if it could be controlled remotely, with serial modules and smooth log ramping.

Bump.

I wish I could help you… but I’m interested to know too. I shoot a lot of video at night with just the light, but none of my cameras are high speed capable- so I don’t often encounter PWM problems, because it’s fast enough most of the time.

I’ve made drives that use constant current steps of 0.35 or 0.38 amp steps (depending on which AMC chip is used). The firmware I wrote uses PWM between those steps, but that could be rather easily eliminated with some changes. The issue I guess is that steps of 0.35 amps might be too much.

More information would help. What type of flashlight? More than one? Comfortable soldering electronics or programming your own chips? How many steps of brightness required?

My initial thought is to use a wireless keyfob and receiver like those below to replace a momentary/electronic switch of a flashlight. I would hazard a guess that most momentary switches ground the input, so a transistor would have to be added to the circuit to invert the wireless momentary receiver output.

As far as the driver goes, I would start with the nanjg 105C, AMC7135 based driver for simplicity. I know it is fairly easy to get a 19kHz PWM, and there may even be ramping firmware available that may just do that. I have one that has 64 steps, with 4.5kHz PWM if I remember correctly. Changing the clock fuse and TMR prescale easily gets you 19kHz.

Will the 19kHz PWM get you artifact free video?, especially at low PWM values, I do not know.

I’m fairly sure it could depend on the camera and settings used. I wouldn’t risk any PWM for video without serious testing with the actual camera and the whole range of shutter settings to be used. I’m not even sure I’d trust PWM for stills for that matter. Better use a constant current driver and ND filters if you really need finer adjustments than the driver can provide.

There are plenty of Buck or Boost driver solutions out there that can have PWM/Analog controlled dimming. It is just a matter of what kind of form factor and control is required. For instance, a bicycle light, with either a 2S2P li-ion or 12V SLA battery, and a BuckPuck (with a potentiometer) driver could be a viable option?

Filming 1080p 60fps has a shutter duration of 1/120 th of a second (ideally) so over 80 pulses to average if PWM is 10khz. That rate should be more than fine for even higher speed stuff.

19khz sounds ideal to me.

I can solder and do some machining, upload Arduino sketches etc.

I bought 3 of the supfire l3-f2 Mini Review: SupFire F3-L2 Zoomable and have http://www.gearbest.com/headlights/pp_299060.html

While it would be awesome to be able to use these lights, I’m also looking to make a larger custom cob solution as well.

Am I wrong in thinking this won’t work smoothly to dim from 15-100%? Smooth would be nice, but getting only the range from 100-75 then dropping out isn’t that helpful.

It’s shouldn’t depend on the camera, it’s all about shutter duration. Also in the OP I mentioned a dimmer that does already work.

https://youtu.be/qlMtakaa7u8 Shows one persons solution, but the pwm is completely knob based, and can’t/won’t fit in the flashlight.

By far the easiest (and cheapest) solution to establish the concept or base case scenario:

1. “IF” the Supfire zoomies have a 17mm driver??? buy a (or a few) nanjg 105C drivers with however many AMC7135’s you feel comfortable with, and swap out with the stock one.

2. Get a Pomona 8 SOIC clip to program the 105C driver’s ATTiny13A chip with a ramping software. My hex file here could get you started with the clicky switch (needs fuse and prescale change for 19kHz PWM). https://sourceforge.net/projects/flopdriver/files/ATtiny%2013A%20Code/ Using the clicky switch means that a double click is required to get to the ramping mode and continue to hold down til the brightness is acceptable. Other ramping software available could be available at toykeeper’s site? Flashlight Firmware Repository

Going thru this exercise would lay the path to mod more expensive solutions like a Convoy L2 or?

Others may have ideas on drivers/hosts that are amendable to the ramping software.

I’m not so sure. Since the two won’t be synchronized, some frames will get an extra pulse, or part of it anyway. That could mean a flicker of about 1% of the intensity from frame to frame, in the worst case. I’m fairly certain that would be unpleasant but also easily fixed if you process the video.

This of course assumes that light output really does flicker at 10 kHz. I don’t know if it’s actually the case with the phosphors used on typical LEDs. Does anyone have a clue? Sounds like something interesting to test :slight_smile:

Ideally, no. But there’s more to a digital camera’s shutter than its duration. I’m sure you’ve heard of the rolling shutter effect. That could leave you with a frame which is only partially lit by one of the PWM pulses (eg. lower half a little brighter than the upper half).

This isn’t theoretical, you can watch the video I linked. 10khz PWM led dimming works for video, I don’t see any reason to doubt it. It’s also working on commercial products at an unknown pwm rate.

Tom Es Narsil with proper components has high PWM (15K)
It runs on the AT85 and ideally coupled with a FET 1 7138 chip and an electronic side switch.

Check the OP of our Q8 topic for info on the hardware and post 2 for Narsil (second link iny SIG)

Not sure if I am a fan of a Fet Driver with ramp. Admit that not a lot of experience, but with a Fet driven XML2 HiCRI (XM-L2, Bare, S6, 7D3) there was a major tint shift between Hi and Low mode. Perhaps it is different with a more neutral or cool white led?

Ramping is just one of the options in Narsil
One can choose from 12 mode groups with fixed spaced modes (well 7 x 12 actually because of the user configurable moon on or off and from ultra ultra low to very low)

Well once the OP is able to program an ATTiny of any flavor with the stated goal of a ramp function, then the sky is the limit in terms of driver firmware choice.

The BLF Q8 flashlight group buy that you are running would be an intriguing candidate in terms of an out of the box experience that includes a momentary switch, ramp software, presumed nice floody output, and tripod mount.

It is a really long thread, is the driver available separately, I think it would work well in my gear best bike light. What’s the size of the driver? Thanks so much.

I think I can sand that driver to 16mm so it physically fit’s. I don’t really understand what you have to do to give it a high Pwm rate, if you wouldn’t mind I would really appreciate your help. Thank you so much. Also, what’s a good 3min turbo amp draw for a xml2 in a host like that?

There is really no right or wrong way to set the PWM, as there are many different ways to do that using the external osc crystal or the internal osc clocks and the associated PWM registers. Specific help means a specific driver and microcontroller employed. Typically that would be the ATTiny13A and the ATTiny25/45/85 family, and more rarely a PIC.

From my ATTiny13A ramping example this is how I set it up:
TCCR0A = B’00100011’ ‘Clear OCR0B on compare match, fast pwm on ocb
TCCR0B = B’00000010’ ’PRESCALE 1/8, 9.6 MHz CK fuse, equals 4.5KHz??? PWM

To up the PWM frequency a 1:1 prescale rate could be accomplished with TCCR0B = b’00000001’ Without actually having an example handy to test, I am not sure what frequency that gets you. But the frequency results can be played with by preloading the Timer Counter control register TCCR0A. The ATTiny13A has two INTOSC clk fuses. The frequency can be cut in half by employing the phase correct PWM mode. So have a play, and get out the DVM to check the results.

I have no information to convey on your turbo set request.