Update README, resources.md, setup.md

This commit is contained in:
Satu Koskinen 2022-10-22 15:55:20 +03:00
parent e19903bb98
commit ba2275b29e
3 changed files with 31 additions and 13 deletions

View File

@ -3,6 +3,8 @@
A software package to record audio and related metadata from a configuration A software package to record audio and related metadata from a configuration
of hydrophones. of hydrophones.
For setup instructions, see `setup.md`.
## Overview ## Overview
Module | Description Module | Description
@ -13,10 +15,12 @@ depth-logger | Record depth of the device and save it in `.csv` format.
*lcd-display | Provide information on the device's LCD screen *lcd-display | Provide information on the device's LCD screen
*device-controls | Provide device control using physical buttons. *device-controls | Provide device control using physical buttons.
*) todo, not implemented yet
## Data Formats ## Data Formats
Type | Output file format | Output file name | Output structure | Content Type | Output file format | Output file name | Output structure | Content
------------|--------------------|--------------------------------------|------------------| ------------|--------------------|--------------------------------------|------------------|-
Audio Data | .wav | <start-time-of-recording>_audio.wav | Each recorded chunk will be written to its own file in `audio` folder | Wav audio data, configuration defined in XXX Audio Data | .wav | <start-time-of-recording>_audio.wav | Each recorded chunk will be written to its own file in `audio` folder | Wav audio data, configuration defined in XXX
GPS Data | .csv | <start-time-of-recording>_gps.wav | All data written to a single file | Csv data with following fields: GPS time UTC, latitude, longitude, speed, satellites in view GPS Data | .csv | <start-time-of-recording>_gps.wav | All data written to a single file | Csv data with following fields: GPS time UTC, latitude, longitude, speed, satellites in view
Depth data | .csv | <start-time-of-recording>_depth.wav | All data written to a single file | Csv data with following fields: date and time, voltage of depth sensor (V), depth (m) Depth data | .csv | <start-time-of-recording>_depth.wav | All data written to a single file | Csv data with following fields: date and time, voltage of depth sensor (V), depth (m)
@ -24,8 +28,8 @@ Log data | .txt | <start-time-of-recording>_log.txt | All da
## Output Locations ## Output Locations
The base location/path for the output directories is defined by a configurable value BASE_DIR_PATH. If directories along this path do not exist, they will be created. If an error occurs or the location is not writable, output will be written to the default location (<x>) instead. The location for the output directories is defined by a configurable value OUTPUT_PATH in `hydrophonitor-config.txt`. If directories along this path do not exist, they will be created. If an error occurs or the location is not writable, output will be written to the default location (DEFAULT_OUTPUT_PATH in hydrophonitor-config.txt) instead.
<ssd card automatic mount??> SSD card mounting is not yet configured in the setup.
A recording session starts when the Raspberry Pi is turned on or booted, and ends on shutdown. Each session will have its output written in its own directory that will be named <start-time-of-recording>_recordings. A recording session starts when the Raspberry Pi is turned on or booted, and ends on shutdown. Each session will have its output written in its own directory that will be named <start-time-of-recording>_recordings.

View File

@ -1,5 +1,13 @@
# Links # Links
# Raspberry Pi GPIO pins pinout
https://pinout.xyz/pinout/i2c
# Setting up an additional i2c bus with the GPIO pins
https://raspberrypi.stackexchange.com/questions/101951/using-normal-gpio-pins-as-i2c-required
# Raspberry Pi water pressure sensor # Raspberry Pi water pressure sensor
https://www.circuito.io/app?components=9443,200000,267055 https://www.circuito.io/app?components=9443,200000,267055
@ -10,5 +18,10 @@ https://wiki.linuxaudio.org/wiki/raspberrypi
https://github.com/supercollider/supercollider/blob/develop/README_RASPBERRY_PI.md https://github.com/supercollider/supercollider/blob/develop/README_RASPBERRY_PI.md
https://madskjeldgaard.dk/posts/raspi4-notes/ https://madskjeldgaard.dk/posts/raspi4-notes/
# Setting up GPS # Setting up the RTC
https://pimylifeup.com/raspberry-pi-rtc/
## DS3231 module pinout
https://electropeak.com/learn/interfacing-ds3231-real-time-clock-rtc-module-with-arduino/

View File

@ -11,6 +11,7 @@
- Pressure sensor - Pressure sensor
- Adafruit ADS1015 ADC - Adafruit ADS1015 ADC
- breadboard, resistors, jumper wires, 12V battery - breadboard, resistors, jumper wires, 12V battery
- RTC module (DS3231)
## Raspberry OS basic setup ## Raspberry OS basic setup
@ -41,8 +42,8 @@ Then the following steps:
If you do not use the Raspberry Pi Imager to set up the SD card, the following steps are required: If you do not use the Raspberry Pi Imager to set up the SD card, the following steps are required:
1. Download the 32-bit / 64-bit Rasbperry Pi OS Lite from here: https://www.raspberrypi.com/software/operating-systems/ 1. Download the 32-bit / 64-bit Rasbperry Pi OS Lite from here: https://www.raspberrypi.com/software/operating-systems/
2. Flash the image to the SD card with the utility of your choice (options for Mac, Linux, Windows?) 2. Flash the image to the SD card with the utility of your choice (options here for Mac, Linux, Windows?)
3. Fill in required details in the configuration files in configuration folder and copy them to the boot folder on the SD card (this is the folder that should open when you open the SD card volume on your computer): 3. Fill in required details in the configuration files in `hydrophonitor/pi-config` folder and copy them to the `boot` folder on the SD card (this is the folder that should open when you open the SD card volume on your computer):
- ssh.txt: this enables ssh on the Raspberry Pi, no need to edit the file (it's empty, the existence of the file in the boot folder is enough) - ssh.txt: this enables ssh on the Raspberry Pi, no need to edit the file (it's empty, the existence of the file in the boot folder is enough)
- userconf.txt: creates a user - userconf.txt: creates a user
- replace <username> with the username of choice (e.g. pi) - replace <username> with the username of choice (e.g. pi)
@ -58,13 +59,13 @@ If you do not use the Raspberry Pi Imager to set up the SD card, the following s
### 2. Setting up the recording programs on the Raspberry Pi ### 2. Setting up the recording programs on the Raspberry Pi
After flashing the operating system to the SD card, it should show up as volume called "boot". After flashing the operating system to the SD card, it should show up as volume called `boot`.
To install all the needed components and to configure the Raspberry Pi to start the recordings when it is turned on, four steps are needed: copying the needed files to the SD card, putting the SD card in the Raspberry Pi and connecting to it on the command line over SSH, running an installer script on the command line, and finally letting it restart and verify that everything works as intended. To install all the needed components and to configure the Raspberry Pi to start the recordings when it is turned on, four steps are needed: copying the needed files to the SD card, putting the SD card in the Raspberry Pi and connecting to it on the command line over SSH, running an installer script on the command line, and finally letting it restart and verify that everything works as intended.
#### 2.1 Copy files to the SD card, set configuration values #### 2.1 Copy files to the SD card, set configuration values
First, set the configuration values in the file hydrophonitor/configuration/hydrophonitor-config.txt. Then, copy the entire `hydrophonitor` folder to the SD card (simple Ctrl+C and Ctrl+V works). First, set the configuration values in the file `hydrophonitor/hydrophonitor-config.txt`. Then, copy the entire `hydrophonitor` folder to the SD card (simple Ctrl+C and Ctrl+V works).
#### 2.2 Plug the SD card in and connect to the Raspberry Pi over SSH #### 2.2 Plug the SD card in and connect to the Raspberry Pi over SSH
@ -129,19 +130,19 @@ There are two scripts that configure the Raspberry Pi to read its system time fr
The first part enables the i2c interface (bus 3 with SDA at GPIO pin 23 and SCL at GPIO pin 24) and loads the needed hardware modules at boot. After that, a reboot is needed to enable the hardware interface. The second part updates the hardware clock module time and configures the Raspberry Pi to set the hardware clock time as the system time on startup. The first part enables the i2c interface (bus 3 with SDA at GPIO pin 23 and SCL at GPIO pin 24) and loads the needed hardware modules at boot. After that, a reboot is needed to enable the hardware interface. The second part updates the hardware clock module time and configures the Raspberry Pi to set the hardware clock time as the system time on startup.
Connect to the Raspberry Pi over ssh and navigate to the home directory: Connect to the Raspberry Pi over ssh, navigate to the home directory, and run the script with following commands:
``` ```
ssh pi@<IP> ssh <username>@<IP>
cd $HOME cd $HOME
sh hydrophonitor/scripts/setup-rtc-1.sh ./hydrophonitor/scripts/setup-rtc-1.sh
sudo reboot sudo reboot
``` ```
``` ```
ssh pi@<IP> ssh <username>@<IP>
cd $HOME cd $HOME
sh hydrophonitor/scripts/setup-rtc-2.sh ./hydrophonitor/scripts/setup-rtc-2.sh
``` ```
### 4. Configuration options ### 4. Configuration options