astrojolo AstroLink 4 Pi User manual

AstroLink 4 Pi manual - astrojolo.com
1
Rev. 1.0
AstroLink 4 Pi
astrojolo.com @2021

AstroLink 4 Pi manual - astrojolo.com
2
Rev. 1.0
Main features:
•Raspberry Pi
*
4 based astroimaging control center
•dedicated AstroLink 4 Pi INDI driver
•focuser motor control for Robofocus, Moonlite, or generic unipolar or bipolar stepper motor
•up to 1/32 micro-stepping control with 2.0A maximum current and 1.4A maximum continuous hold
current
•DS1820 temperature sensor input
•Real-time clock embedded (AstroLink 4 Pi version 2 only)
•permanent focuser position –no need to park focuser after the session
•2 adjustable PWM power outputs to control dew heaters, telescope fans, or custom Peltier coolers.
The maximum load is 40W per output
•2 switchable power outputs to power mount, cameras, or filter wheels. The maximum load is 5A per
output
•1 additional permanent power output
•1 additional adjustable 3-10V output
•XT60 high current input voltage socket
Technical data
•dimensions: 137x83x32mm
•weight: 235g
•the maximum current drawn from all outputs: 10A
•AstroLink power consumption: 6W max
•regulated PWM outputs: 40W max
•permanent 12V DC output: 5A max
•switchable 12V DC outputs: 5A max
•focuser stepper motor outputs: RJ12 6 pin, 2.0A max
•adjustable output: 2A maximum peak load, 1.5A continuous load
•sensor input: jack 3.5mm
*
Raspberry Pi is a trademark of Raspberry Pi Trading
WARNING!
Do not connect or disconnect stepper motor when power is on. It may damage
stepper motor controller.
Make sure the stepper hold torque is set to 0% before replacing stepper motor
with motor of different type.
Do not cover ventilation slits at the enclosure sides and back.

AstroLink 4 Pi manual - astrojolo.com
3
Rev. 1.0
Device overview
System and hardware requirements
AstroLink 4 Pi requires a Raspberry Pi
*
4 module to be installed. Module with 4GB of RAM is recommended.
AstroLink 4 Pi has been designed to work under the control of the dedicated AstroLink 4 Pi INDI driver, which
is available at https://github.com/astrojolo/astrolink4pi . Astroberry system is recommended, however any
working Linux distribution that supports INDI drivers system will work. Good quality 32GB or larger card is
recommended (Class 10 at least). Most of the Raspberry Pi *problems come from a poor quality power
supply or SD card.
PWM outputs
AstroLink 4 Pi has two RCA outputs that provide PWM (pulse width modulation) regulated signal.
Regulations cover the full 0-100% range. These outputs are usually used for powering dew cap heaters.
Output can be regulated using controls in the dedicated INDI driver panel. PWM cycle frequency can be set
in the INDI driver options in the range 10-1000Hz. Default output value at the connection can be defined.
Switchable 12V DC outputs
The device contains two switchable DC outputs, that may provide a supply voltage for imaging setup
components (camera, mount, etc). Output can be switched using controls in the dedicated INDI driver panel.
Default output value at the connection can be defined.
Focusing motors control
The focusing motor can be controlled with AstroLink 4 Pi device. The focusing stepper motor can be
connected to the 6 pins RJ12 socket (see Figure 5). It supports 12V unipolar motors with gearboxes and
bipolar motors at any microstepping resolution in a range of full step to 1/32. The focusing motor can be
controlled with a dedicated INDI driver panel and via the INDI focuser interface. Depending on the AstroLink
4 Pi revision, the stepper motor current is adjusted with a potentiometer, or in the INDI control panel.
Setting holding power is also possible. For unipolar geared motors it is highly recommended to set holding
power to zero, so the motor will not overheat.
Permanent 12V DC output
This output is connected directly to the input 12V XT60 socket. Can be used to provide power to a mini PC or
any other device powered with 12V.
Adjustable DC output
Internal switching converter provides regulated voltage in a 3-10V range that can be used to power any
peripheral devices (DSLR, USB hub, etc.) Voltage can be adjusted with a 2mm flat screwdriver using a small
potentiometer.
Sensors
AstroLink 4 Pi can be equipped with a DS1820 temperature sensor to monitor ambient temperature. The
temperature reading is available in the dedicated INDI driver panel and can be used to perform temperature
compensation of the focuser position.
*
Raspberry Pi is a trademark of Raspberry Pi Trading

