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

You've lost me here on what was done. You may want to add some more detail. I'm thinking this is understood by those who mod?

Is this in reference to a Convoy L6? You diss-assembled the Convoy L6 and are controlling the driver board directly?

This was your actual photo sensor? 8K ohms was in series or parallel with the OSRAM? Which OSRAM?

OK, I think we're back to the Convoy? A quick search for "Attiny" - appears to be a programmable micro-processor? You used this to control PWM output on the Convoy L6 driver board? The 6.5ohms was placed where?

OK, as I typed this up, I see you've added some more pictures - which clarifies that it was a bit complex.

Did my guesses get anything correct?

I just took one of my drivers to drive the LED
as desctribed with 6.5Ohm shunt to limit current

I used a signal generator to drive the MOSFET

I may measure later today my digital DSLR camrera flash

Today, I received four LEDs from BLF member DavidEF. These were given to me – to find out if a regular LED could be used as a photo diode (for measuring PWM).

Unfortunately, all four could only measure PWM at low frequencies. The photos below show PWM from my J5 Tactical V1 Pro (at 257hz).

The fall time on all four of these diodes was way too slow to measure anything from a Convoy S2+ (2KHz to 36KHz).

They all had fall times from 230us (fastest) to over 2mili seconds. Measuring PWM on a flashlight requires fall times less than about 10us. Multiple ways of biasing these LEDs were tried. Nothing really helped.

The four LEDs were:

XM-L2
XP-E2
SST-90 (de-domed)
Large Generic Chinese 50W COB

Conclusion. These are not adequate for measuring all PWM frequencies typically found in a consumer flashlight. We are back to PIN photodiodes as the winners.

It is also possible that I’m missing something – and someone else can find a better way to bias these types of regular LEDs that would make them work for PWM. However, for less than $10, it’s hard to beat the OSRAM PIN BPW34S.

Terry, I’m glad the LED emitters arrived safely. Thanks for the testing! I’m a bit surprised the XP-E2 seems to have done better than the bigger die LEDs, if I’m reading right.

I just checked the XP-E2 again - zoomed in for a more accurate fall time. It's a little slower at 322us, vs 230us for the 50W COB.

One of these days, I might have to get a low-end scope. It’d be really handy sometimes to see what’s actually happening inside my electronics. And maybe I could even figure out why my results have been so different than Terry’s. It’s weird that I had no trouble measuring 36 kHz on the exact same LED which showed a 3ms fall time here.

Yes, strange, especially since a 3ms fall-time is about 100 times longer than the entire period (length) of one waveform at 36kHz.

DavidEF sent me some LEDs to test as sensors as well. My Thanks.

I started a new thread about testing lights using a 192KHz sound card.

It works quite well for slower PWMs and can catch higher frequencies on it’s Freq. Spectrum screen.

ToyKeeper and the BLF crew.
I tested the new BLF SP36 with the Samsung LEDs. Just a wonderful light!

DavidEF kindly sent me some LEDs to test as sensors for looking at PWM waveforms.
Here are the results of the CREE XM-L2

Cree LED

Here is the critter in question. First thing I did was solder to the approved tabs. The next thing I did was to pull the traces right off the board. I managed to scrape enough copper clean to get a connection. And yes, I do suck at soldering small stuff.

I used the Sofirn SP70 as a test subject. It has one of the fastest clean PWMs in my light collection. I’ll be doing a PWM test of this over in my other thread about using soundcards to look at PWM.

Cree vs Diode

Here is a shot of the response of the CREE (top trace) compared to the OSRAM BPW34 photo diode.
Clearly the response time is much slower, especially on the voltage drop side of things. This is with the LED output straight to the scope.

How about compared to a PV cell?

I used this PV cell to convert photons to volts until Terrys post got me interested in a photo diode.

Cree vs PV

The response is nearly identical to the PV cell.

One thing to remember is that an LED used in reverse is putting out a DC voltage. Take that into account if you are planning to use one as an input to something sensitive (Like a Sound Card).
I added a DMM to the equation to see what DC voltage the LED was generating.

SP70 Moonlight

I couldn’t get the scope to trigger on this. You can see something going on.
It’s putting out about 0.47 volts

SP70 M1

Now we see the triangle shaped response of the SP70 running on Medium as filtered by the CREE LED.
It’s putting out about 2.18 volts.

SP70 Turbo

Here is full turbo mode. The SP70 is still controlling things with a PWM.
The off part of the duty cycle is very short. It’s generating about 2.33 volts.

HKJ said that he used a resistor in parallel with his photo diode to improve V change response. Terry reported it didn’t seem to make much difference.

I stacked up some 10K resistors until I got 1.2K Ohms. Anything much less and I didn’t have enough signal to see anything. Putting this in parallel with the LED made quite a difference.

As you see the trace is much like the OSRAM diode.
BUT I had to run the scope on the highest gain setting (5mV per division) to see any signal. So I saw about a 4mV signal. This is with the Medium 2 setting on the SP70
This did take care of the DC offset.
Won’t work on the sound card - not enough volts

I did the same trick with the PV cell. The response improved just a bit. It was nowhere close to the improvement seen with the CREE LED.

Even with the crappy waveforms, the frequency analyses part of the O-Scope software could measure a PWM frequency.
I’ll follow up with the other LEDs to see if there is any difference.

Interesting that the CREE XM-L2 only puts out a 4mV signal. I wonder why so low?

David,
The low voltage is due to the 1.2K Ohm resistor in parallel with the LED. Basically I was shorting out the LED with the resistor. Without the resistor it put out a larger DC voltage. The PWM signal road on top of the DC offset.
Using a higher resistor value gave a higher voltage but the V drop of the LED was worse. So I kept reducing the resistance till I got the best response that I could still see a wave.
All the best,
Jeff

