Temperature compensation using weather data feed

16 replies371 views
Himanshu Pandey avatar
Hi everyone, I hope you're well.  Thanks for taking the time to read this. 

I've clipped off the sensor lead for the external probe for my Gemini focus motor and not able to extract it and as a result cannot use the focus motor temperature data for temp. compensation.

I have a weather station that feeds WeatherUnderground with my local data every 5 minutes.  I use the API key they provide to get the data as my weather feed in NINA and find that it is quite a bit better than what I can get from OpenWeatherMap.   It tracked with the readings obtained from the focus motor very well while it was working.

Is there a way to use the temperature data from the internet feed in NINA for focus temp. compensation?

Thanks for any help you can provide.
Respectful
Alex avatar
Hi Himanshu,

this should be possible with two requirements.

connect your focuser by using this ASCOM driver https://github.com/jlecomte/ascom-virtual-focuser

as makes it possible to use temperature readings from another device.

My focuser based on an Pololu TIC T500 motor controller is not having temperature readings and I use above for temperature compensation using the weather readings of my Pegasus Powerbox.


Second you need an ASCOM Observing Conditions driver for OpenWeatherMap. Best to look around GitHub to find something suitable.

Kind regards,
Alex
Helpful Concise
andrea tasselli avatar
Pointless. Use the HFR readings instead.
Himanshu Pandey avatar
andrea tasselli:
Pointless. Use the HFR readings instead.

You should give this another try.  It is far from pointless.  With temp compensation I'm able to see almost constant star HFR values across all frames in a night.  NINA will make focus change settings for every frame as the temperature changes.  It has to be setup right and it is a challenge but it is worth it. 

It will make you smile when you look at the HFR graphs in NINA throughout a night and, instead of seeing the values trend up in between autofocus runs, you see almost a straight line  trend and the autofocus runs made throughout the night were not really necessary.
Helpful Engaging Supportive
Himanshu Pandey avatar
Alex:
Hi Himanshu,

this should be possible with two requirements.

connect your focuser by using this ASCOM driver https://github.com/jlecomte/ascom-virtual-focuser

as makes it possible to use temperature readings from another device.

My focuser based on an Pololu TIC T500 motor controller is not having temperature readings and I use above for temperature compensation using the weather readings of my Pegasus Powerbox.


Second you need an ASCOM Observing Conditions driver for OpenWeatherMap. Best to look around GitHub to find something suitable.

Kind regards,
Alex

Thank you!
Scott Badger avatar
Himanshu Pandey:
andrea tasselli:
Pointless. Use the HFR readings instead.

You should give this another try.  It is far from pointless.  With temp compensation I'm able to see almost constant star HFR values across all frames in a night.  NINA will make focus change settings for every frame as the temperature changes.  It has to be setup right and it is a challenge but it is worth it. 

It will make you smile when you look at the HFR graphs in NINA throughout a night and, instead of seeing the values trend up in between autofocus runs, you see almost a straight line  trend and the autofocus runs made throughout the night were not really necessary.

I think it depends.....big surprise! If seeing is steady, I would use change in HFR. Maybe not as predictive as temperature, but you don't waste time focusing when it's not necessary. If seeing is bad, and/or particularly variable, then HFR based can lead to unnecessary focus runs.

Cheers,
Scott
andrea tasselli avatar
Himanshu Pandey:
You should give this another try.  It is far from pointless.  With temp compensation I'm able to see almost constant star HFR values across all frames in a night.  NINA will make focus change settings for every frame as the temperature changes.  It has to be setup right and it is a challenge but it is worth it. 

It will make you smile when you look at the HFR graphs in NINA throughout a night and, instead of seeing the values trend up in between autofocus runs, you see almost a straight line  trend and the autofocus runs made throughout the night were not really necessary.


