For people who might be first time on this forum, and that were brought here by eyestrain, headaches, migraine, nausea, disorientation and other unpleasant symptoms caused by working with computer displays, this is a guide how to build a device that can measure whether the backlight of those displays flickers, how and when.
The problem is called Pulse Width Modulation (PWM) and you can read more about it here - http://www.tftcentral.co.uk/articles/pulse_width_modulation.htm
There may be more reasons for the issues people who come to this forum have, but this is the one so far we can measure.

It is important to note that you cannot trust any reviews that claim the device youre about to buy does not use PWM, as displays on phones, tablets, laptops and other tech are sourced from more manufacturers for each brand. All you can do is test for yourself and trust yourself.

  1. We are building an amateur oscilloscope with fraction of the money the real professional ones cost. If you have a friend who can lend you a real one, it is a better and more accurate choice. First you need to download Christian Zeitnitz soundcard oscope software here - https://www.zeitnitz.eu/scope_en

  2. We will be transferring light signal to sound, so you need a probe that can pick up light. A simple photodiode will do, for my device I used this one (Europe shop) - https://www.conrad.de/de/fotodiode-dil-1100-nm-60-osram-bpw-34-153005.html
    A better one recommended to me was this one, I will use it in my next probe - https://www.conrad.de/de/fotodiode-to-39-820-nm-55-osram-bpw-21-152977.html

  3. You have to solder the diode to a sound cable that you can connect to the soundcard or your computers microphone jack. A simple 3,5mm stereo jack will do. That one, when taken apart, has three pins - Left ear, Right ear and Ground. You have to connect the photodiode pins to either left or right, and then to Ground. As long as one pin is connected to the Ground, if the other is L or R does not seem to matter. This kind of soldering is fairly easy, just be careful not to use too powerful solder tool so you do not melt the photodiode with the heat alone.

  4. There is a certain voltage going through when the diode is picking up light, as it serves similarly as when you have a solar powered calculator. There is a report to be careful not to fry the sound-card, however I encountered no problems so far and the voltage seems to be very small to be able to cause any damage. Just in case though, its good to -

  5. Use external sound card. You can buy one cheaply second hand off ebay, or a new one. The reading should be better when a quality sound-card is applied, instead of basic notebook sound card. Also if you would happen to fry it, you just have to replace the card. My external card has a range of 44,1 Khz, which means it can probably read PWM up to 44Khz. Any higher and I would need more professional grade equipment. Newest macbooks are reported to have PWM at 112Khz for example.

  6. Now, connect the card to the computer, open up the oscilloscope software, select the input card in the settings and you are set. Example photo is my external display with lowered brightness to 80%. PWM free only at 100% brightness.

A more portable option, although maybe not so accurate, is to use your smartphone and connect the diode to its headphone jack. You can then get an oscope application from either android store or apple store.
More info here: http://www.retropcmania.com/2017/02/measurements-flicker-of-light-with.html

