From 84a67c27042feee2121d355345be2ad0a36d9d8b Mon Sep 17 00:00:00 2001 From: Jonas_Jones Date: Mon, 29 Aug 2022 18:12:44 +0200 Subject: [PATCH] random commits --- .idea/.gitignore | 3 ++ .idea/PI-MC-WATCHER.iml | 8 +++ .idea/discord.xml | 7 +++ .../inspectionProfiles/profiles_settings.xml | 6 +++ .idea/misc.xml | 4 ++ .idea/modules.xml | 8 +++ .idea/vcs.xml | 6 +++ README.md | 49 ++++-------------- arduino/arduino.ino | 0 pc/main.py | 0 pi-master/main.py | 0 pi-slave/main.py | 0 src/circuit.png | Bin 13 files changed, 53 insertions(+), 38 deletions(-) create mode 100755 .idea/.gitignore create mode 100755 .idea/PI-MC-WATCHER.iml create mode 100755 .idea/discord.xml create mode 100755 .idea/inspectionProfiles/profiles_settings.xml create mode 100755 .idea/misc.xml create mode 100755 .idea/modules.xml create mode 100755 .idea/vcs.xml mode change 100644 => 100755 README.md mode change 100644 => 100755 arduino/arduino.ino mode change 100644 => 100755 pc/main.py mode change 100644 => 100755 pi-master/main.py mode change 100644 => 100755 pi-slave/main.py mode change 100644 => 100755 src/circuit.png diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100755 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/PI-MC-WATCHER.iml b/.idea/PI-MC-WATCHER.iml new file mode 100755 index 0000000..d0876a7 --- /dev/null +++ b/.idea/PI-MC-WATCHER.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100755 index 0000000..d8e9561 --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100755 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100755 index 0000000..dc9ea49 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100755 index 0000000..f941221 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100755 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/README.md b/README.md old mode 100644 new mode 100755 index c5fa205..1de3a46 --- a/README.md +++ b/README.md @@ -1,50 +1,23 @@ # WARNING: This file is outdated. Since the last commit, a lot has changed. -# PI-MC-WATCHER -A system that allows Monitoring of Raspberry PI('s) and it's running Minecraft Server(s) on PC and Mac as well as controlling their cooling +# pi server rack +Monitor and control a Raspberry PI server rack. ## Why? Because I can. Overcomplicated stupid projects are a lot of fun. - -## What it is about -The system contains of three parts. Those are the **PC Module**, **RPi Master Module** and **RPi Slave Module** - ### To "briefly" explain the concenpt: -- The idea is to have a small server rack containing two Raspberry PI's (PI 4B & PI 1.2B+) -- We will call the PI 4B the *Master* and the PI 1.2B+ will now be the *Slave* -- The Master hosts all the information of its own system (such as CPU temps, frequency, etc.) and the ones from the Slave. -- The PC (or Mac) runs a program that, every cycle, requests all the data from the Master to essentially work as a Monitoring program for both PI's -- Let's introduce the fan control: - - We have a large 80mm Fan that cools both PI's and a smaller 40mm fan that primarily cools the Master (it requires more cooling due to it being overclocked and its hosted Minecraft servers) - - The small fan works as following: - - The small fan is either on at 100% or off at 0%. - - As soon as the Master's CPU reaches `50°C` the small fan starts to spin - - The fan requires a 5V. therefore the additional [fancontrol circuit](#fan-control-circuit): - - As soon as the dedicated GPIO pin on the Master turns on, the transistor switches on and powers the fan with 5V from the 5V GPIO pin. - - The large fan works as following: - - The small fan is either at 25%, 50%, 75% or 100% power - - As it cools both PI's, it needs to prioritize the cooling requirements of both PI's it always chooses the higher cooling requirment -- Now the Minecraft server(s): - - The Master hosts two Minecraft servers and currently implemented is the support for a single Minecraft server. - - The Master collects a variety of informations about the server of choice and throws it together with its other system information to form an array (or list in python) with all the information which then "travels" to the PC +A server rack containing 2 Raspberry PI's (Pi 4 & Pi 1.2) and an Arduino Nano is cooled by 2 fans. A display at the front of the rack shows some status infos along with some buttons for direct control of the PI's. +The Arduino's role is to communicate with the PC that it is connected to via USB for monitoring purposes and to tweak settings from the PC. +The display is controlled by the arduino. ### Required for this to work without any modifications are: -- 1x PC or macboock -- 2x Raspberry PI's with GPIO Pins (Model A, A+, B or B+), any version works (I use a **Raspberry PI 4 B** and **Raspberry PI 1.2 B+**) and needed power, ethernet, etc. -connections +- 1x PC +- 2x Raspberry PI's with GPIO Pins (Model A, A+, B or B+), any version works (I use a **Raspberry PI 4 B** and **Raspberry PI 1.2 B+**) and needed power, ethernet for temporary ssh access - 2x cooling fan (I used 1x 5V & 1x 12V fan), external 12V power source (or matching one for the large fan) -- 6x GPIO cables -- fan control pcb with control circuit (The needed circuit is described [here](#fan-control-circuit)) +- GPIO cables +- fan control pcb with control circuit (The needed circuit is described [here](#control-circuit)) -### PC Module -The PC module requests all kinds of system information from both Raspberry PI'S making use of FTP. The Raspberry PI hosts an FTP server from which the PC fetches the text file `output.txt` containing all infos. - -### RPi Master Module -The Rpi Master Module (or Raspberry Pi Master module) gets all sorts of informations from its own system and Minecraft Servers and writes them to the `output.txt` file. It also gets fanspeed requirments from the **RPi Slave Module** making use of binary signal transmission over 2 GPIO pins. This module then controls the fan speeds. - -### RPi Slave Module -The Rpio Slave Module transmits its fanspeed requirments over 2 GPIO pins to the **RPi Master Module**. - -### Setup +### Setup: *outdated!!!* ## Raspberry PI basic setup 1. Install a UNIX operating of your choice onto both PI's 2. If both PI's are different, declare the more powerful one as the master and install an FTP server on it @@ -57,7 +30,7 @@ The Rpio Slave Module transmits its fanspeed requirments over 2 GPIO pins to the 9. Connect the GPIO pins `GPIO_4` and `3.3V OUt` on both PI'S and pin `GPIO_24`, `GPIO_25` and `5V out` of the Master with the fan control circuit board. For pin mapping, view [here](#fan-control-circuit). 10. Connect the cooling fans like shown [here](#fan-control-circuit) -## Fan control circuit +## Control circuit This setup includes a custom designed and built circuit board that manages the cooling fans. The board has the following circuit: diff --git a/arduino/arduino.ino b/arduino/arduino.ino old mode 100644 new mode 100755 diff --git a/pc/main.py b/pc/main.py old mode 100644 new mode 100755 diff --git a/pi-master/main.py b/pi-master/main.py old mode 100644 new mode 100755 diff --git a/pi-slave/main.py b/pi-slave/main.py old mode 100644 new mode 100755 diff --git a/src/circuit.png b/src/circuit.png old mode 100644 new mode 100755