11/02/2019 at 20:54 •
Here a short update on my Computer Lab Box after more than a year in usage:
I found out that my power supply is to week for more than three targets, the main computer and the switch. So, I installed a 100W 5V power supply and put 5A fuses between the supply than each board.
The first power supply I added to my new portable CompLabBox (see pictures). This new box has also a 12V power supply for the Banana Pi R2 and the ESPRESSObin. The new Box has now the following Targets:
1 x Raspberry Pi 3+
1 x A20-OLinuXino-MICRO
1 x BPI-R2
1 x ESPRESSObin
The main comupter is again a Raspberry Pi 3.
09/14/2018 at 18:16 •
For the last part of the Computer Lab Box I wanted to have the possibility to make a net boot provided by the main computer. This was a very easy task. I found already before a good tutorial on https://bootlin.com/doc/training/linux-kernel/.
For now, I am using a cheap USB memory stick as data storage. Later I want to buy an external SSD.
I also updated my main computer from a Raspberry Pi 3 to a 3+.
The last task is to make a clean image and to install only the needed and tested scripts and tools.
09/03/2018 at 16:13 •
In the end I want that the SD-Card of the main computer has a long life. This can be achieved by setting the Raspi into a read-only mode. For this I installed a script by Phillip Burgess:
If I still want to change something on the Raspi, I can use one of the K30 relays to set the read/write-GPIO (defined by the script) to enable the read/write-mode.
09/03/2018 at 16:03 •
The fifth part for the Computer Lab Box is to build the box itself. The Ikea KNAGGLIG wooden box has the optimal size for four slide-in modules. Every module is an aluminum perforated plate. The size and the distance of the holes on the module are arranged in that way that I can mount all mini-PCs (Raspi., BBB, power-switcher, …) with at least two screws on it. Unfortunately, my local electronics supplier didn’t have enough cables and spacer sleeves for me to finish the inner life of the box. I will finish everything soon.
ad Part 1: I found out that my USB-micro Cable was too thin and too long for the main computer (Raspi 3). I have to find a thicker cable, then I can use the OTB charging adapter for all my modules in the box.
08/28/2018 at 18:50 •
The fourth part for the Computer Lab Box is to establish a connection between the targets and the home network. With this connection it is possible to connect the targets via ssh over ethernet and to update the target over the internet. I want to have a static ip-address which is provided by the dhcp-server in the main computer (Raspi 3).
First, I thought to implement a bridge into the Raspi, but unfortunately the Raspi does not support WDS. The other possibility is to build a NAT.
I wrote a script which is placed in /etc/rc.local that makes a NAT in the direction to the home network and a DNAT in the direction to the subnet of the targets. The targets are connected with the main computer via an ethernet switch. The script and all the settings can be found in the Routing.zip.
Here I must thank my colleagues, Christoph Plattner and Martin Neuditschko, for helping with this issue.
ad Part 1: I had troubles with the power Raspi 3. I thought that max. 2.4 A of the OTB charging adapter USB would be enough for the Raspi. But the power LED of the Raspi started to blink from time to time and I also lost sometimes the ssh connection.
I could not find any USB charger with more than one port that gives 3 A. If I can not keep the system elegant and small, then at least I will try to keep the Lab Box simple. Every “high” power consumer will get its own power supply. All other devices will be connected to the OTB charging adapter.
08/20/2018 at 22:09 •
I have made a small change with the fixed USB port names. I have now set the names to the physical USB port and not to the USB-Serial-Converter.
With this setting every perforated plate (which is used for the targets) gets its own USB-Serial-Converter. It is also much better to put one USB extension cable that is shielded from the Raspi to the target, than like with the old setting 3 loose wires for Tx, Rx and GND and with no shielding.
08/19/2018 at 08:51 •
The third part of this project is the measurement setup. I don’t want to leave my PC to check some pins or LEDs. For this I want to have a simple web cam and a simple logic analyzer.Camera:
For the camera I am using the “Raspberry Pi Camera Module V2” together with the software “motion”. How to install and setup the software I found here:
Logic analyzer:For the simple logic analyzer, I will use “wiringPi” which is already installed by default in Raspbian. With this library I can check the pin status of the J8 header, without initializing the GPIOs before.
First I thought to program a better logic analyzer, but for the projects that I plan in the near future I don’t need a better tooling and if I would need something better, I would use “piscope” ( à http://abyz.me.uk/rpi/pigpio/piscope.html) on my “Raspberry Pi Zero W”. So that I don’t lose any performance on the main Raspi.
08/14/2018 at 19:08 •
The second part of this project is to make a remote serial connection. The CP2102 USB-to-SERIAL-Converter is used to connect to the target. The software connection is done with ssh from the work station to the Raspi and with picocom from the Raspi to the target. I wrote a simple shell script to start the communication.
I want to have fixed target names for the targets. This can be done with udev-rules. Unfortunately, all the CP2102 have the same serial ID. But with the "USBXpress Driver Customization Utility" I was able to assign new serial IDs to the adapters. The Link to the software and the udev-rule can be found in the zip-file Remote_Serial_Connection.
08/07/2018 at 20:31 •
The first part of this project is to make a remote power switcher. The switch is released with a Kuman K30. It is an 8-channel-relay controlled by simple logical interface. Each relay needs around 20mA when active. In the worst case the K30 needs around 160mA. This can be supplied by the Raspberry Pi (see Part 1 Schematic). I want to use two channels for one target, one for the 5V and one for the GND.
For the remote control I wrote three shell scripts. The first script is set in PATH on my work station. It calls a ssh and executes the second script on the Raspi.
The second script controls the GPIOs of the Raspi. It is important to note that the relays are active low.
The third script is placed in the rc.local on the Raspi. It initializes the GPIOs, otherwise the pins are in an undefined state.