×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

QHY Driver: Testing required

  • Posts: 61
  • Thank you received: 2
Hello,
some time ago, I noticed that the temperature regulation for cooled QHY cameras is broken. It starts cooling, until the temperature is reached, and then stops measuring and regulating the temperature for the rest of the night.
Now I have build a patch, which does fix the issue, which works fine with my QHY8L camera. Before I submit a pull request, some more testing is needed. I think, following should be tested:
1. Does the change have any effect on non cooled why cameras?
2. Does the change have any effect on cooled, non regulated why cameras?
3. Does this issues exist on other cooled regulated QHY cameras, and if so, does the patch fix this too?

If you own a QHY camera and are willing to test, your help would be appreciated.


I can provide the compiled binary for 32 Bit ARM compiled on Astroberry 2.0 (Debian Buster...). It should run on raspberry 3 and 4 32 Bit, but I am not sure if it works on Ubuntu based distributions. But I could build one on a Raspberry Pi 3 running StellarMate if required.
For other architectures, I do not yet have a build environment, but at least amd64 and maybe i386 could be arranged.


For those who compile their INDI Library themselves here is the patch:

diff --git a/indi-qhy/qhy_ccd.cpp b/indi-qhy/qhy_ccd.cpp

index eeaef0dd..84fa1149 100644
--- a/indi-qhy/qhy_ccd.cpp
+++ b/indi-qhy/qhy_ccd.cpp
@@ -27,7 +27,7 @@
#include <algorithm>
#include <math.h>

-#define TEMP_THRESHOLD 0.2 /* Differential temperature threshold (C)*/
+#define TEMP_THRESHOLD 0.05 /* Differential temperature threshold (C)*/
#define MAX_DEVICES 4 /* Max device cameraCount */

//NB Disable for real driver
@@ -1778,6 +1778,12 @@ void QHYCCD::updateTemperature()
{
SetQHYCCDParam(m_CameraHandle, CONTROL_MANULPWM, m_PWMRequest);
}
+ // Temperature Readout does not work, if we do not set "something"
+ else if (TemperatureNP.s == IPS_OK)
+ {
+ SetQHYCCDParam(m_CameraHandle, CONTROL_MANULPWM, CoolerN[0].value * 255.0 /100 );
+ }
+

ccdtemp = GetQHYCCDParam(m_CameraHandle, CONTROL_CURTEMP);
coolpower = GetQHYCCDParam(m_CameraHandle, CONTROL_CURPWM);
@@ -1803,9 +1809,21 @@ void QHYCCD::updateTemperature()

if (TemperatureNP.s == IPS_BUSY && fabs(TemperatureN[0].value - m_TemperatureRequest) <= TEMP_THRESHOLD)
{
- TemperatureN[0].value = m_TemperatureRequest;
+ TemperatureN[0].value = ccdtemp;
TemperatureNP.s = IPS_OK;
}
+ // Restart regulation if needed.
+ if (TemperatureNP.s == IPS_OK && fabs(TemperatureN[0].value - m_TemperatureRequest) > TEMP_THRESHOLD)
+ {
+ TemperatureN[0].value = ccdtemp;
+ TemperatureNP.s = IPS_BUSY;
+ }
+
+
+
+
+
+

IDSetNumber(&TemperatureNP, nullptr);
IDSetNumber(&CoolerNP, nullptr);


Regards

Dirk
4 years 4 months ago #46996

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 2

Replied by Dirk on topic QHY Driver: Testing required

Hello,
is there nobody else using a cooled QHY camera?

How do you handle the problem with the broken temperature regulation?


Regards

Dirk
4 years 3 months ago #47395

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 1

Hi Dirk:

I am having the same or a similar problem. I'm running on a StllarMate using the latest version 1.46. Connecting using Ekos from my Surface or my MacBook. I've been experimenting all day today. If I use auto temperature regulation I only see the temperature drop to around 12.9°C. Nothing I do will change this. If I remove power from the camera and restart Kstars fresh I can get the manual power setting to work once. As an example if I set power to 100% it will cool down to about -25°C. If I hit auto it goes back to 12.9℃ and can no longer be changed even in manual.

I would love to help but I'm not sure about installing a patch on the StellarMate.

Regards,
Mike
4 years 3 months ago #47528

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 2

Replied by Dirk on topic QHY Driver: Testing required

Hello Mike,
What you describe, sounds really weird.
The change is already merged to the source code, so if you update your StellarMate to the latest beta version, it should install itself.
But IMa not sure if that will help. What type of camera are you using?
Can you supply logfiles?


Regards

Dirk
4 years 3 months ago #47536

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 1
I’m using a miniCAM5F. It worked with older versions of the driver. I’m using the latest stable release on the StellarMate so I may not have the update. Let me check that first and then I will work on getting the logs.

Regards,
Mike
4 years 3 months ago #47542

Please Log in or Create an account to join the conversation.

