astrojolo / astrolink4pi

Astroberry server hardware platform with focuser control and regulated/switchable outputs.
https://shop.astrojolo.com
GNU General Public License v3.0
3 stars 1 forks source link
astrophotography

AstroLink 4 Pi

AstroLink 4 Pi device is the astroimaging setup controller based on the Raspberry Pi module. It contains focusing motor controller, switchable power outputs, regulated dew-cap heaters outputs, regulated voltage output and power monitoring function. Selection of sensors can be connected to this device - temperature, humidity, dew point, sky temperature / cloud coverage and sky brightness.

AstroLink 4 Pi works both with Raspberry Pi 4 and 5.

[!NOTE] This INDI driver works with revisions 3 and newer of AstroLink 4 Pi device (the ones with RJ sensor socket). For earlier revisions see the section below the AstroLink 4 Pi features.

[!NOTE] Raspberry Pi 5 is based on new OS Bookworm. Make sure the software you use is available for this new OS before you upgrade to RPi5. Currently, Stellarmate OS 1.8.0 supports RPi5 and AstroArch was tested successfully.

Device

https://shop.astrojolo.com/astrolink-4-computers/

AstroLink 4 Pi driver installation

Requirements

For AstroArch system there are few additional steps required that are listed below the AstroLink 4 features section.

Required packages

sudo apt update
sudo apt install git build-essential cmake libindi-dev

INDI driver installation

git clone https://github.com/astrojolo/astrolink4pi
cd astrolink4pi
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make

You can install the drivers by running:

sudo make install

After these steps AstroLink 4 Pi driver will be visible in the Aux devices lists under Astrojolo group.

Real-time clock

To enable automatic synchronization of the RTC embedded in AstroLink 4 Pi you need to edit the file

sudo nano /etc/rc.local

and add the following line before the exit 0 statement at the file end

echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device

After restarting the astroberry system time will be synchronized with embedded DS1307 clock. Check hwclock help to find more options, like time adjustments and synchronization:

hwclock -h

AstroLink 4 Pi features:

Source

https://github.com/astrojolo/astrolink4pi

Photo

Devices revision 2 and earlier

INDI driver AstroLink 4 Pi revision 2 and earlier must be installed from the branch https://github.com/astrojolo/astrolink4pi/tree/3.0

[!NOTE] Revision 2 and earlier of AstroLink 4 Pi works only with Raspberry Pi 4

Additional packages required:

sudo apt install gpiod libgpiod-dev libgpiod-doc
sudo systemctl enable pigpiod

AstroLink 4 Pi driver installation (for revisions 2 and older)

git clone https://github.com/astrojolo/astrolink4pi
cd astrolink4pi
mkdir build && cd build
git checkout 3.0
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
sudo make install

In AstroLink 4 Pi revision 2 and earlier internal fan is not controlled by the INDI driver. You need to open Raspberry configuration and switch on the fan on GPIO 13 (Performance tab).

AstroArch only specific tasks

Update system and install packages:

update-astroarch
sudo pacman -S unzip cmake python python3 python-setuptools swig

Add the following line to /boot/config.txt:

dtparam=spi=on

and modify

dtoverlay=i2c-rtc,ds1307

Before compiling lgpio find the following line in Makefile file:

prefix ?= /usr/local

and update to

prefix ?= /usr

Create additional groups and add user astronaut to them:

sudo groupadd gpio
sudo groupadd spi
sudo usermod -a -G gpio astronaut
sudo usermod -a -G i2c astronaut
sudo usermod -a -G spi astronaut

Create /etc/udev/rules.d/99-gpio.rules file with content:

SUBSYSTEM=="gpio", KERNEL=="gpiochip*", GROUP:="gpio", MODE:="0660"
SUBSYSTEM=="spidev", KERNEL=="spidev*", GROUP:="spi", MODE:="0660"

Then you may go directly to AstroLink 4 Pi INDI driver installation.

Revisions matrix

Revision 4

How to use it?

Run Kstars and select AstroLink 4 Pi (Aux section) in the Ekos profile editor. Then start the INDI server in Ekos with your profile, containing AstroLink 4 Pi drivers. Alternatively, you can start INDI server manually by running:

indi_server indi_astrolink4pi

Start KStars with Ekos, connect to your INDI server and enjoy!

Note that your user account needs proper access rights to /dev/gpiochip0 device. By default, you can read/write only if you run the driver as root or a user who is a member of gpio group. Add your user to gpio group by running sudo usermod -a -G gpio $USER

To use restart/shutdown functionality add this line to your /etc/sudoers file or /etc/sudoers.d/010_astroberry-nopasswd (this assumes you run INDI server as an astroberry user):

astroberry ALL=(ALL) NOPASSWD: /sbin/reboot, /sbin/poweroff

For custom labels, you need to save the configuration and restart the driver after changing the relays' labels.

Photo