Can we have settings in equipment profile to limit TEC power?

Hello, I have feature request if you dont mind :slight_smile:

Its advised to never run cooler at 100% power to prevent cooler damage.
Can you please add setting to allow user to control max possible TEC power which SGP will request from camera driver?

I’m using QHY camera (QHY695A) and their driver do not allow me to limit max TEC power. But they specify in manual that you should never run it at 100 to prevent its damaging.

right now there is no way to unconditionally prevent cooler to run at 100%

my problem that if I want to start cooling process manually, I dont want to use option cool down when camera connects or cool down when sequence starts, I want to turn cooler on in Camera cooler docking window. When I do this SGP immediately starts cooling at 100% power, so I have to be very quick to abort cooling and click Cool button instead. but for several seconds TEC power is 100% and temperature rapidly decreasing by 10-15 degrees in merely 1-2 seconds.

once when I turned cooler on, my remote connection to computer running telescope dropped, so cooler was at 100% for like 10-15 seconds until I reconnected. it was really scary, I would hate if something like this will eventually damage my camera.

so please consider adding such option in camera settings in equipment profile, if its ofcourse possible to do

thanks!

Seems if you can’t run it that high then the MFG should limit it. SGP doesn’t actually have the ability to set the power, we can only report on what the camera says it is. We can only control the temperature. You should ask QHY to better handle this in their cameras if this is truly an issue they have.

Thank you,
Jared

1 Like

Hi Jared,

I see, fair enough. I already contacted QHY about this, but they does not seems to be too responsive.

You probably still can have some setting which will monitor reported power and if it is above defined max TEC power it will ask driver for less extreme temperature so driver will react by lowering TEC power. Not sure if it is easy to implement, but I think you probably can reuse some of your cool down logic.

it probably can be even simpler than that. what if you will have setting called something like “always perform cool down procedure when cooler is set to on”? That will solve my issue completely.

right now what I have to do is the following

  1. turn on cooler
  2. click abort as quick as possible
  3. click cool down.

once when I did step #2 above, my remote connection to “astrocomputer” dropped, and TEC worked at 100% for at least 15 seconds while I panically restored my remote connection.

so if turning cooler on will always start cool down procedure the issue will be as good as solved. and that can be controlled by new camera setting in equipment profile. and hopefully can be very easy to implement. what do you think?

Thanks,
Alex

Alex,
I understand your request…unfortunately it’s a hardware specific detail and that is 100% something QHY should do. We can’t be expected to work around something that is highly specific to their product. It adds complexity and un-needed code to SGP and isn’t something we’re interested in adding or supporting. I know this doesn’t put you in a great place…but it’s QHY’s issue to fix and it we put together a bandaide fix then they have no reason to make their drivers handle the issue and the same cycle of apps fixing hardware issues will just repeat. Sorry to take a hard line here.

Thank you,
Jared

2 Likes

Ok, no problem. Makes total sense. just need to find some workaround and not break my camera while QHY will be fixing this :smile:

Why not just select a higher temperature?

I have two profiles, one for the winter, another for the summer. -12c and -10c respectively.

1 Like

Hi Jared,

Maybe you can help me to diagnose the issue. My camera keeps hanging in SGP, it can work with no issues for long time, or can hang every hour or so. I noticed that usually it happens during cool down process. When that happens I have to turn on / off camera (and that is scary because of possible thermal shock)

Today I checked SGP logs and I found that when this happened there are lot of error entries in SGP logs looking like this

[05/05/20 02:16:15.735][DEBUG][TEC Thread][NONE] ASCOM Camera: Error in GetCoolerTemp. : value of CCDTemperature is invalid. (System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.Runtime.InteropServices.COMException: value of CCDTemperature is invalid.
— End of inner exception stack trace —
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
at ASCOM.DriverAccess.MemberFactory.CallMember(Int32 memberCode, String memberName, Type[] parameterTypes, Object[] parms) in C:\ASCOM Build\Export\ASCOM.DriverAccess\MemberFactory.cs:line 243)
at ASCOM.DriverAccess.MemberFactory.CallMember(Int32 memberCode, String memberName, Type[] parameterTypes, Object[] parms) in C:\ASCOM Build\Export\ASCOM.DriverAccess\MemberFactory.cs:line 284
at ASCOM.DriverAccess.Camera.get_CCDTemperature() in C:\ASCOM Build\Export\ASCOM.DriverAccess\Camera.cs:line 126
at so.gr(Boolean A_0)

