[REVIEWED/TESTED] – Thirteen Different Optical Sensors For Measuring PWM With An Oscilloscope [WARNING, LONG POST]

Fantastic tests! I also used the nice OSRAM BPW34 before getting the Thorlabs.

For handling the sensitivity issues on very low moonlight modes with the Thorlabs, I skipped the expensive variable inline terminator they sell and just use a BNC T connector with one of these and a higher value resistor.

Btw, I don’t use the Thorlabs with the sphere. I just shine the light directly and adjust distance/angle in a dark room to handle the saturation on higher modes.

I’ve also had good results with just a small solar cell (from a garden light) and measuring over a resistor.

Post corrected. BTW, it's partially your fault for my long post. Those Rigol scope captures are what got me thinking. :)

I would be interested to see that setup, how you attached the resistor, what value, and whether you got adequate speeds?

I didn't post this (but will now). I did test a Casio calculator solar cell, and the results were not good:

The calculator was disassembled (read destroyed). The solar cell was somehow sonic welded into the case, couldn't remove it with out a lot of cutting, so just left it in. I did attach the rotating potentiometer to the solar cell, but regardless of whether the resistor value was 0 or 10K, the waveform was the same.

The J5 Tactical V1 Pro on low, DC coupled. The solar cell is very slow with a fall time of 1.2ms. In addition, the cell has a constant DC bias, which the waveform rides on.

J5 on low, AC coupled. Slow fall time of 1.5ms

Convoy S2+, at 10% brightness. DC coupled. Again, the solar cell has a DC bias, which the waveform rides on top.

Convoy S2+, at 10% brightness. AC coupled.

CONCLUSION. Although technically you can measure the higher frequencies of a Convoy S2+, the duty cycle and waveform are highly skewed.

Are there faster solar cells that might do better?

Very cool testing! I know nothing about this subject but it is relevant to the hobby. I’m inspired to make a PWM tester because of this test :slight_smile:

Oy.

This is actually the kind of app I was thinking of : Oscilloscope (Android). There are at least a dozen more or less similar Android apps.

I also looked at this for iOS, but although I have an iPad mini and a few old iPhones, they’re not my go-to for this kind of stuff, so I don’t really know what else is out there. I know iOS security often doesn’t allow the kind of (sometimes risky) fun that Android does.

My own electronics design-level work more-or-less peaked in the 74LS74 era, and while I continued to carry and use soldering equipment and logic probes in the field for several more years, things tended more and more towards consulting. The background in software (since 1966) and electronics (a bit earlier) was vital, but less and less hands-on, until around the time I retired, I realized I knew hardly anything useful anymore, and didn’t mind at all. Last week it took me over an hour poking around the house to find a soldering iron for a flashlight repair. At least the soldering itself turned out quick and easy. Now I’m trying to remember where I saw either the soldering gun or the big iron to fix a crack in a carbide lamp, or maybe I can find a torch? That would be more fun.

I do want to try the Android version of the Viso Flicker app - though 2.3 stars and “25 trail uses” [sic] suggest it’s not going to be any better than the iOS version.

..Open Request to Contribute To This Thread..

If anyone has tested something/anything that can measure flashlight PWM as well as my three recommended sensors (regardless of what type of device), please contribute to this thread with "how to" details on setup/configuration, device details, and results. Even if the device was a total failure, post that as well (as a warning). I would like to make this the go-to thread for different ways to measure PWM successfully. I may add more devices in the future.

I will post some tests at some point. This was my first test a year or so ago with a H17f driver with just a DMM connected to the solar cell without any additional parts. It does require a good multimeter, which doesn’t require zero crossing to pick up the PWM, but shows that the signal is clear enough to be interpreted even when above the human threshold of noticing it. With a resistor the fall time improved significantly.

@Terry:
Very useful information, thanks for the immense work!

May I add another cheap solution, all from the spare parts box:

1.) old MCPCB with LED, larger die preferred (here XM-L2, I guess),
2.) Resistor (here 4.7k)

… and a multimeter capable of frequency counting. Also works with oscilloscope, of course.

And the simplest method of them all is to take a photo while moving the camera or light and count the trails.

Thanks for the contributions. There are some older posts on using a sound card input, then using some type of scope software to access the waveform. Anyone want to try this, with details?

My suspicion is that different solar cells will have different biasing characteristics/response times. If we can get the details on a specific solar cell, then the results can be duplicated.

I am very interested in measuring PWM, too. But not just flash lights but also regular lights and especially display PWM. Displays are not as bright as flash lights, especially on lower brightness levels.
Your thread greatly helped me in “building” my own biased BPW34 circuit, thank you for that! I just replaced your 8K resistor with a 100K resistor. I needed 100K because lower resistances would not display much detail on my oscilloscope due to low voltage. Now my voltage range is in between 20 mV (lowest display brightness) and 400 mV (full display brightness), which is great.
I just wonder if the 100K resistor as opposed to 8K makes the photodiode less responsive or introduces additional noise. Do you know about that?

