ZWO-Guider Computer Setup

The Observatories of the Carnegie Institution for Science (Carnegie Observatories), Pasadena, CA

Christoph C. Birk (birk AT carnegiescience DOT edu)


Location of this document: http://instrumentation.obs.carnegiescience.edu/Software/ZWO/Setup/setup.html


  • HowTo make a bootable USB drive
  • HowTo setup the Raspberry Pi
    Add the zwoserver as a systemd service
  • HowTo setup the NUC


    Bootable USB drive

    1. Startup "diskutil" (macOS)
      format USB drive as "MS-DOS (FAT)"
    2. Download the "CentOS" ISO ( https://www.centos.org/download/ )
      NUC: "DVD ISO" (4.6 GB)
    3. Create a bootable USB drive via Etcher ( https://etcher.io/ )


    RaspberryPi-4 Setup

    Specifications: raspberrypi.org
    Quad Core "Cortex A72", 1.5 GHz, 4 GB RAM (USB3, Gb-ethernet)

    Note: The rPi4 specifications at RaspberryPi.Org say "ARMv8, 64-bit" while the actual system returns 'armv7l' and the default binary format is 32-bit.
    arch --> armv7l
    more /proc/cpuinfo
    more /proc/meminfo
    more /proc/version
    MAC arch cpuinfo meminfo Linux version Status
    e4:5f:01:5f:c4:02 armv7l 4 cores: ARMv7 Processor rev 3 (v7l) 3919812 kB NOOBS-?: 5.4.51-v7l+ Azusa
    e4:5f:01:5f:c5:c2 armv7l 4 cores: ARMv7 Processor rev 3 (v7l) 3919812 kB NOOBS-?: 5.4.51-v7l+ Azusa
    e4:5f:01:69:1f:b5 armv7l 4 cores: ARMv7 Processor rev 3 (v7l) 3931056 kB PiOS: 5.15.32-v7l+ LCO
    e4:5f:01:80:a5:13 armv7l 4 cores: ARMv7 Processor rev 3 (v7l) 3931056 kB PiOS: 5.15.32-v7l+ LCO

    ASI294: 1 W (idle), 2.5 W (fan), 9.0 W (peak/cooling=55%), 6.0/8.0 W (stable running, dT=20/25 C)
    rPi4: 2.5 W (idle) 4.8-5.6 W (with ZWO/ASI under load)
    Temperature profile with rPi-board in box with heatsinks installed (vcgencmd measure_temp):
    Exposure [s] Frame-Rate [Hz] CPU [%] Temperature [C]
    idle 0 0 58
    2 0.5 4 59
    0.5 2 9 63
    0.2 5 19 67
    0.1 10 32 71
    0.05 13 (670 Mb/s) 72 76

    Order: Vilros (sold out)
    32 GB microSD card (NOOBS-3.5 pre-installed), power supply, microHDMI to HDMI cable, heat sinks, case.

    If the SD-card of the rPi does not have the OS (Noobs or PiOS) preinstalled, please go to
    www.raspberrypi.com/software/ and follow the instructions to install PiOS (recommended 32-bit version) using the 'RaspberryPi Imager'.

    Setup Steps

    1. Setup the RaspberryPi
    2. Install the ZWO libraries
    3. Install the ZWO server

    1) Setup the RaspberryPi

    Some of these steps are not necessary if the PiOS has been using the 'RaspberryPi Imager' (TODO)
    1. insert the microSD drive into its slot and connect a monitor, keyboard and mouse
    2. set username (pi) and password (xxxx4xx)
    3. ... other steps with screen shots ... TODO
    4. find the MAC (eth0) address using the 'ifconfig' command --> local DHCP server
    5. 'raspi-config' allows to configure (network, start-up, etc) after the initial setup (eg. disable auto-login)
    6. edit .bashrc
      alias dir='ls -lF'
      export LD_LIBRARY_PATH=/usr/local/lib

    2) Install the ZWO libraries

    1. download (to ~/Downloads) the ASI Linux & Mac SDK (on the Developer tab)
      ASI_linux_mac_SDK_V1.20.2.tar.bz2
    2. install the ASI library - follow the README.txt (camera should not be connected)
      tar xf ASI_linux_mac_SDK_V1.20.2.tar.bz2
      cd ASI_linux_mac_SDK_V1.20.2/lib
      sudo cp ./armv7/libASICamera2.so.1.20.2 /usr/local/lib
      sudo install asi.rules /lib/udev/rules.d
      connect camera to USB-3 port
      cat /sys/module/usbcore/parameters/usbfs_memory_mb
      should return 200
    3. download (to ~/Downloads) the EFW Linux & Mac SDK (on the Developer tab)
      EFW_linux_mac_SDK_V1.7.tar.bz2
    4. install the EFW library - the filter wheel is not used with the guider but the 'zwoserver' needs it for CASCA
      tar xf EFW_linux_mac_SDK_V1.7.tar.bz2
      cd EFW_linux_mac_SDK_V1.7/lib
      sudo cp ./armv7/libEFWFilter.so.1.7 /usr/local/lib
      sudo install efw.rules /lib/udev/rules.d
    5. setup the library links
      cd /usr/local/lib
      sudo ln -s libASICamera2.so.1.20.2 libASICamera2.so
      sudo ln -s libEFWFilter.so.1.7 libEFWFilter.so

    3) Install the ZWO server

    1. mkdir $HOME/ZWO; cd $HOME/ZWO and download the zwoserver.tar.gz source code
    2. build the 'zwoserver' executable (XXXX represents the build number, eg. 0031)
      tar xf zwoserverXXXX.tar.gz
      cd src-XXXX
      make zwoserver
    3. setup auto-starting 'zwoserver' at boot (systemd)
      create /home/pi/zwo.sh (ensure 'zwoserver' is in the proper directory or create a link)
      chmod u+x zwo.sh
      sudo cp zwo.service /etc/systemd/system
      sudo systemctl daemon-reload
      sudo systemctl start zwo
      sudo systemctl status zwo
      sudo systemctl enable zwo
      verify that 'zwoserver' runs after a reboot of the RaspberryPi
    Notes:
  • max. transfer rate 13 Hz (1800x1800x2 bytes/frame) ~500 Mb/s
  • Heat dissipation: rPi+ZWO: 14 W (Andor+NUC: 32 W)


    NUC Setup

    Specifications:
    nuc01..03: Dual Core (4 Threads) "Intel i5-7260U", 2.2 GHz, 8 GB RAM, 256 GB SSD, 13 (10) Watts
    nuc04..04: Quad Core (8 Threads) "Intel i5-8259U", 2.3 GHz, 16 GB RAM, 512 GB SSD, 10 (8) Watts

    Steps:

    1. Install CentOS-7 ("DVD")
    2. Update and install additional packages
    3. Install CXT (X11 Toolkit)
    4. Install ZWO-Guider software
    5. Integration into the Magellan Environment

    1) Install CentOS-7 (DVD-Distribution)

    1. Insert the bootable USB drive into the NUC, power it up and press "F10"
    2. Select USB
    3. Select Test this media & and install CentOS 7
    4. Select English (United States)
    5. Date & Time: Set the timezone "Los Angeles" or "Santiago" -- Network time "On"
    6. Installation Destination:
      Select "I would like to make additional space available" and
      Select "Delete All" if over-writing an existing installation.
    7. Software Selection: "Development Workstation" + "Development Tools" + "Platform Development"
    8. Network: "on", set hostname "nucXX"
    9. Click on "Begin Installation"
    10. Root: password XXXX4XX
    11. User: "andor", password: same as 'root' (+"Admin" privileges) TODO change user name
    12. After installation: reboot, remove USB
    First Login:
    1. Accept license
    2. Set hostname/network (if not done earlier)
    3. Set language: English
    4. Typing: English/US

    5. Disable Wi-Fi

    6. Disable Location Services
    7. Skip "Accounts Setup"

    2) Update and install additional packages

    I recommend waiting a few minutes before updating the system, because the "yumBackend" might be running for a while after the first startup.
    The Update is necessary because the default installation does not install the proper kernel sources. These are required to build the Andor driver.
    1. sudo yum update -y
    2. sudo yum install epel-release -y
    3. sudo yum groupinstall "MATE Desktop" -y
    4. logout and login

    5. Select the MATE desktop
    6. Delete the bottom Panel (rightClick--delete)
    7. Add "Window List" to the top Panel (rightClick--AddToPanel--WindowList)
    8. sudo yum install xorg-x11-fonts-75dpi -y

    3) Install CXT (X11 Toolkit)

    1. copy cxt.tar.gz into the directory $HOME
    2. tar xf cxt.tar.gz
    3. cd CXT
    4. make
    5. ln -s libcxt.a libcxt64.a

    4) Install ZWO-Guider

    1. copy zwoguider.tar.gz into the directory $HOME/ZWO
    2. tar xf zwoguider-vvvv.tar.gz
    3. cd src-vvvv
    4. make zwoguider
    5. cd $HOME
    6. ln -s ZWO/src-vvvv/zwoguider

    5) Integration into the Magellan Environment

    1. Update the DHCP server at LCO to provide an IP number to the new NUC.
      It is necssary to provide the same number each time the NUC boots, since some components of the Magellan control system (eg. TCSIS) rely on whitelists of IP numbers to enable access it their services.
    2. Update the whitelist at the TCSIS to allow the NUC to receive status information and send telescope offsets.


    2021-11-09, Christoph C. Birk, Carnegie Observatories