VEYE IMAGING Forum
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc
    • Register
    • Login

    IMX-287M: How to synchronize video frame capture with an LED?

    Scheduled Pinned Locked Moved Raspberry Pi App Software
    6 Posts 2 Posters 3.5k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E Offline
      etale_cohomology
      last edited by etale_cohomology

      I'm using an IMX-287M on the Raspberry Pi 5 to record video at over 500 FPS.
      I'm using an LED PCB to light the scene.
      The LED PCB is controlled by the Raspberry Pi 5.
      The LED PCB can be turned on by setting a Pi 5 GPIO pin to 1 and it can be turned off by setting the GPIO pin to 0.

      How can I synchronize the video capture on the IMX-287M to the GPIO pin of the Pi 5 so that the LED PCB turns on when the IMX-287M is capturing a video frame (during exposure) and turns off the rest of the time?

      That it, how can I turn on/off the LED PCB in sync with the video capture of the IMX-287M?

      veye_xummV 1 Reply Last reply Reply Quote 0
      • veye_xummV Offline
        veye_xumm @etale_cohomology
        last edited by

        @etale_cohomology

        1. If your IMX287 is running in stream mode, please use the upgrade package from the following link for the upgrade:
          https://www.mediafire.com/file/d4yjibcjp1hw8z8/MV-MIPI-IMX287M_C1.37_L2.04_20240306_beta_upgrade.bin/file
        2. The camera will generate its own strobe synchronization signal. I suggest using this signal to drive your LED instead of using the Raspberry Pi's IO. For more details on the principle, please refer to the following link:
          https://wiki.veye.cc/index.php/Mv_mipi_camera_manual#Strobe
        3. On the ADP-MV1 board, the J3-5 pin will output the strobe signal by default.
          https://wiki.veye.cc/index.php/ADP-MV1_Adapter_Board_Data_Sheet/zh

        Questions will be answered as soon as possible, please be patient.
        如果你使用中文,请直接用中文提问。
        May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

        E 2 Replies Last reply Reply Quote 1
        • E Offline
          etale_cohomology @veye_xumm
          last edited by etale_cohomology

          @veye_xumm

          Hi. Thank you very much for your reply.
          It worked.
          (Edited to add answers.)

          • I downloaded the bin file, but how do I use/run/apply it?
            Answer. This explains it: https://wiki.veye.cc/index.php/Mvcam_firmware_update_manual

          • What is stream mode?
            Do you mean the result you get when you run: ./mv_mipi_i2c.sh -r -f trgmode -b 6
            In that case, I'm in mode 0 (Video streaming mode). Is this what you were asking?
            I'm configuring the camera using: v4l2-ctl --set-ctrl frame_rate={framerate} -d {subdevice}
            And I'm reading frames in C using v4l2_open(), v4l2_mmap(), etc.

          • Do I need to turn some strobe setting using the I2C interface in order to activate the strobe?
            Answer. No, I think. I think you only need to make sure you're in streaming mode, but that's the default I think.

          1 Reply Last reply Reply Quote 0
          • E Offline
            etale_cohomology @veye_xumm
            last edited by

            @veye_xumm

            I'm now trying to change the strobe duration, but I'm unable to.
            The strobe is synced with the framerate and the strobe duty cycle is about 4%, but I'd like to increase it.
            I'm trying to do:

            ./mv_mipi_i2c.sh -r -f trgexp_delay -b 6
            ./mv_mipi_i2c.sh -r -f trginterval -b 6

            and I'm reading back those values to verify that they have changed, but the strobe duration doesn't seem to be changing.

            veye_xummV 1 Reply Last reply Reply Quote 0
            • veye_xummV Offline
              veye_xumm @etale_cohomology
              last edited by

              @etale_cohomology

              @etale_cohomology said in IMX-287M: How to synchronize video frame capture with an LED?:

              ./mv_mipi_i2c.sh -r -f trgexp_delay -b 6
              ./mv_mipi_i2c.sh -r -f trginterval -b 6

              In video streaming mode, these two parameters do not take effect. The camera will output the strobe control signal based on the actual exposure time, whether it is in manual exposure mode or automatic exposure mode.

              Questions will be answered as soon as possible, please be patient.
              如果你使用中文,请直接用中文提问。
              May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

              E 1 Reply Last reply Reply Quote 1
              • E Offline
                etale_cohomology @veye_xumm
                last edited by

                @veye_xumm Okay, thank you very much for the replies.

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post