WimDeMeester / eFinder

The software and documentation for the eFinder
0 stars 1 forks source link

ScopeDog eFinder

Mailing list

For more help, you can subscribe to the eFinder mailing list at groups.io.

Source code

Needed parts

Purchase of the hardware

In the following list, you can see which hardware is needed to construct a working eFinder.

The Nexus DSC Pro cannot connect directly over WiFi to more than one machine (e.g. the eFinder and a tablet running SkySafari). To solve this, you can use an external router. The D-Link router is not needed if you use the Nexus DSC, as the problem does not occur on the Nexus DSC.

The Raspberry Pi has a poor WiFi connection when it is in a case. To improve the connection, you can add an external WiFi adapter. The TP-Link adapter is a good option. Instructions on how to set up the adapter are provided later in this document.

Since I live in Belgium, this section is focused on European suppliers. I purchased the ASI camera at Teleskop Service in Germany, and the rest of the components from suppliers in the Netherlands (Raspberrystore) or Amazon.

Ordered Product Company Amount Arrival
03/08/2022 Software Keith Venables € 26.98 03/08/2022
03/08/2022 ASI120MM-S Teleskop Service € 248.51 11/08/2022
03/08/2022 Raspberry Pi 4 model B - 4GB Raspberrystore.nl € 74.95 10/08/2022
03/08/2022 Raspberry Pi Pico Raspberrystore.nl € 3.99 10/08/2022
03/08/2022 2 x 1x40 header Raspberrystore.nl € 2.00 10/08/2022
03/08/2022 Shipping costs Astroberrystore.nl Raspberrystore.nl € 12.74 10/08/2022
03/08/2022 2.23 OLED Display Module for Raspberry Pi Pico Amazon (.nl) € 20.99 09/08/2022
03/08/2022 Geekworm Raspberry Pi 4 Aluminum Case Amazon (.nl) € 14.89 08/08/2022
03/08/2022 Sandisk Ultra 32 GB microSDHC Amazon (.nl) € 8.01 08/08/2022
03/08/2022 100 x 60 x 25 mm DIY box Amazon (.nl) € 10.62 08/08/2022
03/08/2022 Lon0167 Momentary Circuit Control Tactile Tact Push Button Switch Amazon (.nl) € 11.31 16/08/2022
03/08/2022 50 mm F1.8 CCTV-lens for C-mount Amazon (.nl) € 48.38 16/08/2022
10/10/2022 TP-Link 300 Mbps Wifi USB-adapter (TL-WN823N) Amazon (.nl) € 9.95 11/10/2022
12/06/2023 D-Link DWR-932 Amazon (.com.be) € 54.83 14/06/2023
Total € 548.15

eFinder hardware configurations

The eFinder can be added to your telescope system in a variety of ways, depending on your specific needs and preferences.

Nexus DSC Pro, using SkySafari

A travel router is required when using SkySafari on a tablet with the Nexus DSC Pro. This is the needed hardware configuration:

Please use the following steps to install the eFinder

Using a Nexus DSC Pro, ServoCAT and SkySafari

Nexus DSC Pro, without using SkySafari

If you want to connect your tablet to the eFinder (for the GUI) then for the Nexus DSC Pro, you need a travel router. For the non Pro, the Nexus can act as a router.

Using a Nexus DSC Pro, ServoCAT and no SkySafari

Nexus DSC, using SkySafari

When using a Nexus DSC, a travel router is not required when using SkySafari on a tablet.

![]()

Nexus DSC, without using SkySafari

When using a Nexus DSC, a travel router is not required when using SkySafari on a tablet.

Using a Nexus DSC, ServoCAT and SkySafari

Nexus DSC Pro

Update of the Nexus DSC Pro firmware

Network settings on the Nexus DSC Pro

Make sure the following settings are set on the Network page:

Specific settings on the Nexus DSC Pro

Connecting the Nexus DSC Pro to the eFinder using USB

This is only needed when using a Nexus DSC Pro and SkySafari on a tablet!

As the Nexus DSC Pro is a host, a ttl to USB adapter is needed (from amazon.co.uk or amazon.com.be). This cable should be connected directly to the GPIO pins of the Raspberry PI, as described in the following table:

Raspberry Pi GPIO Pin
GND USB to TTL lead, black
14 USB to TTL lead, green
15 USB to TTL lead, white
Not used USB to TTL lead, red

The USB converter is powered via the USB from the Nexus. Do not have the red wire connected.