Feel free to ask any questions.

    Many thanks. With your help, I finally succeeded. I don't have any soldering equipment yet, but I have a male-male audio cable, a BPW34 photodiode, and adhesive tape. Works great so far.

    Edit: In this picture the photodiode is attached in the wrong direction. It works, but the amplitudes are reversed, as seen in the following posts. To get correct amplitude directions, attach the diode to the right (not the left like in the picture).

      KM Could you post some results? I am interested to see. Amazing idea btw, I wouldnt think of taping it🙂

      • KM replied to this.

        martin
        OnePlus 3 at brightness 65/255:
        It looks like terrible PWM, but (on custom ROMs) it's actually the first brightness step of the PWM-free range. What looks like high differences in amplitudes in reality is pretty flat. The sound card oscilloscope may not be able to show the full voltage range from zero to spike.


        OnePlus 3 at brightness 0:
        This time it IS terrible PWM that's visibly flickering, but doesn't look so bad on the oscilloscope. But the frequency gets picked up and you can see that something's going on which is not flat.


        I also tested my BenQ EW2740L (2 devices) and my iPad 4: perfect flat line on all brightness levels, everywhere on the display surface. This doesn't explain why I have to turn down the brightness on all those devices (especially on the iPad 4), and why I feel a difference in eye comfort between the two monitors. They certainly have a different backlight color tone. Their status LED has a flat line, too.
        Buy my Android device's status LEDs flicker when pulsating. Hard to capture. It seems their brightness is PWM-controlled, and only 100% brightness is flat. It might be a good idea to probe all lights in one's house, even the small ones, to be sure there's no PWM - once and for all.

        I measured the voltage of the BPW34 photodiode (hanging on the cable) with a cheap multimeter. I could never get the voltage past 0.5 V, even on 100% monitor brightness, holding the photodiode at the window, or using an LED flash light (which has a flat oscilloscope line, too).

          KM Thank you for the post, that is pretty amazing. I see on the first image the freq is almost 60Khz, what soundcard are you using?
          I must say for myself, I tried measuring iphone 6s, that gives me one of the worst eyestrains and could not detect any PWM. What I detected was weird flickering lines when hitting the lowest brightness levels. I detected the same ones on my iphone 4s though, that is the most comfy device I can use for hours on end. I blame my non-professional gear and wanna test again with some proper gear, as I am absolutely convinced even the newest iphones use PWM - my symptoms are the same with them.

          EDIT: Try playing with the soundcard dials if it has some. I noticed sometimes the amplitude was very low, and then realized I have a very small gain on the card.

          • KM replied to this.
            martin changed the title to Homemade oscilloscope to detect PWM DIY guide .

            martin It's just 60 Hz. The soundcard is an integrated Intel HDA chip.

            martin The BPW 34 seems to be pretty fast. 100 nanoseconds rise/fall time for the Vishnay Model, 200 ns for OSRAM's. I found this link where someone further explains those values: https://electronics.stackexchange.com/questions/118141/high-frequency-blinking-leds-and-sensor-for-that

            The OSRAM BPW 21 you mention seems to be much slower - 1.5 microseconds, which are 1500 nanoseconds:
            https://www.osram.com/os/ecat/TO39%20Ambient%20Light%20Sensor%20BPW%2021/com/en/class_pim_web_catalog_103489/global/prd_pim_device_2219533/ (There's a linked datasheet PDF with specs)

            OSRAM BPW 34:
            https://www.osram.com/os/ecat/DIL%20BPW%2034/com/en/class_pim_web_catalog_103489/global/prd_pim_device_2219534/

            The next step might be those more expensive photodiodes. Somewhere I saw a price of $40. But maybe that's overkill. We better upgrade our oscilloscope first.

            The cheap Hantek 6022BE USB oscilloscope has sample rates of up to 48 MSa/s. Compared to 44100 Hz of our sound card, that'd be a big upgrade.
            www.amazon.com/Hantek-HT6022BE20Mhz-Digital-Oscilloscope-Bandwidth/dp/B009H4AYII

            It even has an open source project with Linux and Mac support: http://openhantek.org

              KM That Hantek one looks good, I might buy it. However, do you know how to attach the photodiode to it? Seems like a completely different cable.

              • KM replied to this.

                KM Might be. @TechSensitive , could you shed some light on this? Just a photo of how your setup maybe looks like with a small explanation how the photodiode is attached, would help a lot.

                  martin I got the oscilloscope today. It has a "crocodile" and a hook connector:

                  Short impressions so far:
                  - The output is more accurate than (my) sound card oscilloscope. One can actually see the "zero" axis and judge how big the difference in amplitudes is. Plus the waves resemble reality much better.
                  - The Hz counter of the OpenHantek software is worse than the sound card scope. It seems to count only very obvious sinus waves. I.e. when the PWM almost touches the x-axis. Not sure yet how to change that.

                  Result of OnePlus 3 PWM at zero brightness:


                  Amazing. Could you test some of the newer iphones, in case they give you eyestrain as well? Im gonna do that on my work iphone where I have absolutely terrible and long lasting pain.

                  Yes the software looks crap compared to Zeitnitz. Also we might need to get a better photodiode just to be sure. I was recommended this - https://www.conrad.cz/pin-fotodioda-osram-components-bpx-61-to-39-vyz-uhel-55-400-1100-nm.k153122

                  @Wootever please what is the difference when you use the diode with the circuit as bought from ebay?

                    martin
                    The transimpedance amplifier converts current from the photodiode to a voltage usable by the oscilloscope (it basically amplify the signal for a more stable output).

                    The advantage of a combined/embedded design:
                    The integrated combination of photodiode and transimpedance amplifier on a single chip eliminates the problems commonly encountered in discrete designs, such as leakage current errors, noise pick-up, and gain peaking as a result of stray capacitance.

                      Wootever Thank you, that is amazing. And it can be clipped to the oscope probes like the regular diode? Could you show a photo of how it is attached to the oscope so it works? I will order it from your link.

                        Wootever Thank you, so I just connect the probe tip to the middle two, probe ground to the bottom two and it will work? What about the voltage supply? (Red)

                          martin
                          Voltage supply is needed for the transimpedance amplifier, but the power consumption is very low, a single 9V battery probably lasts for months/years.

                          Edit:
                          Here are a few example photos of a basic OPT101 photosensor:


                          Galaxy S8 AMOLED PWM on 10cd/m2:

                            dev