Re: CW keying

255 views
Skip to first unread message

Steve Haynal

unread,
Jul 28, 2015, 12:54:53 AM7/28/15
to Ken Hopper, herme...@googlegroups.com
Hi Ken,

Thanks for the feedback. Just to avoid any misunderstanding, I'm referring to the Hermes-Lite when I say it is the right decision to not have an audio codec on board. I know the Hermes has one, but for a budget SDR, the BOM and assembly complexity goes up with a codec. Plus, I see little benefit in reimplementing a soundcard and would rather leverage the economy of scale and use one of the many good, low latency and inexpensive sound cards out there. 

Since I don't have a Hermes, there are a few questions about CW that I hope you can clear up. First, I assume you are plugging your headphones into the sound out on the Hermes or openHPSDR hardware? I see in the RTL how a sidetone is added pretty much immediately, but in full duplex operation, the IQ samples must still be sent to the PC, processed and filtered and then sent back as audio over the network. This adds some latency. Do you also hear a faint echo of your transmitted signal as well as the immediate sidetone then? How good is QSK on a Hermes or related hardware?

What do you think about these solutions? Use a $24 Behringer Micromix MX400 to mix the keyer audio with the pc audio for your headphones. Use the mic input on your PC, or a second mic input with a <$10 USB sound card to do the audio mixing on the PC. I've used these USB sound cards with SoftRocks and some have ASIO drivers for low latency.

73,

Steve
KF7O
 



  

On Mon, Jul 27, 2015 at 4:29 PM, Ken Hopper <iqalways...@gmail.com> wrote:

Hi Steve, I am an avid SDR CW user.  One issue that VK6PH overcame was that if I am wearing headsets (most common for CW ops) I can not hear the (feeble) sidetone from my WinkeyUSB keyer. There seemed to be no simple way to mix an external sidetone and Rx audio. Fortunately, Phil allowed us to plug headphones directly into the rig and hear both the sidetone and the Rx audio :-)

Thank you very much for considering this Dinosaur mode :-)

0x49 de Ken N9VV

On Jul 27, 2015 11:11, "Steve Haynal" <softerh...@gmail.com> wrote:
Hello List,

I've updated the RTL on github and will be testing the various builds to release new firmware in a few days. Anyone who wants to compile their own can test the following features now:

 * CW support. I've been reluctant to add the existing Hermes CW support back as it is a full-fledged keyer and with no audio out (which I believe is the right decision) doesn't make much sense. Jim Ahlstrom suggested the HiQSDR model which I like with just a single key in and requiring the user to supply a keyer and tone generation. CN3 pin 3 is the CW key input, normally open and short to ground when key is closed. Ground is pin 1. Pin 3 may need a pull-up to 3.3V (6-10K) but the FPGA is setup to provide a weak pull-up. Pin 5 is a key press indicator for LED use or external tone generation. The CW wave has basic shaping of a 3ms ramp up and down, similar to the the HiQSDR. I am not currently a CW operator, so testing is appreciated. Back when I first got my extra ticket I had to do 20 wpm and most of my QRP operation was CW... 

 * IP assignment. The save IP address command was originally intended to save a, IP address to the EEPROM, and eventually may do that on the Hermes-Lite. For now it has been reenabled to dynamically set the IP address of the Hermes-Lite.

 * General merging of code. I had too many branches going on and have brought the changes back into one version.

 
There is no support for CVA9 gigabit yet. I had planned to work on that this weekend but spent all of my hobby time on the above changes. I am close with UDP TX and RX tested and a plan and understanding on what needs to be done to connect the old protocol to this new interface. Hopefully by next weekend...


73,

Steve
KF7O

--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Laur

unread,
Jul 28, 2015, 4:19:41 PM7/28/15
to Hermes-Lite
Hi,

On Hermes the audio DAC is fed either with output samples from the PC
or with FPGA generated sidetone; the audio is not mixed. Also of
interest, though sidetone rise/fall are shaped, the audio sent by the
PC for output is not shaped down before sidetone generation begins and
can cause clicks in the headphones. As far as hearing yourself, there
are various confirgurable delays related to Tx/Rx turnaround delays
with relays etc that pretty well prevent the demodulated RF from
echoing back under normal operation, though you can certainly
configure it in a way where it is audible by minimizing delays and
increasing DSP buffer sizes substantially.

