2020年6月22日 星期一

FM Transceivers (en)




Why this

  With these strategies, it is now much easier to develop device drivers. Therefore, I wrote Python drivers for several FM transceiver modules (Si4713RDA5820NKT0803L).  Repository is here.


Transceiver modules 
 Si4713 
  • A transmitter which can also measure noise(signal) level of a particular frequency.
  • Can send RDS message.
  • Popular, resource (documents and sample code are well available).
KT0803L
  • Transmitter mode only.
  • Noisy.
  • Cheap and well available.
RDA5820N
  • Can switch between transmitter / receiver / audio-amplifier / ADC modes.
  • Can send RDS message.
  • PLL locks very slowly.
  • Rare, documents and resources are rare.
  • Website is not reachable.

How to use
  • Usage and test methods are here and here
  • USB-I2C converter is required if you want to control transceivers with PC, options are:
  • There are xxxxx_proxy.py modules with smaller size to be used on ESP32.

Test Results
Si4713
Basic functional test
with FX2LP USB-I2C converter and Jupyter notebook

Basic functional test
with ESP32 and MicroPython Remote Kernel + Jupyter notebook

RDS transmission test 


RDA5820N
Basic functional test

KT0803L
to be added

Dependencies:

FM Transceivers


緣由
  採用 這套策略 之後,開發 device driver 變得容易且快速多了,於是為手上的幾個 FM transceiver 模組 (Si4713, RDA5820N, KT0803L) 也寫了 Python drivers,放在 這裡

模組特性
 Si4713 
  • 主要是 transmitter 的功能。
  • 也可以 量測指定頻率的訊號強度。
  • 可以發送 RDS 訊息。
  • 市面上較常見,開發資源較多。
KT0803L
  • 只有 transmitter 的功能。
  • Noise floor 會整個被抬高,很吵。
  • 市面上常見,較便宜。
RDA5820N
  • 具有 transmitter / receiver / audio-amplifier / ADC 的功能,可以任選一種模式切換。
  • 可以發送 RDS 訊息。
  • 切換頻率的時候 PLL lock 的速度很慢。
  • 使面上較少見,開發資源較少。
  • 官網 連不上。
使用方式
  • 所有的 測試與使用方式 ,都記錄在 這裡 和 這裡
  • 需搭配 USB-I2C converter,例子:
  • 如果要上傳到 ESP32 上面使用,可以用體積較小的 xxxxx_proxy.py 。

測試結果
Si4713
Basic functional test
with FX2LP USB-I2C converter and Jupyter notebook

Basic functional test
with ESP32 and MicroPython Remote Kernel + Jupyter notebook

RDS transmission test 


RDA5820N
Basic functional test

KT0803L
to be added

Dependencies:

Si5351 Clock Generator (en)




Why This
  As stated in previous article ,I wrote python drivers for several popular signal generator modules.
 Soon the Si5351 module I ordered arrived. It has unique characteristic. I put the driver for Si5351 in this repository.
  Si5351 has  3 ~ 8 clock outputs with frequency ranging from  2.5KHz to 225MHz. Spread Spectrum mode is supported. Phase offset between clock outputs can be set. Si5351 functions as quadrature clock source if the phase offset is 90 degree.
  It's difficult to develop a complete device driver for Si5351 because it has 108 registers. Fortunately, with USB-I2C converter we can test Si5351 directly with PC without uploading code to a MCU repeatedly, saving us lots of time and patience. Additionally, being able to set breakpoints and use the debug mode provided by PyCharm to trace code also speeds up the development.
Design and Features
 
    • Python package used to communicate with FX2LP is here.
  • Showing current configuration :

  • Registers value comparision:
    • We can compare two sets of register values, showing all register fields or just the mis-matched ones. This is very useful during device driver development.
  • Find integer divider solution for PLL,  in order to generate specific clock frequencies:

Test Results
Functional tests:
Frequency Dancing (Sweeping)
Control Si5351 with PC + FT232H (USB-I2C converter)  

Control Si5351 with PC + FX2LP (USB-I2C converter) 

  • Also, we can upload the driver to an ESP32 and control Si5351 from there.
Control Si5351 with ESP32+MicroPython
  • We can control an ESP32 with MicroPython Remote Kernel, via a Jupyter notebook
Control Si5351 with ESP32+MicroPython Remote Kernel
  • Spread Spectrum test:
  • Quadrature Clock test:
    • can goes as low as 1.3MHz (with a little bit messing around, out of spec.)

Dependencies: