An RPI audio recorder
This system expects the RPI Relay Board and the CodecZero to be installed on the RPI. The relay board should be wired to provide 27 V to the PCB signal conditioner as shown in the wiring image in the repo. Also, it is critical that the RTC battery be installed and the RPI set up to charge the battery.
-
Create a repos directory on your RPI in your home folder:
user@raspberrypi:~ $ mkdir repos user@raspberrypi:~ $ cd repos
-
Clone this repo into that directory:
git clone https://github.com/dynamic-and-active-systems-lab/boring_recorder
-
Pi-Codec is a submodule that can be initialized after the cloning of this repo with
git submodule update --init --recursive
-
When using this for the first time, you need to generate the virtual environment and install the necessary packages:
python3 -m venv .venv
source ./venv/bin/activate
pip install -r requirements.txt
To get the audio recording to run on boot, you need to edit the crontab file on the RPI:
sudo crontab -e
Once in the file add the following:
@reboot /bin/sleep 10; /home/dasl/repos/boring_recorder/recorderLaunch.sh >> /home/dasl/repos/boring_recorder/mycrontablog.txt 2>&1
- If you add new package requirements, add them to the requirements.txt file using
pip3 freeze > requirement.txt
- Note on initial setup: to add other submodules, use
git submodule add <webaddress_of_git_repo>
The relay board documentation can be found here. It states states that the communication occurs on RPI pins 37, 38, and 40 (BCM no. 26, 20, and 21, respectively).
The Codec Zero board documentation can be foudn here. It states that the communication occurs on RPI pins 3, 5, 12, 35, 38, 40 (GPIO 2, 3, 18, 19, 20, and 21).
There is a conflict of RPI Pins 38 and 40 between these two boards. The scripts in this repo currently only use the pin 37 relay channel to turn on and off the peripheral signal conditioner. The using the other channels have not been tested and could cause problems. This is noted in the code.