The PC Wireless Remote Controller System

Total Page:16

File Type:pdf, Size:1020Kb

The PC Wireless Remote Controller System

. . Date: April 16th 2004 . Class: Projects . Prof: Kevin Cardamore . .

Eric Unterhoffer

The PC Wireless Remote . .Controller . . . System . . . . .

The audio controlling system of the future . . . . . The PC Wireless Remote Controller System

The audio controlling system of the future Table of Contents

1. Project Description ……………………………………………………3 - 4

2. Project Status ………………………………………………………….4 - 5

3. Schematics …………………………………………………………….6 - 8

. .4. .Artwork …………………………………………………………………...9 ...... 5. Circuit description …………………………………………………...9 - 13

6. Problems Encountered ……………………………………………...13 - 14

7. Work to be done …………………………………………………….14 -18

8. Precautions ………………………………………………………………19

9. Bill of materials ………………………………………………………….19

10. Project pictures …………………………………………………….20 - 21 1) Project description

Basic Idea

The project I am constructing is a PC wireless remote control system. The essential idea of this project is to give the user the capability to listen to mp3’s from their computer with out having to walk over to their computer to select a song or a new track list to play from. This project would give the user the capability to any were in their house and allow them to listen to any music that they own so long as it has been saved to their hard drive. Essentially this project is designed to work with the PC over a wireless signal of 433 MHz, which will allow the remote to have a max range of 200 – 300 meters in open air. The remote control will be designed to have full control of the PC’s audio controlling system software, which is designed by my self, for playing mp3’s that have been downloaded or ripped from a CD. With this remote unit, the software would then send back information to the user, which would let them know what song they are listening to, the artist, the album, the track time and even give them the ability to adjust the volume or to eject the CD from the CD ROM. The software, which I will use to control my remote unit will be created in Visual C++ .Net. The actual remote will be made up of a 4 x 4 matrix key pad along with a 4 x 20 serial LCD with a max baud rate of 19 200.

Key pad Functionality

The matrix key pad will give the remote the capability to play, stop, pause, skip track, reverse track, fast forward, rewind, shuffle, repeat, random, eject, volume up and volume down control. There will also be a scroll keys that will give the user to the capability to toggle from different screens and choose from a list of songs, which are shown on the PC or possibly even give them the capability to open different play lists that the user had previously created.

LCD Functionality

The LCD is used to display the track being played, the number of the track with in the play list, the artist, the progress of the song and the volume level. When a button is engaged the function of the key will be displayed on the screen to verify the operation, essentially acting as an ACK to the operation inquired. In the case of the scroll keys, they will be used to toggle to different screens for different options. An example would be if you are listening to a song and it is displaying all the songs information, if you hit a scroll key, it would then go to another screen that would have a list of the songs in the current play list, and if you hit another key it would then display a file that would contain several other different albums or files that were

2 already created by the user on the PC. The scroll keys will also give the capability to go back to its main screen and also be able to turn the LCD back light on or off to preserve battery life.

Wireless Functionality

The wireless portion of this remote will be created through an AM modulated digital signal that produces an RF module frequency level of 300 – 434 MHz. This wireless signal is capable of transmitting and receiving form 200 – 300 meters in open air. The main purpose of this wireless circuit is to allow the remote to be used from a far distance without a serial cable connection or a connection to the hydro outlet making the remote unit run strictly on battery power. Unfortunately the PC will also have to be on along with the designed software for this application for a wireless link to the PC unit to be established

2) Project Status

