DUO up/down band change


Bob G3PJT <bob@...>
 

Hi
As an HF CW op (mainly) one thing I miss is band up/down switch/buttons. Using the EXTIO-232 I hashed one up using an Arduino Due I had spare. Now I have up/down band buttons with built in band /mode memory. Using a rotary encoder and another bit of code I can also now vary the internal CW keyer speed 'on the fly' so to speak. I guess it could easily be extended to other functions except that one limitation is that the EXTIO-232 doesn't offer full access to the CAT command set.

73 Bob G3PJT

P.S. Using the EXT/IO or CAT USB directly looks a bit challenging for my limited software skills judging by comments I read earlier on this reflector.


Patrick Bouldin KM5L <patrick@...>
 

That's awesome, Bob. Any chance you can share all the "how to"/details, including any code? What did you write it in, etc.

73,
Patrick KM5L


Bob G3PJT <bob@...>
 

Patrick,
HF Band up/down
This uses a Arduino DUE, RS232 module  and a prototype board with a bit of interconnection to 2 buttons and a rotary encoder (for CW) 
The connection to FDM-DUO is via the EXTIO-232 box which plugs into the back of my ART.
The software scans the up or down button for a press, when one is detected it ....
- reads the FDW-DUO and converts freq to a band #
- saves the current freq/mode on VFO A to EEPROM at an address depending on the band#
- goes to the next band up or down and reads the freq/mode  which I had last  used on the new band and is stored in EEPROM.
- loads that info into FDM-DUO VFO A
So after a few cycles all the last band/modes are stored in EEPROM per band. This works for me. VFO B is unchanged though it would be easy-ish to save its band settings too.
As far as the CW speed is concerned this works incrementally. So turning the encoder either increases the speed or slows it down a bit. So what ever I had had set in the FDM-DUO from the last QSO , say 25wpm,  one click changes the speed by 1 wpm up or down depending on direction of the encoder and writes it into the FDM-DUO, menu 45 via the 'CS' command.
Code is written in Arduino C++
There are other functions which could be handled but the instruction set which can be read through the EXTIO-232 is limited. I do have a RIT version half working though.
This was all motivated because changing the CW speed in a QSO is a bit fiddly through the Menu and knob. I am just interested in improving my operating interface a bit.
I can post code in the files area  I guess, bearing in mind that this is an on going project and I am a novice progammer.
73 Bob G3PJT


Bob G3PJT <bob@...>
 

Just to say that I now have a touch screen version of the band change working on an Arduino Mega and a 3.5 " screen. Does NR/NB on/Off with RIT as well

73 Bob G3PJT


Antony Watts
 

Bob

That’s very interesting. What is your interface to the FDM-DUO? 9 pin connector or CAT USB? I have CAT usb working and could implement any CAT command… don’t have a fancy screen though…

Antony
M0IFA


Bob G3PJT <bob@...>
 

Antony
I have the EXTIO-RS232 box ( used for antenna switch ) to interface from EXTIO so there are limits on reading from the DUO but I can set several of the useful commands. I am trying to work out which controls I use most often from E1 and E2 and see if I can bring them onto the touchscreen. Certainly the screen makes the operation feel smoother, esp. the band up/down.
Using the CAT USB connector is my next task when the USB-MEGA board arrives. I looked at the other mails and code posted on the use of the EXTIO pins directly but there seemed to be limitations which I didnt feel confident about sorting.
The fancy screen was a steep learning curve, the screen is the one advertised as 3.5 inch IL9486 touchscreen from Amazon and it plugs sraight into the MEGA. The problem is that there are a plethora of libraries and examples - finding the right one took some time and teeth gnashing! And there are still occasional glitches to iron out. What is your Arduino setup?
73 and glad to share code BTW
Bob G3PJT


Antony Watts
 

Hi Bob
I like your idea, I do feel the E1 & E2 knobs are difficult to use, and difficult to remember exactly what they do…

You need to check the CAT command list in the Manual to see if it includes the knob functions you can send/reveice via USB CAT… I have not yet looked at that.

Have a browse down my web site GanymedeHam.blogspot.com and you will see the things I am playing with. I will put up the code I have developed for talking to CAT on my download web site M0IFA.me.

http://m0ifa.me/ALL%20ARDUINO%20SKETCHES/_UTILITY%20SKETCHES/


So far I have sent commands for TX/TX, Frequency setting and USB/LSB modes only but it should be easy to send/read others too…

73

Antony
M0IFA


Andy G4JNT
 