AstroLink 4 Pi manual - astrojolo.com
4
Rev. 1.0
External view
Figure 1 - external views
1. LAN port
2. USB3.0 ports
3. USB2.0 ports
4. XT60 power input (12V DC)
5. Regulated DC output (3-10V)
6. Regulated RCA outputs
7. 12V DC output (non-switchable)
8. Switchable 12V outputs
9. Temperature sensor input
10. Focusing motor output

AstroLink 4 Pi manual - astrojolo.com
5
Rev. 1.0
Version comparison
Feature
Version 1
Version 2
FOCUSING MOTOR CURRENT ADJUSTMENT
With potentiometer
In INDI panel
RTC REAL-TIME CLOCK WITH COIN BATTERY
Not available
Available
RTC battery replacement (AstroLink Pi 4 version 2 only)
AstroLink 4 Pi revision (version) is displayed in the log window after clicking Connect button
CR2032 battery that is used to sustain real-time clock should work several years. If you notice that after
switching on the device time is not set properly it may indicate that battery needs replacement. You need to
open the device (see Hardware Setup section), remove the Raspberry Pi
*
module and you will see the
battery holder. Remove the battery and insert the new one. Make sure the polarity is correct. Refer to the
Software installation chapter for setting up and synchronizing the time.
*
Raspberry Pi is a trademark of Raspberry Pi Trading

AstroLink 4 Pi manual - astrojolo.com
6
Rev. 1.0
Hardware setup
Raspberry Pi
*
installation
Figure 2 - enclosure screws
Installing the Raspberry Pi*module requires opening the AstroLink 4 Pi enclosure. You need to unscrew four
out of eight screws at the device's sides. Please remove only bottom screws. Then remove enclosure top.
After that, you need to unplug the cooling fan.
Figure 3 - Raspberry Pi module fixing screws
Then remove four screws that fix the Raspberry Pi*module and place the module in the device. Watch the
proper position of the GPIO socket pins. Put the Raspberry Pi* front sockets into the holes in the front device
panel and push the pins down to the GPIO socket. Then fix the Raspberry Pi* module with four screws,
connect the fan (refer to Figure 4 for the fan polarity), and mount the top part of the enclosure. The last step
is to put back four screws at the device's sides.
To unmount the Raspberry Pi*module just do all these steps in the reverse order.
*
Raspberry Pi is a trademark of Raspberry Pi Trading

AstroLink 4 Pi manual - astrojolo.com
7
Rev. 1.0
Setting focusing motor current
Figure 4 - AstroLink 4 Pi interior
AstroLink 4 Pi revision (version) is displayed in the log window after clicking Connect button.
Version 1 only
The stepper motor current is regulated with a small potentiometer at the stepper motor controller (see
Figure 4). To check the current, you need to measure the voltage between the adjustment
potentiometer wiper and the GND point. Required steps:
1. Unscrew and take off the enclosure top. Disconnect fan
2. Power the AstroLink 4 Pi device
3. Do not login to the astroberry panel and do not connect the INDI driver
4. Measure the voltage
5. Use a 2mm flat screwdriver to adjust the voltage
The motor current can be calculated from the measured voltage with the following formula:
current = voltage * 2
For example, if the measured voltage is 0.6V, then the output current is set to 1.2A. Please refer to the
stepper motor datasheet to set the correct current. The maximum allowed current is 2.0A, but then the
holding current should not be set to 100%. The recommended maximum continuous current value is
1.4A.
The default factory value is 0.4A –ready to use by unipolar Robofocus, Moonlite, or AstroLink motors,
and safe for most of the bipolar stepper motors.

AstroLink 4 Pi manual - astrojolo.com
8
Rev. 1.0
The stepper motor socket pinout is presented in Figure 5.
Figure 5 - AstroLink 4 Pi focusing motor output
Required connections are listed in the table below.
pin
unipolar
bipolar
1
COMMON
NOT CONNECTED
2
COMMON
NOT CONNECTED
3
COIL A
COIL A
4
COIL A’
COIL A’
5
COIL B
COIL B
6
COIL B’
COIL B’
Setting the regulated output voltage
The voltage at the regulated output can be adjusted using a small potentiometer at the DC converter module
(see Figure 4). To access this potentiometer you need to take off the enclosure top (see Figure 2) and then
use a 2mm flat screwdriver to adjust the voltage. The regulated output voltage can be set in the range of 3
to 10V. Use a multimeter connected to the regulated voltage output to control the actual voltage value.
Disconnect any device from the regulated voltage output before you start the voltage adjustment
operation!
Version 2 only
The stepper motor current is regulated with an option Stepper current in the INDI panel. Do not regulate
the current using the potentiometer –it should be left in the default factory position 0.2V.

