K3-Android Wireless Remote

Here is a brief description of a wireless remote I've developed for controlling the K3 from an Android phone or tablet that supports Bluetooth. Originally I was only looking for a way to turn on the K3 remotely from the operating position of the mobile when doing QSO party operations from the laptop. However on several trips involving casual operations, wherein it was cumbersome to set up the laptop, it became apparent that it would be beneficial to have a small remote control device that could be mounted on the window or sunvisor and with more functionality than the originally envisioned on/off control. At a minimum the device should be wireless and include the following capabilities:
  • turn the K3 on and off
  • set the frequency of the K3
  • set the mode of the K3
  • put the K3 in a scan mode
  • terminate the scan mode
  • adjust the RF and AF gain
  • set the keying speed
  • set the filter bandwidth
  • define and send a CW message
An Android smartphone was an obvious choice for such a device but the problem was how to interface it to the K3 over RS-232 and to control a relay for turning on the K3. Then I discovered the Android IOIO board being offered by Sparkfun Electronics and this turned out to be the essential ingredient needed to complete the project. Following a brief description of the hardware there are some screen shots showing the smartphone side of the remote.      

The Hardware Configuration

The Android IOIO board provides almost all of the hardware needed for the interface between the smartphone and the K3. It consists of a single MCU (Microchip PIC24Fxxxx) mounted on a board that is approximately 3.5x1 inches when a Bluetooth dongle is installed. Interface between the board and the Android device can be either via USB or Bluetooth. The Android IOIO acts as a USB host interpreting commands from the Android device. All software development is done for the Android smartphone/tablet device using Java and a simple API provided with the Android IOIO. No hardware modifications are required on the smartphone/tablet. The Android IOIO supports a large number of general purpose IO ports including four UARTS for serial communication. The current project requires only one of the four UARTS and a very small number of connections to the board as shown below. For additional information on the Android IOIO follow this link and links that it contains. Excellent documentation including example code is available and there is an active Google support group moderated by the developer Ytai Ben-Tsvi. 
K3-IOIO Diagram

The only parts that are required to complete the hardware portion of the interface are a SPST 5v relay to provide contact closure between pin 8 and pin 12 of the K3 accessory port and a TTL-RS232 level converter to provide the proper voltage levels to/from the K3 serial port. The latter can be built from the MAX232 IC and a few capacitors using a well-known circuit. For the relay part of the interface be sure to include a diode across the coil. The Bluetooth dongle (Blue Soliel) was obtained for under $10 at Fry's. It should noted that early versions of the Android IOIO required upgrades to the firmware in order to support Bluetooth but current versions come Bluetooth-ready.

Here's the hardware side "in the flesh" and in bad need of a suit of armour

 K3-Android Interface 

Software for the Remote

The software for the remote was developed using freely available tools (Android SDK, Java, and Eclipse) on a Windows 7 machine.  After experimenting with some of the examples provided with the Android IOIO and from time to time consulting the Android documentation found on the Android Developer site it was easy to embark on the development of my first Android app which I'm calling K3-IOIO. Here are a few screen shots from that application.

 K3-IOIO showing main screenK3-IOIO Frequency entryK3-IOIO message entry

The three buttons across the top are toggle buttons for toggling the power, test mode, and scan. The scan takes place between the frequencies contained in the VFO-A and VFO-B edit windows. Entries into these two windows control the corresponding VFO frequencies on the K3 and the scan is initiated using the sequece of commands described in the K3 Programmer's reference. Pressing each of the VFO-A/B edit windows brings up the soft keyboard in numeric mode for entry of the frequency as shown in the second screen shot. Pressing the Next button on the keyboard issues the appropriate command to the K3.

Another window provides a means of defining a message to be sent -- typically this would be a CQ message. Entry into this message window is performed using the soft keyboard in alpha numeric mode. Buttons are provided for sending the message and for terminating any in-progress message. Keying is done using the K3 KY command to control the internal keyer in the K3.

Adjustments of the AF and RF gains are provided by two slider controls (SeekBar controls in Android-speak).

The icon at the bottom of the first screen shot is a handle for grabbing a sliding window which contains the following additional controls: Mode Up, Mode Down, Band Up, Band Down, Filter Bandwidth, Power Output, and Keying Speed.

So that's an overview of "K3 Meets Android Over Bluetooth". The controls that have been implemented so far were primarily done as proof of concept and are those that are useful in the mobile environment. All of the other controls supported by the K3 are possible but the challenge is getting them all included on the small display of the smartphone in a reasonable design. Finally this type of remote could also be developed for other radios and is not limited to the K3.

Copyright: C.W. Sanders, NO5W
Last Updated: 02-February-2012