QHY600 Professional version has 5pin/6pin GPIO socket. Which can output the Vsync , Hsync signal for meassurement. It can connect with the QHY-GPSBOX to do directly time test and encode the meassured information into the image.
This document will introcude how to get the precise time meassurement of it.
Due to the rolling shutter of the QHY600 cmos sensor. The camera can not output a signal to indicate the global exposure starting and global expsoure ending. The signal for meassurement is Vsync. Vsync is apporx the time that one frame starting to readout. So it is very close to the exposure end time of row 0. The pulse width of Vsync is about 0.4us.
Rolling Shutter Timing
For rolling shutter. It is row based exposure. Normally speaking the end of the exposure is happend at the time when one row begin to readout. And the start of the exposure is controlled by register and the unit is row period.
exposure time = n * row period
If we get to know the end of exposure time of row 0. We get to know the start exposure time is
exposure start time row 0 = exposure end time row 0 – exposure time 0
And we can get to know other rows start exposure and end exposure :
exposure start time row 1 = exposure start time row 0 + row period
exposure start time row 2 = exposure start time row 0 + 2 * row period
……
exposure end time row 1 = exposure end time row 0 + row period
exposure end time row 2 = exposure end time row 0 + 2 * row period
……
fig.1 The timing graph when exposure time is one row period (short exposure mode)
fig.2 The timing graph when exposure time is two row period (short exposure mode)
fig.3 The timing graph in long exposure mode. long exposure is done by increase the hsync number between two vsync. So the exposure time = frame period .
For precise time meassurement. Once we get the time of end of exposure time of row 0. We can get all other row’s end exposure time and start exposure time.
If the object is a point source. We can get to know its position (X,Y) in the image. Then we can use the exposure start and end time of this row for the object’s exposure start/end time.
Get to know the Vsync time to the first row end time
Because the cmos sensor does not output certain row’s end exposure time , like the row 0’s end exposure time. And also , since we need to use the (X,Y)position to calculate the object. We need to know the relationship that the row on the image to the exposure time . For example, the row 0 on image may not the row 0 in the fig.1,2,3. Because the sensor has the optic black rows.
In order to meassure the vsync signal to the end of exposure time of row 0 in the image. We need to use the LED calibration method to do it.
We use the LED method to test the timing and found the the camera is exposured with two rows together. And for default resolution when capture with SharpCAP, USB_TRAFFIC=0. Line1 and Line2 ends of exposure in the HSYNC=46. And the position to the falling edge of hync is 21.52us. So we can get to know:
T (end exposure, line1&2) = GPS position + 46 * LinePeriod + 21.52us.
When in ROI mode, it is best to redo the LED calibration to get accurate value. QHYCCD can supply the LED calibration tools for calibrate it.
Important: For 2CMS mode , The exposure is with one rows, not two rows togehter. And the “46” and the “21.52us” will not the same.
FAQ
(1)What parameter will effect the LinePeriod and how to get to know the LinePeriod.
USB_TRAFFIC, 8bit/16bit setting will change it. You can use osciliscope to meassure the HSYNC signal to get to know the LinePeriod. In QHYCCD SDK there is a API also can return it. But it is best to use the osciliscope to double check it.
uint32_t STDCALL GetQHYCCDPreciseExposureInfo(qhyccd_handle *h,uint32_t *PixelPeriod_ps,uint32_t *LinePeriod_ns,uint32_t *FramePeriod_us,uint32_t *ClocksPerLine, uint32_t *LinesPerFrame,uint32_t *ActualExposureTime,uint8_t *isLongExposureMode
(2)What parameter will effect the “46” in above text?
The ROI , LiveFrame/SingleFrame, the 2CMS/non 2CMS will effect it. It is best to use LED calibrate method to test it to confirm the detail timing.