Friday, January 28, 2011
RDS Sender
The first project I'll be working on this semester is rewriting a program I've been calling the RDS Sender. Last semester we installed an RDS encoder so that people could see the name of the song and artist in their cars. A future post will give a lot more information on that whole process and the problems encountered along the way. Right now I'll explain more about the RDS Sender. Over the summer, in anticipation of our RDS encoder, I started trying to figure out a good way to to send the names of artists and songs out to our transmitter. I realized that, without Internet at our transmitter site, the only way to do this was to use the serial data port on our studio-transmitter link. Having never written a program that needed to use serial communication, I began looking for a tutorial on how to do this in a familiar programming language. Zach Musgrave, General Manager, also wanted me to test the serial connection to ensure that it was reliable and fast enough to suit out needs. My research brought me to a Visual Basic 6 program that was written in French. Luckily for me I'd taken a VB6 class in the 9th grade and I had Google Translate at my disposal. After some translation and some modification I learned the basics of serial communication in VB6 (which is pretty similar to that of VB .Net) and modified this program to send a series of strings (movie quotes so I would recognize if something went wrong) marked with timestamps out of the serial port. I also modified the program to timestamp every string it received and log them in text files. I tested the program with two computers at the station first to work out all the bugs before trying it all the way out at the transmitter. Once everything worked the way I wanted it to, WSBF Computer Engineer, David Cohen and I hooked up a sending computer at the station and drove out to the transmitter to hook up the other. We were very disappointed when it didn't work. A re-read through of the STL manual revealed that we needed to activate the serial port. We activated the port on the STL receiver at the transmitter and David Cohen drove back to the station to activate the port on the STL transmitter while I waited at the transmitter site to see if it worked. Of course David Cohen didn't have a key to the engineering closet where the STL was housed, so he returned to the transmitter site and we tried it again. Once we finally got the ports activated we were happy to find that the serial link worked, and after days of running not a single bad string had been logged. From there I moved on to the next step, making the RDS Sender. There were several goals I outlined for this project. I decided it would get the song and artist name from text files that the logbook program would keep up to date with the currently playing song. I chose the Inovonics 730 to be the RDS encoder we would purchase, so I downloaded the manual from the Inovonics website and learned how I would need to format the output of my program. Once the first version was done it could output the DPS and PS, and calculate the RT+ for a given artist and song name in the formats required by the 730. Prof. David Bowman suggested that I make the program censor certain words. Although the FCC doesn't regulate sideband use, I found this to be a good idea that was in line with WSBF's emphasis on the surrounding community. I soon implemented this feature around the time we were ready to implement the RDS encoder and we were happy to find that the program worked as intended. I later added the support for the ability to send strings that weren't songs and also improved the text formatting for when we had live sessions. I also made it so that the program would send the live session string repeatedly so that the RDS didn't time out to the default text during a long band. After a few months of this functionality, David Cohen announced his desire to switch our web server over to Linux. Since a VB application won't work in Linux I've been tasked with the problem of rewriting the RDS Sender, keeping all of the same functionality. I'll be keeping track of my progress for this an other projects in this blog as the year goes on. I'll also include the code for the original RDS Sender on my website soon, as well as code for other projects that I'll be talking about.
Subscribe to:
Posts (Atom)