AstroLink 4 Pi manual - astrojolo.com
9
Rev. 1.0
Connecting temperature sensor
The temperature sensor is a popular DS1820 device. It can be either purchased ready to use or assembled by
the customer. The required connections between the DS1820 sensor and jack 3.5mm plug are presented
below:
DS1820
Jack 3.5mm
GND
Sleeve
DQ (data)
Ring
VDD
Tip
The temperature sensor needs to be connected to AstroLink 4 Pi before the power is on. It will not be
recognized otherwise.

AstroLink 4 Pi manual - astrojolo.com
10
Rev. 1.0
Software installation
System setup
The recommended software is the Astroberry system that can be downloaded at the site
https://www.astroberry.io/. Astroberry installation procedure is described there in detail. After the first run,
you need to update WiFi settings and connect to the home wireless network and update the system. Do not
remove the default astroberry WiFi hotspot, that is used as a failover if it cannot connect to any other
configured networks.
After that step, two more actions are required. Open Raspberry Pi Configuration and in the Interfaces tab
enable 1-Wire –this is required to read data from the temperature sensor. Then in the Performance tab
enable the Fan section, and select GPIO pin to 13. Then adjust the temperature when the internal fan starts
to work. The recommended setting is 60-70C –to be on the safe side. When the CPU reaches that
temperature the cooling fan will be switched on.
All these actions above are not required when you purchase AstroLink 4 Pi device with the preconfigured
system.
INDI driver installation
AstroLink 4 Pi INDI driver is available at the https://github.com/astrojolo/astrolink4pi page. Required
installation steps are listed in the README file.
If you have a fresh SD card with an astroberry system, then it is worth updating the system with the
command
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade
Download and install required libraries before compiling AstroLink 4 Pi driver. See the INDI site for more
details. In most cases it's enough to run:
sudo apt-get install cmake libindi-dev libgpiod-dev
You also need to enable pigpiod daemon, which is preinstalled with astroberry, but not enabled at startup:
sudo systemctl enable pigpiod
and restart the device. Then you can download and compile the driver:
git clone https://github.com/astrojolo/astrolink4pi
cd astrolink4pi
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make

AstroLink 4 Pi manual - astrojolo.com
11
Rev. 1.0
Or update to latest version:
cd ~/astrolink4pi/build/
git pull
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
You can install the drivers by running:
sudo make install
Real-Time clock enabling - only version 2
To enable automatic synchronization of the RTC embedded in version 2 of AstroLink 4 Pi you need to edit the
file
sudo nano /etc/rc.local
and add the following line before exit 0 statement at the file end
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
After restart, the astroberry system time will be synchronized with the embedded DS1307 clock.
Driver installation is not required when you purchase AstroLink 4 Pi device with the preconfigured system.
INDI driver configuration
The configuration below will be presented for Kstars/EKOS system.
The first step is to create a new hardware profile. Click plus icon next to the profile selector and fill it with all
the equipment you have. As one of the Aux devices select AstroLink 4 Pi. Then click Save.
Figure 6- EKOS profile editor

AstroLink 4 Pi manual - astrojolo.com
12
Rev. 1.0
After that, you should be able to start the EKOS with the play button, and INDI Control Panel should be
opened. If you close INDI Control Panel by mistake, it can be always opened with the button with the INDI
logo.
AstroLink 4 Pi control panel contains several tabs.
Main Control
Figure 7 - Main Control
Here you can Connect or Disconnect from the AstroLink 4 Pi device using standard buttons.
Focuser info section contains information about step size and critical focus zone. These values are calculated
from focuser configuration data and Telescope device data (aperture and focal length).
If the temperature sensor is connected to AstroLink 4 Pi device, then the Temperature section is present and
the current temperature is displayed here. When temperature reading is available, also temperature
compensation is possible.
General Info tab contains some basing information about the driver. None of these fields is editable.

