Home USB - RS232 PTT Control and Audio Interface
USB - RS232 PTT Control and Audio Interface PDF Print E-mail
Written by Aj1S - Andy   
Monday, 05 April 2010 03:53

USB - RS232 PTT Control and Audio Interface
by AJ1S - Andy

------------------------------ Purpose and Scope ----------------------------------

The following notes and specs were compiled to create an physical interface between
a radio and PC. The original idea was to support FLDIGI but there might be other
applications for the design. Everything was done in text form using notepad such
that the file could be sent or distributed over the air.

This interface will allow the user to connect radio and PC audio lines
together and provide PC transmit control of the radio (via the rs-232 rts or DTR)
when using FLDigi sound card digital software. The RS232 port can be on-board the
PC or a USB-RS232 convertor


---------------------------------- Caution ----------------------------------------
As of this writing, testing was done using a ICOM IC706MKIIG and the Accessory
Socket. Operation using the DATA socket of the 706 which is on the IC2820H as well
has yet to be tested. It is unknown if there are any differences between the
accessory socket and the DATA socket but it is assumed that the internal connections
are the same

Although a working prototype was created from these notes, Use the notes as
guidelines, a place to start and experiment. You may find a better method, parts,
PC configs and levels are slightly different, radio levels and pin out a little
different, have a different radio or ...

MEASURE ALL LEVELS I.E. AUDIO, VOLTAGE, ETC BEFORE MAKING CRITICAL CONNECTIONS AND
GOING ON THE AIR. Overdriving modulator on the radio can cause damage as well as
interference. Overdriving the PC sound card can damage it as well.

If in doubt, ask someone that has a experience with electronic development.

Ham Radio is all about... the art of radio.


----------------------------------Audio Section---------------------------------

This section contains information regarding the audio section of the project.

PC to Radio Interface Specifications and schematics

Transmit
Adjustment Note: The output of the PC into the rig can be adjusted via the
"SOUND GUI" and with the 10 Kohm Potentiometer on the interface board.
Some means to measure the correct level should be employed. On VHF/UHF FM either a
deviation meter or o'scope should be used. One published method is to listen
to the transmitted TUNE tone with another reciever and adjust until the level
will not get any louder or distorted and back off slightly.

PC Output Headphone 8 ohms 100 mV rms -----> Radio Mod Input 10kohms 100 mVrms
Test with PC Tower Volume Control, Master and Wave, set at half position measured
approximately 100 mV pk-pk or 35 mVrms. So some adjustment can be made on the fly
using the GUI

Actual Measurement
AFSK Input resistor level was set to about 80 mVpk-pk with the PC Master Volume
Control set to mid-point and wave level set to midpoint - Reasonable level control
from the PC's Master Volume control GUI can be achieved approx. 10 mv gradients

CAUTION: WITH THE PC VOLUME LEVEL SET TO MID POINT ON BOTH MASTER AND WAVE SETTING
OUTPUT LEVEL WAS OBSERVED TO BE APPROX. 750mV DIRECTLY FROM THE OUTPUT JACK


The second channel of the PC speaker output was terminated with 5 ohms. this output
could be used with a speaker to monitor the FLdigi tones

Receive
Radio to PC
On the Receive side, when using the accessory or data jack, the output from the
radio will be fixed, as
Radio AF out 4.7 k ohms (100 - 300 mVrms) ----> PC Input 1k to 20kohms min 10mV
(some older cards 100mV)

Actual Adjustment
Adjust the level from the radio going to the PC to about 10mV using a o'scope.
Launch FLDigi
Note the level of the "upper signal level (dB)" adjustment This adjustment is
indicated in the window at the bottom of the screen next to the WF/FFT/SIG
window/button It will be some value from 0 to -40 with arrows on either side

i.e. WF -20

 


(The upper signal level(dB) text can be prompted when the pointer is moved over
the button/window)

Set this value to -20 this will be the mid range of the adjustment. When you
adjust toward 0 the signals will become less intense or less sensitve and
adjusting toward -40 will make the signals more intense or more sensitive.

Adjust the Potentiometer on the circuit board to a level such that you see
yellow random "hash" pattern on the blue water fall screen.
Find a digital signal and see if you get red as well as yellow in the pattern

You can adjust the "upper signal level(dB)" to suit varying conditions and
signal levels when in use.

*****NOTE
After the potentiometers are adjusted on the interface board, only small
adjustments using the PC's Sound Master Volume and Wave levels and FLDigi's
"upper signal level(dB)" value are needed during normal use.

Convert Vpk-pk to Vrms
Vrms= vPk-pk x .35355

