Jump to content

Stargazers Lounge Uses Cookies

Like most websites, SGL uses cookies in order to deliver a secure, personalised service, to provide social media functions and to analyse our traffic. Continued use of SGL indicates your acceptance of our cookie policy.

sgl_imaging_challenge_banner_lunar_landings.thumb.jpg.b50378d0845690d8a03305a49923eb40.jpg

Astro Projects

  • entries
    11
  • comments
    1,110
  • views
    3,273

Setting up a Raspberry Pi for Astro Imaging and Control - Updated 2019 for RPi 3B+

Gina

1,049 views

INTRODUCTION

This is a tutorial explaining how to install an operating system and software into a micro SD card to use in a Raspberry Pi 3B+ for astro imaging and control of the relevant hardware.  The software to capture images, control camera cooling and other things such as the mount etc. is called INDI and provides a set of drivers to control all the hardware.

The Raspberry Pi will run in what is called "headless" mode - meaning that no human interfaces are directly connected to the RPi - instead the RPi is connected to the local area network (LAN) using either Ethernet (preferred for speed and reliability) or WiFi.  Everything is then controlled from indoors on a computer also connected to the LAN.  This computer is called a "client" and the Raspberry Pi a "server".

This tutorial will detail all the steps involved in installing the operating system and software - there are rather a lot of them, hence the need for a tutorial but there is a script that is downloaded that does all the difficult stuff.  I believe that anyone with some knowledge of computers should be capable of following these steps and setting up a working Linux based astro imaging system.  The Raspberry Pi can be put on the pier (or tripod) or even directly on the telescope mounting and would replace a laptop for instance, reducing the use of long cables etc.

The operating system used is Ubuntu Mate and involves using a monitor, keyboard and mouse (or trackball) in order to set up the operating system and enable remote control before the RPi can be used headless in the observatory or on a tripod.  The Raspberry Pi is a "proper" computer though a bit slower and with less storage space that a desktop or laptop.  When powered up the operating system goes into a setup routine and you just have to answer the questions, same as when setting up any computer.  Near the beginning there's an opportunity to set up WiFi so you'll need your WiFi password.

  • Like 1


5 Comments


Recommended Comments

Gina

Posted (edited)

Installing the Operating System and Astro software

The Raspberry Pi uses a micro SD card as its main drive and this behaves the same as the hard drive on a computer except that this card can be removed and data read from it or written to it.  In fact the way the operating system is installed on it requires it to be out of the RPi.  This tutorial will describe how the operating system is written to the card, the system set up with computer name, user name and password and then further software installed to permit remote control via LAN and the astro software to capture images and control the hardware such as filter wheel and mount.  You need an SD card reader attached to your main computer.

First job is to download the operating system on the main computer and write it to the micro SD card. Go to the Ubuntu MATE download page,  choose the Raspberry Pi 3B+ version of Ubuntu MATE 18.04 (takes two clicks) and download it.

Next is to unzip it and write the image to the micro SD card.  In Windows this can be done with Win32 Disk Imager.  For Linux I recommend Etcher which works well (my main PC uses Linux Mint).  Etcher unpacks and writes the OS to the card in one go.  Plug card into reader (with adapter if required), run Etcher and select the micro SD card - careful here not to select you HD or other device.  Also select the downloaded file.  Set Etcher going and a few minutes later the OS is written to the card.  With Windows, install Win32 Disk Imager, unzip the downloaded file and chose the image file (.img) and SD card in Imager and follow the onscreen instructions to write the OS to the card.

There is a script that has been written for installing the INDI drivers onto the card in the RPi that covers what we are trying to do.  This is AstroPi3 and pretty much does it all.  The instructions given repeat what I have written above.  The lines of code can be copied and pasted from the web page into a Terminal window on the RPi.  Applications > System Tools > MATE Terminal.  Use Firefox on the RPi to go to the AstroPi3 page and copy/paste each command line to the Terminal window.  Hint, 3 clicks selects the whole line for copying.

