オーディオコーデックの選択

1.はじめに
Hermes基板に内蔵されているMic及びPhoneの機能をRedPitayaでは「WM8731Audio Codec Proto」と呼ばれる外付け基板で実現している。MikroElectronica社から比較的廉価(送料込みで$28=約3,000円程度)で入手できるのでこれを試してみた。今まではこの機能をPC内蔵のマイク及びスピーカーにVACで接続していたが、これではOpenHPSDRのMasterAFとかMIC利得とかのスライダーが使えないのとデジタルの場合にVAC切り替えが必要とか音声の遅延が気になっていたので試してみたかったためである。

2.接続
RedPitayaとの接続は下図の通りで、デジタル音声はI2S Codec(GPIO-driven frame-sync?)でボリューム等の制御はI2Cであり電源を含めて8本の接続が必要である。I2Cのアドレスは0x1Aである。


基板回路図


WM8731    Red Pitaya
SCK --- DIO4_N (E1) Pin 12

MISO --- DIO5_N (E1) Pin 14

MOSI --- DIO6_N (E1) Pin 16

ADCL --- DIO7_N (E1) Pin 18

SDA --- (E2) Pin 10

SCL --- (E2) Pin 9

3,3V --- (E1) Pin 1 oder 2

GND --- (E1) Pin 25 oder 26


RedPitayaとの接続


実態配線図
3.実物の確認
ネットで問題視されている項目を実物で確認した。

1)クリスタル周波数
ATS 122SM-1 CTS 05 1630 CTS社の12.280MHzのSMDタイプの水晶発振器。マニュアル通りで巷で問題視されている16MHzのものではない。

クリスタルの捺印はATT122SM-1

2)C23は容量の表記はないが形状からして1μFはない。マイク入力のWolfsonのICマニュアルでの推奨値は1μFでIC側が正極となっている。このバイアスはエレクトレットマイク用であるがテスターで確認するとIC側が負極である。なお、ライン入力としてはハイ受けでステレオ入力が可能で基板にL/RLINEINが用意されている。

C23の形状
4.動作確認
WM8731を搭載したRedPitayaのインターフェースボード。マイクとヘッドフォーンがWM8731に接続される。キーヤーもRedPitayaのE1に収容されてRedPitayaの内蔵キーヤーが働いている。






上記の接続で

1)PowerSDRとRedPitayaのソフト設定等は不要でそのまま動作する。

2)OpenHPSDRではMasterAFとかMIC利得とかのスライダーが使える。

3)従来のVACを通しての復調音よりも遅延は少ない。音声復調の遅延は気にならない。CWにおいてもサイドトーンを聞きながらパドルを操作できる。

4)C23に1μFのコンデンサーを外付けしない場合はハイが強調されていて聞きづらい。1μFを追加するとローも伸びて聞きやすいが所詮はポータブルオーディオの範疇は超えられない音でありHF機だからとの割り切りが必要になる。

少し気になる点としてダイアルを回すとかすかにクリックノイズが聞こえる。どこで発生しているか原因は不明。また、CW Memories and Keyboardが使えない。このことは以下のサイトでも指摘されているが現状解決されていないようだ。

http://forum.cq-nrw.de/viewtopic.php?f=40&t=202


1μFのタンタルコンの+極性マークに注意。


追記:ダイアルを回すときのクリック音はバンドスコープで雑音レベルが10dBほど盛り上がるほど強力で、I2Cケーブルを抜いても止まらないがI2Sケーブルを抜くと止まることが分かった。(03/09/2018)

追記:ダイアル音はIN1とIN2の入力にステップアップコイルを入れるとなくなった。12MHz帯で雑音が多いのが分かった。切り分けた結果PE4302EのクロックとTS-680SのUSBドングルからの雑音は特定できた。その他は依然不明。これらの雑音は送信用のバーチカルアンテナで強力に受信されるが屋外にあげたLZ1AQのスモールループアンテナでは感知されない。机の近くのPC周り(特にUSBの12Mbps(FS), 1.5Mbps(LS)は注意)からのものと推定される。(03/17/2017)
2つの雑音源は特定。
追記:160m帯で1.85MHz付近で強力な雑音源は流用しているiPad用の電源アダプターであることが判明。自励であるためか不安定であるので容易にわかる。Switching電源の利用は160m運用には要注意。(03/18/2018)


5.VAC経由でPC側のASIOオーディオコーデックを利用する代案
Master AFスライドは使えなくなるが、VAC経由PCの内蔵オーディオコーデック利用するか外付けのオーディオデック利用する代案がある。以下この方法実例を示す。

この方法のポイントは

1)VACの接続先はSSBの場合はマイクスピーカーであるがデジタルではWSJT-Xなどのソフトがありこの選択機能が必要でVOICE MEETERなどのミキサーソフトを使う

2)モニターが使えないため内蔵のCWキーヤー機能が使えない。外付けのキーヤーを別途用意するかPCにソフトキーヤーを搭載するかの判断が必要。ソフトキーヤーを選択すると遅延特性が厳しいのでASIOまたはASIOALLなどの低遅延オーディオフォーマットの調整が必要となる。

6.実際の構成例
ASIO2のインターフェースを持つE-MU0204を中心にした構成例を以下の2枚の写真で示す。
BOSEのスピーカーとヘッドフォーンはE-MU0204に接続されている。手前のキーヤーはPCIインターフェースのCOMポートに接続されている。