AstroLink 4 Pi manual - astrojolo.com
13
Rev. 1.0
Options
Figure 8- Options tab
Configuration –here you can load, save, reset or purge the INDI driver configuration.
PWM frequency –that is the frequency of the regulated PWM outputs power.
Relay labels –these are names of the outputs, that are shown for convenience in the Output tab.
Step delay –time in milliseconds of each focusing motor step. Should be adjusted to the focusing motor
parameters and selected resolution.
Stepper current [mA] –focusing stepper current in milliamperes. Refer to the motor datasheet to set the
correct value. For 12V geared unipolar motors set 350 or 400mA here. Stepper current in version 1 of
AstroLink 4 Pi must be set with the potentiometer (see Hardware setup)
Snoop device –that is telescope device name that will be used to retrieve aperture and focal length data.
Max travel –that is the maximum output position of the focuser. This value is used to calculate the step size.
Resolution –here required focusing motor resolution can be selected. For unipolar geared motors 1/1 to 1/8
resolution is recommended. For bipolar motors, without an additional gearbox 1/16 or 1/32 is
recommended.
Hold power –here you select the holding power of the focusing motor. For unipolar motors, it should be set
to 0 to avoid motor overheating. For bipolar stepper motors should be set to some significant value, so the
balance between the motor temperature on idle and holding torque will be preserved. Recommended
values are 40-60%.

AstroLink 4 Pi manual - astrojolo.com
14
Rev. 1.0
Temperature coefficient –when the temperature sensor is available, temperature compensation may be
performed. The number of steps per one degree of the temperature change should be entered into this
field.
Temperature compensate –enable or disable temperature compensation. The temperature compensation
cycle is 30 seconds.
Focuser
Figure 9- Focuser tab
Direction –controls the direction of the Relative position move
Relative position –allows moving the focuser by the specific amount of steps
Absolute position –allows moving the focuser to the specific position in steps
Max Position –this is the maximum outward position of the focuser in steps
Abort Motion –stop focusing motor movement immediately
Sync - synchronizes current focuser position to the specific amount of steps
Reverse Motion –reverses focuser motion, so In direction becomes Out. This setting depends on your
focuser mechanics
Backlash –implements backlash correction

AstroLink 4 Pi manual - astrojolo.com
15
Rev. 1.0
System
Figure 10- System tab
This tab contains several read-only fields with some information about the system. System Ctrl section
allows to reboot or turn off the operating system, but to use these buttons some additional configuration of
sudo is required, so these operations are allowed without a password.

AstroLink 4 Pi manual - astrojolo.com
16
Rev. 1.0
Outputs
Figure 11- Outputs tab
Outputs tab contains controls for operating with external power sockets of the AstroLink 4 Pi device. There
are three DC 12V outputs in the device. One is permanent, and two are switchable and can be controlled in
this panel. There are also two RCA sockets in the AstroLink 4 Pi that can be used for powering dew cap
heaters. These sockets provide PWM regulation (the frequency can be set in the Options tab) in the range of
0 to 100%.
Default values for the outputs can be saved in the Options tab. Once saved, these values will be restored on
the next connection to the driver.

AstroLink 4 Pi manual - astrojolo.com
17
Rev. 1.0
Temperature compensation
Temperature compensation in AstroLink 4 Pi is implemented linearly. So there is only one parameter that
describes how temperature affects the focus point. It is not a perfect approach, however, its accuracy is
good enough for most amateur setups.
How to determine the temperature compensation coefficient?
The best way is to note the focuser position at different temperatures. When during session temperature
changes, the focuser position needs to be adjusted to maintain a sharp focus. When you note these points of
temperature and corresponding focuser position, then it is pretty straightforward to calculate the
compensation coefficient, i.e. the number of focuser steps required to compensate for one-degree
temperature change. And this value needs to be entered into the Temperature coefficient field in the
Options tab. When decreasing temperature requires the focuser position to decrease, then the value will be
positive.
How to use compensation?
Once you enter the compensation value into the Temperature coefficient field, you need also to enable the
compensation. Actual compensation is performed once the calculated focuser position correction is larger
than half of the critical focus zone. CFZ value is calculated and presented at the Main control tab.