The pinout is as in the following picture:

Raspberry Pi Pinout

Enable ’serial’ on the Pi raspi-config set up:

sudo raspi-config

Select Interface Options, Serial Port, No Login Shell, Enable Serial Port hardware

The Nexus USB communication should be set to LX200, 9600,8,1,N

A useful test is to use the Nexus DSC in test mode monitoring the USB port, when switching on the eFinder. You should see the traffic as the eFinder asks for geo data etc. If not switch the green and white wires on the UART to USB cable.

Software

Raspberry Pi 4

Install OS and needed dependencies

cd ~
git clone https://github.com/WimDeMeester/eFinder.git eFinder
cd eFinder
sudo ./pi-install.sh
sudo raspi-config

Install the ZWO ASI Linux SDK

wget "https://dl.zwoastro.com/software?app=AsiCameraDriverSdk&platform=macIntel&region=Overseas" -O ASI_linux_mac_SDK.tar.bz2
bunzip2 ASI_linux_mac_SDK.tar.bz2
tar xvf ASI_linux_mac_SDK.tar
cd ASI_linux_mac_SDK_V1.27/lib/
sudo mkdir /lib/zwoasi
sudo cp -r * /lib/zwoasi/
sudo install asi.rules /lib/udev/rules.d

Start eFinder

Activate a python virtual environment (do this every time):

poetry shell

Run the VNC Gui version of the app:

python src/eFinderVNCGUI.py

The headless version can be started using the command:

python src/eFinder.py

Run the VNC Gui version of the app without having a handpad, a camera or a nexus device. (The headless version has no command line options at the moment)

python src/eFinderVNCGUI.py -fh -fn -fc

An easier way to start the app is executing scripts/start.sh for the headless version and scripts/startVNCGUI.sh for the GUI version.

Start eFinder automatically after boot

echo $PATH
crontab -e
export PATH=<The returned path from the echo $PATH command>
DISPLAY=:0
@reboot sleep 20 && (/home/efinder/eFinder/scripts/start.sh > /home/efinder/logs.txt 2>&1)

It is not possible to start the VNC GUI version automatically from crontab.

@reboot sleep 20 && (cd /home/efinder/Solver ; /usr/bin/python /home/efinder/Solver/eFinderVNCGUI_wifi.py >> /home/efinder/logs.txt 2>&1)

Create a RAM disk on the Raspberry Pi

Edit /fstab to add the line:

tmpfs /var/tmp tmpfs nodev,nosuid,size=10M 0 0

Save & exit

Execute in terminal sudo mount -a

Install RTL8192EU driver for the TP-LINK TL-WN823N

sudo apt-get install git raspberrypi-kernel-headers build-essential dkms
git clone https://github.com/Mange/rtl8192eu-linux-driver
cd rtl8192eu-linux-driver
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
sudo dkms add .
sudo dkms install rtl8192eu/1.0
echo "blacklist rtl8xxxu" | sudo tee /etc/modprobe.d/rtl8xxxu.conf
echo -e "8192eu\n\nloop" | sudo tee /etc/modules
echo -e "8192eu\n\nloop" | sudo tee /etc/modules
echo "options 8192eu rtw_power_mgnt=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/8192eu.conf;
sudo reboot
sudo bash -c 'echo "blacklist brcmfmac" >> /etc/modprobe.d/raspi-blacklist.conf'
sudo bash -c 'echo "blacklist brcmutil" >> /etc/modprobe.d/raspi-blacklist.conf'
sudo reboot

The Raspberry Pi Pico handbox

The software for the Raspberry Pi Pico handbox is written in micropython. We first need to install micropython on the board.

Changelog

The changelog of the software can be found here.

Hardware

Adding the OLED display to the Raspberry Pi Pico

Connect to the Nexus DSC wifi

How to work with the handpad

In the VNC GUI version

In the handpad version

image

Development environment

Poetry

Install poetry to manage the python dependencies.

Install the dependencies and the virtual environment (do this once):

poetry install

Activate a python virtual environment (do this every time):

poetry shell

Run the VNC Gui version of the app without having a handpad, a camera or a nexus device. (The headless version has no command line options at the moment)

python eFinderVNCGUI.py -fh -fn -fc

Docker

Building the image: docker build --no-cache --platform linux/arm64/v8 -t efinder .

Running the image: docker run -d --name efinder-test efinder

Accessing the running image: docker exec -it efinder-test bash