MountOne | DSLR Software.

Don't Panic!

This guide is 99% images.

Index.

Imaging The Raspberry Pi OS (64-bit).

We'll be starting with a fresh Raspberry Pi OS Desktop install, Not the lite version. You can of course do the lite version if you want to, but you'll need to adapt the instructions to match.

I use the Raspberry Pi Imager to write the OS to an SD card, and to set initial login details.

Make sure to select the Raspberry PI OS (64-bit).

I like to input a hostname MountOne to make finding the system on the network easier. You can also inpt Wi-Fi details here too. I recommend doing so.

Make sure to enable SSH so you can login remotely without the need to connect a monitor, keyboard and mouse.

When the imager has finished writting to the SD card, remove it from your PC and insert it into the Raspberry Pi and turn on the power.

First Power-On.

PuTTY is a terminal program that we shall be using to open an SSH connection to the Raspberry Pi.

Download PuTTY. Install PuTTY. Open PuTTY.

In the 'Host Name (or IP address)' box, put in 

MountOne.local

Then click Open.

Login with the details you setup during the imaging process.

We'll now need to update the install.

sudo apt update &&  sudo apt full-upgrade

This can take anything from a few seconds to a hour to run, depending on your connection, and how up to date the install is.

Once  it has finished, reboot.

sudo reboot

PuTTY will tell you it has unexpectedly lost connection.

Reconnect again by restarting the session (click on the two terminals in the top  left), and then login again. make sure you get the login details correct.

Clone The SD Card To The M.2 HAT.

This is an optional step, if you don't have an SSD, go to the next step.

I am using Jeff Geerling's fork of rpi-clone to perform the cloning. Because it works. I have modified the steps to better align with our needs.

Go home.

cd ~

Make a directory for our software stack.

mkdir Projects

Change to that directory.

cd Projects

Download the rpi-clone repository

git clone https://github.com/geerlingguy/rpi-clone.git

Change to the rpi-clone directory

cd rpi-clone

Copy the files to /usr/local/sbin

sudo cp rpi-clone rpi-clone-setup /usr/local/sbin

Clone the SD Card.

sudo rpi-clone nvme0n1

When it has finished doing its thing, shutdown, don't reboot, the Pi.

sudo halt

Power off the Pi and remove the SD Card.

When the SD Card has been removed, power the Pi back up again.

If everything has gone to plan, you should be able to log back in again.

Raspi-Config.

Before we begin the install proper, we need to do a bit of house-keeping. Log back in and open The Raspberry Pi Software Configuration Tool.

sudo raspi-config

From here we will adjust a few system settings.

From the System Options menu enable Auto Login.

From the Interface Options menu enable RPi Connect.

Enable I2C.

For the Serial Port disable the login shell over serial.

And enable the serial port hardware.

From the Advanced Options menu, Expand Filesystem, expand the file system to make available any unused space on the SSD or SD Card.

Reboot the system and log back in again.

GPIO Highjacker.

To enable all the I/O on the GPIO Highjacker we need to edit config.txt.

sudo nano /boot/firmware/config.txt

Scroll to the bottom of the file and below the [all] section paste in:

# Disable HAT EEPROM on GPIO0/1 so they can be repurposed
#dtoverlay=i2c0

# free primary UART from BT/console
dtoverlay=disable-bt
enable_uart=1

# map the UARTs to your chosen header GPIOs
dtoverlay=uart0
#dtoverlay=uart1
dtoverlay=uart2
dtoverlay=uart3
dtoverlay=uart4

Ctrl-x and then y to save.  Then reboot.

You will now have UART0, UART2, UART3, UART4 & i2c available on the GPIO Highjacker. 

Verify everything with: 

pinctrl get 1-40

GPSD.

GPSD is a daemon that manages the GPS, if you have one installed.

sudo apt-get install gpsd-clients gpsd -y

This will take but a few minutes to install.

Next, we need to change the configuration so the daemon knows where to look.

sudo nano /etc/default/gpsd

Find the line DEVICES="" and change it to DEVICES="/dev/serial0"

Then ctrl-x and y to save and exit. Then reboot.

sudo reboot

After logging back in again we need to enable the daemon and set it to autostart on power-up.

sudo systemctl enable gpsd.socket && sudo systemctl start gpsd.socket
sudo gpsd /dev/serial0 -F /var/run/gpsd.sock

 

You can check all is well,

cat /dev/serial0

Ctrl-c to stop the stream.

INDI & KStars Install.

