Skip to content

Customization

In the default configuration, the ahoi modem is designed for acoustic communication

  • in the frequency band from 24 - 60kHz
  • with an Aquarian Audio AS-1 hydrophone.

The schematics and firmware in the GIT repository are designed and optimized for these characteristics. However, the ahoi modem can be used with different hydrophones. It also possible to modify the communication frequency band and tweak other aspects of the hardware to your needs. Due to the complexity of these modifications, we restrict this chapter to the most relevant use case, namely the use of an alternative hydrophone.

In this chapter, we explain the function and dimensioning of the hardware's building blocks and relevant firmware aspects.

Note

We encourage you to

  • study the hardware concept and
  • read through this entire chapter

if you plan modifications and before you begin with any customization.

Prerequisites

To use a different hydrophone, you have to take the following steps:

  1. For your hydrophone, determine

    • its capacitance \(C_\mathrm{H}\) (the AS-1 has 5-6nF) and
    • its transmit voltage response (TVR) and free-field voltage sensitivity (FFVS).
  2. Customize the hardware as outlined in the following.

  3. Modify the firmware to match the hydrophone's TVR and FFVS.

Warning

Please note that using a hydrophone other than the AS-1 is at your own responsibility and risk. Failure to use a compatible hydrophone may cause permanent damage to the hardware.

Info

When using a hydrophone other than the AS-1 from Aquarian Audio, you will have to

  • make changes to the firmware to compensate the frequency response and
  • adjust the input impedance of the receiver to match the capacitance

When using a hydrophone other than the AS-1, you must ensure to meet a set of compatibility criteria. A minimal set of requirements is provided in the following table. Additional requirements and restrictions may apply.

Property Requirement
Band width The device should have a bandwidth of 60kHz or more.
TVR The transmit voltage response should be fairly linear in the used frequency band.
FFVS The free-field voltage sensitivity should be as flat as possible.
Voltage The device must tolerate input voltages of at least 20V (40V peak-to-peak) when used with TX or 40V (80V peak-to-peak) when used with TXB.
Capacitance The capacitance of the device must be less than 10nF; larger values may cause permanent damage to the hardware

Hardware Modifications

Receiver (RX) Input Stage

The hydrophone and input stage of the receiver form a high pass filter. Adjustment of the receiver circuit's input impedance RJ1 must match the hydrophone's capacitance \(C_\mathrm{H}\) and lowest passband frequency \(f_\min\). Pick RJ1 such that

\[ \operatorname{RJ1} \approx \frac{10}{2\pi \cdot f_\min \cdot C_\mathrm{H}} \]

For the default values \(C_\mathrm{H}\) = 6nF and \(f_\min\) = 24kHz, we find RJ1 \(\approx\) 10k\(\Omega\).

Receiver (RX) Pre-Amplifier (optional)

The pre-amplifier amplifies the analog signal before it is fed into the bandpass filter. It offers an optional lower gain setting for noisy environments or short-range communication. If the path loss of your hydrophone is considerably lower than that of the AS-1, you may want to activate this lower gain setting.

Path loss and pre-amplifier gain

The AS-1 has a TVR of ca. 130dB and an FFVS of ca. -210dB, summing up to a total gain of -80dB; i.e., a path loss of 80dB at the reference distance (of 1m).

Transmitter (TX/TXB) output voltage (optional)

If your hydrophone has a lower voltage tolerance than stated in above requirements, you may change the transmitter's voltage level.

  • In case of TX, the maximum output level is controlled by resistor R201, where the absolute output level is

    \[ \text{TL} = \left( 1 + \frac{100\,\mathrm{k}\Omega}{\text{R201}} \right) \cdot 1.65\,\mathrm{V}\;. \]
  • In case of TXB, the maximum output level is controlled by the two resistors R201 and R211, which must have identical value. The absolute output level is

    \[ \text{TL} = \left( \frac{68\,\mathrm{k}\Omega}{\text{R201}} \right) \cdot 1.5\,\mathrm{V}\;. \]

Please note that the output is a sinusoidal waveform with a respective maximum and minimum voltage of \(\pm\)TL.

Power efficiency penalty

Reducing the maximum output voltage level will reduce power efficiency of the transmitter. This can be compensated by adjusting the power supply rails of TX and TXB, which is yet beyond the scope of this documentation.

Firmware Modifications

All hydrophones exhibit a certain transmit (TVR) and receive (FFVS) characteristic that is compensated in software to equalize or balance the output levels (loudness) of the different frequencies. For this purpose, we use a look-up table that contains a compensation factor for the frequencies used for communication.

The file gain_48x.c in the folder ./src/lut/os/fsk_25-60 of the firmware repository contains the 2-dimensional array FREQ_TXGAIN_LIST[TRANSDUCER_NUM][FREQ_LIST_NUM], which is comprised of FREQ_LIST_NUM compensation factors for each of the TRANSDUCER_NUM defined and supported transducers. The first entry (set of compensation factors) FREQ_TXGAIN_LIST[0] or FREQ_TXGAIN_LIST[TRANSDUCER_USER], respectively, is reserved for your custom transducer. Its FREQ_LIST_NUM==49 values represent the relative compensation of frequencies from 24kHz to 60kHz in steps of 750Hz with the following semantic:

  • All compensation factors are encoded as 16-bit signed fixed-point values with 14 digits (i.e., linear factors multiplied by \(2^{14}\)).
  • The entry for the most silent frequency (in the communication band) is assigned a value of 1 (0x4000).
  • All other entries contain the required compensation factor, such that loudnesses are equalized.

Replace the entries of FREQ_TXGAIN_LIST[TRANSDUCER_USER] with your custom compensation factors, then recompile and install the custom firmware image. From the MoSh, you can then instruct the modem to use the custom compensation values via the command transducer 0. Please note that this must be repeated every time the modem is (re)started. To make the modem use your custom values automatically by default, enable the corresponding option in config.mk by commenting in:

# CFLAGS += -DTRANSDUCER_DFLT=TRANSDUCER_USER

Example

  • Assume that your hydrophone is the most silent at 42kHz and loudness increases by 5% every 750Hz.
  • The entry at index \((42\,kHz-24\,kHz) / 750\,Hz = 24\) receives the value 0x4000 (\(1 \cdot 2^{14}\))
  • The entries at indices 23 and 25 receive the value 0x3CF4 (\(1/1.05 \cdot 2^{14} \approx 15604\))
  • The entries at indices 22 and 26 receive the value 0x3A0D (\(1/1.05^2 \cdot 2^{14} \approx 14861\))
  • ...
  • The entries at indices 0 and 48 receive the value 0x13D8 (\(1/1.05^{24} \cdot 2^{14} \approx 5080\))

To facilitate adjustment, a script to produce values for insertion in this table will be available soon.