Difference between revisions of "SDR"

From Stu2
Jump to navigation Jump to search
(Flex 1500)
(Setting up the Audio)
Line 98: Line 98:
 
</pre>
 
</pre>
  
Note - change the windows settings first because the settings in the audio tab of N1MM will change back to the defaults.
+
Note - change the windows settings first because the settings in the audio tab of N1MM will change back to the defaults.  
  
 
In the PowerSDR:
 
In the PowerSDR:
Line 130: Line 130:
  
 
I was able to use the windows recorder (start/accessories/entertainment) to verify the audio was being recorded.
 
I was able to use the windows recorder (start/accessories/entertainment) to verify the audio was being recorded.
 +
 +
I tried using Windows 7, but couldn't get the microphone to mute on DVK playback. There are no devices in the N1MM 'device to mute' pull down menu. This became a show stopper for me and I switch back to XP. There was a note on the N1MM page about this issue, but honestly, I'm not sure I had all the COM port, CAT switching issues resolved. So I'll go back and try again after the September contest.
  
 
=== Setting up the CAT, CW and PTT ===
 
=== Setting up the CAT, CW and PTT ===

Revision as of 09:09, 4 September 2010

I'm working on a couple of projects to make the SDR more productive for the VHF contests.

N1MM Network Protocol

I used wireshark to sniff the N1MM network protocols. N1MM uses UDP. So it's possible to emulate a N1MM station and exchange 'instant messages'. For example, it's possible to parse APRS data and send messages to the operators via N1MM.

TALK%[STA2] Passing WA0DYJ on 432000.0%~

STA1 (.49)			STA2 (.88)
ECHOREQ%2008-07-22%19:43:11%~   ECHO%2008-07-22%19:43:11%~
STATUS%0%43200000%0%W4IY%0%0%%~ ECHOREQ%2008-07-22%16:43:10%~
ECHO%2008-07-22%16:43:10%~      STATUS%1420000%1420000%-1%W7IY%0%0%SB%~

Start up sequence
STA1 (.49)			STA2 (.88)
ECHOREQ%2008-07-22%19:46:42%~	ECHOREQ%2008-07-22%16:46:41%~
FREQ%43200000%~	
ECHO%2008-07-22%16:46:41%~	ECHO%2008-07-22%19:46:42%~
LASTQAT%2008-07-19 23:46:42%~	FREQ%1420000%~
				LASTQAT%2008-07-22 23:45:59%~
CHECKSUM%2008-06-29 18:00:22%2008-07-22 23:46:42%1273027086%FD%~
				TALK%[STA2] My contest: DX, yours: FD%~

Exchange ECHOREQ/ECHO with each station in the group.

Send UDP packet to port 12056
<N1MMRotor><goazi>20.0</goazi><offset>0.0</offset><bidirectional>0</bidirectional></N1MMRotor>

Enter az in entry window, press Alt-J

N1MM and the Flex 5000A or Flex 1500

Using N1MM and PowerSDR for CW and SSB contesting. You need the following:

  • PowerSDR (Flex 5000A or 1500)
  • N1MM
  • Virtual Audio Cable (VAC version 4.09, not 4.10)
  • N8VB Virtual COM port software (or com0com or VSP Manager)
  • Windows XP

Using a Single COM Port

The following article shows you how to use a single COM port to take care of both the CAT and keying controls. Note, I had to restart N1MM after I made the configurations as per the article. However - if you get stuck and need to separate out the control signals, the method described in this wiki may be helpful. The audio configurations in these pages are still valid.

http://kc.flex-radio.com/KnowledgebaseArticle50119.aspx

Getting Ready

VAC provides virtual cabling between the Flex 5000A and Windows. Use the control panel in VAC to set up two cables. They are generic, use the default. When you're done, you'll have two virtual audio cables that we will use like this:

VAC
Windows -> Cable 1 -> Flex    TX audio to the Flex
Windows <- Cable 2 <- Flex    RX audio from the Flex

Install N8VB virtual COM driver, enable the virtual connections like this:

COM6 -> COM16   -   use for CAT control
COM7 -> COM17   -   use for CW
COM8 -> COM18   -   use for PTT (Not sure about this)

I was NOT able to use the same port for the CW and CAT. For the VHF contests, I used COM1 with the Flex 1500 (not 5000A) to key an external sequencer. The sequencer handles keying for the preamp, transverter (Elecraft) and Flex 1500. A footswitch and COM1 are inputs to the sequencer. The COM ports are only representative. You need three pairs, one pair for CAT control, CW and PTT. N1MM only allows COM1-COM8, so plan accordingly.

