Satellite Computer - Rogozin-high-school/sat_monitoring_system GitHub Wiki
This page documents the satellite computer.
Hardware
The satellite computer is a raspberry pi zero w. We chose it because of the following reasons :
- Cheap - It is very cheap and we can afford some spare ones is something goes bad.
- Small - A nano satellite is small and there is no room to spare so our parts need to be as small as possible.
- Wifi - Most of our communications is based on wifi so our computer has to come with wifi builtin.
- Well Documented - The raspberry pi zero w is a very well known computer so a lot of documentation is available online to make our lives a bit easier.
- Linux based - Most of the operating systems written for the raspberry pi zero w are linux based. Linux is the most popular operating system among server and mission critical systems and therefore it's very light weight, doesn't use much resources and stable.
OS
The pi is running raspbian (preferably the lite version), you can find a download link in the official raspberry pi website. Raspbian is a linux distribution. Most of our system interaction is done using the command line and SSH (see SSH section for further info) so mastering the command line is a must.
The os is installed on a micro sd card that is then places into the raspberry pi. We used win32diskimager to burn the image to the micro sd, configure headless wifi and ssh and any other option you need and you should be good to go.
Wifi Connections
The pi is configuted to connect to the lab's wifi network on boot. We did it with the help of this raspberry pi stack exchange answer.
After the raspberry pi boots it should be connected to your wifi network, you can find it's ipv4 adress by either connecting to the raspberry pi using ssh by any other means (ssh over usb or connecting the pi to a monitor and keyboard) and running the ifconfig
command. You can also scan the network by using all sorts of network scanning tools, like for example nmap. In some cases we also opened the router's control panel and looked at the list of devices connected to the network.
SSH
SSH stands for Secure Shell, which means it lets you open a shell (often called a terminal) of another computer securely and over the internet. It comes by default with most linux distribution (raspbian included). It is very useful for controlling system without monitors and any input devices connected but are connected to the internet, like servers.
The pi is configured to have ssh enabled, we tried enabling SSH over USB using this guide (link) but we encoutered some problems and we hope to fix in the future and be able to connect to the raspberry pi using usb.
In raspbian it can be enabled with the setting or using the command sudo raspi-config
and enable it in the interfacing section. You can also enable it before booting the raspberry pi by creating a file called ssh
in the /boot
directory of the raspberry pi os.
I2C
Some of our sensor and hardware use I2C to communicate with the pi so it has to be enabled.
In raspbian it can be enabled with the setting or using the command sudo raspi-config
and enable it in the interfacing section.
Debian Packages
The following debian packages are installed on the pi :
- vsftpd - Allows for file transfer from and to the pi, we usually use git for moving files to the raspberry pi but ftp is nice to have.
- i2c-tools - A package for handling i2c devices and contains various useful tools, such as
i2cdetect
. - python3 - Python is a popular programming language and our software is written using python3, it should come pre installed with most linux distributions (including raspbian).
- python3-smbus - Python software for reading and writing to i2c devices, essential for communicating with i2c devices using python.
- python3-numpy - A very useful python library for handling math and vectors.