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

Yes, some of us won't want to disassemble a light (or don't know how).

Reserved

That’s hilarious! :laughing:

Nice - even if I scrolled pretty quickly through parts [no smiley face - they’re dangerous]. I will come back and spend more time on it. Ummm. When/if I get an oscilloscope.

“Oscilloscope” apps are available Android smartphones, and I believe for iPhones (provided they have a 3.5mm jack).

They are intended for analysis of audio input through the 3.5mm jack, and presumably are limited to audio frequencies (by software? by hardware?), but they do some clever o-scope stuff, and could do much of what you show, within the supported frequency range.

It has seemed to me that putting a photodiode pointing out the cord hole of a 3.5mm stereo plug, sort of a poor-man’s version of Ftlab/Smartlab’s series of Smart XX Checkers, and with the appropriate app, PWM clocking for the masses. And then I come to the never-get-around-to-it phase.

So since you actually seem to get things done, I thought maybe I’d pass the idea on to you to figure out the details and best options.

Looking at audio-frequency PWM might provide all the play-value I need, or it might turn out to be the entry-level drug toward getting a real oscilloscope. I’ve wanted an o-scope on and off for decades, but never quite built a business case while I was still working, and never quite built a play-value case then or now.

Thanks, my career background was in electronics (37yrs), so I stuck with what I know. A while back, I tried that Viso Flicker Tester on my iPhone. It's pretty crude, doesn't really tell me anything of value. Here's what I got with the J5 Tactical V1 Pro.

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: