Networked Home Theater

Block Diagram

By

Jeff Patrick

Advisor: Alexander Malinowski

Figure 1 System Block Diagram

Hardware Interface

In order to connect the CD player to the PC, several factors must be taken into consideration. The CD player outputs TTL (0-5) voltages, while the serial port on the PC outputs RS232 (-15 - 15) voltages. Some voltage conversion must be done in order to connect the two.

Second, the CD player communicates at a 600-microsecond time base. The Java server has a minimum wait time of 1 millisecond. In order to communicate at the speed required, the communications functions must be written in a separate language. In addition, the server PC will be slowed down considerably by the need to monitor a port at high speeds. This is a very large waste of processor power since the S-Link bus is unused 99% of the time.

To reduce strain on the PC processor, and reduce the complexity of the server software, a microprocessor will interface the PC to the CD player. The microprocessor has the ability to communicate to the CD player at a 600 microsecond base frequency. It can then talk to the PC at a slower speed. The microprocessor will also take care of the voltage conversions between TTL and RS232. Figure 1 shows the block diagram of the entire system with the microprocessor interface. In addition to controlling just Sony devices, the microprocessor will have the capability to talk to different bus’s if the need arises.

Figure 2 Microprocessor Code Flowchart

Microprocessor Code

The microprocessor code is very simple. Figure 2 shows the entire microprocessor code flowchart. The majority of the time the processor will be in an idle state. While in the idle state it will listen to both the Serial and the S-Link bus. When it detects information on either bus, it will convert it into the format of the other bus and send it. If the ability to interface multiple buses is implemented, the microprocessor will also analyze the incoming signal and route it accordingly.

 

Figure 3 Server Code Flow Chart

Server Code

The Java server has several functions, which are shown in figure 3. The first operation of the server is to wait for a connection from an applet. Once a client is connected, the server will transmit status information about the system. After the status information is sent the server will wait for an instruction from the client. When an instruction is received, the server will pass the command to the microprocessor through the Serial Port Out. Finally, the server will return to the Wait for Instruction mode.

The server will also be running a separate thread to detect if any information is being sent from the microprocessor. When status information is received from the processor, the server will analyze weather the information is a CD identification number. If so, the server will connect to CDDB using proprietary libraries from Gracenote/CDDB. If the data is not a CD identification number, the server will skip the CDDB connection step. The code then enters a Report Status block. This block parses the data received from the processor or from CDDB.com and prepares it for display. Finally, the data to be displayed will be sent to an applet through the Socket Out block.

Figure 4 Server Chat Block Diagram.

The server will also act as a chat server. If a second user tries to connect, he will not be able to control the CD player, but he will be able to chat. The user controlling the CD player will be using both flowcharts to control and to chat. Figure 4 shows the server flowchart when a user connects. First the list of connected users is sent, and then the status of the CD player. The CD player status will be executed separately whenever needed. For example, it will execute when the track or CD changes. Next, the server will listen for user chat data, and when that is received it will broadcast it to all the connected users.

Figure 5 Applet Code Block Diagram

Applet Code

Figure 5 is the flowchart for the Applet. The applet will connect to the server and retrieve information about the discs in the player. If the client is the first connection to the server, it will be able to send commands to the system. Otherwise, it can just monitor the status of the system. After a command is sent to the system, the applet will receive an updated status before it waits for the next command.

 

Figure 6 Applet Chat Block Diagram

The flowchart in Figure 6 will be executed by the applet. If a user is the controlling user, the Figure 5 flowchart will be executed also. First, the applet will receive the user list and CD player status from the server. The CD player status will be received at any time, not just when a user connects. Next the applet will send the chat data when entered, and it will also receive broadcasts from the server. If the connection is lost at any time, the applet will attempt to re-connect to the server.