At this point in my project I have most of my hardware completed and tested for functionality. There has been issues with the wireless portion of the project due to the lack of a spectrum analyzer, the components being used and most importantly, the time. On the hardware side of things I currently have all schematics designed for my remote unit and the two transceivers for the wireless link on ORcad. Also I have the layout of each board completed in Ultiboard along with data sheets for each component necessary with in my project as a whole. At this point I have tested my entire circuit to verify that correct voltages are in the correct places. I have tested to see that the PC can see my basic stamp 2 on my board as well as testing to see that the basic stamp can be sent information by the PC. I tested my LCD to verify that it was functional, first by connecting it directly to the PC and a 5 volt power supply and then by connecting it directly to the specified header located on my board. I was then able to send messages to my LCD through the basic stamp 2 on my board to verify that the circuit was capable of transmitting information to my LCD. I have also tested my keypad by using a special software specifically for basic stamps. This software has proven that I can communicate to the computer via Hyper Terminal and that my key pad can also communicate with my LCD. I have also used the Basic Stamp software to make sense of what my key pad is sending to the LCD and the PC. For example I am able to sent 1 to 0x0F to the LCD and PC in the proper order that my keys on the key pad are laid out. On the software side of things, I currently have a program in development Visual C++.Net. With this user interface I currently have

3 various functions working on the actual mp3 side of it such as play, stop, pause, fast forward, rewind, track progress and volume control. I am also able to display the name of the track being played and the artist of the song through static text that is in a separate group box from the list box that is used to display my track list. I currently have the list box displaying the mp3 being played along with the file extension. Besides these functions I have working I am also able to open mp3s and close my program. For more options I also made a link to the mixer embedded in the windows operating system and all of my menu options for the program and the hotkeys. Also with my program I made a link in my menu that allows the user to install a CD ripper and also to rip CDs. I found an excellent ripper on the internet and I thought it would be perfect for users who wish to rip their already owned CDs to their hard drive so that it can used with this application. The main thing that is not working in my program rate now is the track list. The problem with the track list is that I can not save lists that I create and also I can not play from the list by double clicking on specified track. After the track list is fixed, all other items will then fall into place. The remaining items to get functional besides the track list are skip track, reverse track, random repeat, eject and album name. Besides all the functionality of my project I also have an aluminum housing to store all of my components and circuitry.

4 3) Schematics

Ultiboard Layout

This schematic is my PCB layout which was done on Ultiboard and was tested to make sure all nets were correct properly along with the proper conductivity. In this layout I was made certain that I had the proper track sizes of 40 for regular tracks and 72 for ground and power. I also made sure that the pad sizes for my components were a reasonable size to ensure that the copper would not lift as I made drilled holes. I made sure that the distance between pads for my Basic Stamp 2 were correct and finally I made sure that there were proper air gaps between all tracks and components to ensure that no voltages would jump from one track to another.

5 Wireless Remote Controller box Top section

Top Piece Over Head View

7" 4-3/8" 1-3/4"

135deg 45deg " 8 / 7

9/16" 9/16" " 4 / 1 -

1 1-7/8" "

6 3-1/4" 1 / " " 7 1-5/16" - 6 6 1 1 1 / / 3 9 - - 1-5/8" 1-5/8" 9 6 1-1/8" 3/16"

13/16" " 13/16" 6

1 3/8" / " 1 6 1 - 1 /

2 3/4" 1 1 " 6 1 / 1 1

Name: Eric Unterhoffer Title: Front Plate Date: November 19th 2003 For: Kevin Cardamore Rev: 1

6 Wireless Remote Controller box Bottom section

Bottom Piece OverView

8"

4-3/8" " 6 1 / 3 1 - 1 " " " 6 6 6 1 1 1 / / / 1 3 7 - 1 - 0 - 6 1 2 " 6 1 / 3 1 - 1

1-13/16" 4-3/8" 1-13/16"

Name: Eric Unterhoffer Title: Front Plate Date: November 19th 2003 For: Kevin Cardamore Rev: 1

7 4) Artwork

Actual PCB Layout for board production

5) Circuit Description

Powering the circuit

