# Some exposure times are not accepted by OpenMV

**URL:** <https://forums.openmv.io/t/some-exposure-times-are-not-accepted-by-openmv/7495>\
**Category:** OpenMV Boards\
**Created:** [September 13, 2022, 9:31am UTC](https://forums.openmv.io/t/some-exposure-times-are-not-accepted-by-openmv/7495 "2022-09-13T09:31:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamedelahi](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/hamedelahi/32/1863_2.png) [@hamedelahi](https://forums.openmv.io/u/hamedelahi)\
**Post date:** [September 13, 2022, 9:31am UTC](https://forums.openmv.io/t/some-exposure-times-are-not-accepted-by-openmv/7495/1 "2022-09-13T09:31:57Z")

</div>

Hello,

I set the exposure time to these values:  
sensor.set\_auto\_exposure(False, exposure\_us = 101244 \* 1)  
sensor.set\_auto\_exposure(False, exposure\_us = 101244 \* 5)

They work without any problem, but when I set it to the following value, it does not work and goes back to 101244.

sensor.set\_auto\_exposure(False, exposure\_us = 101244 \* 10)

But this one works:  
sensor.set\_auto\_exposure(False, exposure\_us = 101244 \* 11)

Do you know, what the problem is?

I need to change the exposure time in the algorithm.

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [September 13, 2022, 1:21pm UTC](https://forums.openmv.io/t/some-exposure-times-are-not-accepted-by-openmv/7495/2 "2022-09-13T13:21:26Z")

</div>

Hi, which camera are you using?

Note that the exposure time setting is an abstraction. The camera’s have less granular control internally. So, if one number works and another does not this isn’t exactly unexpected. We try to do our best to abstract away the fact that you set the exposure time on most cameras via setting the number of lines to expose for which is based on the clock freq of the sensor.

---

<div class="post-metadata">

**Author:** ![hamedelahi](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/hamedelahi/32/1863_2.png) [@hamedelahi](https://forums.openmv.io/u/hamedelahi)\
**Post date:** [September 13, 2022, 5:04pm UTC](https://forums.openmv.io/t/some-exposure-times-are-not-accepted-by-openmv/7495/3 "2022-09-13T17:04:22Z")

</div>

Hi,

I tested it on an OpenMV Cam H7 Plus.

Thank you for your answer. So, I must find these values and do not use them when I set the exposure time, automatically. That’s difficult, but there isn’t another way, as you told.

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [September 13, 2022, 5:29pm UTC](https://forums.openmv.io/t/some-exposure-times-are-not-accepted-by-openmv/7495/4 "2022-09-13T17:29:03Z")

</div>

Here’s the code for that method: [openmv/ov5640.c at master · openmv/openmv · GitHub](https://github.com/openmv/openmv/blob/master/src/omv/sensors/ov5640.c#L1125)

---

<div class="post-metadata">

**Author:** ![hamedelahi](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/hamedelahi/32/1863_2.png) [@hamedelahi](https://forums.openmv.io/u/hamedelahi)\
**Post date:** [September 13, 2022, 5:52pm UTC](https://forums.openmv.io/t/some-exposure-times-are-not-accepted-by-openmv/7495/5 "2022-09-13T17:52:36Z")

</div>

Thank you.

I saw that, but I think, I cannot change it to have a better result, as I understood (because of hardware limitations etc.). But, thanks.