do you know if this is error raised by ASCOM driver itself or by SGP code when it received some unexpected result from get_CCDTemperature() method?

if this coming from SGP is there way to understand what invalid value were returned from driver? Maybe you have some verbose logging mode?

Thanks

UPDATE. Here you can find full SGP log and QHY ASCOM drive log - SugarSync
Based on log study I see that cool down process was completed successfully , and then few minutes later these error entries started to happen all the time.

Jared, you can disregard my request above. I decomplied QHY’s ASCOM driver and did some debugging. This error is coming from ASCOM driver. It is raised by driver when current temperature reported by QHYCCD SDK is outside of range [-280C, 100C]. Its probaly some software or hardware glitch. Dont know yet what exact temperature my camera reports when this hanging happens, but I complied my own version of QHY ASCOM driver with additional logging, so I will find out that when the problem with hanging repeats next time.

Also I diagnosed why when I turn on Cooler in SGP my camera starts immediatelly dropping temperature with TEC working at 100%. It turns out that driver stores in ASCOM driver profile the last requested CCD temperature and when you turn cooler on next time - it immediately will try to reach that last requested CCD temperature. So in the scenario when you cool down your camera in SGP to -20C, then for some reason you do not warm it up, then last requested CCD temperature in driver profile will remain as -20C, and next time you turn on cooler it will start immediately cooling till -20C;
I added some protection logic for this in my own version of QHY ASCOM driver, so it wont be doing that anymore; will just try to keep current CCD temperature when cooler is turned on, until SGP will request some different one. also it turned out that when camera connects its cooler is automatically turned on with TEC level of 10%, but driver stll report that cooler is off. added fix for that too, now it will report actual state of cooler.

So overall, I think I solved my issue, except than hanging problem, which has nothing to do with SGP.
Decided to post here my story, so maybe if someone will have similar problem - they will know why it happens

axlns,

I have a QHY8L and experience a similar issue to you, in my case, as soon as I turn the cooler on the power shoots up which does scare the hell out of me too. I usually set whatever the ambient temp is at the time in ‘Set to’ in the module over a time of 2 mins, connect the camera, go over and click Cooler to ‘On’ and hit ‘Set’ immediately.

with an old version of the driver, power would start from 0% and begin rising until SGP’s control system intercepted it and begins bringing it down to 0% again. A newer driver they released used to fire up at as much as 100% which as you said scares the hell out of you.

A long time ago I contacted QHY over the issue and their answer was that on power up, the cooler is set at 50% power (this was the older driver) as they seemed to have the impression that ‘Most’ people, when turning on their camera want it to cool immediately and get to set temp as soon as possible. I requested that they put an option in the driver to apply the 50% power on connection or to have an alternative option to apply 0%, this way, every one will be happy. This obviously fell on dead ears but for the SGP workflow, in my opinion is very important. I like to pre-plan my session and set SGP ready to go way before it is due to start, I want SGP to decide then the cooler is going to turn on and start the cooling process so the camera is cool and ready to go when the sequence fires up.

Although I would normally ‘not’ agree with reverse engineering other peoples software, in this case, after years of frustration with this camera, and the ignorance of QHY over what I think is a simple modification to their driver, good on you for finding a way around the problem.

If I had the money available I have promised myself I will never purchase a QHY camera ever again purely based on their ignorance over this issue, until I have got the cash I am stuck with this camera…Very frustrating for sure :frowning:

I’m curious if your modification would also work with my QHY8L, do you think this is possible ?

Many Thanks
Paul

1 Like

Hi Paul. Looks like ASCOM driver for QHY8L is different, so my version of driver probably wont work.

But, I think they added TEC Protection setting for QHY8L driver, at least they suggested the version of the driver where it should be available. Maybe that will work for you? There is no such setting in ASCOM driver for QHY all-in-one cameras.

Here you can find more details - https://www.qhyccd.com/bbs/index.php?topic=7495.msg37453#msg37453