QHY 174 GPS Calibration LED issue // USB Traffic weirdness

procyon12
Posts: 253
Joined: Tue Jan 14, 2020 11:32 am

Re: QHY 174 GPS Calibration LED issue // USB Traffic weirdness

#101

Post by procyon12 »

Hello,

... this is the 100th reply in the thread :roll:

Jean-Francois, I hope to be able to do some tests in the near future.

Cheers, Christian
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: QHY 174 GPS Calibration LED issue // USB Traffic weirdness

#102

Post by admin »

Hi folks,

just reporting in that I have now received the replacement USB board for my camera and after a little surgery I now have a camera that works in both USB2 and USB3 again. It also doesn't get nearly as hot, which may have been related to the failing USB board...

I've done some initial calibration tests and it does look like we were measuring the end calibration position incorrectly when we built our database of calibration values and derived the calibration formula from it. Essentially, I think our values were one whole frame too large (ie too big by 75 times the exposure in microseconds - give or take).

My current measurements suggest that the end position (USB3) is approx 2850 + 320 * USB Traffic for 8 bit and 4190 + 320 * USB Traffic for 16 bit. If you try calibration you should find falling edges when adjusting the end pos near these values. You will also find a falling edge near the current SharpCap auto calibration selection value.

My suspicion is that we were naturally expecting END POS > START POS, so we went looking for a falling edge that matched that criteria and found one. Unfortunately the correct calibration has END POS < START POS in most (all?) cases.

I'm not sure what effect this has on the timestamping of frames - SharpCap reports the exposure to be roughly the right length in both cases, which means that tha start/end frame times must differ by the same right amount. If anyone has a reference clock they can image with the camera, perhaps they could test the two difference calibration values to see if the higher value that SharpCap has been using does throw off the timings. My apologies to anyone whose data has been corrupted due to this :(

I'm planning on adjusting the SharpCap autocalibration once I have confirmation from the community that they agree with my conclusions. I've also asked QHY if there is a way SharpCap can work out if the camera is on USB2 or 3 - if I had that info I could make adjustments to the calibration calcs to suit either connection mode.

cheers,

Robin
procyon12
Posts: 253
Joined: Tue Jan 14, 2020 11:32 am

Re: QHY 174 GPS Calibration LED issue // USB Traffic weirdness

#103

Post by procyon12 »

Hi,

Congratulations Robin on a camera that is now working again.

I made an initial test only too.
W7-64 i7 64GB, SC pro 3.3.7030 32bit, USB3, QHY174GPS with FW-upgrade, running and stabilised GPS and QHY driver from 2020 Feb 03.

I attach a picture with all the information.

a) I called one of my predefined and tested set-ups, settings see pic, the autocalibration worked and I got a lock immediately.
SP 9 661, EP 1 506 827
The chosen exp. time was 20 ms, the GPS status window showed 19.9622 ms - a so far usual difference.
I add a result for 80 ms, all other settings unchanged.

b) Then, with calibration on, I reduced the EP from the above value (1 506 827). I ended up (LED to full light with histo) at EP 5 127 !, maybe on the way there were additional LED off-on events ("third transition" ...).
With your formula, Robin, I would get: 4190 + 320 * USB Traffic for 16 bit = 5 150, fair near to my value 5 127.
And, for exposure, the GPS status window showed now 20.0097 ms. The situation was stable with GPS lock and other plausible values.

c) Now I set the EP to 0: the GPS status window showed 20.0052 ms, and all was running o.k.

d) In a last step I tried to bring the exp. time shown in the GPS status window to exactly the chosen one, 20 ms. With EP 0, this was possible by changing the SP from the default autocal. value 9 661 to 10 061: the exp. time showed was now 20.0000 ms, again very stable and reproducible.
EP 0, SP changed from autocal. 9661 to 9611: 80.0000 ms

Did I reproduce the QHY postulated micro-second precision ?

I think we have to do some work here again.

Cheers, Christian

... there were no problems with SC 3.3 ...
Attachments
3.3-w7-20ms_2.png
3.3-w7-20ms_2.png (184.44 KiB) Viewed 4590 times
Last edited by procyon12 on Tue Dec 08, 2020 6:07 pm, edited 4 times in total.
procyon12
Posts: 253
Joined: Tue Jan 14, 2020 11:32 am

Re: QHY 174 GPS Calibration LED issue // USB Traffic weirdness

#104

Post by procyon12 »

