Controlling the Telescope with a Berry

One of the things that made me reluctant to seriously start with astrophotography was the prospect of spending long nights outside in front of a laptop that is tied to the telescope with a long USB cable. Nights that would typically end in disappointment and anger after I inadvertently tripped over that cable - at least that had been my experience in some early attempts. 

This time I wanted to take a different approach. The entire setup should be controlled by a little computer that is directly attached to the equipment, while the control would happen remotely over the network. 


I guess there are three main technical approaches that you can take to achieve this:


  • mini-pc being controlled over remote desktop; basically using ascom and a similar imaging software as you would use in the "long USB" scenario. 
  • "out of the box" solution from an astronomy equipment vendor like the ASIair
  • Linux based solution using Kstars/Ekos/Indi running e.g. on a Rasperry Pi


I am not sure if there is a clear winner between these three. The list of available features in each one is evolving constantly. There appears to be more active and wide range development on the PC while the Linux based development seems to be a bit more coherent. I may be jumping back and forth between the first and the last one for a while before I make my final choice. However, as a start I decided to go with a Raspberry Pi running Kstars/Ekos and Indi.


The Raspberry Pi as an "Astroberry"
controlling all components of the astrophoto equipment 


Setting up an Astroberry

I didn’t  have any prior experience with the Raspberry Pi and only limited knowledge of today’s Linux. So I was looking the simplest possible way to get this going. Fortunately there is is a packaged solution called Astroberry that provides a preconfigured image including the Linux as well as all the key astronomy software packages.  This can simply be downloaded and put on an SD card following the instructions on the webpage.


The hardware can be a standard Raspberry Pi package. I went with a Raspberry Pi4 with 4GB RAM, which fits the requirements. However, going with an 8GB box may provide additional headroom and flexibility.  If you want to use wifi for connectivity it is probably best to go with a plastic box rather than a metal one. 


The Astroberry can either be accessed via a local monitor and keyboard connection - which may be the easiest for the initial configuration e.g. of the Wifi settings - via a web browser or using a remote desktop client called VNC. All three variants are basically preconfigured. For me VNC is the preferred method. The client is available for mobile phones as well as for Windows. With some practice the entire platform can be controlled e.g. from an iPad.



Indi and company 


The astroberry image contains several software packages, but the main ones for controlling the scope and the imaging gear are Indi, Kstars and Ekos. 


Indi is the main interface to the equipment. There are Indi drivers for a wide variety of astro devices like focusers, mounts, cameras from a large number of manufacturers. The devices are often connected locally via USB, but there are Indi drivers e.g. for network/wlan connected devices as well. On the other side Indi provides a standardized interface to the other programs, so they don‘t have to deal with the specifics of each individual type of equipment. Indi can provide this interface either locally or via the network. So it is possible to configure the Astroberry to just run Indi for the device connections and have all other components running on another computer.  There are advantages doing that, but I prefer having everything directly on the Astroberry. That way the setup is independent of network availability and continues working during connectivity issues or at remote locations. 


Indi is configured to talk to all the individual Devices 


Kstars is a planetarium program. As with similar programs it e.g. allows you to get a representation of the sky visible at a certain date and you can search for various objects of interest. In addition to that it uses the Indi interface e.g. to slew the telescope to the desired object and it is used to launch Ekos.


Kstars the planetarium program


Ekos is the main command and control for the imaging session. It has controls scope and object alignment, focus, guiding and taking the pictures. 


A typical workflow 

Let me describe a typical imaging workflow using Ekos (other tools like e.g. NINA are very similar). The individual steps can be combined in an automatic script (or sequence to be precise), but it is a good idea to start taking each step individually to make get a better understanding of what is happening and to see if there are any issues. In Ekos each of the main steps are done in a separate window, so it is relatively easy to follow. 


Getting started: The only prerequisite is to set up the equipment and to have a focus that is good enough to see stars in the camera image. I just compiled a list of focus settings for the various configurations. I am entering that number in the focuser window of Indi or Ekos, that is sufficient. 


Polar alignment: You can use the tools provided by the mount, e.g. a polar scope. Alternatively Ekos provides a tool for that purpose. After measuring a few locations in the sky it basically shows which way to adjust the polar axis by showing the target location of a star in an image. The polar alignment is then simply achieved by adjusting the mount while continuing to check the location of the star in the looping image. 


Usually I go back inside after the polar alignment, controlling the remaining steps from there. 


Finding and centering the object: Traditionally I would start an observing session by doing a (typically three) star alignment. If done carefully it would allow the mount to slew to the various target objects with reasonable accuracy so that they are in the field of view (though normally not exactly in the center). With Ekos this is not needed anymore. I just enter the desired object in Kstars let the mount slew to the rough location and use "solve and center" in the Ekos alignment module. This will take a image, solve the celestial coordinates of the picture, calculate how far the scope is off and slew to the calculated location. After that it will repeat the process until the object is in the center of the field of view. A cool feature is that at the same time you get the exact dimensions of the FOV and its actual size. The location and orientation is shown as a yellow rectangle in the Kstars display. 


Start Guiding: Then I usually turn on the autoguiding. One could do the autofocus first and if you are guiding through an off axis system rather than a parallel guidescope that is probably a good idea. However, as the NexStar mount sometimes had issues guiding at high declinations I want to make sure that I can actually guide the object before going any further. Additionally this avoids the object drifting away during the autofocus run. Once guiding works ok it is time for the next step. 


Autofocus: In this process the system basically measures the size of the stars at different positions of the focuser fitting a curve to the measurements to find the minimum. This is one of the more tricky elements and I had been struggling a bit with it at the beginning (I will make a separate post with lessons learned on this subject).  


Imaging: Here comes the fun part of finally taking the pictures.  Just check and - if needed - change the camera settings like temperature, gain etc.  Enter the desired number of pictures and exposure time. In addition it is possible to configure limits for the focus and guiding quality to avoid spending time on taking pictures that would need to be discarded later anyway. Once you are happy with the settings you just say "go" and the pictures will be taken and stored on the computer with meaningful filenames. In .fits files all the metadata fields like focal length, Ra/Dec or camera gain will be populated. 


While the exposures are running it is possible to monitor the progress and e.g. guiding performance on a summary page. I usually have that open on my iPad and just check if everything is going as planned every now and then. 


At the time I was only observing visually I thought I had a "computerized telescope" as I was controlling the star alignment and the object selection with my iPad. I was really amazed how far you can easily take the computer integration in astrophotography. 












Popular posts from this blog

December Nebulae - fighting star halos

Galaxies at a larger scale