The total round trip delay from the FPGA to the PC through the
receiver chain and all DSP and back to the DAC for output in an
average setup has been measured to be about 32ms. If the PC receives
the key information and bypasses all dsp and simply generates sidetone
mixed to VAC I would imagine that key down to audio out could be
trimmed to ~5ms. I believe PC based sidetone to VAC is viable in
PowerSDR but it would take significant changes and is not likely to
happen soon. I do still agree with all that generating the RF CW
signal on the FPGA is the right approach; the round trip delay through
the DSP causes delay that is equal to 1 dit at 30wpm. According to
feedback, CW ops start getting sensitive to that around 20wpm.

I believe we have a (binary) output for sidetone, right? It should be
possible to design a little headphone feedthrough circuit that
generates sidetone audio and mixes it with the feedthrough audio. How
do people using external keyers handle sidetone while using
headphones?

73, John K5IT

Steve Haynal

unread,
Jul 28, 2015, 4:44:26 PM7/28/15
to herme...@googlegroups.com

---------- Forwarded message ----------
From: Steve Haynal <st...@softerhardware.com>
Date: Tue, Jul 28, 2015 at 8:22 AM
Subject: Re: CW keying
To: "Ken N9VV (Win-10 v10240)" <iqalways...@gmail.com>


Hi Ken,

Thanks for your thoughts. I am posting to the list as I hope for more beneficial discussion on CW with SDR use.

73,

Steve
KF7O


On Tue, Jul 28, 2015 at 5:11 AM, Ken N9VV (Win-10 v10240) <iqalways...@gmail.com> wrote:
HI Steve,
R R R on all your thoughtful comments. You have a good understanding of the many issues regarding CW.

I have my headphones connected *directly* to the Hermes/Apache Transceiver front panel (Hermes PCB). That way I have an immediate sidetone with no (audible) delay. Using the PC generated Sidetone is impossible when operating CW. Any "latency" > 20ms drives your brain nuts <g> because the sidetone from the PC and the paddle push do not coincide.

The ARRL used to qualify "QSK" using their "TOR" test. Any T/R times < 20MS so that you could operate the ancient "TOR" modes of AMTOR and PACTOR where an acknowledgement to the other station had to be within the 20ms window. {*very* few modern Analog rigs have T/R < 40ms let alone 20ms <g> - old FLEX 5000 gear was an embarrassing 80ms}

I would not say the Hermes/OpenHPSDR implementation is QSK, but it is perfectly useful on CW up to about 40WPM. If you have ever listened to a Ten-Tec rig or one of the direct conversion QRP kits, you can appreciate how useful it is to have excellent QSK. Ten-Tec rigs always tested around 8ms T/R time. T/R was "invisible" to your ear and very high speed operators covet that gear (Orion, Jupiter, Corsair).

A practical example is working DX SPLIT. You need very fast T/R times in order to hear the DX station come back with your call. If you are deaf for more than 20ms, you often miss your call being sent by a 35wpm DX station or during a contest. Barry N1EU has been complaining about this for several years of frustration with SDR Transceivers <LOL>

Yes, thank you again, I followed your suggestion and bought a Behringer UCA202. It is unopened sitting right here for use in the future :-) I should try it to mix the sidetone and RX audio as an experiment.

O.K. I'll not waste any more of your precious time. Keep those inventive fires burning.

Blessings for you and your family Steve,
73 de Ken


On 7/27/2015 11:54 PM, Steve Haynal wrote:
Hi Ken,

Thanks for the feedback. Just to avoid any misunderstanding, I'm
referring to the Hermes-Lite when I say it is the right decision to not
have an audio codec on board. I know the Hermes has one, but for a
budget SDR, the BOM and assembly complexity goes up with a codec. Plus,
I see little benefit in reimplementing a soundcard and would rather
leverage the economy of scale and use one of the many good, low latency
and inexpensive sound cards out there.

Since I don't have a Hermes, there are a few questions about CW that I
hope you can clear up. First, I assume you are plugging your headphones
into the sound out on the Hermes or openHPSDR hardware? I see in the RTL
how a sidetone is added pretty much immediately, but in full duplex
operation, the IQ samples must still be sent to the PC, processed and
filtered and then sent back as audio over the network. This adds some
latency. Do you also hear a faint echo of your transmitted signal as
well as the immediate sidetone then? How good is QSK on a Hermes or
related hardware?

What do you think about these solutions? Use a $24 Behringer Micromix
MX400