Schematic as used with a Tower PC and a ICOM IC706MKIIG Accessory Jack

Radio                        1000uF Cap +     10k ohm Pot              PC
AFSK Output pin >----------||-------      GND----/\/\/\/----- Tip PC mic input
                                                        |------------------^



Radio                     1000uF Cap +        10k ohm pot               PC
AFSK Input pin <----------||-------        GND----/\/\/\/----< Tip PC Speaker Output
                                                     |-------------------^ (wiper to GND measured) 
                                                                                
(approx 1.35kohms)

GND pin ----------------------------------- Gnd Ring PC (Both connectors)


The second channel of the PC speaker output was terminated with 5 ohms. this output
could be used with a speaker to monitor the FLdigi tones



Happened to have electrolytics in the junk box but cer disc caps could be used.



-------------------------------Transmit/Receive Control  Section--------------------------

This section contains information regarding the transmit/receive section of the project.

USB-RS232 Pinout

Pin Function Data Direction
1 DCD - Data Carrier Detect Input
2 RxD - Receive Data Input
3 TxD - Transmit Data Output
4 DTR - Data Transmit Ready Output
5 GND - Ground -
6 DSR - Data Set Ready INPUT
7 RTS - Request to Send Output
8 CTS - clear to Send Input
9 RI - Ring Indicator Input

The USB/RS232 adaptor DB9 pinout functions as labeled. The only
signals that are supported by FLdigi for Push to Talk (PTT) Function are DTR and
RTS.
Home PC configured for com4 - Hardware handshaking enabled

In RX Mode DTR @ -10 Volts
TX Mode DTR @ +10 Volts


To install and configure the USB/RS232 adaptor to function with FLDigi,
1. Connect the adaptor to the pc
2. Install the driver
3. To verify which serial port the adaptor is assigned
1. Go to Start
2. select Control Panel
3. Select System
4. Select Hardware
5. Select Device Manager
6. Select "Ports(COM & LPT)"
7. Find the Adptor's Manufacturers Name
In this case it is Edgeport. In Parenthesis the defined serial
port is indicated (COMx)
In this case (COM4)
8. Select this device
9. select "Port Settings" Tab
10. Verfiy that "Flow Control is set to "HARDWARE"
If it is set to "NONE", Select the pull down and select
"HARDWARE" (Hardware will activite the DTR & RTS handshake signals
that will be used by FLdigi)
11. Selct "OK" and the other windows can be closed



Schematic
                                          Diode 1          Diode2
                                            A    C              C    A
RS 232 pin 4 (DTR) --------|>|--------------|<|-----------RS232 Pin 5 (GND)
                                                           |                     |
                                                           |                     |
                                                           |                     |
                                                           | Relay Coil |

Radio PTT/Key-line ---------------------->       / 
                                                                          / Normally Open Contact Closure
Radio GND ______________________/ Closed when DTR is asserted


Theory of operation
Normally, the RS232 DTR signal swings from -10V in Receive mode to +10V when DTR is
asserted or in this case, Transmit mode. Because of the bipolar nature of the RS232
signal levels, Diode 1, a 1n914 is used to block current when in Receive mode
because DTR is at -10v potential. Otherwise, the relay would always be closed.
When in Transmit, DTR goes to +6v (due to the 10mA Relay coil load no load +10V)
therefore Diode 1 goes to forward bias conducting current through the relay coil
and closing the contact on the relay. The contact closure ties the radio key-line
to the radio ground and the radio is in transmit. Diode 2, another 1n914 is used to
suppress and effectively shorts out the reverse voltage caused by the relay coil's
magnetic field collapsing when DTR goes back to -10v. When DTR is off (-10V)
turning off the relay, which opens the relay's contact closure in putting the radio
into Receive mode.


-------------------------- T/R Control SECTION APPENDIX----------------------------

Parts List
Perforated Circuit Board
Relay Coil 12v @ 1050 ohms Radio Shack P/N 275-233
DB9 F connector Radio Shack P/N 276-1538
1n914 Diode Radio Shack p/n 276-1620 (qty 50 though)
QTY 2 - 1/8" Stereo PLug
Hook up wire
1000 uF Caps Cer Disc
10kohm (50vdc 100 mW) micro-potentiometer Radio Shack P/N 271-0282
USB to RS232 Adaptor (if needed)
Connector to Radio (Mini-Din 6 POS in the development case)



Regarding driving Reed Relays from
http://www.tkk.fi/Misc/Electronics/circuits/rspower.html