Seeing is how my project is going to be a wireless remote control system it makes sense that it should be battery operated. Because the circuit was battery operated I then had to find a way to deliver the battery power to my circuit in a cost effective manner by this I meant the life of my circuit in milliamp hours. I discovered that an AA battery can provide 3135 mA hours which was much more convenient then the 655 mA hours provided by a 9 volt battery. AA batteries do not have the greatest amount of milliamp hours, but they are much less costly compared to C or D batteries and they are much lighter in weight. I then began to look at my components so that I could have a rough estimate of how long my circuit could be powered, which was anywhere from 6 to 10 hours or more pending on if the LCD backlight was on steadily or if the Basic Stamp 2 was in sleep mode or not. The next issues were brought up because of my LCD, which had a 5 volt capacity (+- 0.25 volts) and my Basic Stamp 2 which also had a max voltage rating of 5 volts. This brought me to the conclusion that 4 AA batteries in a serial connection would provide me with both the necessary voltage of 6 volts and milliamp hours of 3135ma/h needed to power my circuit for a period of 10 hours. Now that I came to this conclusion, it was now necessary to find a method to reduce my voltage to 5 volts for my components in a relatively safe and in expensive fashion for the protection of my very costly components. I decided to go with the TPS 7350 voltage dropout regulator because I knew this would provide me with my desired voltage of 5 volts, with little current drain and in a much safer fashion then the LM7805. The TPS 7350 has more

8 safety features, such as under voltage protection. My circuit for the voltage dropout regulator was then designed using this schematic (disregard CSR resistor).

What happens in this circuit is first the 6 volts that I am applying to the circuit is my VI, and it is sent into the chip through the input port. The capacitor on the input port and output port are used as decoupling capacitors, which reduce the noise produced by the chip. After the chip does its magic, the output of the chip will then provide 5 volts to my circuit with a small current drain of 0 to 500 mA. The reset on this chip acts as a safety feature in the event of an under voltage supply. The reset pin will go LOW during the under voltage duration, once the duration is completed, a 200 ms time out then starts. At the completion of the time out, the reset pin then goes high again allowing the circuit to function normally. The circuit that I designed on Orcad Capture layout looks like this and can be seen on the Orcad Capture design in the schematic section starting on page 5:

Circuit processor

9 For the circuit control I decided to go with the Basic Stamp 2 because of its simplicity in programming and connecting process. I also chose the Basic Stamp 2 because it was recommended for educational purposes. The Basic Stamp 2 is a powerful microprocessor that can process a few thousand lines per second. This basic stamp also contains 16 ports which allow for more applications. The Basic Stamp 2 is a 5 volt regulated chip that uses 8mA while running and 100uA while sleeping along with the capability of communicating serially to other devices. In my circuit the Basic Stamp 2 is essentially the brains of my circuit. This is the schematic of the Basic Stamp internally:

The voltage drop out regulator is first connected to this Basic Stamp via the VDD pin 21 in order to provide a regulated 5 volts. There is also a decoupling capacitor placed

10 on this pin for noise reduction purposes. Reset pin 22 is connected with the voltage drop out regulator reset pin so that if under voltage does occur, the Basic Stamp will be put LOW as well thus shutting down the circuit completely. The serial connection was connected according to the following circuit:

This circuit makes it possible for my Basic Stamp to communicate and be programmed by the PC. As you can see the receive pin of the serial port is connected to the SOUT pin1 of the Basic Stamp for receiving info from my remote and the transmit pin of the serial port is connected to the SIN pin 2 for receiving data to my remote, thus making this a bidirectional circuit. DTR of the serial port is connected to ATN pin 3 or the attention pin for programming, this lets the Basic Stamp know that information is either being sent or received. Finally GND of the serial port is connected to the VSS pin 4 for programming purposes as well because VSS is the ground pin for the DB9 connection of the chip. This circuit is only being used during the programming process, once the programming is completed in the chip, this circuit will no longer be used for my wireless remote. The remaining pins are all port pins which make up the main design of my circuit. (Note that P0, P9, P10 and P11 are not used for my application.)

Circuit Control

