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.

Astro Projects

  • entries
    15
  • comments
    1,171
  • views
    3,944

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

Gina

463 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 or 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 (called a Single Board Computer).  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 if you want to use WiFi.  This section can be skipped if using Ethernet cable rather than WiFi.



2 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 appropriate Raspberry Pi version of Ubuntu MATE 18.04 (takes two clicks) and download it.

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.  After writing to the card Etcher checks the written data is correct.

With Windows you have unzip the downloaded file and write the image to the micro SD card.  IThis can be done with Win32 Disk Imager.  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 and other software 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.  Menu > 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.

Before copy/pasting from the site you will probably need to enter sudo apt-get update into the Terminal window.

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  You can edit the script file whilst in the RPi with the text editor - Menu > Accessories > Pluma.  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

This command is run via SSH on the remote RPi by entering it in the Terminal window of the Client computer indoors.

Edited by Gina

Share this comment


Link to comment
Gina

Posted (edited)

Unfortunately, I have to report that I have not managed to get this working ATM with a Raspberry Pi 3B.  When trying to connect to the RPi over WiFi using SSH I get

Connection reset by 192.168.1.234 port 22

I have tried the procedure to produce a working RPi system twice and get the same result.

EDIT :-  A search has revealed a suggestion to cure this which I shall try.  Means running the RPi with human interfaces and entering in Mate Terminal

sudo rm /etc/ssh/ssh_host_* && sudo dpkg-reconfigure openssh-server

Later...  the rm (remove) command reported

rm: cannot remove '/etc/ssh/ssh_host_*': No such file or directory

so I just used

sudo dpkg-reconfigure openssh-server

which worked.  Now to come out of the RPi and see if SSH works.

Edit...  Yep.  Can now log in to the RPi via SSH.

Edited by Gina

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.