We are going to use nou's astro-soft-build to download, configure, compile, and install INDI Core Library, INDI 3rd Party Drivers, KStars and a load of other software.

This takes a long time > 1 hour. I advise you follow  the instructions on their repository after changing to the Projects directory.

cd ~/Projects

Perform the stable install.

When it has completed, reboot, and log back in again.

RPi Connect.

Register your Pi for remote access.

rpi-connect signin

Follow the instructions and open a remote desktop connection to the Raspberry Pi.

Disable Automount.

The Raspberry Pi will automatically mount the DSLR's SD Card as a drive in File Manager. This blocks the INDI driver from controlling the camera.  We need to disable it.

Connect to the Pi via RPi Connect and open File Manager.

Click Edit and then open preferences. Then navigate to Volume Management.

Untick the three tick-boxes. Close, and reboot.

INDI Server.

To be able to use KStars & EKOS either as a local or remote client, we need to setup INDI Server as a service which loads automatically on power-up.

To check that everything actually works.

indiserver -v indi_gphoto_ccd indi_gpsd indi_lx200_OnStep

You should get something similar to the above, if not, have a cup of tea and a think.

If all has gone well, we shall begin. Ctrl-c to close indiserver.

sudo nano /etc/systemd/system/indi.service

Into this currently blank file paste;

[Unit]
Description=INDI Server
Requires=multi-user.target
After=multi-user.target

[Service]
User=mountone
ExecStart=indiserver indi_gphoto_ccd indi_gpsd indi_lx200_OnStep
Type=idle

[Install]
WantedBy=default.target

Ctrl-x then y to close and save.

Enable the INDI service.

sudo systemctl daemon-reload
sudo systemctl enable indi.service --now

To check it is running,

sudo systemctl status indi.service

Reboot.

If everything has gone to plan, after logging in check the INDI service status again and indiserver should be up and running.

Connect To The DSLR Astrograph.

KStars will be preinstalled on the Raspberry Pi. If you are opening a remote desktop, it will be in the Education section of the main menu.

In both cases, locally & remote, the configuration will be the same. KStars includes Ekos. Ekos will be used to configure and control the astrograph. KStars User Manual.

Configure KStars & Ekos.

If you are working remote, download and install KStars (download).

Open KStars.

Click on the Ekos ion in the top right.

We need to configure Ekos, click next.

We are going to setup Ekos as if it were a remote system, even if running Kstars on the Raspberry Pi. We do this because Ekos will try to start INDI server locally if we don't.

We're using neither StellarMate nor AtikBase. Click Other.

Enter in the hostname you chose for the astrograph and select No for INDI Web Manager.

Choose a name for the profile.

Nothing to do here, click Save.

Click the black triangle Play button to connect to the astrograph (it needs to be turned on, obviously).

A load of new windows will pop up. Click on Telescope & Lenses in the Optical Trains window, go to the DSLR Lens tab, and input your lens details.

Input details for the Optical Train.

Next you'll need to tell INDI Control Panel how to connect to OnStep. If you remember during The DSLR Assembly Documentation we wired OnStep to UART4, we set this as

/dev/ttyAMA4

Clicking Connect will connect INDI to OnStep, and a load of new tabs will appear.

You can tell the MountOne that it is in the Home position (Polar Aligned), assuming it is, by clicking Set.

This is the first thing to do when powering on The MountOne & DSLR Astrograph in the future.

You can also check it has detected and connect to the camera.

If you can, enable Mirror Lock on your camera and set it to about 2 seconds in INDI. It will help reduce vibrations when capturing images.

In the Image Settings tab you'll need to set the following,

  • Encode to Native.
  • Capture Target to RAM.
  • SD Image to Delete.

On the camera itself, set the lens to Autofocus, but in custom settings disable AF/ AE Lock. If you don't do this the camera will try to focus the lens before each image capture and get stuck until it timeouts.

Closing INDI Control panel should bring you back to KStars and show the MountOne as being polar aligned.

Open Ekos (the little dome icon on the right), and go to the camera tab. You'll be asked to setup the camera (right click the link).

I am using a Canon EOS 1000D.

Depending on the time of day, set the exposure to 0.01 seconds and click the preview button.

The preview image will open in a FITS viewer. In this case the image was captured shortly after 1318 and so the sun was up. The astrograph was also pointing at a wall, from inside.

For best results, take the astrograph outside.

Continue to The DSLR First Light Documentation.

Back to Main Documentation.