*In my experience it is either unnecessary (focus doesn't change with temperature changes) or it is unpredictable and/or non-linear thus difficult to work out for all possible conditions. Best way around here is to refocus when needed, and even with the most temperamental system I got it is no more than twice in 10 hours. At any rate I would still need to stop acquisition to carry re-focus runs.
Himanshu Pandey avatar
andrea tasselli:
Himanshu Pandey:
You should give this another try.  It is far from pointless.  With temp compensation I'm able to see almost constant star HFR values across all frames in a night.  NINA will make focus change settings for every frame as the temperature changes.  It has to be setup right and it is a challenge but it is worth it. 

It will make you smile when you look at the HFR graphs in NINA throughout a night and, instead of seeing the values trend up in between autofocus runs, you see almost a straight line  trend and the autofocus runs made throughout the night were not really necessary.


*In my experience it is either unnecessary (focus doesn't change with temperature changes) or it is unpredictable and/or non-linear thus difficult to work out for all possible conditions. Best way around here is to refocus when needed, and even with the most temperamental system I got it is no more than twice in 10 hours. At any rate I would still need to stop acquisition to carry re-focus runs.

I understand, I think the technology we use causes some misunderstandings.  I have two different types, APO refractors and Celestron catadioptric.   

Temp compensation is needed for the refractors where the effects of temperature can be modeled fairly accurately across the mild temperature ranges I experience (Southern California).  A simple linear fit is all that you need and the autofocus report analysis tool in NINA helps derive it from your own autofocus data that it has been storing all along.

Temp compensation is not needed for the celestron and other reflectors.
Helpful Concise
Tony Gondola avatar
Sure, fix the lead…
Himanshu Pandey avatar
Tony Gondola:
Sure, fix the lead...

I went back and gave that a look because its probably something I overlooked.  Sometimes you can't fix what is broken...

...to Gemini's credit however, I was offered a free PCB for the focuser when I order a replacement probe from them.
Bill McLaughlin avatar
Himanshu Pandey:
You should give this another try.  It is far from pointless.


I agree, HFR varies with more than focus and temp. In fact the biggest driver can often  be seeing (especially with relatively temp stable systems and long F.L. systems) so using HFR in a situation where the seeing is getting worse will result in lots of focus runs that will do you no good.

OTOH, I would use the temp of whatever part of your system is responsible for the most focus shift with temp, not "weather station" ambient. This is often the OTA so putting a probe there is much better than ambient measurements when it comes to focus shift.

Finally, characterizing your system and having both the depth of focus zone information as well as the focus steps/degree information will let you set things up more precisely.
Helpful Insightful
Alex avatar
andrea tasselli:
Pointless. Use the HFR readings instead.

Cannot say so, with a well defined temperature compensation the HFR readings remain stable throughout the night actually without much need of refocusing.

Of course may depend on the individual scope in use. My TOA for example is quite temperature sensitive.
andrea tasselli avatar
Well, it is less clear than that and in my case it correlates to the front element temperature which obviously isn't measured directly by the probe, never mind by a temperature sensor located elsewhere. There can be a significant lag between the two, OTOH mine is very fast (f/2.8) so very sensitive to these sort of things.
Himanshu Pandey avatar
Alex:
Hi Himanshu,

this should be possible with two requirements.

connect your focuser by using this ASCOM driver https://github.com/jlecomte/ascom-virtual-focuser

as makes it possible to use temperature readings from another device.

My focuser based on an Pololu TIC T500 motor controller is not having temperature readings and I use above for temperature compensation using the weather readings of my Pegasus Powerbox.


Second you need an ASCOM Observing Conditions driver for OpenWeatherMap. Best to look around GitHub to find something suitable.

Kind regards,
Alex

Thank you, this works very well.   

I have a free API key from OpenWeatherMap and if I select OpenWeatherMap Observing Conditions under the ASCOM label as NINA's weather source and configure it for my API and location, I can select the same in the DarkSkyGeek's virtual driver and see my local weather provided by OpenWeatherMap in NINA's imaging tab AND in the focuser connection where it can be used for temp comp.
Helpful
Alex avatar
Himanshu Pandey:

Glad to hear this is working for you. However, proper temperature compensation relies on local data ideally taken close if not taken directly on the OTA. Maybe you can find, if your focuser is not having temperature reading, at least some little temperature device like for USB there are some available to buy or you can home-brew something based on an Arduino.
Dan Watt avatar
I think it's worthwhile for people to go in the logs and see what autofocus is doing throughout the night and if it correlates to temperature, meridian flips, or just plain random. In my case I finally took a look and discovered that my focus point would change by less then ten steps throughout the night and was certainly related to temperature. Using HFR is effective but very easy to chase the seeing around by trigging an autofocus run after every exposure (and wasting a ton of time) if not set up correctly. 

But every setup and location out there is different and like everything else in this hobby, a one size fits all approach doesn't fit anything. Go look in your logs, the answers are already there.
Helpful Insightful
Himanshu Pandey avatar
Alex:
Himanshu Pandey:

Glad to hear this is working for you. However, proper temperature compensation relies on local data ideally taken close if not taken directly on the OTA. Maybe you can find, if your focuser is not having temperature reading, at least some little temperature device like for USB there are some available to buy or you can home-brew something based on an Arduino.

Thank you.  I am using it for relative correction and my goal is to reduce the drift caused by temp.   The lens temp would be ideal but the data for temp compensation doesn't need to be perfect to be very useful.  I run autofocus every 3 hours to correct it whereas without on HFR trend it would be around every hour.