I'm currently doing some testing on several photo sensors that can be used to capture flashlight PWM on an oscilloscope. In order to test a sensor's rise/fall time, I'm using the highest PWM frequency I have available in a flashlight - a Convoy S2+ (Biscotti firmware). My Convoy's highest PWM rate is about 36.4Khz at 35% brightness. Is there any flashlight that uses a higher PWM frequency?
Sample waveform for one of the sensors I'm testing. I hope to publish the results of my testing at a later date.
A while back on my original Cypreus and Ferrero Rocher drivers, which are both FET-only, I used a combination of PWM and PFM to ramp between individual PWM levels by changing the pulse frequency. At the lowest level it had a self-adjusting moon mode which went anywhere from 15 kHz to about 2 MHz depending on battery voltage.
But I haven’t seen any commercial lights with such fast pulses.
Usually I try to get PWM as close as possible to 20 kHz, so it’ll be just barely too fast for humans to hear, without reducing pulse resolution or wasting a lot of power on MCU clock speed. And for the lowest few levels I slow it down to increase stability.
Thanks maukka, good to know I'm stressing the sensors at the highest frequency available for flashlight PWM. When I began my testing - and attempting to find out how others measure PWM with a scope, your threads came up often in search results. Every time I saw those Rigol screen captures, I knew it was you. :)
Interesting you mention PFM. It appears the Convoy is using a combination of changing the duty cycle and frequency - from a low of 2.27Khz at .1% brightness to a high of 36.4Khz at 35% brightness.
I've tested some very slow optical sensors that that have severe clipping even below 2Khz. There are other types of sensors that are more than photodiodes only (think photodiode with onboard amplification for example). Then there are phototransistors. Don't want to say what sensors yet, until I've published the results. The good news, there are some very affordable sensors that easily capture stable waveforms at the Convoy's higher PWM levels of 36.4Khz. There are also other issues (besides speed) with some sensors that hamper proper PWM measurements. So far, my testing has revealed notable differences in speed between photodiodes, phototransistors, and photodiodes with onboard amplification.
The Convoy biscotti driver changes the MCU clock speed at the lowest level. Behavior depends on which version of the driver you got, but if it’s running at 36 kHz it’s the old version. That one uses SPEED/16 for moon, SPEED/2 for levels 1 and 2, and then full speed for everything above. Because the prototype driver hardware had really slow leading edges on each pulse, so I had to slow it down when the pulses were narrow.
But then the hardware totally changed in production, and they got the fuse values wrong, so the first batch runs twice as fast as intended and isn’t calibrated correctly. :person_facepalming: