Ham Radio Remote Control Via Internet and Raspberry Pi

The experiment: In this experiment were going to build a Ham Radio Internet Remote Base interface using  Raspberry Pi 3 for the server and a Android app / Web app for the  client. The Android / Web client will be very basic, Frequency dial, Band select, Mode select,  Volume control , PTT, Connect , Close, Radio on/ Radio off button.

1. Project Progress
2. Block Diagram
3. Requered Hardware
4. Requierd Software
5. Raspberry Pi Software Install
• Raspbian Jessie Lite .img on SD Card
• Node-v7.2.0
Oracle-java8-jdk
• Pi4J 1.1
6. Raspberry Pi Setup
Enable Serial Port
Enable USB Audio Card
7. Raspberry Pi Serial To RS232 / ICOM CIV Level Converter
8. Links



Project Progress

FEB 26, 2017: Progress: Have been working on this for 8 weeks and all is working well. Now working on the new PCB and the housing for the Raspberry pi 3 server / interface board.

^Top



Block Diagram
ham-radio-raspberry-pi-remote-base-rig-controller-voip-server-android-icom-yaesu-kenwood0

ham-radio-raspberry-pi-remote-base-rig-controller-voip-server-android-jave-icom-yaesu-kenwood2

ham-radio-raspberry-pi-remote-base-rig-controller-voip-server-android-jave-icom-yaesu-kenwood1

ham-radio-raspberry-pi-remote-base-rig-controller-voip-server-android-jave-icom-yaesu-kenwood

ham-radio-raspberry-pi-remote-base-rig-controller-voip-server-android-jave-web-interface-icom-yaesu-kenwood2

^Top



Required Hardware
1. One – Raspberry Pi 3 B
2. One – Micro USB 5V AC Adapters
3. One – Serial Level Converter + On-Off switch
2. One – USB Sound Card
^Top



Required Software

Raspberry Pi
1. Raspbian Jessie Lite
3. Node-v7.2.0
4. Oracle-java8-jdk
2. Pi4J 1.1

Windows PC
1. Putty
2. WinSCP
3. Android Studio
^Top



Software Install

Raspbian Jessie Lite .img on SD

1. Download Raspbian Jessie Lite here
2. Installing Operating System Images here Linux Mac OS Windows
^Top



Node-v7.2.0

1. sudo apt-get update
2. node —version  <check if node already installed>
3. npm -v  <check if npm already installed>
4. sudo mkdir /home/nodejs
5. cd /home/nodejs
6. sudo wget http://nodejs.org/dist/v7.2.0/node-v7.2.0-linux-armv7l.tar.gz
7. cd /usr/local
8. sudo cp /home/nodejs/node-v7.2.0-linux-armv7l.tar.gz /usr/local
9. sudo tar xzvf node-v7.2.0-linux-armv7l.tar.gz –strip=1
@. Note: Node must be install in /usr/local
10. node —version  <check node version>
11. npm -v  <check npm version>
12. sudo rm node-v7.2.0-linux-armv7l.tar.gz
13. sudo reboot
^Top



Oracle-java8-jdk

1. sudo apt-get update
2. sudo apt-get install oracle-java8-jdk
3. sudo java –version
^Top



Pi4J 1.1

1. sudo apt-get update
2. sudo mkdir /home/pi4j
3. cd /home/pi4j
4. sudo dpkg -i pi4j-1.1.deb

@. Uninstall
1. sudo dpkg -r pi4j

@. Complie
1. sudo javac -classpath .:classes:/opt/pi4j/lib/’*’ -d . <your file>.java

@. Run
1. sudo java -classpath .:classes:/opt/pi4j/lib/’*’ <your file>.class
^Top



Raspberry Pi Setup

Enable Serial Port
In order to use the serial port correctly on the Raspberry Pi 3 will need to do the following, this will disable the Bluetooth option.

There is yet another wrinkle in that in the latest Jessie releases (as of May 2016) the GPIO serial port is disabled by default. In order to enable it, edit config.txt:

1. sudo nano /boot/config.txt
Then add the line (at the bottom):
enable_uart=1
Exit / Save File

On the Raspberry Pi 3 the second serial port is called /dev/ttyS0 and is by default mapped to the GPIO pins 14 and 15. So immediately, if you have code that references /dev/ttyAMA0 you’re going to have problems and things aren’t going to work.

Disabling the Console:
For Raspberry Pi 3’s the command is similar but referencing /dev/ttyS0:
1. sudo systemctl stop serial-getty@ttyS0.service
2. sudo systemctl disable serial-getty@ttyS0.service

You also need to remove the console from the cmdline.txt.
1. sudo nano /boot/cmdline.txt
you will see something like:
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes root wait
remove the line:
console=serial0,115200
Exit / Save File

Swapping the Serial Ports on Raspberry Pi 3
1. sudo nano /boot/config.txt
Then add the line (at the bottom):
dtoverlay=pi3-miniuart-bt
Exit / Save File

After reboot /dev/ttyAMA0 should be the default serial port.

1. sudo reboot

You can verify the change by:
1.ls -l /dev
^Top



Enable USB Audio Card

1. sudo nano /lib/modprobe.d/aliases.conf
Under:
To keep snd-usb-audio from being loaded as first sound card
Find the line below and place a # sign in front of it
#options snd-usb-audio index=-2
Under that past:
options snd-usb-audio index=0
options snd slots=snd_usb_audio
Also place a # sing on the following line:
#options snd_bcm2835 index=-2

3. Exit / Save File

Now we need to stop the bcm2835 from loading at booth, this will route the speaker to USB sound card:
1. sudo nano /etc/modprobe.d/alsa-blacklist.conf
Then add this line:
dblacklist snd_bcm2835

Exit / Save File

1. sudo reboot
^Top



Raspberry Pi Serial to RS232 / ICOM CIV Level Converter
ham-radio-raspberry-pi-serial-rs232-icom-civ-lever-converter

WARNING: When connecting external circuitry to the raspi GPIO pins, please be reminded that the Raspberry Pi only support 3.3V signal level. So in the best interest of your raspi keep this in mind!
^Top



Links
1. Raspberry Pi Ham Radio Remote Base Server/Client
2. Raspberry Pi Remote Ham Radio HTML5 Audio / Node.js Server
^Top

Advertisements