You mentioned the Thorlabs DET36A2. Do you know if it has a similar output voltage when connected to an oscilloscope?
I am tempted to buy a Thorlabs detector in the hopes of getting less noise and more precise measurements. Maybe those devices are the ultimate PWM measurement tools. However, I do not know how much voltage they deliver. Maybe the biased ones would do, or maybe the more expensive amplified photo detectors are needed. Any ideas?

@maukka You were mentioned to own a device simliar to the DET36A2. What device are you using, and do the voltages differ to the do-it-yourself methods in this thread?

And finally, you asked for other devices that can measure PWM. There is the portable Fauser LiFli (Fauser Elektrotechnik - Light flicker meter LiFli - Description), which can detect flicker up to 400 kHz. A downside is it will not directly tell you the frequency. You can listen to the audio output to “hear” frequencies. Ultrasound is converted into audible sound. If there is flicker, the device tells you a rounded percentage on an LED scale. It even has an oscilloscope output. Sadly, the output of my device has a lot of noise, making it less useful for low brightness measurements. I believe it is usable for higher brightness as seen in flash lights or room lighting. The device itself will not tell you a percentage if the light is below 100 lux.

I admire your skills Terry and thank you for all the testing. :+1:
One question. You stored the sensors in anti static bags. Where were the lab Snacks stored? :slight_smile:

I just tried a 100K resistor with the OSRAM. The noise, amplitude and sensitivity didn't seem to change, but the fall time increased about 4X, causing clipping to occur sooner. However, whatever seems to work - which is why I said "the resistor values on my schematics can be taken with a grain-of-salt. My values are just a starting value. You may find lower/higher values work better in your circuit". . Was your supply voltage the same as mine?

The Thorlabs DET36A2 uses a 12V battery for biasing voltage (significantly higher than what I used), and they recommend a 50Ω BNC cable impedance matched to a 50Ω terminator. Can't say if this would give better results for measuring display PWM. If you decide to buy one, let us know the results.

There should be a good joke here, still trying to think of one . . .

Someone’s belly? :slight_smile:

I use a 9 V battery. Actually I do not know which manufacturer my BPW34 is from. I have read the Vishay manual which states a 10 V bias and 1K resistor give the diode 100 ns rise/fall time: https://www.vishay.com/docs/81521/bpw34.pdf. The OSRAM PDF differs and mentions 5 V, 50 Ohm, and 20 ns: https://www.osram.com/media/resource/hires/osram-dam-2495812/BPW%2034.pdf
It seems it is not a simple task to make the most out of one’s circuit.

This is a good thread. :slight_smile: I managed to miss it when it was new, but I wonder if you might be able to scope the results when using a regular LED as the sensor?

I realize this idea was ruled out since they aren’t optimized for use as a photodiode and may produce less than satisfactory results. But I wonder what the results actually are. I’ve been able to measure frequency pretty effectively with a plain XM-L2 inside a Convoy S2+ head to focus incoming light onto the LED… but I don’t have a way to see the actual waveform.

Problem is - I don't do modding, so don't have much in the way of LEDs to test. The only LED's I used during my sensor test, was a stock off-the-shelf LED like this one. I do remember trying to use the white LED as a sensor, and it hardly worked at all. HOWEVER, other LEDs (actually used in flashlights) might work better. If you or anyone else want to mail me a particular LED, I will certainly volunteer to test it (will return if they are expensive).

Right. I shouldn’t assume everyone has extra Cree LEDs laying around. :slight_smile:

Hey, if it will help further BLF driver development, I’ll send you some emitters for free. I’ve got lots of different LEDs that are just lying around right now because I pretty much lost all my modding time to a change in work hours a while back.

I’ve got…

  • a couple hundred cheap XP-sized “1W” Chinese emitters. These are “bare” in a pick-and-place roll.
  • several XP-E2 on 20mm non-DTP Aluminum MCPCB’s
  • a few XP-L HI. I can’t remember how many, but not much. I’m not using them, so they are available.
  • a few XP-G3. I don’t know how many of these either. I haven’t counted recently.
  • one Sofirn Q8 MCPCB still populated with the stock XP-L HI emitters. I replaced the whole thing.
  • a couple of de-domed Luminus SST-90 on the stock DTP MCPCB’s
  • some other random XM and XP emitters pulled from lights that I’ve modded.
  • maybe still a MT-G2 around somewhere as well

ToyKeeper, the offer is open to you as well, of course!

EDIT: To clarify, I’m not offering to send “all of the above” for free. I’m just listing what I have to let you know that I could send you several kinds. But if you decide you do want it all, I can let it go for a small amount. :innocent: