Remote controlled shortwave radio system

Under construction…

The first in a series describing a system for internet remote control of a shortwave radio station. Its not something new. There are commercial products that provide remote operation of amateur radio transceivers. The purpose of this project is to make it possible to use shortwave radio sounds in musical performance, without the need of an antenna system.

Features:

  • Max/MSP for USB serial control of radio, OSC remote interface, user interface, Midi device handling, and an SQLITE database of preset frequencies.
  • Low latency, good quality audio using Soundjack by Alex Carot.
  • Hardware control of radio using Midi controllers (CDJ-101 and Launchpad)
  • Bi-directional OSC and VOIP using Logmein Hamachi VPN
  • Additional hardware control of AC power and antenna selection using Arduino and a WeMo switch.
  • TouchOSC Ipad audio mixer control using MOTU Cuemix
  • TeamViewer remote desktop software for logging into to base station compuer
  • Optional radio user interface control with Ipod TouchOSC, Griffin Powermate dial, and Korg Nano-kontrol.
  • Optional VOIP backup using Mumble.

System diagram

base station:

remote-radio-sys1

remote control:

remote-radio-sys2

 

 

 

 

 

 

Hamlib and rigctl

Hamlib provides a linux command-line API for amateur radios.

Hamlib_design

Installation

On Mac OS you can install using Mac Ports:

sudo port install hamlib

Usage

Get a list of “rig numbers” for supported radios:

rigctl -l

Find available serial ports:

ls /dev/tty.*

Set the frequency to 7.2 MHz and mode to LSB on a Tentec Eagle transceiver:

rigctl -m 1608 -r /dev/tty.usbmodem14531 -s 57600 F 7200000 M LSB 0

Use a rigctl command with no commands at the end to start an interactive command shell.

Network control with TCP/IP

First start the daemon. It uses port 4532 by default, but here we are setting it explicitly:

rigctld -m 1608 -r /dev/tty.usbmodem14531 -s 57600 -t 4532 &

Then in another window, send commands to the daemon using netcat. For set example, to set the frequency to 14.247:

echo ‘F 14247000’ | nc -w 1 localhost 4532

Max/MSP

Note: [mxj tcpClient] no longer functions in Max8 (1/25/2021)

This patch uses the mxj tcpClient object from https://cycling74.com/toolbox/tcpclient/#.Vnj_fpMrKuU by Arvid Tomayko to communicate with rigctld over TCP/IP. The patch below is a modified help file that connected to the radio using rigctld as configured above.

Screen Shot 2015-12-22 at 2.47.10 AM

Notes on grig and rpc.rigd

grig is a graphical rig front end for hamlib by Alex Csete. rpc.rigd is a daemon that allows multiple clients. I was able to get both of them sort of working together (use -m 1901 from grig) but the daemon starts streaming error messages “read_string timeout without reading a character”. Also the latency with grig over the LAN is high. Its possible that there are problems with the rig CAT file. I am using the file for the Tentec Orion – as I haven’t figured out how to add new devices. At any rate, the above methods (UDP or TCP command line) are way more responsive.

References:

 

Substituting components in parallel

Resistance and capacitance in an AM radio.

A first test to find out if its practical to ‘piggyback’ external controls on to an existing radio. The reason for doing this is to leave an original radio intact by clipping the remote components to the leads of the existing controls.

For example a varactor would be connected in parallel to the variable capacitor already in the circuit. The existing capacitor would be set low. The capacitance of the varactor would then be added to the total, using the formula for parallel capacitors.

For potentiometers, its not as easy because parallel resistors are divided:

ParallelWiderstaende

Formula:  Rtotal = R1×R2/(R1+R2)

For example if R1 is 10K, R2 would need to be 100K to get a total resistance of 9K. To get 99% of the existing resistance, the piggyback resistor needs to be 100 times the value of the existing resistor. 1 MegOhm if matched with 10K.

Practical considerations

What happens when the radio is not being controlled remotely?

  • For capacitance, the remote capacitor (varactor) should be set to 0.
  • For resistance, the remote resistor should be set as high as possible.

Conversely, how should the physical controls on the radio be set when operating remotely?

  • Variable capacitors should be set as low as possible.
  • Potentiometers should be set as high as possible. For a volume control this actually means turning the volume all the way down.

Switches

SPST switches can be considered as a form of potentiometer with infinite resistance. A piggybacked switch will only work if the existing switch is in the ‘off’ position. And vice-versa.