RedPitayaのインターフェース基板にはVM8731コーデックは取り払われている。その代わりEhoCwが制御するもう一つのCOMポートは草色のミニステレオコネクターでフォトカップラーを介してRedPitayaのE1コネクターのDash信号に接続されている。

以下に各ソフトの設定例を示す。

1)VOICEMEETERとASIO Codec設定
ASIOの設定が重要。HARDWARE OUT A1でE-MU0204を選んでMenuでSystem settings/OptionsでBuffering ASIOはOpenHPSDRと同じく512 Virtual ASIO TypeはInt32LSBに変更 Prefered Main Sample Rateは48000Hz, Engine ModeはSwiftを選択。

ASIO:ASIO E-MU AudioをクリックするとASIO E-MU Audioのコントロールパネルが出る。Buffer Sizeは20ms, Bit Depthは24-bit。

2)OpenHPSDRの設定
Voicemeeter Virtual ASIOを選択してBuffer Sizeは512, Buffer LatencyはAutoとした。 Gainの設定はVOICEMEETER側で行うことを前提に0dBとした。



3)EhoCWの設定
Sound deviceでASIO: Voicemeeter Virtual ASIOをSample rateを4800 Channelsを1-2を選択。CW keyer input portとRPのKey inputを制御するCOMポートを設定。25 wpm程度でも操作できる。

7.まとめ
PC側のオーディオデック用いる構成の最大メリット豊富な外付けオーディオコーデックが選択できることである。小生が使っているのはオーディオ機器としては普及品であるがS/Nは110dBを超える性能がありVM8731の85dBに較べて25dBは良い性能でありいったん聴き較べをするとVM8731に戻る気がなくなってしまう。しかし同期外れを防ぐためバッファーサイズなどの細かい調整とCPUの過負荷時の音切れを防ぐためにバックグランド処理を制限するなどのOSのチューニングが必要な難点がある。早く新型のPCに切り替えたい欲望をおさえるのに苦労することになる。(2018年11月9日)

コメント

  1. Hey,

    I have been following your internet blog for a year with the conversion of the ts680sdr.
    I also got inspired by it and in January I bought an old broken TS-140 for not too much money.
    Last year I built a Red pitaya tranceiver with 2 transverters for 2mtr and 70cm. The work perfectly.
    The conversion of the ts140s is proceeding smoothly, and the WM8731 Audio Codec I have now integrated in the ts140s also the capacitor of 1uf I have soldered on the pcb. The volume control and microphone input now also work and can be operated from the front. Now I'm making a pcb for the if10c communication, the parts are now ordered via ebay thought it was a very nice idea !!. Everything fits in the ts140s I'm going to install it on the metal plate after the final stage Word continued !!

    '73 Lucien PE1OFO

    Email L.Lammertink@home.nl

    返信削除
  2. Hi Lucien,

    Thank you for sending the information and status of your TS-140SDR project. I recently learned one JA station has built another TS-680SDR based on my blog. Thus, we can form global-based TS-140/680SDR community. Great!! Please describe your approach in your blog site and let's share your achievements to improve our idea.

    The reason I brought up CAT interface is to explore the possibility to adress a majory of ham population who own CAT build-in rigs such as TS-870S (one generation after TS-140/680S) and who want to switch to state of art SDR rigs with reasonable budget. Key will be to offer simple and easy modification solution to their existing rigs along with low-cost SDR engine such as RedPitaya or Hermes-lite, e.t.c.

    By the way, it is a small finding but I believe the porarity of 1uF capacity described in Wolfson datasheet and RedPitaya related sites is wrong. Do you agree?

    take

    de JA5AEA

    返信削除
  3. Hi Take,

    Thanks for your anwer!
    I test it whit my mc60a and i reverse the polarity of the capacitor and i heare no diverence. I dont know if its good or not..

    '73 Lucien PE1OFO

    返信削除
  4. Lucien,

    Yes, I also confirmed the fact that both polarity works as capacitor. Wiki of Tantalum capacitor does not say it loses the capacitor characteristics under reverse voltage but it says "it represents a very high localized current density which can cause a tiny hot-spot" under reverse voltage condition. In my case, I use 10v rated capacitor with the reverse voltage is about 0.5V, it is within the safety guideline stated in the Wiki.

    So, my conclusion is that it does not matter but better to know the nature.

    I hope we can keep the dialog about the progress of mutually interested project.

    Regards,

    take

    de JA5AEA

    返信削除
  5. Take,

    Of course we can stay in dialogue!

    I'm working on the engineering of the various PCB layouts.
    And I am still waiting for the necessary components that I have ordered on ebay.
    If everything goes well, all parts fit into the ts140s.
    I make sma connectors on the back, tx1 tx2 rx1 rx2 which I can switch with various small relays and then I also have the possibility for rx1 = rx2 / rx2 = diversity and there is also a possibility to control a transverter.
    If I have an update again, I'll let you know. It is my intention to make a YouTube video from the conversion to TS140SDR.

    '73 Lucien PE1OFO

    返信削除
  6. Hi Take,

    How are you?
    My ts140sdr project is almost finished.
    Its working very good!!
    Only the cat control does not work.
    Is it possible to send me a screenshot from your settings in omnirig and comport settings in windows?
    Maybe i'm doing something wrong..

    '73 Lucien PE1OFO

    返信削除

コメントを投稿

このブログの人気の投稿

RedPitayaを使ったSDR構成のまとめ

Thetis完全対応:sdr-transceiver-hpsdr-ananxd(3月1日改定)

DAIWA CNW-518 アンテナチューナのフィルター特性