Friday, December 25, 2020

CW key connected to a serial port - External key for SunSDR2 and ExpertSDR2


Ever since i got my SunSDR2  transceiver i loved it for it's quality and versatility. The main mode for me is CW and it's a great rig for that. 

Since the software (ExpertSDR) uses your local area network (LAN) to connect to the radio it's possible to work the bands form another location that the shack. You can even use a wide area network (WAN) so you can basically work from anywhere in the world. But that is for another blog.

Working SSB is pretty simple when you’re not in the shack. Just use the speakers and mic from your laptop. Although not ideal but it works. Better to use a proper headset.
Next comes CW, my favorite. How to hook up a CW key (straight or paddle) to the computer instead of the radio? Actually that’s also pretty simple. It’s just making and breaking contacts, right?  
In this article i'll explain how i've setup my CW key to use on a serial port of my laptop. ExpertSDR2 has options to use a serial port as an input for an external CW key.

Hardware

USB to Serial converter

To hook up a CW key you need a serial port on your computer. I have an old laptop lying around that has a serial port so I started with that one. <<image of serial port on old laptop>> Once that worked, I purchased a USB to serial converter to use on my current laptop.

I got this one on Amazon.


Prolific PL-2303RA




Next is creating a CW-to-Serial converter. And for that I used this scheme from the Instructables website.








I used a chassis mount stereo plug 3,5mm because that's what i had lying around. Next on my list is to 3D-print a case for the D-Sub connector with room for
the stereo plug.

Software

Windows

The USB to serial converter I ordered came with an actual CD. But In these days we don’t use CD’s anymore. So to get the latest drivers I went to the Prolific website since they are the manufacturers of the chip used in the converter. Follow the instructions that come with the driver. After it is installed check your device management to find the corresponding COM-Port. To start Windows Device management click Start (Win key) type compmgmt.msc and hit enter. Under the Ports section you should see the Prolific USB-to-Serial port.


Next, go into Options in ExpertSDR2.



You're all set.

Linux

For Linux no drivers are needed. It works out of the box. If it’s your first USB device it’s probably /dev/ttyUSB0. 

There is one thing though you need to do and that is to give yourself access rights to the USB to serial converter. 

sudo adduser <username> dialout


Replace <username> with your logon name in linux.

You can find it by typing ls -l /dev/ttyUSB* when the converter is plugged in. And then again after you’ve removed it. The one that’s missing is your converter.
With the command lsusb run from a terminal session you can check if the adapter has successfully loaded. 



Then select the device in the Options and don't forget to enable it.

 Mac OSX

In Mac OSX no drivers are neccessary. Just select the new port as shown in the image below.

Issues

Running in Windows I noticed a slight delay between the CW key and the generated tone on the radio. This can make it hard to send CW. It’s like keying when hearing your own echo. Under Linux and OSX there’s no problem, the sound is instant. The delay might be caused by the windows driver for the USB to Serial converter. I have ordered another converter with a different chip inside (the PL-2303HXD). And I’ll post my findings here.


Wrapping up

Thanks for visiting my blog. I've done my best to create a clear and concise article. Please let me know if it was of any use to you. If you have questions or just want te leave a remark, don't hesitate. Just leave a comment or find my contact details on QRZ.

I hope we'll meet on some band in the near future.

 73

Pieter


No comments:

Post a Comment

Launch ExpertSDR2 from a shortcut in Ubuntu

So, i'm running Ubuntu 20.10 and have installed ExpertSDR2. It runs fabulous! But to start ExpertSDR2 i have to go into terminal and nav...