Double-Throw and Rotary switches present more difficulties as multiple states are maintained by the same device.

I don’t think multiple throw switches can be piggybacked. Two possible solutions:

  • mechanical connection to manual control (servo)
  • internal relays – requiring modification of the radio, so that the existing control and the remote control operate the same relays
  • Hybrid approach: Operate the switches manually while operating other controls remotely.

Testing

I piggybacked a tuning capacitor from an AM radio onto the tuning capacitor of a vintage Radio Shack Globe Patrol (regenerative receiver).

 

Regenerative receiver design

Notes and circuits

Screen Shot 2015-04-30 at 1.30.02 AM

 

“The regenerative circuit (or regen) allows an electronic signal to be amplified many times by the same active device

From Wikipedia: http://en.wikipedia.org/wiki/Regenerative_circuit

In other words it uses feedback.

Charles Kitchin, N1TEV

“High Performance Regenerative Receiver Design”, QEX Nov/Dec 1998: http://www.arrl.org/files/file/Technology/tis/info/pdf/9811qex026.pdf

A Shortwave Regenerative Receiver Project”, http://www.electronics-tutorials.com/receivers/regen-radio-receiver.htm

A two part video presentation: https://youtu.be/gcr7hSjTqd8

Google search, kitchin regenerative receiver, https://www.google.com/?gws_rd=ssl#q=kitchin+regenerative+receiver

Derivatives

Makota, 7N3WVM

Derivatives

Circuit Salad

http://circuitsalad.com

By Ray Ring

More…

SSTV in Max

Slow scan television simulation using Jitter.

See this Cycling 74 forum post for an explanation of how frame rate is limited by audio sample rate and  horizontal resolution: https://cycling74.com/forums/topic/jit-poke-vertical-bars-at-high-scan-frequencies/

Download

https://github.com/tkzic/max-projects

Screen Shot 2015-04-09 at 7.24.11 PM

Folder: sstv

Patches:

  • raster-scan4.maxpat (original)
  • raster-scan5.maxpat (better frame rate by lowering screen resolution to 160 x 120)
  • raster-poly-wrap5.maxpat (even better frame rate – up to 15 fps – by up sampling to 384 KHz)

Note – set your audio sample rate to 96KHz if possible, to get the results described above.

RF mixer simulation in Max

Audio simulation of an RF circuit.

Screen Shot 2015-03-29 at 4.49.36 PM

The simulation serves no purpose, but its fun. There are 4 versions. I think the third one sounds best (rf-mixer-sim3.maxpat). Its interesting to hear how much spectral distortion happens from multiplying sawtooth waves.

Screen Shot 2015-03-29 at 4.46.55 PM

Download

https://github.com/tkzic/max-projects/

folder: rf-mixer

patches:

Note: please set the signal vector size to 1 (or as low as possible) and enable overdrive and audio interrupt

Screen Shot 2015-03-29 at 5.22.30 PM

Four versions:

  • rf-mixer-sim.maxpat (initial attempt)
  • rf-mixer-sim2.maxpat (uses sah~ and rate~ objects)
  • rf-mixer-sim3.maxpat (uses gate~ objects with a phasor~ clock)
  • rf-mixer-sim4.maxpat (bandpass filter on RF input)

 

Macbook analog TV mirroring

How to connect a new computer to an old Television

Signal path

Connect a VGA adapter to the Macbook DVI (Thunderbolt) port.

Screen Shot 2015-03-27 at 4.59.58 PM

http://www.amazon.com/Tera-Grand-DisplayPort-Thunderbolt-Microsoft/dp/B006FKTR3U

Connect a VGA cable from the adapter to a PC-to-TV adapter. This converts VGA to video component (RCA plug) output. The sound from the Macbook can go through this adapter as well – it gets passed through to the RF modulator.

Screen Shot 2015-03-27 at 5.02.22 PM

http://www.amazon.com/gp/product/B002PXFJ2O

Connect the PC-to-TV adapter, using RCA cables, to an RF modulator.

01502526_00

http://www.radioshack.com/rf-modulator/1502526.html#.VRXF67qHRbw

Connect a coaxial cable from the modulator to an RF transformer (75 to 300 ohms)

Screen Shot 2015-03-27 at 5.10.10 PM

http://www.radioshack.com/matching-transformer/1501253.html#.VRXHHbqHRbw

Connect the 300 ohm leads of the matching transformer to the antenna input terminals of the TV.

references