kamilsss655 / ESPRI

ESPRI (ESP Radio Interface) project providing extended functionalities to ham radios
Apache License 2.0
122 stars 6 forks source link

[FEATURE] Demodulate AFSK messages #22

Open kamilsss655 opened 5 months ago

kamilsss655 commented 5 months ago

Is your feature request related to a problem? Please describe.

In order to allow messaging with these devices demodulation of signal is required.

Describe the solution you'd like

Demodulate AFSK signal.

kamilsss655 commented 4 months ago

Filter:

  1. Pass through 2200 BPF.

Envelope detection (generates bitstream):

  1. Square the signal (y=sqrt(x))
  2. Pass through 1000 LPF.
  3. Run through comparator function.

More context: https://www.notblackmagic.com/bitsnpieces/afsk//#digital-demodulation-implementation

luisesn commented 1 month ago

I've used succesfully LibAPRS with an esp32 to send/receive APRS from an sa868 module, maybe its worth a look.

The only problem is that it uses audio over I2S, I've been wondering why you choose pwm over i2s.

kamilsss655 commented 1 month ago

I've seen the LibAPRS - it uses classic approach which is also what I am doing in my WIP branch.

I tried both I2S and PWM audio output and found that I2S had noticeable digital clicking/noise (pronounced during times of silence). It could be improved with a RC low-pass filter and tweaking the upsample rate, but not to my acceptance criteria.

PWM produced clean sound from the start.