My circuit is controlled through a 16 key or 4 x 4 matrix key pad. The key pad has the full control over the operations of the wireless remote control system. The key pad is wired to the circuit via an 8 pin header connected to the circuit board as shown:

11 The resistors shown are used to prevent shorting across the port pins of the Basic Stamp, I chose to use 1Kohm resistors because the resistor rating for this circuit is from 100 to 1Kohms. The key pad was connected similar to the diagram shown in the basic stamp book page to make it easier for programming.

Wireless Communication

For the wireless portion of my circuit I simply connected a 4 pin header to my board with the data out and dig out connected to ports 1 and 2 for the wireless communications.

This header will be connected to a separate circuit that we are still currently trouble shooting.

LCD Viewing

The LCD will be connected to the circuit via a 4 pin header as well. This 4 pin header will have a transmit and receive pin which will be connected to ports 3 and 4 of the Basic Stamp for LCD data receiving and transmission of data.

6) Problems Encountered

Voltage Regulation issues There have been a few problems encountered so far. One of the more serious problems was with the connection of the 7850 voltage regulator. The regulator was short circuiting at first when my board was populated, when I was testing my voltages thus read 0 volts throughout the circuit. I discovered after that the reason for this was because I had my spare input and output of my voltage regulator grounded without realizing that the inputs and output were connected together. To fix this problem I simply removed pins 4 and 5 of my voltage drop out regulator and I connected a jumper across the two open ports of the chip harness. By doing this I eliminated the short across the regulator and I was still able to ground the unused pins.

12 Wireless issues

For my original schematic the wireless connections for receive and transmit pins were originally drawn to be connected to SOUT and SIN of the Basic Stamp. I soon discovered that the serial port of the PC provides a 12 volt voltage source which would result in the destruction of my wireless circuit. I then decided to connect the wireless circuitry to its own port of the basic stamp with the 5 volt voltage source needed.

Key pad issues

There were issues with getting the Basic Stamp to communicate with the 4 x 4 matrix key pad. The main issue with attempting to test this was with the program that was provided with the basic stamp book. This program was incorrect and therefore making it difficult to recognize when a button was pressed. Another issue was found with the resistors that I originally had connected to each row and column of the key pad. We discovered that with resistors being used meant a major hazard could occur at anytime. If two buttons were engaged by chance while the circuit was on, this could cause current to flow into two ports of the Basic Stamp at the same time thus resulting in the chip burning out. Through programming the Basic Stamp2 I was able to neutralize this problem. 7) Work to be done

Wireless Circuitry design

The wireless circuitry design is going to be a challenge all on its own, I have came up with a few designs up to now but testing must still be done on this aspect. This Schematic is my Orcad layout of the circuitry that will connect to the remote inside of every ones box to provide the wireless communication between the PC and the user.

13 For a better view of this schematic see the back of the report were schematics are held.

This circuitry is still in the process of being tested, the current problem is that the receiver is receiving information at all times. All thought the circuit is switching the way it was designed to do so that the receiver and transmitter are never on at the same time there are still issues to over come. Transmitting and receiving at the same time will result in the receivers destruction for the reason that the receiver is a low powered device were as the transmitter is a high powered device. There is still testing to be done and unfortunately because we don’t have access to the equipment that is needed for testing such as a spectrum analyzer, this aspect of the project is either going to be a hit or miss.

This circuit was a designed as the PC interface for the wireless circuitry that is needed for the PC to transmit and receive signals:

This circuitry similar to the last and is in the process of being tested, we still have yet to determine if this transceiver will be able to communicate with the transceiver of the Basic Stamp interface. The same issues as the previous circuit apply. Also some sort of casing will need to be constructed for this circuit.

Programming

The programming aspect of this project has came a long way, I currently have many things working. I have already determined through the Basic Stamp software that all my hardware is working and functioning the way I wanted it to. The hardware is able to communicate with the PC and the hardware is also able to sent information amongst its self. I have came extremely far along with my GUI interface. Here is a photo of the interface I have created so far.