Sensitive reed relays
You can drive directly a sensitive 12V reed relay that has a minimum coil
resistance of 1200 Ohm.

DTR--------( 1200 ohm 12V reedrelay coil )-----------TXD

Internal current limiting in the RS232 drivers will give a combined voltage of 0 or
about 12V to the relay depending on the level of the DTR line. When the DTR and TXD
lines are at different potential the relay gets energized and when they are at same
potential relay gets no power. TXD line is normally at negative potential when no
data is sent so the relay gets energized when DTR line is raised.


Testing DTR signal Level when driving the relay circuit
DTR - through diode protection and 1Kohm reed relay coil to ground
Across DTR to Ground - DTR not asserted (-10 Volts)
- DTR asserted using tune function on FLdigi (+ 6.57 volts)
Start time - 1:04 - 6.57 V
- 1:14 - 6.59 V (across coil 5.89V)
- 2:14 - 6.59 V (across coil 5.89V)
- 3:24 - 6.59 V (across coil 5.89V)
Steady state ok but cycle testing should be performed.



-------------------------- AUDIO SECTION APPENDIX----------------------------------


Various Specifications as collected from the WEB and Manuals

PC sound card Specification
BPC99 Standard

Pink - Microphone Input

Monophonic

Impedence - 1k to 20kohms

Level - min 10mV (some older cards 100mV)

Pinout - Tip - Mic Input
- 1st Ring - 1 to 5 V bias for Electret microphones
(no Connection if bias isn't needed)
- Ground Ring - Ground

*** 1uF to 22 uF Cap from tip to mic element and 1k to 22k resistor
from 1st ring (bias) to mic element ****


StereoPhonic

Impedence - 1k to 20kohms

Level - min 10mV (some older cards 100mV)

Pinout - Tip - Left Mic Input 1-5volt bias provided
- 1st Ring - Right Mic Input 1-5 V bias provided
- Ground Ring - Ground

*** Direct connection to electret type micrphones, Capcitive DC block
and/or software disable bias
Use Soundcard O'scope or Audio measurement software on the PC to measure
and adjust the rig's audio output level into the PC's audio input

Green - Line/Spkr/Headphone Output

Line
Impedence 30 - 400 ohms (typical)

Level - 2V (typical)
HiFi Line Level In = -10dB (RCA Jacks)

Pinout - Tip - Left Channel
- 1st Ring - Right Channel
- Ground Ring - Ground

Speaker
Impedence 8 - 32 ohms (typical)

Level - 2W (typical)

Pinout - Same as Line


Headphone

Impedence 8 ohms (typical)

Level - 100mW (typical)

Pinout - Same as Line



Blue - Line Input

Impedence - 10k - 47 kohms (typical)

Level - 500mV - 2V

Pinout - Same as line out

(use mic to line preamp for microphone connection)

Shure.com for app notes to interface microphones to pcs
Good Reference with links (sound generators/analyzers, Specs)
http://www.messaggeri.it/xcomputer%20audio.htm

Good app notes
http://www.hobby-hour.com/electronics/computer_microphone.php


Icom 2820H - Data Socket assignment
6 pin mini-din (PC Keyboard/Mouse Plug)
Pinout defined in Maunal Page 124
As seen looking at the front panel 

         TX Audio from PC -> Data In Pin 1 - 0   0 - pin 2 GND

PTT Key-line(Gnd to TX) -> PTT Pin 3 - 0          0 - pin 4 N.C. 

              Rx Audio to PC <- AF Out Pin 5 - 0 [] 0 - pin 6 Sql (N.C.)



PS2 Keyboard/mouse pinout spec

pin 1 - kybrd_data, pin 2 - n.c., pin 3 gnd, pin 4 - pwr, pin 5 - kybrdclk pin 6 n.c.
Source - http://www.pc-control.co.uk/keyboard_connector.htm

- Cut into a PS2 mouse cable and only 4 conductors were available. therefore the pins that
were needed for the radio interface did not have wire conductors in the cable

Mouser P/N 806-KMDAX-6P was ordered but not received as of this entry

Icom 718 Audio Specifications (Accessory Socket)

Pin 2 - GND
Pin 3 - Send/PTT - Pull to ground for TX
Pin 11 - Mod Input - Input Z = 10K ohms Input level = approx. 100 mV rms
Pin 12 - AF out - Output Z = 4.7K ohms Output Level = 100 to 300mV rms

Olivia 16/500 LSB on 80 mtrs copy with 7.2 s/n

 

Last Updated on Tuesday, 06 April 2010 19:52
 
Copyright © 2010 w1sul.org. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.
 

Net Night Training