Raspberry Pi Setup

From MuonPi-Wiki
Jump to navigation Jump to search

This article will introduce to you, how to set up a Raspberry Pi from scratch with all software needed to run the detector hardware.

DISCLAIMER: If not stated otherwise, this tutorial is developed on Raspian 10 Buster.

Initial Setup

(Requirements: Raspberry Pi version 3 or above (with 40-pin GPIO connector) )

  1. Create a fresh install of Raspbian Buster operating system e.g. from here on microSD card (with or without desktop)
  2. Enable I2C Interface: In terminal: sudo raspi-config >> Interfacing Options >> I2C>> Enable: Yes >> Reboot optional
  3. Enable SSH: The SSH protocol is needed if you want to remotely configure your hedless Raspberry Pi. In a terminal: sudo raspi-config >> Interfacing Options >> SSH >> Enable: Yes >> Reboot
  4. Configure the network connection:
  • Per default, the RPi is configured to automatically obtain an IP address when a connection is available and DHCP in your local network is active (this should be the case for most local/home networks).
  • If you prefer a fixed IP address in a local network: edit the /etc/dhcpcd.conf. Use the template and uncomment the "Example Static IP Configuration" section with your desired IP address.
  • If network access should be established via WiFi, either configure it via the network configuration wizard in the graphical desktop environment (network icon in the system bar), or manually following these steps (either one is fine):
    • Make sure that the wpa_supplicant package is installed: sudo apt install wpasupplicant
    • edit the file /etc/wpa_supplicant/wpa_supplicant.conf: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

the configuration should look like this (non-relevant lines not shown):

update_config=1
country=DE
network={ ssid="<your network ssid>" psk="<your wifi password>" key_mgmt=WPA-PSK }

Enter your WiFi's SSID and password in the indicated fields. Finally, restart the system that the changes take effect. You should have a fully configured Raspbian system now and are ready-to-go to set up the MuonPi

MuonPi Setup

(Requirements: a MuonPi board plugged onto the GPIO connector of the RPi)

  • First, add the MuonPi apt repository to your system:
wget -qO - https://archive.muonpi.org/muondetector.public.key | sudo apt-key add - 
sudo sh -c "echo deb https://archive.muonpi.org/raspbian buster main > /etc/apt/sources.list.d/muondetector.list"
  • Update your system:
sudo apt update && sudo apt upgrade
  • Install the muondetector-daemon package and it's dependencies:
sudo apt install muondetector-daemon
  • Optional: install the Graphical User Interface (GUI) program to monitor and control the MuonPi locally
sudo apt install muondetector-gui
  • The GUI can connect to the MuonPi over network, so it can be installed on other computers in the local network. Currently, binary packages for Raspbian, Ubuntu and Windows are available. The Linux-based versions can be installed from the package repositories (execute steps 1,2 and 4 from this list). The Windows program can be downloaded directly from https://archive.muonpi.org and installed by simply unpacking the zip-archive.

Configuration and Start

Now the installation of the muondetector-daemon should be adapted to your setup:

Configuration

Edit the configuration file /etc/muondetector/muondetector.conf: nano /etc/muondetector/muondetector.conf Change the settings to your needs or leave them untouched, if unsure. The comments in the config file should guide you through any required modifications. One option, however, describes the placement of your detector. If you like, choose a stationID descriptor, eg.:

(file: /etc/muondetector/muondetector.conf)

# A unique identifier of the user's station
# leave on default when the user operates a single station
# all detectors of the user are distinguishable on the basis of this id
stationID = "HomeOffice"

(anything which best describes the location of your detector like e.g. "GarageSW", "Bldg16Lab105", "AtticNE"). If you operate only one stationary detector, it may as well be left on the default ID which is "0" (zero).

Important: When operating multiple detectors (under the same user account, see below) the stationID descriptor must be unique for each detector.

Login with your user credentials (only once)