What, exactly, are you uneasy about with the EXTIO port?  It can receive serial CAT commands at 115200 baud 3.3V logic exactly as you would send to the 'normal' CAT interface.   I am not an Arduino user, so don't know how easy / difficult it is to be a USB master, but it all seems a bit convoluted to convert the commands to USB, send them to the DUO only to have them converted back again as if they were serial commands.
Far easier to do it as 115.2kB stop/start, surely?

There are, in my opinion, two ports missing on the FDM-DUo.   A bidirectional CAT port for those of us who want standalone operation, but with keypads etc (although, TBF, you generally only need input, and this is there on the EXTIO connector). 
Also an audio line input - for tone generators, external modems etc that don't want to or can't work with a USB soundcard.



On Fri, 10 Jul 2020 at 10:08, Bob G3PJT <bob@...> wrote:
Antony

Using the CAT USB connector is my next task when the USB-MEGA board arrives. I looked at the other mails and code posted on the use of the EXTIO pins directly but there seemed to be limitations which I didnt feel confident about sorting.


Bob G3PJT <bob@...>
 

Andy
Are you saying that the signals on the EXTIO pins 6/7 at 115k are just internally converted to the CAT USB port at whatever speed you choose?
And that the DUO command formats are the same?

If so then I can try that right away.
73 Bob


Andy G4JNT
 

The input accepts identical CAT commands to those the UuSB one works with, except that the EXTIO serial interface runs only at 115200 baud.  The output contains a lot more than CAT information, I think spectral data as well, but not sure. SO is not terribly useful

But the input on pin 7 can be used to send any command you like to control the radio.   See my note on adding an external keypad    http://g4jnt.com/FDM-DUO_Keypad.pdf
and more generally for the FDM-Duo   http://g4jnt.com/FDM-DU0_Notes.htm

There's even more details on the Elad site,  URL is in that .PDF I wrote





On Fri, 10 Jul 2020 at 15:29, Bob G3PJT <bob@...> wrote:
Andy
Are you saying that the signals on the EXTIO pins 6/7 at 115k are just internally converted to the CAT USB port at whatever speed you choose?
And that the DUO command formats are the same?

If so then I can try that right away.
73 Bob


Alan
 

I think spectral data as well, but not sure. SO is not terribly useful
There is an Bluetooth adaptor that may be made to control the Duo and show the spectrum on a phone/tablet. But not audio without a bit more work.

73 Alan G4ZFQ


Bob G3PJT <bob@...>
 

Andy - I will have to think this through a bit as I need 2 way comms so if I send "IF;" I need the full 32 bytes back.
So my application is not just sending commands like a keypad.
Anyway I have a working system

73 and thanks again
Bob


Giovanni Franza
 

To all,
AUX contains a pseudo serial, speed fixed at 115200 bps, that accept imperative CAT comands (no quesries) and send a continuous serial flow of data alternating FFT and radio status.
See this document: http://www.eladit.com/download/sdr/FDM-DUO/ELAD%20FDM-DUO%20-%20EXTIO%20Serial%20Protocol%20-%202017-09-08.pdf
I've developed a schetch that read that flow (but the Arduino has not enough memory to manage all the data): you can find at: http://www.eladit.com/download/sdr/Linux/sketch_2019_03_12.ino
Most of the code is commented out, but correct. The purpose is to activate/deactivate an output if the mode in SSB/CW. Also it has a pin to switch SSB/CW. It can be useful to inspect how the protocol works.
Also it can be modified to change bands and to display band and/or frequency used.
Hope this helps,

Giovanni - HB9EIK


Antony Watts
 

Giovani!

That is an impressive piece of coding. I have not followed it through in detail but I am most impressed. What are your long term goals, will you build some sort of external controller?

I have read the Manual about the signals on the 9pin but have been put off by the coding complexity. That’s why I chose to use CAT USB commands. If my system does not work I will probably follow your ideas.

Thanks for the code.

73

Antony
M0IFA


Andy G4JNT
 

THe coding is a bit confusing.
The control block, data length is sent LSB first  there's an underlined statement to say so !
  " 3°, 4°, 5° e 6° Length of the data following the control block (coded in ascii to facilitate synchronization) NB: this field is sent with the LSB first method. Hexadecimal value encoded in ascii. Example: for a length of 1024 bytes (0x0400 in hex), 0x30303430 is sent "

 
BUT  the VFO data is sent MSB first
"   The VFO is encoded in pseudo-ascii using its hexadecimal value. 
Example :  14.072.000Hz : 0x30 0x30 0x3D 0x36 0x3B 0x38 0x3C 0x30,  52.000.000Hz : 0x30 0x33 0x31 0x39 0x37 0x35 0x30 0x30"

It took a bit of playing around with a calculator to realise 14072000 = 0x0D6B8C0   and 52000000  = 0x03197500



