Announcement

Collapse
No announcement yet.

Goldelox refresh Rate: Change it via arduino code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Goldelox refresh Rate: Change it via arduino code?

    Guys, I really need a hand here...

    I have build some gauges to monitor my RC Plane flight... I want to monitor the Display via a camera. The problem is that I am get the flickering behaviour when watching it via the camera. The reason is the different refresh rates of the camera sensor the and Display...

    https://www.youtube.com/watch?v=1tmP...zRsp1Gp4AaABAg

    Is there any way i can change the Screen refresh rate to avoid this flickering? I cannot change the camera FPS.

    Thank you so much.

    Guilherme

  • #2
    Which display are you using? How are you sending commands from the Arduino to the display? (SPE, or custom?)

    I'm not sure that this is fixable, but, hopefully, we can get the flickering to be less severe.
    Mark

    Comment


    • #3
      Hi Mark,

      I am using the uOLED-96-G2 and uOLED-160G2. I was planning to commercialize this application but if I cannot solve it, the product becomes unviable for this application...
      I have create the gauges using the 4D Workshop4 IDE PRO and sending the data via arduino.
      I am using the Goldelox library (Goldelox_Serial_4DLib.h is SPE right?) media_SetAdd and so on...

      Comment


      • #4
        It's really annoying, OLED displays are supposed to have a reasonably high persistence time. And, as you may have noticed, the scan rates are quite high, as shown by the high flicker rates.

        The scan rates are quite different between the 96 and the 160, but I'm not sure if they can be altered the way you need.

        The real culprit seems to be the camera, as the amount of light coming into it increases it seems to be 'simply' shortening it's shutter time chopping up the display output. It would be better if you could lower the aperture on the camera instead.
        Mark

        Comment


        • #5
          If you can't adjust the aperture on the camera, maybe you could manually lower the aperture by placing a 'solar filter' film in front of the camera?
          Mark

          Comment


          • #6
            Another thing, some of these cameras allow you to change the lenses and some of the lenses have different apertures, so maybe this is the best way, if a suitable lens is easily obtainable
            Mark

            Comment


            • #7
              Originally posted by ESPsupport View Post
              Another thing, some of these cameras allow you to change the lenses and some of the lenses have different apertures, so maybe this is the best way, if a suitable lens is easily obtainable
              Hey mate, yes agree, usually is possible to change these settings. But this camera is quite the opposite (DJI FPV Air Unit)... So far, the only viable alternative is to use ND filters and pray the flickering will be attenuated so that i can use this as a solution, otherwise I'll have not many other settings i can play with (ISO, Shutter Speed and so on are fixed... not possible to change)...

              Comment


              • #8
                As I mentioned before OLEDs have a high persistence and frame refresh rates, so this shouldn't be a problem.

                But when it is there is not really much that can be done.

                The 0.96 display has the SSD1331 as its underlying driver, from the datasheet it says "If the frame frequency is set too low, display flickering may occur. On the other hand, higher frame frequency
                leads to higher power consumption on the whole system. In normal application, it’s suggested to set the frame frequency between 100Hz and 110Hz." So, unless the flickering is quite slow I don't think there is scope to change this much within the 100-110Hz range.

                The 1.6" display has the SEPS525 as its underlying driver, from the datasheet it appears this is adjustable from 75 to 150Hz in 5 Hz increments. The default is 90Hz and that is what we are using. I have attached some code to cycle though the available rates, maybe one will work for you.

                Mark

                Comment


                • #9
                  Originally posted by ESPsupport View Post
                  As I mentioned before OLEDs have a high persistence and frame refresh rates, so this shouldn't be a problem.

                  But when it is there is not really much that can be done.

                  The 0.96 display has the SSD1331 as its underlying driver, from the datasheet it says "If the frame frequency is set too low, display flickering may occur. On the other hand, higher frame frequency
                  leads to higher power consumption on the whole system. In normal application, it’s suggested to set the frame frequency between 100Hz and 110Hz." So, unless the flickering is quite slow I don't think there is scope to change this much within the 100-110Hz range.

                  The 1.6" display has the SEPS525 as its underlying driver, from the datasheet it appears this is adjustable from 75 to 150Hz in 5 Hz increments. The default is 90Hz and that is what we are using. I have attached some code to cycle though the available rates, maybe one will work for you.
                  Hey Mark, thank you very much! At least I have few options to play with. BTW, any chance you share equivalent arduino code?
                  I'll try and share the results with you.
                  appreciate your support
                  Thanks
                  Last edited by guipedroso; 3 March 2021, 08:32 AM.

                  Comment


                  • #10
                    These commands aren't available from Arduino, so what you need to do is, once you have worked out the correct rate values is add the
                    disp_WriteControl()
                    disp_WriteByte()
                    To the Goldelox SPE assuming you are using that. The SPE source can be found in C:\Users\Public\Documents\4D Labs\4DUpdates\Utils\SPE2GV13.INC, after line 135 would be good. Just remember that this SPE will be used 'forever', so if you need a Goldelox SPE for another display you will need to change it back.
                    Mark

                    Comment


                    • #11
                      Originally posted by ESPsupport View Post
                      These commands aren't available from Arduino, so what you need to do is, once you have worked out the correct rate values is add the


                      To the Goldelox SPE assuming you are using that. The SPE source can be found in C:\Users\Public\Documents\4D Labs\4DUpdates\Utils\SPE2GV13.INC, after line 135 would be good. Just remember that this SPE will be used 'forever', so if you need a Goldelox SPE for another display you will need to change it back.
                      HI Mark, I got the idea of the SPE2GV13.inc. The only doubt it how to set the refresh into this... what is the variable i should change in there once i find the Refresh rate i want to set?

                      func main()
                      var i, j, k, l, m, cmd, spl ;
                      ssdelay := >?SSDelay?< ;
                      ssspeed := >?SSSpeed?< ;
                      >?if?< SSDelay != '0'
                      ssstat := SSENABLED ;
                      *(TIMER0) := ssdelay ;
                      >?endif?<
                      SS_Mode(>?SSMode?<) ;
                      >?if?< PmmCID = 'uOLED96-G1'
                      pin_Set(SOUND, IO1) ;
                      >?else?<
                      pin_Set(SOUND, IO2) ;
                      >?endif?<

                      com_Init(combuff,20,0); // set up a interrupt driven ring buffer for comms 20, not enough, 100 ok

                      setbaud(BAUD_>?SerialBaud?<);
                      gfx_OrbitInit(&strbuff[0], &strbuff[1]); // set result holders for orbit command, if used
                      repeat
                      if (com_Count() > 1) // outer loop
                      if (ssstat && SSACTIVE)
                      SS_Stop() ;
                      ssstat := SSENABLED ;
                      endif
                      j := serin() << 8 + serin() ;
                      if (j > 0) // 'manual' command? Manual commands will be 1..nn
                      if (j >= maxmancmds)
                      if (ssstat && SSENABLED)
                      *(TIMER0) := ssdelay ;

                      Comment


                      • #12
                        Just add after
                        Code:
                        ssspeed := >?SSSpeed?< ;
                        disp_WriteControl(0x03); // CLOCK_DIV Command
                        disp_WriteByte(0xYY); // Clock_div data
                        Where YY is the value showing on the display when it 'looks best'
                        Mark

                        Comment

                        Working...
                        X