Flex 1500

We plan to use the Flex 1500 to feed a transverter for the upcoming ARRL September VHF contest. As of Sept 2, 2010, the Flex 1500 has a bug that doesn't allow a delay on the flexwire PTT out. Additionally, there is no way to delay the internal PowerSDR TX from the external HW or CAT PTT inputs. (Missing feature) Protecting our mast mounted preamp is my main goal and I need to switch things from two inputs. (N1MM and a footswitch.)

My solution was to modify my homebrew sequencer to accept two inputs; one from the computer's COM port RTS line and one from my footswitch. The sequencer handles the proper switch timing for the preamp, transverter and rig. The transverter switches the power amplifier. I had to choose this method because PowerSDR doesn't delay the actual internal PTT from the hardware PTT. For example, if I keyed the rig directly with footswitch, I can't delay PowerSDR TX until the external sequencer finished. Transmitting RF before the preamp switches out of RX mode would destroy the preamp.

If the delay was sufficient to allow the preamp to switch out, then I would be able to key the rig directly with the footswitch and let the rig key the sequencer. (Note the Kenwood TS-2K allows you to set this internal delay to 20ms.) This would be the simplest configuration. There may actually be enough delay due to the PowerSDR's latency, but I didn't measure it and I didn't want to depend on the preamp relay winning the race.

