Lactobacillus
Posts: 64
Joined: Thu Apr 19, 2012 7:57 pm

Longer exposure time with camera V1

Sun Oct 20, 2019 10:20 am

I tried to extend the maximum exposure time on camera V1. I have good and bad news.

The good news:
Lowering the register value 0x3036 (SC_CMMN_PLL_MULTIPLIER) extends the exposure time.
Increasing the upper nibble of 0x3035 (SC_CMMN_PLL_CTRL1) extend the exposure time by dividing all clocks.
Increasing the register value 0x380C and 0x380D (TIMING_HTS) extends the exposure time (max 0x1FFF).
This way I could take shots of about 25 s exposure with raspiraw.
0x3036 = 0x30
0x3035 = 0x81
0x380D = 0xFF
Also: line_time_ns in ov5647_modes.h set to 889026

Tha bad news:
The reproduceablilty of my experiments was really bad. I tried different or the same register settings on different days and got good and bad results with the same settings. Sometimes no images were captured, sometimes they were broken (missing lines). It seems that the timing for the start of a line is broken. Does anyone has an idea how to fix this?
Raspberry Pi 1B; Rev2; 512mb RAM (Samsung)
Raspberry Pi Zero, V1.3 + Esp8266

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7416
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Longer exposure time with camera V1

Sun Oct 20, 2019 12:52 pm

Messing with pll settings is not something that can sensibly be merged into the firmware. PLL changes typically take a short period of time to adapt, so swapping settings between modes is likely to mean bad behaviour on mode switches.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Lactobacillus
Posts: 64
Joined: Thu Apr 19, 2012 7:57 pm

Re: Longer exposure time with camera V1

Sun Oct 20, 2019 6:30 pm

Attached you can find an exemplary image.
6by9 wrote:
Sun Oct 20, 2019 12:52 pm
Messing with pll settings is not something that can sensibly be merged into the firmware.
Is the responsible part of the firmware closed?
6by9 wrote:
Sun Oct 20, 2019 12:52 pm
PLL changes typically take a short period of time to adapt, so swapping settings between modes is likely to mean bad behaviour on mode switches.
I took about 5 images with raspiraw waited some time and took more with a new instance but the same settings. So you expect better results when i take 50 images?
Attachments
example.jpg
example.jpg (51.72 KiB) Viewed 995 times
Raspberry Pi 1B; Rev2; 512mb RAM (Samsung)
Raspberry Pi Zero, V1.3 + Esp8266

Lactobacillus
Posts: 64
Joined: Thu Apr 19, 2012 7:57 pm

Re: Longer exposure time with camera V1

Sat Nov 02, 2019 9:32 pm

I tried to take more photos in a row. No improvement.

Is there anything I can do to optimize the timings of the firmware?
Raspberry Pi 1B; Rev2; 512mb RAM (Samsung)
Raspberry Pi Zero, V1.3 + Esp8266

Lactobacillus
Posts: 64
Joined: Thu Apr 19, 2012 7:57 pm

Re: Longer exposure time with camera V1

Fri Nov 08, 2019 8:55 pm

I looked around a bit in the code of raspiraw and the forums.
MMAL_PARAMETER_CAMERA_RX_TIMING looks promising.

Could the arrays in this line and the following line be modified to fix my problem?
What do the different elments of the arrays do?
Raspberry Pi 1B; Rev2; 512mb RAM (Samsung)
Raspberry Pi Zero, V1.3 + Esp8266

Lactobacillus
Posts: 64
Joined: Thu Apr 19, 2012 7:57 pm

Re: Longer exposure time with camera V1

Thu Nov 14, 2019 9:47 pm

I would be really thankful for help. Most of the people here rapid videos or photos of small things. I try to do something different:
Long exposures of big things (stars/planets). This can even evolve to something what can relatively easy been done in class to teach kids more about space.

Maybe someone with knowledge about the camera driver (@6by9; @HermannSW) can give at least a hint where I have to look to fix the problem.
Raspberry Pi 1B; Rev2; 512mb RAM (Samsung)
Raspberry Pi Zero, V1.3 + Esp8266

gordon77
Posts: 4221
Joined: Sun Aug 05, 2012 3:12 pm

Re: Longer exposure time with camera V1

Thu Nov 14, 2019 10:06 pm

You don't need really long exposures for planets, but you need a larger scope.

https://www.raspberrypi.org/forums/view ... 25#p537459

https://www.raspberrypi.org/forums/view ... 00#p518110

Return to “Camera board”