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

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:

Thanks for the offer,

I wouldn't have time to test all of them - but if you could pick about four of them - that you think might work in reverse to measure PWM - I will test them - to see if they are anywhere near as good as PIN photodiodes. Would be an interesting experiment. PM me.

PM Sent.

ToyKeeper, do you have any input about what kind of LED is the most likely to give the best results as a photodiode? Is it the same property that makes a good LED or something else?

Mostly, the same things which make it good at producing light. But in particular, a large die surface and probably a relatively high Vf. That raises the amount of voltage it’ll produce. A reflector helps too. And being a recent LED helps, instead of an older model with a slow response time. Upgrading from XM-L to XM-L2 allowed me to measure a bit better.

If an emitter normally starts lighting up at ~2.4V, it’ll generally produce up to 2.4V when a light is shined at it. But if it’s a higher-voltage model which doesn’t light up until ~4.8V, it can produce twice as much voltage, which might be easier for the attached DMM or scope to read. Generally the range is from 0 to the lowest voltage which will make it light up.

I have a bunch of broken lights I could take apart for parts if it would help. For sensor purposes, it just needs the head of the light with two wires sticking out. I have several dev hosts set up this way so I can access the driver for easy flashing and testing purposes… I generally just grab one of those and clip on some DMM leads.

I’m not sure if it helps to remove the phosphor layer. I haven’t tried. Also not sure if it helps to add something to pull down the signal faster after each pulse. It probably does. With just the emitter though, I can at least confirm it handles 36 kHz PWM with no problems.

When I tested flashlights I used a photo diode parallel to a resistor directly connected to the scope for measure PWM. The value of the resistor has a significant influence on the fall time, but also on output voltage.

The red line is voltage on led, the blue voltage from photo diode.

HKJ, can you sketch out that schematic? I wouldn't have thought that a resistor in parallel with the sensor would work, as the reverse bias would cause the current to seek the path of least resistance, mostly going through the resistor and not the sensor.

I do not use any external voltage, only the voltage generated by the diode:

I wanted a simple circuit without any battery.

Interesting. For future reference, what photo diode did you use (manufacturer).

Thanks ToyKeeper, that makes sense, from my original post: [quote] It was also noted that the best sensors in this review had large sensor areas. [/quote]

No info, the diode is maybe 30 years old. I got a handful of them when a company cleaned out their stock of them.

It says VACTEC on the chip.

Thanks, a search suggests that Vactec is an older defunct company acquired by Excelitas.

I managed to get one of these lights apart, a Sofirn SF36 with a broken driver. The LED is fine though, and works as a PWM sensor. It looks like an original XP-L, which is basically XM-L2 with the sides of the dome chopped off. It handles 36 kHz just fine on my DMM, but I don’t know how the actual scope traces would look.

I could send it, if desired. Either the whole light or just the head.

Will PM you ToyKeeper

Toykeeper,
I did a post about building a PWM sensor:

I based this on Terry’s build.
A cheap solar cell works well but doesn’t have the resolving power of one of the diodes.
Here are a pair of traces, the top trace in each shot is a cheap photocell and the bottom one of the OSRAM BPW34S Terry found to excel at this.

This is a shot of florescent lights in my office.

This is a shot of a flashlight I tested.

The photocell has a slow V drop compared to the OSRAM BPW34S

On another note (literally) you can hook up a cheap solar cell like this one directly to an efficient speaker and you can hear the PWM on flashlights that use a frequency in the lower audio bands. You can hear it change as the PWM cycles through different modes. Who says a flashlight can’t make music?

As I mentioned at the end of my post I ended up with 5 of these BPW34 diodes.
I’d like to give away 3 of them to deserving BLFs. PM me an address (US only please) and I’ll mail a diode and a few 10K resistors to play with.
All the Best,
Jeff

I did a post about using Audio software to measure PWM Frequency: