I just thought I would provide an update in case anyone else is interested in internal temp compensation and SGP. I built the focuser controller that Robert (brown_rb above) designed here:
I wanted to be able to user internal temperature compensation with SGP with my two Moonlite focusers and my Rigel focuser while preserving the ability to do AF. If anyone is interested, I built the Uno/L293D minimal option with the temperature probe. It was a very simple build since I did not want the LCD display or the buttons.
The way the ASCOM TempComp property is supposed to work is that I the property is enabled, the focuser will move based on temperature changes defined by a user-settable temperature coefficient. So, for long narrowband subs, the focuser will keep track of the temperature and make moves during the exposure (or any other time) as the temperature changes. When TempComp is enabled, the ASCOM standard says that all move commands must be disabled so the only moves the focuser will make are the ones driven by TempComp.
Of course, when SGP tries to run AF, it will not work with TempComp enabled, nor would the focuser movement buttons in the focuser pane. However, SGP correctly disables TempComp prior to an AF run and then correctly enables it again when the AF run is complete. I have tested all of that and it works quite well.
The problem is that SGP does not offer a way for the user to toggle TempComp. So, if the focuser starts with a default value of TempComp disabled, there is no way to enable it within SGP. AF and the move buttons will work fine, but TempComp will never actuate. If TempComp is enabled by default, it will perform internal temperature compensation and AF will work properly, but there would be no way for the user to move the focuser with the buttons in the focuser pane since the only time TempComp would be disabled would be during an AF run.
I typically operate the observatory remotely, and my usual work flow is to set initial focus using F&F and the move buttons on the focuser pane to get things close. This is usually necessary because the starting temperature is usually quite different than the ending temperature of the previous session and as a result, the initial focus position of often off too much for AF to work well. To do this, I would need TempComp disabled (otherwise I could not use the move buttons). Once initial focus is set, I typically let SGP handle focus for the rest of the night, at which point, I would want TempComp enabled.
Since there is no way to enable/disable TempComp from within SGP, I have been working with Robert to solve this dilemma, and he has very graciously taken his time to modify his ASCOM interface to include a TempComp toggle button.
Now, when I first connect, I do so with TempComp disabled so I can use the move buttons and F&F to get focus close. Once I’m sure that it is close enough to let AF do its thing properly, I disconnect the focuser, open the ASCOM interface with the tools button, enable TempComp and then reconnect the focuser. I then leave everything to SGP and TempComp. It’s a bit kludgy, but since SGP has no way to enable/disable TempComp, it is the only way to make internal temperature compensation useful.
I write all of this in case there is anyone else who struggles like I do with rapid temperature changes and long subs. At times of the year like now, it is not uncommon for it to be 60 degrees when I start imaging and drop below freezing by the time the night is over. I have seen the temperature change by more than 2 degrees C during a 20-minute exposure. This can cause the focus to be soft during the last part of the exposure. Additionally, if the focus is off by enough, when AF runs at the end of the exposure, I will often get a wonky curve and the resulting focus is not as good as it could be. AF works best, as we all know, when it is already close to good focus. The closer, the better.
I tested everything last night using the Moonlite CXL on the Tak FSQ106 EDX4. I already knew that my temperature coefficient was about 16 steps per degree C. I had SGP set to run AF for every 2 degree C temperature change and had TempComp set up to move 4 steps for every 1/4 degree change. I watched it closely for the first part of the night. Everything worked beautifully. The focuser is quite smooth and the moves during image acquisition had no effect on image quality from vibration. When AF ran, I got a perfect “V” curve every time, with AF changing the focus position by no more than 3 or 4 steps when it completed.
So, if you want to do internal temperature compensation even though SGP does not fully support it, you can. If you are at all handy with electronics, you can build a richly-featured controller for less than $50 all-in.
Tim