Example code for time lapse using ov2640 mini 2MP plus

Published by katesfb on

Home Forums Arducam SPI Cameras Example code for time lapse using ov2640 mini 2MP plus

Viewing 7 reply threads
  • Author
    Posts
    • #23100
      katesfb
      Participant

      Hi,

      I am trying to get the arducam mini 2MP plus camera to capture images in time lapse mode. I  have an old arducam mini 5MP camera (Rev. A) that has some example time lapse code that was part of the old library and using this code as a starting point i was able to create a time lapse camera that uploads images to an FTP server (using MKR1400). I now want to do the same thing with the mini 2MP plus and i thought that just altering the code i had  (including making the relevant changes to the memorysaver.h file) would work but it didn’t. I tried the multi capture example code, which works,  but i found the original  time lapse code easier to understand and alter to my requirements.

       

      So is there any time lapse example code that would work with the arducam mini 2MP plus camera?

       

      Any help is much appreciated.

       

      Cheers.

    • #23115
      Arducam jyh
      Moderator

      Hi,

      All the examples on Arduino UNO are in this link. If there is no one you can use directly, you may need to modify our original examples according to your own needs.

      If you have any questions about the camera during the modification process, please contact us again. We will try our best to help you.

    • #23122
      katesfb
      Participant

      Hi,

      Thanks for the reply.

      Is there a low power mode option for the mini 2MP Plus?

      Is there an auto focus option for the mini 2MP plus?

      Any help is much appreciated.

      Cheers.

    • #23171
      Arducam jyh
      Moderator

      Hi,

      OV2640-mini-2MP plus supports two low-power modes. One is to control the camera’s power supply through CPLD, as you can see in this example.The other is to set the camera’s COM2 register so that the camera goes into standby mode, but with a Current around 900uA.Although the camera can be controlled with low power consumption, the CPLD is always running.

      Autofocus is not supported in the 2mp-plus.

    • #23470
      katesfb
      Participant

      Hi,

      Thanks for the reply.

       

      What is the power consumption when using the myCAM.set_bit(ARDUCHIP_GPIO,GPIO_PWDN_MASK); method?

       

      Is there an example using the ‘set the camera’s COM2 register’ method.

       

      Another option is to use a relay to turn off power to the camera module when not required. Is this OK?

       

      Any helps is much appreciated.

       

      Cheers.

    • #23489
      Arducam jyh
      Moderator

      Hi,

      Using myCAM. Set_bit (ARDUCHIP_GPIO GPIO_PWDN_MASK); entering low power mode, the 2mp-plus module consumes about 55.8mA of current.

      For COM2 you can use the following methods after the camera initialization is complete:

      uint8_t temp = 0;
      myCAM.wrSensorReg8_8(0xff, 0x01);
      myCAM.rdSensorReg8_8(0x09, &temp );
      temp |= 1 <<4;
      myCAM.wrSensorReg8_8(0x09, temp );

      The option that turn off power to the camera module when not required is OK. But you must reinitialize the camera module after power on every time.

    • #23714
      katesfb
      Participant

      Hi,

      And thanks for the reply.

      I tried to put the  arducam into standby mode by using the following code:

      uint8_t temp = 0;
      myCAM.wrSensorReg8_8(0xff, 0x01);
      myCAM.rdSensorReg8_8(0x09, &temp );
      temp |= 1 <<4;
      myCAM.wrSensorReg8_8(0x09, temp );

       

      However this did not reduce the power consumption which was measured at about 100mA.

       

      Also, once in low power mode what code is required to get it back into normal mode. Is there some example code using this method of putting the arducam into standby mode?

       

      When using a relay to power on and power off the arducam,  powering on the arducam via the results in the arducam getting stuck in “while(!mycam.get_bit(ARDUCHIP_TRIG, CAP_DONE_MASK));” bit of the image capture process. What could be causing this?

       

      Any help is much appreciated.

       

      Cheers.

       

    • #23718
      Arducam jyh
      Moderator

      Hi,

      Get into standby mode by Writing ESP32 register, as shown in the register list below.

      We do not have a separate example of using registers to go into standby mode.

      When using a relay to control the camera’s power supply, a series of operations such as resetting the CPLD, initializing the camera, and so on must be re-operated after repower.

Viewing 7 reply threads
  • You must be logged in to reply to this topic.