The stable versions are getting updated so no need to switch to beta. Just update in a few hours.
4 years 3 months ago #47557

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 1
Thanks, updated to latest version this morning. Log file attached if anyone would like to take a look. Note that around #940 I shut off the cooler, set it to 70%. You can see it cool just fine. I then put it in Auto cool for 0.00. Strangely when it auto it always sets the power to 1.8% (3 in actual value).

Regards,
Mike
4 years 3 months ago #47570
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 2

Replied by Dirk on topic QHY Driver: Testing required

Hello Mike,

at
[2020-01-01T22:29:01.193 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|QHYCCD.CPP|SetQHYCCDParam|call AutoTempControl|COOLER value = -5.000000 "
[2020-01-01T22:29:01.193 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolTemp|222222222222currentPWM 126.000000 "
[2020-01-01T22:29:01.194 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolTemp|333333333333333currentPWM 126.000000 "
[2020-01-01T22:29:01.194 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolPWM|1111111111111111currentPWM 126.000000 "
[2020-01-01T22:29:01.472 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|QHYCAM.CPP|iTXD_Ex|EndPoint 1 Length 3 "
[2020-01-01T22:29:01.473 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|QHYCAM.CPP|iTXD_Ex|libusb_bulk_transfer ep 1 length 3 trasnfered length 3 "
[2020-01-01T22:29:01.474 EST INFO ][ org.kde.kstars.ekos.capture] - "Cooler is off"
[2020-01-01T22:29:01.486 EST INFO ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[INFO] Switching to manual cooler control. "
[2020-01-01T22:29:01.491 EST INFO ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[INFO] Camera is warming up. "
[2020-01-01T22:29:02.194 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolTemp|222222222222currentPWM 126.000000 "
[2020-01-01T22:29:02.196 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolTemp|333333333333333currentPWM 126.000000 "
[2020-01-01T22:29:02.197 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolPWM|1111111111111111currentPWM 0.000000 "
[2020-01-01T22:29:02.197 EST DEBG ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[DEBUG] CCD T.: 9 (C) Power: 0 (0.00%)


You switched the cooler off, which worked o.k. (Power: 0 (0.00%) )

The you switched to 70% which worked as well:

[2020-01-01T22:29:07.199 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolTemp|222222222222currentPWM 126.000000 "
[2020-01-01T22:29:07.200 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolTemp|333333333333333currentPWM 126.000000 "
[2020-01-01T22:29:07.201 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolPWM|1111111111111111currentPWM 0.000000 "
[2020-01-01T22:29:07.203 EST DEBG ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[DEBUG] CCD T.: 10 (C) Power: 0 (0.00%) "
[2020-01-01T22:29:07.629 EST INFO ][ org.kde.kstars.ekos.capture] - "Cooler is on"
[2020-01-01T22:29:07.642 EST INFO ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[INFO] Setting cooler power manually to 70.00% "
[2020-01-01T22:29:08.200 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|QHYCAM.CPP|iTXD_Ex|EndPoint 1 Length 3 "
[2020-01-01T22:29:08.201 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|QHYCAM.CPP|iTXD_Ex|libusb_bulk_transfer ep 1 length 3 trasnfered length 3 "
[2020-01-01T22:29:08.204 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolTemp|222222222222currentPWM 126.000000 "
[2020-01-01T22:29:08.204 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolTemp|333333333333333currentPWM 126.000000 "
[2020-01-01T22:29:08.205 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolPWM|1111111111111111currentPWM 178.500000 "
[2020-01-01T22:29:08.205 EST DEBG ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[DEBUG] CCD T.: 11 (C) Power: 178 (70.00%) "


Then you requested a temperature of -5C:
[2020-01-01T22:29:28.224 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolTemp|333333333333333currentPWM 126.000000 "
[2020-01-01T22:29:28.225 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolPWM|1111111111111111currentPWM 178.500000 "
[2020-01-01T22:29:28.226 EST DEBG ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[DEBUG] CCD T.: -10 (C) Power: 178 (70.00%) "
[2020-01-01T22:29:28.344 EST DEBG ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[DEBUG] Requested temperature is -5, current temperature is -10 "
[2020-01-01T22:29:28.345 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|QHYCCD.CPP|SetQHYCCDParam|call AutoTempControl|COOLER value = -5.000000 "
[2020-01-01T22:29:28.346 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|QHYCAM.CPP|iTXD_Ex|EndPoint 1 Length 3 "
[2020-01-01T22:29:28.347 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|QHYCAM.CPP|iTXD_Ex|libusb_bulk_transfer ep 1 length 3 trasnfered length 3 "
[2020-01-01T22:29:28.348 EST INFO ][ org.kde.kstars.ekos.capture] - "Cooler is off"
[2020-01-01T22:29:28.356 EST INFO ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[INFO] Switching to automatic cooler control. "
[2020-01-01T22:29:29.220 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|QHYCCD.CPP|SetQHYCCDParam|call AutoTempControl|COOLER value = -5.000000 "
[2020-01-01T22:29:29.221 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolTemp|222222222222currentPWM 126.000000 "
[2020-01-01T22:29:29.224 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolTemp|333333333333333currentPWM 126.000000 "
[2020-01-01T22:29:29.225 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|MINICAM5BASE.CPP|GetChipCoolPWM|1111111111111111currentPWM 126.000000 "
[2020-01-01T22:29:29.225 EST DEBG ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[DEBUG] CCD T.: -11 (C) Power: 3 (1.18%) "
[2020-01-01T22:29:29.226 EST INFO ][ org.kde.kstars.ekos.capture] - "Cooler is off"

This went completely wrong. It looks like this: COOLER value = -5.000000 does not arrive at the cam... .

But what surprise me is, it almost looks like there are 2 cameras:
QHY CCD QHY5LII-C-6137e
and
QHY CCD MINICAM5F-M-70d

Could there be more than one QHY, Orion etc. product?


Regards

Dirk
4 years 3 months ago #47581

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 2

Replied by Dirk on topic QHY Driver: Testing required

Hello Mike,
to my two camera theory:
[2020-01-01T22:40:40.698 EST DEBG ][ org.kde.kstars.ekos] - Disconnecting iOptron CEM25
[2020-01-01T22:40:40.699 EST DEBG ][ org.kde.kstars.ekos] - Disconnecting QHY CCD MINICAM5F-M-70d
[2020-01-01T22:40:40.700 EST DEBG ][ org.kde.kstars.ekos] - Disconnecting QHY CCD QHY5LII-C-6137e
[2020-01-01T22:40:40.700 EST INFO ][ org.kde.kstars.ekos] - "Disconnecting INDI devices..."
[2020-01-01T22:40:40.745 EST DEBG ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[DEBUG] Closing QHY CCD MINICAM5F-M-70d... "
[2020-01-01T22:40:40.758 EST INFO ][ org.kde.kstars.indi] - iOptron CEM25 : "[INFO] iOptron CEM25 is offline. "
[2020-01-01T22:40:40.762 EST DEBG ][ org.kde.kstars.ekos] - iOptron CEM25 is disconnected.
[2020-01-01T22:40:40.762 EST INFO ][ org.kde.kstars.ekos] - "iOptron CEM25 is disconnected."
...
[2020-01-01T22:40:42.247 EST DEBG ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[DEBUG] QHYCCD|QHYCCD.CPP|CloseQHYCCD|END return value=0 "
...
[2020-01-01T22:40:42.262 EST INFO ][ org.kde.kstars.indi] - QHY CCD MINICAM5F-M-70d : "[INFO] Camera is offline. "
[2020-01-01T22:40:42.263 EST DEBG ][ org.kde.kstars.ekos] - QHY CCD MINICAM5F-M-70d is disconnected.
[2020-01-01T22:40:42.263 EST INFO ][ org.kde.kstars.ekos] - "QHY CCD MINICAM5F-M-70d is disconnected."
...
[2020-01-01T22:40:43.762 EST INFO ][ org.kde.kstars.indi] - QHY CCD QHY5LII-C-6137e : "[INFO] Camera is offline. "
[2020-01-01T22:40:43.763 EST DEBG ][ org.kde.kstars.ekos] - QHY CCD QHY5LII-C-6137e is disconnected.
[2020-01-01T22:40:43.764 EST INFO ][ org.kde.kstars.ekos] - "QHY CCD QHY5LII-C-6137e is disconnected."

Strange ...
4 years 3 months ago #47583

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 1
The QHY5L-ll-C is the guide camera.
4 years 3 months ago #47585

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 2

Replied by Dirk on topic QHY Driver: Testing required

Hello Mike,
in the profile editor, have you chosen the QHY CCD Driver two times, once for CCD and once for Guider?
If so, leave the guider empty and try again. INDI should start both cameras from the same driver, I think....

If that does not help, try with only the minicam first and see if it works.


Regards

Dirk
4 years 3 months ago #47586

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 1
Dirk:

First, thank for the help. I tried it with only the QHY CCD Drive picked under CCD. No change. I then disconnected my guide camera and tried it again. I then powered everything off and restarted with only the miniCAM. No go, same error each time. Still setting the power to 1.18% when you select AUTO. Any other ideas? Do I need to update the firmware in my camera? Good thing its clouds and ran for the next 10 days, time to figure this out. Note I was working fine under the previous version of StellarMate. Any chance updating to a RP4 would fix the problems? I'm running a RP3+ right now.

Regards,
Mike

Screen shot of INDI control panel attached.
Last edit: 4 years 3 months ago by Michael Ivancic. Reason: Trying to get the screen shot right...
4 years 3 months ago #47615
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 1.402 seconds