AstroLink 4 Pi manual - astrojolo.com
18
Rev. 1.0
Ground loops
The ground loop in the electrical system occurs when two points that should have the same potential have
different voltages. The ground loop in the astroimaging setup may occur when the ground (i.e. minus of
power supply voltage) is connected to one receiver with more than one cable path. Here are two example
scenarios:
Scenario one
•the newtonian telescope has a mirror cooling fan, and this mirror fan socket is fixed in the metal
mirror cell. Its minus is connected to a metal telescope tube
•the imaging camera case is also connected to the power supply minus.
Now, when you power both fan and camera from the same power supply, then the power supply ground will
be connected to the camera with power supply cable, but also via the fan power socket, then metal
telescope tube, focuser, and camera case.
Scenario two
•an active USB hub is powered from the regulated voltage output from AstroLink
•imaging camera is powered from DC AstroLink output
•the camera is connected to a USB hub with a cable
In this scenario, a negative voltage is supplied to the camera also in two ways. The first one is the main
power cable between the camera and AstroLink. The second loop is from 5V output in AstroLink to the USB
hub and then with the USB cable to the camera.
The ground loop may cause some problems with connections, that are hard to investigate. The best way is to
avoid them. Possible solutions for the second scenario are:
•connect the imaging camera to the computer without an additional USB hub
•power camera from a separate supply
•power USB hub from a separate supply
•do not power the USB hub at all - maybe it is not required
•use a USB cable with galvanic isolation

AstroLink 4 Pi manual - astrojolo.com
19
Rev. 1.0
Tips and troubleshooting
I cannot find the device in my network
Make sure it is powered for at least two minutes, so it booted up properly and is connected to the WiFi
network.
Use some local area network tool to scan and find the IP address of the Raspberry module (like Fing for
Android phones).
Make sure you have updated Raspberry Pi*module WiFi settings properly. If it cannot connect to the home
WiFi network, then it will start as a failover with its WiFi hotspot: SSID astroberry, password astroberry, IP
10.42.0.1.
If all above fails, then switch off the home router, so there is no WiFi around, and restart AstroLink 4 Pi. After
about two minutes it should be astroberry WiFi available, where you can connect.
I have removed the default astroberry WiFi hotspot and now cannot connect at all
You need to open the AstroLink 4 Pi device and:
•remove SD card and reflash it with the fresh astroberry image. Then you will lose all data and
configuration
•remove Raspberry Pi
*
4 module from the device, connect keyboard, mouse, any screen, power with
5V and 2A power supply, and fix the WiFi configuration
The sensor is connected, but the temperature is not displayed
Make sure that the sensor was connected before switching on the power. Otherwise, it may not be detected
and recognized.
*
Raspberry Pi is a trademark of Raspberry Pi Trading

AstroLink 4 Pi manual - astrojolo.com
20
Rev. 1.0
Table of contents
Main features: ..................................................................................................................................................... 2
Technical data...................................................................................................................................................... 2
Device overview .................................................................................................................................................. 3
System and hardware requirements............................................................................................................... 3
PWM outputs .................................................................................................................................................. 3
Switchable 12V DC outputs ............................................................................................................................. 3
Focusing motors control.................................................................................................................................. 3
Permanent 12V DC output .............................................................................................................................. 3
Adjustable DC output ...................................................................................................................................... 3
Sensors ............................................................................................................................................................ 3
External view ................................................................................................................................................... 4
Version comparison......................................................................................................................................... 5
RTC battery replacement (AstroLink Pi 4 version 2 only)................................................................................ 5
Hardware setup................................................................................................................................................... 6
Raspberry Pi installation.................................................................................................................................. 6
Setting focusing motor current ....................................................................................................................... 7
Setting the regulated output voltage.............................................................................................................. 8
Connecting temperature sensor ..................................................................................................................... 9
Software installation ......................................................................................................................................... 10
System setup ................................................................................................................................................. 10
INDI driver installation................................................................................................................................... 10
INDI driver configuration............................................................................................................................... 11
Main Control.............................................................................................................................................. 12
General Info............................................................................................................................................... 12
Options ...................................................................................................................................................... 13
Focuser ...................................................................................................................................................... 14
System ....................................................................................................................................................... 15
Outputs...................................................................................................................................................... 16
Temperature compensation.............................................................................................................................. 17
How to determine the temperature compensation coefficient?.................................................................. 17
How to use compensation?........................................................................................................................... 17
Ground loops..................................................................................................................................................... 18
Scenario one.................................................................................................................................................. 18
Table of contents
Other astrojolo Controllers manuals