Android soundcard TX/RX

This project using Android soundcard as TX/RX at the same time and

Generates sine, square, NRZ (Non-Return-to-Zero), and noise waveforms

Supports pulse modulation with adjustable PRF (Pulse Repetition Frequency) and pulse width

Frequency range from 20Hz to 20kHz

Real-time FFT (Fast Fourier Transform) analysis of microphone input

Peak frequency detection with noise filtering

Spectrum visualization

Frequency sweep with configurable start/end frequencies, step size, and delay

Three sweep modes:
UP, DOWN, and BETWEEN adjustable 2 frequencies

Optional mute duration between frequency steps
sliders for frequency, PRF, and pulse width control

Buttons for playback control, waveform selection, and special functions
Separate windows for sweep control and microphone analysis

Ability to save reference spectra

Similarity scoring between live and reference signals
Custom FFT implementation
Hanning window for spectral analysis
Peak detection with accurate frequency measurement
Noise filtering and smoothing

Playback controls

Waveform selection

Pulse modulation toggle

Frequency and analysis displays

Sweep mode selection

Parameter configuration

Start/stop controls
Mic Sensitivity adjustment
Mic Delay control
10 frequencies history display

Here is Main menu with accurate frequency reading

Sweep menu

Mic control and frequencies history record

Could save and compare and match up to 10 peaks the stored spectrum has white color live spectrum different color

3 Likes

Looks interesting…
Is it available to download somewhere?

This is the first prototype and some enhancement I am working on when finished I am going to post it on GitHub

1 Like

Ok … I’ll watch out for future posts :+1:

1 Like

(post deleted by author)

The heart of this project is to break the capabilities of the sound card by manipulating the timing to get the shortest spectrum analysis time… which is similar to using direct ports on the Arduino, but with a different technique… and it actually worked.

SAMPLE_RATE = 48000;
FFT_SIZE = 1024;
Needs 21.33 ms time

When a small time delay is added to the microphone signal, the delay will appear in the FFT analysis time, and when the microphone delay is zero, the FFT analysis speed is completely different.

Echo peaks appears with mic delay with no delay the peak is clean indeed it’s taking less than 4 ms rather 21.33 ms

Here added about 50 ms delay to the mic

The peaks appear with echo or decay and sample time rise to 50 ms + real time

Without mic delay sampling less 1 ms but in real it could reach up to just 4 ms