2016年10月21日金曜日

DDS VFO controller version up ( Ver3.1 Multi-band )

以前UPしたArduino_nanoを使用したDDS-VFOコントローラーVer.2をバージョンアップした。


 今回は、海外HAMからの要望でマルチバンド対応した。
当初Arduino_nanoでは、メモリー容量やI/Oの数が少ないことから無理であろうと思い、Arduino_mega256の使用を考えた。しかしmegaはメモリー容量、I/Oは十分であるものの形状が大きく今一歩気が進まなかった。
 そこで、Ver2のスケッチを改めて見直し、メモリーの節約を図ってみた。送信パワーメータを受信Sメータと兼用することにしメモリーとアナログポートを1個節約できた。
 その他にも細かいプログラミングの無駄を見つけ出し、当初フラッシュメモリー96%位であったものを何とか92%までに下げることができた。

 しかしポートに関してはアナログ入力(A7)が1個空いただけである。マルチバンドに対応する場合、バンド情報をポートに出力しフィルタ切り換え等を行う必要がある。
 ここで秘策活用である。過去にBASCOM-AVRで開発した万能VFO(旧ブログ参照)の時にやはりポートが足らず苦肉の策として、アナログ入力を利用し、入力電圧の判定でスイッチと利用したのである。AVRのアナログはデフォルトでMAX5Vを1023分解能で判別できる。
今回5個のスイッチを対応できるように抵抗を決めた。誤動作の無いよう十分に電圧差を持たせている。メインループの中でアナログ値を読みに行き、対応電圧範囲内にあるか判別しスイッチが押されたと判定し、対応するサブルーチンに飛ばしている。前作を含め今のところ誤作動は経験していない。
8-Band

 バンド機能は、イニシャルデータを最初にEEPROM(専用スケッチ)に書き込み、続いてメインスケッチを書き込む。現在バンド情報出力の為のポート数が3個であるため最大8バンド(バイナリー3bit)としている。バンド情報を別の方法で出力する(例えばシリアル出力)ことができればバンド数はかなり増やすことができる。
 また、メモリーSWを押すことにより現在の周波数、モード、ステップが記憶され、バンドをメモリー機能としても使える。例えばモノバンドとして使えば8CHメモリーとなるわけである。
 さらに最後にメモリーSWを押した情報で、次回パワーオン時立ち上がるようにしている。
一度SWを押すという操作が必要ではあるが、簡便なメモリーとしても有効と思う。

Schematic

 バンド情報及びモード情報は、それぞれ3bit、2bitでポートに出力される。この出力を74HC238等のデコーダーICで個別情報に変換すれば、BPF切り替えやキャリア周波数を制御できる。
 今回マルチバンドに対応するため、周波数可変範囲をKHz台からMHz台に拡張しているため、表示の反応が少し遅くなってしまった。エンコーダーの取りこぼしは無いようなので表示の感覚だけであるが。
EEPROM DATA

 作業手順としては、
1)イニシャルデータをEEPROMに書き込む専用スケッチ(???)を編集し希望周波数、モード、ステップを編集する。
2)編集したスケッチをコンパイルしてarduinoのEEPROMに書き込む。
3)上記終了後メインスケッチ(???)を書き込む
となる。

 今回のバージョンアップでフラッシュメモリー98%となった。
回路図及びスケッチは当局ダウンロードサイトにUPしておく。
また簡単なモディファイができるよう簡単な解説を載せたいと思っている。
Youtubeに動作をUP  https://youtu.be/h2E5PaQPexQ

DDS-VFO controller Ver.2 with Arduino_nano has been upgraded. (Ver.3)

Multi-band answered with request from amatua_radio_station foreign countries this time.
Because the memory capacity and I/O were few in Arduino_nano at first, I thought it'll be impossible and considered use of Arduino_mega256. It's the memory and  I/O is enough,but it's bigger.

So I reconsidered a sketch of Ver2 once more and planned for saving of a memory. I decided to Po_meter and the S_meter were shared. frash memory and one analog port could be saved.
 It was possible also to find waste of a small programming.
 Consumption of a frash memory fell from 96% to 92%.

 Band is maximum 8 bands.
 Frequency, mode and step are stored by pushing memory SW, and a band can also be used as the memory function. For example when using mono band, it's becomes 8CH memory.
 When power on of VFO is started, it started last band-data memory_SW pushed .

 Band and mode data are output by a port by 3bit and 2bit. When changing this output to individual data by decoder IC(74HC238),  BPF and carrier-frequency can be controlled.

install sketch(Arduino IDE V1.6.5)
1) Edite sketch(vfo_v3eep.ico). That is initial band-data(frequency, mode and step.)
2) Compile & write to EEPROM in arduino-nano.
3) Edit sketch(NKDVFO22_Ver310.ico). That is main progam.
4) Compile &write to flash memorry in arduino\nano.

A skematics and a sketch is in my download site.

Sorry,my English is poor.

73's

 Youtube: https://youtu.be/h2E5PaQPexQ

15 件のコメント:

Unknown さんのコメント...