The script installs INDI and a few other items of astro software but you don't have to accept it all if you don't want it.  The script may be edited to comment out unwanted items but you need to be careful and know what you're doing though "it's not rocket science" :D  It also turns on SSH so that further command lines can be added from the main PC through its Terminal window and SSH.  At this time the human interfaces can be disconnected from the RPi.

With this script you end up with a usable system that will capture images and control most of the astro equipment on the market.  Controlling DIY equipment is another matter and one I've worked on successfully - this will be another Tutorial.  The script takes an hour or more to run and has a few y/n responses needed.

We now should have a working system on the RPi but to use it we have to run indiserver. 

You need to choose the drivers for your equipment, for instance, I have a ZWO ASI astro camera indi_asi_ccd and EFW indi_asi_wheel and a SkyWatcher mount (EQ8 but same for NEQ6) indi_eqmod_telescope  :-

indiserver -m 100 -vv indi_asi_ccd indi_asi_wheel indi_eqmod_telescope

ADDENDUM :- I have had a problem with the AstroPi3 script reporting the "dpkg is locked...".  To stop this edit the script file to comment out the appropriate lines.  The location of the script file and the lines to comment out (with #) are shown in the screenshots below.  I shut down the RPi and edited the SD card in my desktop computer before returning to the RPi and continuing.

914675500_Screenshotfrom2019-06-3018-21-13.png.e68a5481c3b1ce3a7b24e537be070c59.png2076056601_Screenshotfrom2019-06-3018-19-56.thumb.png.ed51b63f153264ed42a90300ed33c6f9.png

Next will be to install and use the software for the main computer indoors (or maybe warm room).

Edited by Gina
  • Like 1

Share this comment


Link to comment
Gina

Posted (edited)

Installing the main control software on the Client computer

This is KStars and includes Ekos which connects to the INDI drivers in the remote RPi via LAN.  Go to the KStars web page for instructions.  For Linux there in Synaptic Package Manager from the Administration menu.  Search for "kstars" to select for installation.

Once KStars has been installed, run it from the Education menu and choose Tools > Ekos

You will get a window like this but without anything in Profile.

1430526601_Screenshotfrom2019-07-0115-22-24.png.706b7631db2b0ee10331f6b4aafc6cc8.png

In the Profile section click on the + to bring up an editing box fro your connection details, looking like this.

673016352_Screenshotfrom2019-07-0115-25-57.png.bdda1e46ba375609c2f5686b18cd377f.png

Give your remote device (imaging rig) a name and if you are connecting over LAN, check the Remote option.  Check Auto Connect.  In the Host box put the computer name you gave to the RPi when you set it up (or alternatively, the IP address if you set up a fixed address).  You can select your devices from the drop-down lists but it worked without in most cases for me.  When finished choose Save.

If all went well you can now choose Start INDI to connect to your astro imaging rig RPi.

Full instructions on using KStars can be found hers :- The KStars Handbook.   There are also tutorials on YouTube.  Google KStars (other search engines are available).

Edited by Gina
  • Like 1

Share this comment


Link to comment

Hello Gina,

Have you done any more with this?

I've been playing with a Raspberry and the Indi drivers although I've been using a Windows client.  I'm very interested to see how you get on.

Share this comment


Link to comment

I keep adding bits as I find the information.  I use KStars as client - free Open Source software, multi-platform so works on Windows and Mac OS etc. as well as Linux.

Share this comment


Link to comment

Hi Gina

I don't know if you can help, but I want to run a Raspberry Pi for imaging with a ZWO ASI178MM camera and Daystar Solar Scout. However, I need to run with a monitor and keyboard as I intend to take the setup to Gran Canaria for the Mercury transit and will have no other computer with me. So, I have a couple of questions:

Do you know if this will work with the new Raspberry Pi 4, as mine will not arrive until next month, now? I have some 3B+ Pies, if not.

Do I need to do anything other than connect a monitor and keyboard to use this in normal mode, i.e. not headless?

Basically, I need a complete stand-alone solution which will run from the car battery via USB 5 V converters and possibly a small inverter, which I would rather avoid, but might need for the monitor.

Thanks.

H-alpha_Telescope.JPG

Share this comment


Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.