14 This interface is very user friendly, all the buttons that you can see are all active x buttons that I had downloaded and implemented into my application. These buttons are graphical, which means they physically move when ever the buttons are engaged. The portion that you can see on the right is a mock of my hardware. This is going to be used to attempt to show what the LCD should be seeing when buttons or functions are engaged. So far what is working on this screen is play, stop, pause, rewind, fast forward, artist name, track name, track progress, volume all of the menu selections and all of the bottom option buttons. When the mixer button pops up, it displays the windows operating sound board mixer like in the following picture.

15 Also included in this program is the ability to install a CD Ripper and Rip CDs. The program that I chose to use for this application is called free CD ripper and it can be accessed in the CD Ripper header of the menu. The CD Ripper interface looks something like this.

16 This ripper allows the user to rip there CDs to mp3, wav and ogg. Unfortunately this application is only designed to play mp3s at this time.

I also have the List box that is designed to show the track lists displaying the mp3 being played and its file extension. The main issue rate now is that is you open more then one mp3, it will only play the one that was most recently opened. Although all the mp3 files will be displayed in the list box, you can not double click on the mp3 you wish to play through the list box yet. In order to get this mp3 player to work I had to download an active x mp3 player. With this active x, I implemented it into my application and then attached a variable to it. Once the variable was attached to the active x, I simply attached functionality to my buttons by making the mp3s players object have an extension to a function that is embedded into the mp3 active x .

Another part of this program is the ability to make a track list and save it so that it can be reopened in the main dialog above. The user interface which I have designed for this looks like the diagram below.

17 Currently this dialog application is able to open , close and save what is in the edit box. There has been issues with how to save what is in the list box so that track lists can be created by either adding or deleting tracks. Once this is working I then have to figure out how to play the mp3s that are displayed by either engaging the play function in the main dialog or by double clicking on mp3 file displayed in the list box.

Flow Chart

Week number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Key pad functionality Program remote Wireless circuitry design Wireless circuitry manufacturing Wireless circuitry testing Wireless circuitry programming Test Entire Project Functionality Final report

8) Precautions

There are a few precautions that must be taken into account for this project. Some of the precaution include static discharge, over or under voltage and current. There are two statically sensitive chips that are involved in this project, the Basic Stamp and the

18 voltage drop out regulator. This means that any sort of static discharge upon these chips could result in there malfunction. This is a very costly lesson to learn so it is necessary at all time to be using a static bracelet whenever these chips are being handled. Over and under voltage can also be an issue. In the case of the LCD and the Basic Stamp, over and under voltage can result in there malfunction causing a costly lesson as well. The LCD has a voltage rating of +5 volts( +- 0.25 volts) and the Basic Stamp has a 5 volt rating with a little more of a margin of error. This means that at all time, voltage being applied to the circuit should be double checked before these expensive devices are inserted for use. Finally current can also be an issue in the case of the Basic Stamp. Because of the current layout of my board with concerns to my key pad, if two buttons were pushed at the same time, this would force current through two ports of the Basic Stamp at the same time thus causing the chip to burn out. To prevent this, the resistors of my circuit must be changed to diodes and I must also be careful to not push more then one button of my key pad at the same time before this change is made.

9) Bill of Materials

Component Quantity Cost Wireless Speakers 1 235 .94 TPS 7350QP 2 22.88 LCD 2041-IY 1 115.64 16 Key Blank Key Pad 1 46.64 16 key clear overlay 1 37.86 TX 433 2 24.48 RX 433 2 24.48 4 Batteries and holder 1 11.02 5v power cable 1 7.45 4 ft serial data cable 1 8.53 DB9 connectors 2 6 Basic Stamp 2 1 60 Relays 2 10 Max 232 1 8 Total $ 618.92

10) Pictures

19 Front view

Side View

20 21

Recommended publications