mix the keyer audio with the pc audio for your headphones. Use the mic
input on your PC, or a second mic input with a <$10 USB sound card

do the audio mixing on the PC. I've used these USB sound cards with
SoftRocks and some have ASIO drivers for low latency.

73,

Steve
KF7O




On Mon, Jul 27, 2015 at 4:29 PM, Ken Hopper <iqalways...@gmail.com
<mailto:iqalways...@gmail.com>> wrote:

    Hi Steve, I am an avid SDR CW user.  One issue that VK6PH overcame
    was that if I am wearing headsets (most common for CW ops) I can not
    hear the (feeble) sidetone from my WinkeyUSB keyer. There seemed to
    be no simple way to mix an external sidetone and Rx audio.
    Fortunately, Phil allowed us to plug headphones directly into the
    rig and hear both the sidetone and the Rx audio :-)

    Thank you very much for considering this Dinosaur mode :-)

    0x49 de Ken N9VV

    On Jul 27, 2015 11:11, "Steve Haynal" <softerh...@gmail.com
        <mailto:hermes-lite...@googlegroups.com>.

Alan Hopper

unread,
Jul 28, 2015, 5:15:49 PM7/28/15
to Hermes-Lite, iqalways...@gmail.com, st...@softerhardware.com
Steve, List,
I fully understand the gold standard for cw has to be direct switching to the fpga and sidetone generation locally. Stepping back from this I would like to explore how to do this best over the network for those with remote radios or slightly lower expectations. I'm aware a lot of time has been spent on this by a number of very clever people and am interested as to where the biggest latencies/problems occurred.  My initial thoughts on reducing latencies are that the sidetone generation can happen directly in the portadio/other callback and avoid any buffering or resampling delay. If the fpga could generate the tone and ramp and look at the newest entry in the fifo rather than wait for a number of preceding packets as it does in ssb/audio mode that might also help.
Just thinking out loud.
73
Alan M6NNB

Roger Rehr

unread,
Jul 28, 2015, 6:30:38 PM7/28/15
to Hermes-Lite
I do not believe that the CW sidetone should be generated within the radio under all circumstances.
I am running my own modification of KissKonsole remotely over a multi-mile wireless link.
I can tell you based on a lot of personal experience and experimentation with my software that for remote operation you do NOT want the sidetone to be part of the radio in this circumstance, because of latency over the ethernet path, even when very low bandwidth notification-of-state-change solutions [which is what I settled on] are used.

You need to have the CW sidetone generated at the physical location where the operator is generating the CW. 

As a matter of convenience I use WinKey's sidetone, and contrary to Ken's experience, my WinKey sidetone is extremely loud, and easily heard through my noise cancelling headphones.  In fact, I have to wrap the little one-inch RadioShack speaker that I use to generate the sidetone in a cloth and place the face of the speaker down on the table to keep from disturbing my family elsewhere in the house.  But I also have available a software generated sidetone and the difference in latency between when the CW sidetone path includes a long wireless link and when it doesn't is the difference between usability and uselessness.

So while it is fine to have a CW sidetone generated within the radio, that will not be useful under all circumstances and specifically will be useless when an ethernet path with significant latency is present between the user and the radio. 

I bring up this point just so that those who have not operated remotely are not surprised in the future.

73,

Roger Rehr
W3SZ


ZL2APV

unread,
Jul 28, 2015, 9:09:34 PM7/28/15
to Hermes-Lite, 73w...@gmail.com
I had been working on an interface for a keyer input to ghpsdr3-alex which will support either a hand key through a serial to usb or a K3NG via USB. The radio was going to produce the sidetone and the key presses were going to be fed via ethernet to the hardware. The USB polling was pretty good and picked up the keystrokes in a reasonable number of mSec and getting the keystroke to the hardware was a function of the ethernet latency and for a localhost connection was negligible but I did not really care too much about that path as I knew when I finally stopped keying the other station would not send back until they had received the last keystroke and I would be in Rx mode by then. Of course that does not help much for contest break in unless your network latency is low i.e. no good over an internet path. The real hassle was getting the audio to play and stop within 10 mSec of the key being pressed and released and you need less for really high speed. This was due to Qt's QAudio implementation and the way that the buffers are filled. In the end I abandoned the sidetone in the radio although I believe that I can get it to go but simply pass the keystrokes directly to the hardware, listen to the sidetone from the keyer and use my keyer widget for the radio to play recorded messages like CQ's etc.

