Reducing exposure time on OV2640 mini plus

Published by nmilner on

New Home Forums Arducam SPI Cameras Reducing exposure time on OV2640 mini plus

Tagged: , ,

Viewing 1 reply thread
  • Author
    Posts
    • #34983
      nmilner
      Participant

      1.Which seller did you purchase the product(s) from?
      ScorpioVision
      2.The Model number of the product(s) you have purchased?
      Arducam Mini 2MP Plus – OV2640 SPI Camera Module
      3.Which Platform are you using the product(s) on?
      Arduino MKR Zero
      4.Which instruction are you following?
      Using your ArduCAM_Mini_2MP_Plus_Multi_Capture2SD example
      5.Has your product ever worked properly?
      Yes
      6.What problems are you experiencing?
      I run the example code (ArduCAM_Mini_2MP_Plus_Multi_Capture2SD) which is in autoFocus mode and noticed that any sort of movement in a captured image is blurry. I am capturing 1600×1200 images. This implies that exposure is too long and needs to be reduced to capture less movement. Please can you advise how I go about reducing the exposure time manually?
      7.What attempts at troubleshooting have you already made?
      Searched the web, only found articles on increasing the exposure
      8.How would you like us to help you?
      Please advise how I would go about reducing expsoure time on the module.

    • #35212
      Arducam jyh
      Moderator

      Hi,

      The reference code for setting the exposure time is given below. Some parameters need to be modified for different resolutions. The register address is common.
      #define EXPOSURE_MS 10 //manual exposure time:0-99.928ms

      uint32_t tex = EXPOSURE_MS * 1000000;
      uint16_t AEC = tex / (1922*41.66);
      char exposure1 = AEC & 0x3;
      char exposure2 = (AEC >> 2)& 0xff;
      char exposure3 = (AEC >> 10)& 0x3f;

      void set_exposure(ArduCAM myCAM)
      {
      uint8_t temp;

      myCAM.wrSensorReg8_8(0xff, 0x01);
      myCAM.rdSensorReg8_8(0x13, &temp);
      temp &= ~(1 << 0); //Close automatic exposure
      temp &= ~(1 << 2); //Close AGC
      myCAM.wrSensorReg8_8(0x13, temp);

      myCAM.rdSensorReg8_8(0x04, &temp);
      temp = temp & 0XFC;
      myCAM.wrSensorReg8_8(0x04, temp | exposure1);

      myCAM.rdSensorReg8_8(0x10, &temp);
      temp = temp & 0;
      myCAM.wrSensorReg8_8(0x10, temp | exposure2);

      myCAM.rdSensorReg8_8(0x45, &temp);
      temp = temp & 0XE0;
      myCAM.wrSensorReg8_8(0x45, temp | exposure3);
      }

Viewing 1 reply thread
  • You must be logged in to reply to this topic.