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.
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.
https://shop.astrojolo.com/astrolink-4-computers/
- INDI http://indilib.org/download.html
- lgpio https://abyz.me.uk/lg/download.html
- I2C and SPI support must be enabled in Raspberry configuration
For AstroArch system there are few additional steps required that are listed below the AstroLink 4 features section.
sudo apt update
sudo apt install git build-essential cmake libindi-dev
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.
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
- Focuser
- DRV8825 driver support for Moonlite / Robofocus / AstroLink geared unipolar steppers and bipolar microstepping up to 1/32
- Absolute position control
- Relative position control
- Forward / Reverse direction configuration
- Customizable maximum absolute position (steps)
- Customizable maximum focuser travel (mm)
- Backlash compensation
- Speed control
- Focuser info including: critical focus zone in μm, step size in μm, steps per critical focus zone
- Automatic temperature compensation based on temperature sensor
- Humidity / dew point / sky temperature / cloud coverage / sky brighntess sensors support (version 3 and later)
- Stepper movement abort
- 6-pin RJ12 stepper output
- embedded real-time clock (version 2 and later)
- voltage, current, and energy monitor (version 4 and later)
- Power outputs
- Two switchable 12V DC outputs, 5A max each
- One permanent 12V DC output
- Two PWM-regulated RCA outputs, 3A max each
- One adjustable DC output 3-10V, 1.5A max
- Configurable labels
- Other
- Internal fan controlled by GPIO pin - controlled automatically by INDI driver
https://github.com/astrojolo/astrolink4pi
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.1
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).
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.
- Works with the most recent INDI driver version from main.
- Works with Raspberry Pi 4 or 5.
- Requires lgpio library for GPIO control.
- Requires I2C enabled.
- Works with the most recent INDI driver version from main.
- Works with Raspberry Pi 4 or 5.
- Requires lgpio library for GPIO control.
- Requires I2C and SPI enabled.
Works with tag 3.0 of INDI driver - see the README inside this tag.
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.