Ah! That’s the part I wasn’t understanding! Okay! Thanks for testing, BTW.

Here is a test of the second LED DavidEF kindly sent me

This one is a Shaved SST-90.

I managed to solder on some wires without messing this one up.

Just for fun I thought I’d get some voltage measurements.
The overhead lights in my office generated 0.4v. -
The Sofirn SP70 on High revved it up to 2.2v

The BLF – It’s a gateway drug….
We pause this testing to spend money on a PICO scope.
I blame Terry and the rest of BLF for this. I could have been buying lights instead.

But Nooo… I’ve got to see what’s going on with the lights.
The old BK scope is a pain to use and capture a picture.
The 192KHz sound card can’t get enough samples to look at shorter wavelengths.

This is how it starts – Come here looking for info about some light. Start reading and learning.
Discover some nifty lights that are too interesting to pass up. Makeup some excuse as to why more than a couple of lights are all I’ll ever need.

Get interested in basic tests. Try some free stuff to test with. Then an upgrade or two –
The next thing you know HKJs’ rig is starting to look reasonable.

BTY I’m fairly stunned as to what the PICO scope can do. Back in the 70s when I was in collage electronics class I could have sold tickets just to watch this thing do tricks.
With the logging software I may never have to babysit run times ever again (I really hope).

I do miss the super smooth traces on the old CRT scope not to mention the 24Bit depth on the sound card software.
I don’t miss having to have one hand on the BK trigger knob, a second hand holding the light in just the right place to get a good signal, and my third hand holding the camera (and hoping for an in focus picture).

First a 1.2KHz PWM from a headlamp - reviewed here:

SST-90 LED going straight in with no resistors

OSRAM Diode in red. LED in Blue.

Not very impressive. It ramps up till the trailing edge of the on cycle. Then it ramps down until the next power on cycle.
The previously tested CREE XM-L2 did way better with some resistance in parallel with the LED.

SST-90 LED with 5K Ohms

CREE XM-L2 LED W 5K Ohms from the previous test

The square waves are, well, square. The trailing edges are not the best.
Not much difference to see in the two LEDs. Perhaps a bit faster V fall with the CREE.

Rayovac running a PWM of 12KHz
Jumping the PWM by a factor of ten.
I didn’t post a pic using 5K resistor. At this frequency it was very poor.
The display time is 10x smaller/faster to account for the higher frequency.

OSRAM Diode

Notice the double peaks on top of the square wave.

SST-90 loaded up with 1.2K Ohms in parallel

Not looking too bad. There is some hint at the double peaks.
But you would be hard pressed to know for certain if this is a square wave.

This is about as low a resistance I can use and still get enough voltage to measure.
This is with the source light almost touching the LED.
Dimmer lights won’t put enough photons into the equation.
Tough choice, better frequency response vs signal level.

The CREE in the same configuration

Maybe a little better resolution using this LED?

It was easier to get a good reading with the CREE XL-M2 vs the SST-90.
The SST-90 was way more finicky as to the placement of the hotspot in relation to the die.
The SST-90 was shaved, so maybe that is a contributing factor?

But what about just a cheap PV Cell?

As noted before, without some load the response is awful.

PV Cell 0 Ohms

So I started adding resistance.

PV with 1.2K Ohms

Look at the fall time. Way worse that the loaded LEDs with the same resistor.

PV with 300 Ohms

Looking better. The rise time is close to the LEDs and there is the hint of the double peak.

PV with 33 Ohms

It’s showing a square wave (in my imagination?). Ugly, but a square wave.

Rise time is looking good. The fall is better also.
Look what happens to the double peak at the top of the wave. The amplitude has reversed and the first peak shows a higher voltage than the second. What’s with that?

Using the PV cell with a 300 Ohm or 33 Ohm resistor is WAY easier to get enough voltage to see a good trace.

Conclusions
So my quick tests agree with Terrys’ much more rigorous testing. The better photo diodes are far superior to LEDs or PV cells as far as using them as sensors to look at PWM waveforms.

OSRAM photo diode - CREE LED - PV Cell

I think a PV cell bridged with the optimum resistance is a better option for looking at PWM as compared to using an LED as a sensor.
I think each PV cell will need testing to see what the best load might be.
If I come across some more options, I’ll give then a try.
All the Best,
Jeff

Thanks for these tests. Even if I will not have any use for the data, it was fun to read and nice to know all this.

FWIW, over time I have collected some measuring equipment that cost me more than my most expensive flashlights. But finding out stuff is even more addictive to me than collecting flashlights, so that is fair enough.

Thanks to both Terry and Jeff for humoring us by testing these LEDs as photo-diodes! :stuck_out_tongue:

I have one of these Dr. meter lux meters.

I opened up the sensor end and I see something awfully familiar.

The OSRAM BPW34 that Terry tested sitting on top of the Dr. meter sensor.

Looks like someone else besides the BLF thinks this is a useful item.
All the Best,
Jeff

I have one of these meters as well. Very interesting.

hello,

Thorlabs FDS100 PIN is available in US only :frowning_face:
Not on Mouse, digikey, farnell etc. It was not even 400 khz tested given price tag of over 130Eur as it is used in Thorlabs DET36A2 biased photodetector why not tested same as all ?

OSRAM BPW34S is 1.7Eur from farnell.
HAMAMATSU S1223 DIODE is 16.56Eur from farnell.

The testing used 8K resistor but another post lists that with [TLC271ACP] opamp “After that I did some dimensioning on the resistor (I’m sure there is a formula for that) and it turns out that 200k works best, giving a response from 0V for very dark up to 4.2V for very bright light. All set! Tnx all!”

Thanks for sharing!

I used a BPW34 and a pot (~8kOhm):

Cool, you’re welcome.

1 Thank