I can hear the sidetone (just) through my headphones so I am going to make a mixer for the radio output and keyer sidetone so I listen to it through the phones. In addition I will add an intercom for field days so a second op can listen to everything and also talk over the intercom to the primary operator but that is a digression.

To summarize
1. Generate your sidetone from the key/keyer (Need a little oscillator on a straight key)
2. If you can't hear it due to headphones, mix it with Rx output (same goes for a mike)
3. Get the key up/down state to the firmware by the fastest method
4. Generate the tone in the firmware and send it directly to the hardware.

73 Graeme ZL2APV. Hi Roger, hope you are keeping well.

Joe

unread,
Jul 30, 2015, 3:09:51 PM7/30/15
to Hermes-Lite, 73w...@gmail.com, gvj...@gmail.com
 Using the latest firmware version CW keying  CN03 ground thrua resistor 
using a counter I see no difference in transmit frequency depending on
if CWU or CWL boxes are checked using PowerSDR. The transmit frequency seems 
fixed in CWL-CWU depending on band selected. In fact keying the transmitter no matter 
what mode your in (AM SSB) results in CW output.
Again I'm not a CW op others need to check.

Joe   wa9cgz

ZL2APV

unread,
Jul 30, 2015, 6:03:59 PM7/30/15
to Hermes-Lite, 73w...@gmail.com, gvj...@gmail.com, joep...@ameritech.net
Hi Joe,

This is normal. The Tx frequency is that indicated on the dial. On Rx in CW mode the receiver is displaced from the indicated frequency either up or down depending on CWUSB or CWLSB and the displacement is equal to the tone frequency e.g. 700 Hz etc.

Got to go out for the day but will get to testing the CW this evening.

73 Graeme zl2apv

Steve Haynal

unread,
Jul 31, 2015, 1:57:47 AM7/31/15
to Hermes-Lite, 73w...@gmail.com, gvj...@gmail.com, joep...@ameritech.net
Hi Joe,

The frequency behavior is normal as the FPGA essentially generates the simplest carrier wave without processing from the PC.

Currently the key turns on this carrier in any mode as it was easier to test. There is a CW External/Internal flag in the protocol that I will adhere to in the next release. I expect there will be more feedback regarding CW refinements.

73,

Steve
KF7O

Steve Haynal

unread,
Jul 31, 2015, 2:07:21 AM7/31/15
to Hermes-Lite, softerh...@gmail.com
Thanks for all the comments on CW. Here are some models possible for CW that I gathered from this discussion:

** Key->HL->TX   and Key->HL->Sidetone or Sidetone indicator

This has the lowest latency for TX as there is no ethernet or PC to deal with. This is what is implemented in the Hermes/Hermes-Lite and I believe HiQSDR. The Hermes substitutes a sidetone for the audio out during key press. I wondered what happens in full-duplex but it appears as if PSDR doesn't really do full duplex at the audio level. There will be latency for the audio from the PC, and this may be distracting to Hermes-Lite users as it goes on/off after the latency -- the sidetone is not substituted immediately.


** Key->PC->Sidetone and Key->PC->Ethernet->HL->TX

This is the setup I believe Roger suggested. Latency to the sidetone is probably pretty low and responsive, but TX will be delayed. This works if the HL is remote, but TX latency may mean you miss a QSO with some DX stations according to Ken.


** Key->PC->Ethernet->HL->Ethernet->Sidetone

I think this was what Roger was advising against. Anytime something has to cross Ethernet there will be added latency. It appears that the key and sidetone need to be entirely on the PC or HL, never split.

73,

Steve
KF7O





Roger Rehr

unread,
Jul 31, 2015, 8:23:38 AM7/31/15
to herme...@googlegroups.com
Hi Steve,

Thanks for the excellent and very clearly stated outline!

I would recommend that two options be available, 1 and 2 as you listed them:

** Key->HL->TX   and Key->HL->Sidetone or Sidetone indicator [this is optimal for local operation]

** Key->PC->Sidetone and Key->PC->Ethernet->HL->TX [this is the only operation that will provide satisfactory function for remote operation]

You are correct, the third option [** Key->PC->Ethernet->HL->Ethernet->Sidetone ] is what I was recommending be avoided.

Of course, sidetone generation directly by the keying device such as the WinKey sidetone always works, too.

Thanks again for all that you do!

73,

Roger
W3SZ
Reply all
Reply to author
Forward
0 new messages