Здравствуйте, немогу скомпелировать скетч пишит ошибки, что делать?

JA2NKD さんのコメント...

Hi,Владимир Туренко
happy New year
Please show me error message.

JA2NKD Ryuu

Unknown さんのコメント...

NKDVFO18_Ver3_1.ino: In function 'void meter()':
NKDVFO18_Ver3_1:181: error: 'ucg_font_fub20_tr' was not declared in this scope
NKDVFO18_Ver3_1.ino: In function 'void txset()':
NKDVFO18_Ver3_1:242: error: 'ucg_font_6x10_mf' was not declared in this scope
NKDVFO18_Ver3_1.ino: In function 'void modeset()':
NKDVFO18_Ver3_1:258: error: 'ucg_font_6x10_mf' was not declared in this scope
NKDVFO18_Ver3_1.ino: In function 'void setrit()':
NKDVFO18_Ver3_1:311: error: 'ucg_font_6x10_mf' was not declared in this scope
NKDVFO18_Ver3_1:322: error: 'ucg_font_6x10_mf' was not declared in this scope
NKDVFO18_Ver3_1.ino: In function 'void ritlcd()':
NKDVFO18_Ver3_1:339: error: 'ucg_font_6x10_mf' was not declared in this scope
NKDVFO18_Ver3_1.ino: In function 'void steplcd()':
NKDVFO18_Ver3_1:366: error: 'ucg_font_6x10_mf' was not declared in this scope
NKDVFO18_Ver3_1.ino: In function 'void freqlcd()':
NKDVFO18_Ver3_1:378: error: 'ucg_font_osr18_tn' was not declared in this scope
NKDVFO18_Ver3_1.ino: In function 'void screen01()':
NKDVFO18_Ver3_1:518: error: 'ucg_font_6x10_mf' was not declared in this scope
NKDVFO18_Ver3_1:546: error: 'ucg_font_osr18_tn' was not declared in this scope
NKDVFO18_Ver3_1.ino: In function 'void bandwrite()':
NKDVFO18_Ver3_1:619: error: 'ucg_font_6x10_mf' was not declared in this scope
NKDVFO18_Ver3_1.ino: In function 'void chlcd()':
NKDVFO18_Ver3_1:687: error: 'ucg_font_6x10_mf' was not declared in this scope
'ucg_font_fub20_tr' was not declared in this scope

Unknown さんのコメント...



vfo_v3_18eep.ino: In function 'void setup()':
vfo_v3_18eep:51: error: 'ucg_font_5x8_mf' was not declared in this scope
'ucg_font_5x8_mf' was not declared in this scope

Unknown さんのコメント...

Здравствуйте, будет ли работать дисплей без fxma108?
Не могу найти аналог.

JA2NKD さんのコメント...

Hi,Владимир Туренко

Для интерфейса ЖК-дисплея см. Следующий блог.

https://ja2nkd.blogspot.jp/2016/08/arduinolcd-interface.html

Сообщение об ошибке «Я не могу найти шрифт в ucg.lib».
Убедитесь, что ucg.lib установлен правильно.

73's
JA2NKD

Unknown さんのコメント...

CD4010 как я понимаю это аналог?
С библиотекой разобрался, большое спасибо.

Unknown さんのコメント...

Здравствуйте, могли бы вы более подробно описать процесс прошивки.

install sketch(Arduino IDE V1.6.5)
1) Edite sketch(vfo_v3eep.ico). That is initial band-data(frequency, mode and step.)
2) Compile & write to EEPROM in arduino-nano.
3) Edit sketch(NKDVFO22_Ver310.ico). That is main progam.
4) Compile &write to flash memorry in arduino\nano.

Из за трудности перевода ничего не получается

JA2NKD さんのコメント...

Hi,Владимир Туренко

1.
Загрузите vfo_v3eep.ino в IDE, скомпилируйте его и напишите на nano
2.
Загрузите NKDVFO22_Ver 310.ico в IDE, скомпилируйте его и напишите на nano

OK?

JA2NKD さんのコメント...

Hi,Владимир Туренко

Извините, я не в ico, но ino

JA2NKD

Unknown さんのコメント...

Спасибо, попробую.

Canabra Galhardo さんのコメント...
このコメントは投稿者によって削除されました。
Geo さんのコメント...

Hello! I am having issue while trying to compile and write to nano the file NKDVFO22_Ver 310.ico, i am getting the following error: EF_AD9850.h: No such file or directory.
The library you provided for EF_AD9850.h is no longer available for download.
I would need the the original library you have used for your program in order for this to work properly.
Is there another way to download the original library or a way to bypass this error?

JA2NKD さんのコメント...


Hi,Geo
Thank you for visiting my blog.
I will upload the link of the library.

https://drive.google.com/file/d/1lQMH84GK6PuTAMgnO0qG_1Ogihv9EVPb/view?usp=sharing

Let's enjoy homebrew.

73's Ryuu(JA2NKD)

Unknown さんのコメント...

Adakah yang sudah berhasil untuk mengcompile sketch ini?
bagi dong caranya?
terima kasih