... I add the results from the script (for USB3, see viewtopic.php?p=18033#p18033) by Jean-Francois, all settings like in the above post:

SP 14 297, EP 1 510 036, exp. shown in GPS status window 19.9432 ms; seems to run o.k.

Christian
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: QHY 174 GPS Calibration LED issue // USB Traffic weirdness

#105

Post by admin »

Hi folks,

based on further experimentation and some helpful info from Dr Qiu, I am now thinking these are the correct formulae for USB3 values:

Input data :

exposure duration = exposure (ms) * 75000 (exposure length in 75Mhz clock ticks)
height = height of ROI in pixels
USB = USB traffic control value

8 bit :

end = 2850 + 320 * USB
long exposure start = 6280 + 1120 * USB
vsync time = ((80*height)+3890)*USB + 448 * height + 20710
short exposure start = vsync + end - exposure duration
start = max(long exposure start, short exposure start)

16 bit :

end = 4190 + 320 * USB
long exposure start = 10950 + 1120 * USB
vsync time = ((80*height)+3890)*USB + 778 * height + 40320
short exposure start = vsync + end - exposure duration
start = max(long exposure start, short exposure start)

Any feedback on whether these calculations work cleanly (to within a few 100 for long exposures, within a few 1000 for short ones) would be helpful.

thanks,

Robin
Jean-Francois
Posts: 360
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: QHY 174 GPS Calibration LED issue // USB Traffic weirdness

#106

Post by Jean-Francois »

Hello Robin and Christian,

"Achh NÖ!"
Really ? ... all the nice (long) calculations I do are now for the "cats" (also German translation :-))

Means that the simple idea that the EndPos is "after" the StartPos is wrong (EndPos > StartPos).

OK, in the past, when I test the first time the camera with the QHY test program, then I read the QHY174M-GPS On-Line Technology Document from the website ... here the table:
Table_QHY_document.png
Table_QHY_document.png (50.45 KiB) Viewed 4569 times
Note some errors : the column name Start <-> End, the EndPos is dependent of the ROI height but the values in the table seems to be for 1200 pixel not 1080 and the value for 5 ms is the same for 8 or 16 bit (the 16 bit value is wrong).

I test now with these values ... yes, it works too.
Now what is correct ? EndPos ~= StartPos + ms*75000 or EndPos constant near zero and < StartPos.

The "new" EndPos seems to be not dependent from the exposure time ... also constant for a (USB Traffic, Height, bit and USB connection ?) configuration.

OK, if this is the correct way to calibrate the camera (I think that the guy programming the camera knows that), then I will change my scripts (menu and list).

Regards,
Jean-Francois
Jean-Francois
Posts: 360
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: QHY 174 GPS Calibration LED issue // USB Traffic weirdness

#107

Post by Jean-Francois »

Hello Christian,

Concerning your post from today 15:54 ...

When I set the same settings (480x300, MONO16, USB traffic = 3, 20 ms), then I can set the "Exp. (us)" value like you ~ 19999.9 with the StartPos = 10061 and EndPos = 0 ...

But the start and end values are to be set with the LED illumination.
The LED is not visible with StartPos = 10061. The LED starts to be visible around 14280.
The LED is not visible with EndPos = 0. The LED starts to be visible around 5150 (new) or 1510040 (old, but now wrong).

Also with StartPos = 14300 and EndPos = 5150, I have "Exp. (us)" = 20012.0 ... 12 microsecond deviation to the wanted exposure time.
Note: This is only the exposure time ... not the timing precision relative to the GPS time.

Regards,
Jean-Francois
procyon12
Posts: 253
Joined: Tue Jan 14, 2020 11:32 am

Re: QHY 174 GPS Calibration LED issue // USB Traffic weirdness

#108

Post by procyon12 »

... yes, happy testing again :o

@Jean-Francois
You may be right. Maybe we can conclude something from the FITS headers - but the only safe way is testing with a SEXTA/EXTA like in my IOTA presentations.

@Robin
I attach an Excel file with some tests done with the new formulas. It seems to work (so far I tested with a few parameters only).

Cheers, Christian
Attachments
newCal_01.xlsx
(19.52 KiB) Downloaded 96 times
Filipe Dias
Posts: 10
Joined: Sun Nov 15, 2020 3:11 pm
Location: Portugal

Re: QHY 174 GPS Calibration LED issue // USB Traffic weirdness

#109

Post by Filipe Dias »

admin wrote: Mon Dec 07, 2020 11:10 pm I've also asked QHY if there is a way SharpCap can work out if the camera is on USB2 or 3 - if I had that info I could make adjustments to the calibration calcs to suit either connection mode.
I think I bumped into a way!... because I have a faulty USB cable !!
Try checking the shortest possible exposure you can do! (using a continuous light source like a LED lit by DC current, or in daytime, to see when the brightness of the image is the same regardless of exposure time differences) And/or measure the frame rate you can download frames of known size..
So far, my camera connected at USB3 speeds while able to reach 0.01 ms exposure times. when connected at USB2 speeds it could only go about 0.1 ms... Unexpected, uh?
My new USB3 cable arrived this Monday only, so now I can go back to testing all this better..

Cheers
procyon12
Posts: 253
Joined: Tue Jan 14, 2020 11:32 am

Re: QHY 174 GPS Calibration LED issue // USB Traffic weirdness

#110

Post by procyon12 »

Hello Filipe,
So far, my camera connected at USB3 speeds while able to reach 0.01 ms exposure times
Really reached 0.01 ms or are these theoretical values only? If really measured what were the settings and machine, no dropped frames (PyMovie/PyOTE) ?

Christian
Post Reply