Arduino Uno 16MHz on Linux command-line
The modemrx.ino project can be built on the command-line and also loaded into the Arduino IDE on any supported platform.
# Download arduino-cli (run once)
./download-arduino-tools
# Download arduino libraries (run once)
./download-arduino-libs
# Build and upload the modemrx project via USB serial
make -C modemrx upload
# Read characters decoded from the modemrx project
make -C modemrx read
Listen and record audio on Linux via Arduino ADC
The recordwav.ino project allows you to listen to or record the audio at the ADC, making debugging with Linux tools easier.
# Download arduino-cli (run once)
./download-arduino-tools
# Download arduino libraries (run once)
./download-arduino-libs
# Build and upload the recordwav project via USB serial to record from the ADC
make -C recordwav upload
# Save audio to disk for offline testing, adjust gain and center for SparkFun SPH8878 microphone
./recordwav/save_arduino_sparkfun_sph8878.sh
# Listen to live audio on speakers, adjust audio gain and center for SparkFun SPH8878 microphone
./recordwav/live_arduino_sparkfun_sph8878.sh
Linux testing of modem
The modem code also builds on Linux with the ability to encode to and decode from WAV files.
Automated regression tests are provided to ensure that different sample rates all work after changes are made.
Tests also verify that HydroModem's Bell 103 encoding is compatible with MiniModem http://www.whence.com/minimodem/ on Linux.
# Download Debian/Ubuntu dependencies (run once)
./linux-test/apt-get-deps
# Build Linux binaries
make -C linux-test
# Generate WAV files using test strings
./linux-test/bell103_goertzel_wav_encoder
# Decode WAV files and recover test strings
./linux-test/bell103_goertzel_wav_decoder
# Run test suite that verifies encoding and decoding at various sample rates.
make -C linux-test test
Connecting a microphone or hydrophone
This is currently the software needed to read audio from the ADC pin on an Arduino Uno. Currently it is easiest
to test by connecting a microphone like the SparkFun SPH8878 and testing it in air listening to the sample audio
from a phone transmitter. Once this is working, you then need to connect a hydrophone to the ADC pin. The design
of a suitable hydrophone and how to connect it is future work. Make sure that your microphone does not exceed the
voltage specs of the Arduino ADC.
Future work is to provide a circuit schematic and PCB layout for a custom dual ATmega328P design with input from a piezo microphone.
The modem also needs to be tested in water and frequencies tuned for best performance.
|