This is an old revision of the document!
Raspberry Pi PCs are being installed at the sites for monitoring temperature and humidity in the antenna and (in Katherine) any vibrations on the maser.
First system is in at Katherine which has two raspberry pi PCs, one for the antenna and one for the maser room. The other sites will have PCs in the antenna.
Katherine is set up with a different set of temperature and humidity sensors to the other two sites (DHT11 compared to DHT22). The Raspberry Pi in the maser room also has an Arduino board attached to it for the accelerometer and some analog temperature sensors.
Connect the Raspberry Pi to the Arduino via a USB cable. The Arduino will get power via the cable but it's a good idea to also give the Arduino power via a DC power supply as this provides a more stable reference voltage for the analog sensors.
Each DHT11 sensor requires 3.3 - 5V, ground and a digital input pin. Pinouts are shown below: Use any 5V and GND pin from the RPi.
Any of the RPi digital pins should be fine to use. That’s the ones labeled BCM here: Raspberry Pi pinouts
These have three pins as well:
pin connection --- --------------- - GND middle +5V S digital signal
Connect them to the Raspberry Pi. Any GND or +5V pin will be fine.
Use any digital pin on the Pi and make sure they are set to “False” in TempHumid.conf
(you can give them an appropriate label though). See below.
This should be connected to the Arduino:
module pin Arduino connection ---------- --------------- VCC +5V X out A0 Y out A1 Z out A2 GND GND
Attach the accelerometer to the maser (or whatever you want to measure). You might want to align it according to the orientation diagram on the module.
This should also be connected to the Arduino:
module pin Arduino connection ---------- --------------- T A3 G GND H A4 5V +5V
Edit the TempHumid.conf
file accordingly (see below), then either restart the software by typing CTRL-C in the start_THRecord xterm or by rebooting the Pi.
Software, config file etc are stored in ~pi/TempHumid
The file TempHumid.conf
describes which of the digital pins have sensors attached to them. e.g:
[pin03] gpio = 2 label = Hub sensor = 11 attached = True
The bin
directory contains the executables:
THRecord.py
: Reads sensors and writes values once per ~20s to a sqlite database in the data directory. Note database should grow at the rate of ~200 MB per year and the RPi has ~10 GB of free space on its microSD card.THServer.py
: Listens on port 60030 and returns the latest values on any query. Could be more sophisticated (different data depending on query), just ask . Example output: 2018-09-09 05:52:00.648388 0.0 0.0 46.0 0.0 0.0 49.0 0.0 48.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -273.0 -273.0 19.0 -273.0 -273.0 20.0 -273.0 19.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0 -273.0
where first two strings are date and time (in UT) then all humidities and then all temperatures. The order of values is in digital pin number order (the same as in TempHumid.conf)
client_test.py
: a test script to poll the server and get the most recent datastart_THRecord.sh
and start_THServer.sh
are started automatically after the RPi boots into a desktop session, so a reboot of the RPi should start these processes. They are called from ~/.config/lxsession/LXDE-pi/autostart
. Edit this file if you want to change what happens when the desktop starts.A work in progress… The accelerometer data are available via the web but an alarm system for jolts needs to be implemented. At the moment, no analog temp/humid sensors are in use.
A work in progress… Some preliminary work has been done but we are having trouble 'learning' the remote.
Access via VNC or SSH:
username is pi
, password is as usual
This should be done already, but just in case…
Edit /etc/dhcpcd.conf
:
interface eth0 static ip_address=131.217.61.28/26 # /26 = netmask of 255.255.255.192 static routers=131.217.61.1 static domain_name_servers=131.217.0.19
The hostname should be correct but can be set via the Preferences/Raspberry Pi configuration GUI on the desktop.
Reboot.