On Fri, 10 Jul 2020 at 17:51, Giovanni Franza <gfranza@...> wrote:
To all,
AUX contains a pseudo serial, speed fixed at 115200 bps, that accept imperative CAT comands (no quesries) and send a continuous serial flow of data alternating FFT and radio status.
See this document: http://www.eladit.com/download/sdr/FDM-DUO/ELAD%20FDM-DUO%20-%20EXTIO%20Serial%20Protocol%20-%202017-09-08.pdf
I've developed a schetch that read that flow (but the Arduino has not enough memory to manage all the data): you can find at: http://www.eladit.com/download/sdr/Linux/sketch_2019_03_12.ino
Most of the code is commented out, but correct. The purpose is to activate/deactivate an output if the mode in SSB/CW. Also it has a pin to switch SSB/CW. It can be useful to inspect how the protocol works.
Also it can be modified to change bands and to display band and/or frequency used.
Hope this helps,

Giovanni - HB9EIK


Giovanni Franza
 

Hi Antony,
this sketch was coded to help a friend OM that uses this controller to switch two audio filters during microwave contest.
The code was a sort of "reclicle" of BlueDUO code, that is free available on ELAD site.
Feel free to use as many code as you prefer, or to follow other ideas.
Have a nice day,

Giovanni


Giovanni Franza
 

Hi Andy,
I confirm that the representation of the numeric values is not always the same, I think this depends from the fact that the protocol has been developed time to time, with different needs in mind.
Keeping in mind this, the documentation is good, and I left the code, even commented, to further help to implement.
Unfortunately the Arduino has not so much memory to compile the compete code and I was forced to comment out the part not essential for the goals of the sketch.
In BlueDUO sources (java - for Android Studio) it is possiible to see all the code uncommented, but I feel that Arduino sketch is simpler to read because it is most focused on the serial communication.
Have a nice day,

Giovanni - HB9EIK


Andy G4JNT
 

The FFT or spectrum Data:
1024 bytes sent every 150ms, can we assume approx 6Hz bins and 6kHz of spectrum ?
Or it is wider than that?



On Fri, 10 Jul 2020 at 22:00, Giovanni Franza <gfranza@...> wrote:
Hi Andy,
I confirm that the representation of the numeric values is not always the same, I think this depends from the fact that the protocol has been developed time to time, with different needs in mind.
Keeping in mind this, the documentation is good, and I left the code, even commented, to further help to implement.
Unfortunately the Arduino has not so much memory to compile the compete code and I was forced to comment out the part not essential for the goals of the sketch.
In BlueDUO sources (java - for Android Studio) it is possiible to see all the code uncommented, but I feel that Arduino sketch is simpler to read because it is most focused on the serial communication.
Have a nice day,

Giovanni - HB9EIK


Giovanni Franza
 
Edited

Hi Andy,
the band of the spectrum is 192kHz and the bins are of 192/1024 kHz, because 192 kS/s is the sampling rate at which the internal SDR operates.
On the spectrum you can see the effect of the windowing as "shoulders" on the ending of the spectrum.
In BlueDUO I use and display only 160 kHz because I prefer not to show the part of band afflicted by the windowing.
Do not trust the spectrum timing. It is computed when the internal cpu has time, not on precise istants, even if the timings are more or less those.
Reards,

Giovanni - HB9EIK


Andy G4JNT
 

Having looked at the EXTIO protocol I'm now a bit confused.
There is an attempt to make a header for Spectrum and  Parameter data  ,   0x00 30 [30 30 34 30]   and  0x01 31 [3F 31 30 30] respectively, but as far as I can see it is not necessarily unique;   there is nothing to stop that series of bytes appearing in either the body of the spectrum data, which is just 8 bit byte values, or in some of the parameter fields.

I feel sure I've missed some point somewhere, as it clearly does work in practice with the Blue Duo etc,  but why doesn't framing go wrong ?

If the frame pattern is unique, then extracting just small amounts of parameter data is merely a case of looking for the frame, then counting bytes until the wanted ones arrive.   A small circular buffer a low as 31 bytes long would suffice for that - and any small processor like a PIC  could do it.



On Sat, 11 Jul 2020 at 08:24, Giovanni Franza <gfranza@...> wrote:

[Edited Message Follows]

Hi Andy,
the band of the spectrum is 192kHz and the bins are of 192/1024 kHz, because 192 kS/s is the sampling rate at which the internal SDR operates.
On the spectrum you can see the effect of the windowing as "shoulders" on the ending of the spectrum.
In BlueDUO I use and display only 160 kHz because I prefer not to show the part of band afflicted by the windowing.
Do not trust the spectrum timing. It is computed when the internal cpu has time, not on precise istants, even if the timings are more or less those.
Reards,

Giovanni - HB9EIK