random commits

This commit is contained in:
Jonas_Jones 2022-08-29 18:12:44 +02:00
parent 9e84f79584
commit 84a67c2704
13 changed files with 53 additions and 38 deletions

3
.idea/.gitignore generated vendored Executable file
View file

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

8
.idea/PI-MC-WATCHER.iml generated Executable file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

7
.idea/discord.xml generated Executable file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
<option name="description" value="" />
</component>
</project>

View file

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml generated Executable file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Executable file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/PI-MC-WATCHER.iml" filepath="$PROJECT_DIR$/.idea/PI-MC-WATCHER.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Executable file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

49
README.md Normal file → Executable file
View file

@ -1,50 +1,23 @@
# WARNING: This file is outdated. Since the last commit, a lot has changed. # WARNING: This file is outdated. Since the last commit, a lot has changed.
# PI-MC-WATCHER # pi server rack
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 Monitor and control a Raspberry PI server rack.
## Why? ## Why?
Because I can. Overcomplicated stupid projects are a lot of fun. 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: ### To "briefly" explain the concenpt:
- The idea is to have a small server rack containing two Raspberry PI's (PI 4B & PI 1.2B+) 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.
- We will call the PI 4B the *Master* and the PI 1.2B+ will now be the *Slave* 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 Master hosts all the information of its own system (such as CPU temps, frequency, etc.) and the ones from the Slave. The display is controlled by the arduino.
- 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
### Required for this to work without any modifications are: ### Required for this to work without any modifications are:
- 1x PC or macboock - 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, etc. -connections - 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) - 2x cooling fan (I used 1x 5V & 1x 12V fan), external 12V power source (or matching one for the large fan)
- 6x GPIO cables - GPIO cables
- fan control pcb with control circuit (The needed circuit is described [here](#fan-control-circuit)) - fan control pcb with control circuit (The needed circuit is described [here](#control-circuit))
### PC Module ### Setup: *outdated!!!*
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
## Raspberry PI basic setup ## Raspberry PI basic setup
1. Install a UNIX operating of your choice onto both PI's 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 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). 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) 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: This setup includes a custom designed and built circuit board that manages the cooling fans. The board has the following circuit:

0
arduino/arduino.ino Normal file → Executable file
View file

0
pc/main.py Normal file → Executable file
View file

0
pi-master/main.py Normal file → Executable file
View file

0
pi-slave/main.py Normal file → Executable file
View file

0
src/circuit.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After