Making some modifications to some nice Python examples found on the Internet (Fuzzy Logic Robots, python-mpd documentation, raspi-hd44780 by Irvick) I was able to make a very basic, but fully working, standalone RPI Web Radio receiver.

Here is the complete wiring sketch:

In the above sketch, pin 1 of the LCD is the leftmost one. The rightmost 2 pins (15 and 16) are for the backlight connections. The LCD works at 5V. A 2 lines x 40 characters display was employed, because the titles and the station-ID are generally long. If a smaller display is being used (e.g. 16/20 characters), some modifications to the LCD program are necessary. Adjust the small 10 kOhm variable resistor to get the best LCD characters contrast.

S1 and S2 are used to move up and down through the channels, S3 and S4 to adjust the volume level. The pull-up resistors are all connected to the 3.3V power source. Idea: the four pushbuttons may be connected to a simple remote control circuit.

Take care not to short out each-other the 5V and the 3.3V outputs coming from the RPI and double-check the wiring before powering-up the RPI.

For simplicity, two independent programs have been made: one starts mpc and handles the four pushbuttons, while the other one handles the LCD (updated every 3 seconds). Both programs run in background.

The name of the playlist used by mpc is embedded into the program.  The playlist is named “mymy” (see below).

Instructions:

MPD/MPC must be already be installed as described in Part 1.

1. download the python programs and change the file permissions:

mkdir /home/pi/rpi_web_radio
cd /home/pi/rpi_web_radio
wget http://www.gmpa.it/resources/rpiwebradio/radio.btn.py
wget http://www.gmpa.it/resources/rpiwebradio/radio.lcd.py
sudo chmod +x radio*

2. download the sample playlist “mymy.m3u” (stations may be obsolete at the time you’re reading this article, just update the contents as needed) then check/change the file permissions and the owner:

sudo cd /var/lib/mpd/playlists/
sudo wget http://www.gmpa.it/resources/rpiwebradio/mymy.m3u
sudo chown mpd:audio /var/lib/mpd/playlists/mymy.m3u
sudo chmod 644 /var/lib/mpd/playlists/mymy.m3u

3. download the following programs into /etc/init.d/ then change the files permissions:

sudo wget -O /etc/init.d/radio_btn http://www.gmpa.it/resources/rpiwebradio/radio_btn
sudo wget -O /etc/init.d/radio_lcd http://www.gmpa.it/resources/rpiwebradio/radio_lcd
sudo chmod +x /etc/init.d/radio_btn
sudo chmod +x /etc/init.d/radio_lcd

4. make the programs run automatically at boot:

sudo update-rc.d radio_btn defaults
sudo update-rc.d radio_lcd defaults

If needed, the two control programs can be manually stopped/started:

sudo /etc/init.d/radio_btn stop
sudo /etc/init.d/radio_btn start
sudo /etc/init.d/radio_lcd stop
sudo /etc/init.d/radio_lcd start

To stop the automatic program execution at boot:

sudo update-rc.d -f radio_btn remove
sudo update-rc.d -f radio_lcd remove

The Raspberry, wired to the network (ethernet or wifi), should automatically start playing and the LCD should show the song title and the station name at every reboot.

≡XXS≡

With the progress of technology and Internet, the use of a receiver or even a transceiver that is located elsewhere is a more and more common habit.

MyRigPeater allows me to use my FT-817  from virtually anywhere, almost* as if I were in front it. It should work with the FT-857 and the FT-897.

I wrote the programs in 2006 both for my own purposes and for programming pleasure. Sending the serial CAT commands over the internet was a relatively simple task. On the contrary, taking the audio signal from one side and sending it to the other side of an internet connection was a more complex job, requiring the conversion of the transmitted and received audio signals into digital form. The programs are sufficiently stable (under Windows XP) and the audio quality is very good.

All tasks are carried out by two small programs, one running on the remote PC to which the FT-817 is wired-up, and the other one on the other PC. For simplicity, the respective programs were named MyRPServer and MyRPClient.

*Only audio modes are usable (SSB/FM/AM, no CW unless it is transmitted as audio signal).

The following picture summarizes the entire setup:

In the next two screenshots you can see the Server and the Client programs.

Screenshot of the Server program, running on the PC connected to the FT-817.

Screenshot of the Client program.

The Client program is entirely controlled by the mouse. First of all, the connection to the remote server must be performed clicking over the “> <” button (and disconnected clicking over the “< >” button). Clicking over the up/down buttons the frequency goes one step up/down, while a click over the frequency allows the user to enter the frequency. VFO, mode, split and repeater functions are selectable by the mouse too.

To interface the FT-817 to the PC, I made a simple isolated audio interface (see Fig. 1, below). The correct audio levels are obtained both using the PC audio controls and the radio controls. A variety of standard RS-232 adapters and USB converters were successfully used, both homemade and bought on Ebay at small cost.

PC to FT-817 Interface

Both programs need not to be installed. The configuration of a .ini file, with the appropriate IP address and serial port values is needed before running the programs. Also, if any PC is connected to the Internet via a router, an appropriate configuration of the NAT and Firewall rules is almost surely necessary to allow the correct packet routing. If you wish the programs please e-mail me.

≡XXS≡

,