The rig can be keyed from N1MM via the CAT commands. In fact, it must be keyed via the CAT command to allow the DVK functions to work when I use the footswitch as an input to the sequencer. This means I need to use COM1 to key the sequencer. (I can't use the rig output, because that causes a feedback loop. Sequencer keys rig, rig keys sequencer.) Using a COM port pair from N1MM doesn't allow the audio to come from N1MM for some reason. (If you uncheck the Allow VAC to override button, then N1MM DVK works, but the footswitch ceases to function.)

If the rig is keyed directly from the footswitch (internal delay still an issue) AND the sequencer is keyed from the rig - then a COM port pair in N1MM will work fine. The CAT commands work, too. However - since this is confusing - just key the rig from N1MM using CAT commands!

Therefore, I configured N1MM to key both the CAT PTT and COM1 PTT. Since I can control the DVK/CW keyer start-up delay, I can ensure there will be enough time for the preamp to switch out.

The flex 1500 also has a known issue with CW, but an external WinKey will work fine. I set it up on COM6 (arbitrary port #). Configuring the Winkey is not so mysterious and the PTT set up as described above will work fine. Just make sure you add the start up delay to account for the sequencer timing.

As mentioned above, the ideal configuration for VHF/UHF work would use two PTT outputs, with settable delays from the input PTT (CAT or hardware) and the internal PowerSDR TX PTT, plus a settable delay between the input PTT and the output PTTs. That way, we could let the software handle the entire sequencing job. Since the 1500 only has a single output, I think we are stuck with an external sequencer for the preamp.To further simplify, we really need that settable delay between the 'master PTT' and the internal PTT.

Of course, if you are using the 1500 for HF and only need to key an amplifier, then the single PTT OUT is fine. In this case, the delay between PTT IN and PTT OUT would be handy to ensure the rig TX stops before the amp is switched out.

Setting up the Audio

In Windows:

Start, Settings, Control Panel, Sounds and Audio

Sounds Tab: Make sure sound scheme is set to none (nothing selected) otherwise, 
you'll have 'dings' mixed in with your TX audio. ;)

Audio Tab:
Sound Playback: Virtual Cable 1   (This is TX audio going to the Flex)
Sound Recording: Virtual Cable 2  (This is RX audio coming from the Flex)

Note - change the windows settings first because the settings in the audio tab of N1MM will change back to the defaults.

In the PowerSDR:

Setup -> Audio -> VAC

Under Virtual Audio Cable Setup Box
Select:
Driver: -> MME
Input: -> Virtual Cable 1
Output: -> Virtual Cable 2

Set the buffer size to 2048 and the sample rate to 48000
Check Allow PTT to override VAC for PHone

in N1MM

Config -> Config Ports, Telnet Address, Other -> Audio Tab

Select # 1 - Zero or Single Sound card
Select Device: Virtual Cable 1
Select Input Line: Microphone
Select Line to Mute: SW Wave (not sure if this matters)
Recording Bits: 16
Recording Sample Rate: 48000
Radio Input Port: Microphone

I was able to use the windows recorder (start/accessories/entertainment) to verify the audio was being recorded.

I tried using Windows 7, but couldn't get the microphone to mute on DVK playback. There are no devices in the N1MM 'device to mute' pull down menu. This became a show stopper for me and I switch back to XP. There was a note on the N1MM page about this issue, but honestly, I'm not sure I had all the COM port, CAT switching issues resolved. So I'll go back and try again after the September contest.

Setting up the CAT, CW and PTT

In the PowerSDR:

Setup -> DSP -> Keyer
Under the connections box,
Primary: 5000 (uses the key jack on the back panel)
Secondary: COM17
PTT Line: RTS
Key Line: DTR

Setup -> CAT Control
CAT Control box
Uncheck Enable CAT - so you can make changes
Port: Port COM16
Baud: 57600
Parity: none
Data: 8
Stop: 1
Check Enable CAT

Under PTT Control:
Uncheck Enable PTT
Port: COM18  -> Note, under N1MM, I set use CAT command for
    PTT. This must be enabled for the N1MM audio to work.
check RTS
Check Enable PTT


Then, in N1MM:

Config -> Configure Ports, Telnet Addresses, Other -> Hardware Tab

For the Flex 5000A:
COM6: Kenwood   Set: 57600,N,8,1, DTR=Always Check: Radio PTT via CAT command (this keys the SDR)
COM7: Check CW/Other  Set: DTR = CW, RTS = PTT, Allow external Interrupts, WinKey = unchecked
COM8: Check CW/Other  Set: DTR Always on, RTS = PTT

For the Flex 1500:
COM1: DTR=Always, RTS=PTT - this keys the sequencer via an open collector transistor.
COM6: Kenwood   Set: 57600,N,8,1, DTR=Always Check: Radio PTT via CAT command (this keys the SDR)

Using the Configuration

You should be able to run N1MM and PowerSDR together. The frequency and mode should appear in N1MM and you should be able to change modes by entering something like "USB" in the call sign entry window. If this doesn't work, then check the CAT settings.

For CW, enter CW in the call sign window, press ENTER and the Flex will switch to CW. Press F1 and check the transmission. (Should key the rig and send the F1 message.)

For SSB, double check the messages and make sure you have the directories and files set up correctly. Use Ctrl-O to change operators. Note, this usually means there must be a directory and corresponding file to store the WAV files recorded by the operator.

Ensure the VAC button is on
Ensure the MON button is on in PowerSDR

Press the foot switch - should key the rig
Check 'GATE' and set the threshold (neat feature)
press SHIFT-CTRL-Fx to start recording
Talk
press SHIF-CTRL-Fx to stop recording
Release the foot switch

press Fx to play the message

Note, there is a delay between your voice and the monitored audio. N1MM is recording the monitored audio, not the microphone audio. Since this uses the audio card in the flex, where the mic attaches, I don't think there is a way to record the audio directly from the mic. Perhaps a more complicated set up, which uses the sound card in the computer?

VFO Knob - Software Solution

Note - I found this neat utility, which allows you to use the wheel in a mouse to send tuning commands to the Flex. While a knob still seems favorable to me, this gets the job done nicely.

Here is a link to the e-mail, with instructions:

http://mail.flex-radio.biz/pipermail/flexradio_flex-radio.biz/2007-June/016424.html

Here is a link to the file:

http://kotisivu.dnainternet.net/ahti/sdr-1000/HotWheel.zip

Turn on the scroll lock and the num lock. The following commands will go to Flex.

- mouse wheel roll and click
- ctrl+arrow keys (up/down=tuning, left/right=sets tuning step)
- NumPad 9/3 = Band Up/Down
- NumPad 8/2 = Filter Up/Down
- NumPad 7/1 = Mode Up/Down

I'm still looking for a Griffin Knob equivalent. (I think one could build a C# program combining the HID stuff from Microsoft with the concepts from the HotWheel program. This would be more effective than building yet another hardware interface using PIC controllers. Incidentally, it seems like this could be built into the PowerSDR program. I have no idea why it isn't.)

Update: 11/08 - I used the SDR-5000A and the above program during the 2008 ARRL CW SS contest. It worked great! I searched and pounced the entire time and ended up with 441Q's and 78 Mults. The point and click feature of PowerSDR was nice and the filters were awesome. Too bad K3AN (and maybe others) beat me. Guess I need to call CQ more often and stay on the low bands longer.

I also discovered a set of instructions for using a single virtual COM port for the link between N1MM and the SDR. Makes my set up obsolete. (Almost silly, really. ;)