kamilsss655 / ESPRI

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

[BUG] Recorder causes squelch open likely due to EMI #67

Open kamilsss655 opened 3 months ago

kamilsss655 commented 3 months ago

Describe the bug

When ESPRI records audio from K5 that is in scan mode sometimes squelch opens without reason, or stays open even though there is no signal.

ESPRI was powered from USB cable.

Not sure if anyone else noticed such behavior? Anyone found a solution?

To Reproduce

Steps to reproduce the behavior:

  1. Connect ESPRI to K5 (ESPRI powered from USB cable).
  2. Enable scan on K5.
  3. Enable recorder on ESPRI (save to SD card).
  4. Squelch on K5 opens or stays open without a reason (phantom signal).

Expected behavior

ESPRI should not interfere with host radio squelch.

Additional context

I think this is caused by electromagnetic interference generated by ESPRI itself.

ESPRI can generate EMI from following sources:

This needs additional research and testing if anyone is interested please post your findings.

So far I disabled touch button, but this didn't fix the issue. Maybe it is LED or WIFI then? Once the source of interference is known the code could be altered to turn of the EMI source during recording.

kamilsss655 commented 3 months ago

Upon further testing it looks like the SD card activity can be blamed for the EMI. Clicking "Refresh" button on SD card file browser page causes consistent squelch opening.

kamilsss655 commented 3 months ago

Increasing SD card frequency from 400kHz to 20MHz seems to greatly improve the EMI generated by the SD card, at the expense of some audio noise in the audio recording.

If someone wants to experiment the frequency can be adjusted here:

host.max_freq_khz = 400;