Mp3 player with pen drive zigbee control MP3 player with PenDrive and ZigBee communication (for selecting songs) is a system that incorporates the idea of mp3 decoder using embedded system and ZigBee communication. Here the songs from the PC are copied to pen drive. The songs stored in pen drive are retrieved by MP3 decoder implemented by embedded software. The songs can be selected by the keys on the board or through ZigBee communication. The selected song is played by the system using the speakers attached to the system. The song that is selected is displayed on LCD panel also. The systems available in the market will not allow users to select songs from a distant location. This system has an LCD, a keyboard and an embedded system with ZigBee module attached to it. This module allows the user to select the songs using data transmission using ZigBee protocol.
Mp3 Player with pen drive & ZigBee Control ACKNOWLEDGEMENT We thank almighty for providing us an opportunity to complete this project. We would like to thank a few persons whose advice and co-operation made our project a success. Our foremost and heartier gratitude goes to our principal, Dr. George Issac, who provided us necessary facilities to proceed with the project. We hereby express our sincere gratitude to our Head of the Department of Electronics & Communication, Prof. Thomas George for providing us with the entire necessary infrastructure to complete our project. We are highly obliged to our academic guide Ms. Mary Joseph of Electronics & Communication department for her valuable guidance and unrelenting help during the course of this project work. We are indebted to Mr. Robince Samuel, Rhydo technology who led our project as external guide. We also extend our sincere thanks to all our teachers, supporting staffs and friends for their constant help and encouragement without which our project could not be completed. Dept. Of Electronics & Communica!on Engineering, MACE Page 1 Mp3 Player with pen drive & ZigBee Control ABSTRACT MP3 PLAYER WITH PEN DRIVE AND ZIGBEE CONTROL MP3 player with Pen-Drive and ZigBee communication (for selecting songs) is a system that incorporates the idea of mp3 decoder using embedded system and ZigBee communication. Here the songs from the PC are copied to pen drive. The songs stored in pen drive are retrieved by MP3 decoder implemented by embedded software. The songs can be selected by the keys on the board or through ZigBee communication. The selected song is played by the system using the speakers attached to the system. The song that is selected is displayed on LCD panel also. The systems available in the market will not allow users to select songs from a distant location. This system has an LCD, a keyboard and an embedded system with ZigBee module attached to it. This module allows the user to select the songs using data transmission using ZigBee protocol. When the USB device is connected to the USB port of the controller, the device driver detects the presence of a new device and loads its driver, if it is previously installed. Once proper driver is loaded, the communication between the systems is established using the USB driver protocol. The firmware written in microcontroller read the content of the USB device and its ID using USB cables. When a pen-drive is connected, it displays all file names in LCD. We can select the song from the pen drive using keyboard interface. Also we can select song from remote location using ZigBee module. Dept. Of Electronics & Communica!on Engineering, MACE Page 2 Mp3 Player with pen drive & ZigBee Control CONTENTS 1. Project objective 4 2. Introduction 6 3. Block diagram 10 4. Working 12 5. Circuit diagram 14 5.1. Layout –TOP AND BOTTOM VIEW 16 6. Module description 19 6.1. PIC18F6722 20 6.2. Mp3 decoder STA013 30 6.3. DAC CS4334 37 6.4. USB module VINCULUM VDIP1 39 6.5. Zigbee module XBee 42 6.6. Matrix Keyboard & LCD (16×2) 46 6.7. Power supply 47 7. Software description 48 7.1. Program Flow 49 7.1.1. Microcontroller 50 7.1.2. Zigbee initialization 51 7.1.3. Interrupt service routine 51 7.2. Flow Chart 52 7.3. Progam code 55 8. Advantages & Disadvantages 74 9. Future Enhancements 76 10. Conclusion 78 11. References 80 12. Appendix 82 Dept. Of Electronics & Communica!on Engineering, MACE Page 3 Mp3 Player with pen drive & ZigBee Control PROJECT OBJECTIVE Dept. Of Electronics & Communica!on Engineering, MACE Page 4 Mp3 Player with pen drive & ZigBee Control The aim of our project was to build an MP3 player wherein which the music to be played is stored in a portable pen drive. A remarkable feature of this player which distinguishes it from presently available players in the market is its control part. The player can be controlled directly from an onboard keyboard and also wirelessly from a distance, by using ZigBee communication protocol. Thus in short the project aims in building an MP3 player using USB pen drive for storing music in MP3 format and wireless communication by ZigBee. Dept. Of Electronics & Communica!on Engineering, MACE Page 5 Mp3 Player with pen drive & ZigBee Control INTRODUCTION Dept. Of Electronics & Communica!on Engineering, MACE Page 6 Mp3 Player with pen drive & ZigBee Control MP3 player, a digital audio player ("DAP") is a consumer electronics device that stores, organizes and plays audio files. Some DAPs are also referred as portable media players as they have image-viewing and/or video-playing support. Most DAPs are powered by rechargeable batteries. Listening to music stored on DAPs is typically through earphones connected with a 3.5 mm jack. Digital audio players are generally categorized by storage media: Flash-based Players – These are non mechanical solid state devices that hold digital audio files on internal flash memory or removable flash media .Due to technological advancements in flash memory, these originally low-storage devices are now available commercially ranging up to 32 GB. Because they are solid state and do not have moving parts they require less battery power and may be more resilient to hazards such as dropping or fragmentation than hard disk-based players. Basic MP3 player functions are commonly integrated into USB flash drives. Hard drive-based Players or Digital Jukeboxes – Devices that read digital audio files from a hard disk drive (HDD). These players have higher capacities currently ranging up to 250 GB. MP3 CD Players – Portable CD players that can decode and play MP3 audio files stored on CDs. The first mass-produced DAP was created in 1997 by SaeHan Information Systems, which domestically sold its “MPMan” player in the middle of 1998. Common formats supported MP3 is the dominant format, and is nearly universally supported.The main alternative formats are AAC, on players from Apple, ATRAC and Sony, and WMA, on players from Microsoft and partners. Unlike MP3, these formats support DRM restrictions, which are often added to files from paid download services. Open source formats which are completely patent- free are available but less widely supported – examples include Ogg Vorbis, FLAC, Speex, and Module file formats. MPEG-1 Audio Layer 3, more commonly referred to as MP3, is a digital audio encoding format.This encoding format is used to create an MP3 file, a way to store a single segment of Dept. Of Electronics & Communica!on Engineering, MACE Page 7 Mp3 Player with pen drive & ZigBee Control audio, commonly a song, so that it can be organized or easily transferred between computers and other devices such as MP3 players.MP3 uses a lossy compression algorithm that is designed to greatly reduce the amount of data required to represent audio recordings, yet still sound like faithful reproductions of the original uncompressed audio to most listeners. An MP3 digital file created using the mid-range bitrate setting of 128 kbit/s results in a file that is typically about 1/10th the size of the CD file created from the same audio source. MP3 is an audio-specific format. It was invented by a team of international engineers at Philips, CCETT (Centre commun d'études de télévision et télécommunications), IRT, AT&T- Bell Labs and Fraunhofer Society, and it became an ISO/IEC standard in 1991. The compression works by reducing accuracy of certain parts of sound that are deemed beyond the auditory resolution ability of most people. This method is commonly referred to as Perceptual Coding. It provides a representation of sound within a short term time/frequency analysis window, by using psychoacoustic models to discard or reduce precision of components less audible to human hearing, and recording the remaining information in an efficient manner. This is relatively similar to the principles used by, say, JPEG, an image compression format. USB pen drive A USB flash drive is a NAND-type flash memory data storage device integrated with a USB (universal serial bus) connector. USB flash drives are typically removable and rewritable, much shorter than a floppy disk (1-4 inches or 25-102 mm), and weigh less than 2 ounces (56g). Storage capacities typically range from 64MB to 32GB. Some allow 1 million write or erase cycles and have 10-year data retention, connected by USB 1.1 or USB 2.0 or both. USB flash drives offer potential advantages over other portable storage devices. They are more compact, faster, hold more data, are more reliable for lack of moving parts, and have a more durable design. USB ports, on the other hand, appear on almost every current mainstream PC and laptop. These types of drives use the USB mass storage standard, supported natively by modern operating systems such as Windows, Mac OS X, Linux, and other Unix-like systems. A flash drive consists of a small printed circuit board typically in a plastic or metal casing and more recently in rubber casings to increase their robustness. This makes the drive sturdy Dept. Of Electronics & Communica!on Engineering, MACE Page 8 Mp3 Player with pen drive & ZigBee Control enough to be carried about in a pocket, for example as a key fob, or on a lanyard. Only the USB connector protrudes, and it is typically protected either by a removable cap or by retracting into the body of the drive. Most flash drives use a standard type-A USB connection allowing them to be connected directly to a port on a personal computer. To access the data, the drive must be connected to a USB port, either a host controller built into a computer, a USB hub, or some other device designed to access the data, such as an mp3 player with a USB-in port. Flash drives are active only when plugged into a USB connection and draw all necessary power from the supply provided by that connection. Some flash drives, however, especially high-speed drives, may require more power than the limited amount provided by a bus-powered USB hub, such as those built into some computer keyboards or monitors. These drives will not work unless plugged directly into a host controller (i.e., the ports found on the computer itself) or a self-powered hub. Dept. Of Electronics & Communica!on Engineering, MACE Page 9 Mp3 Player with pen drive & ZigBee Control BLOCK DIAGRAM Dept. Of Electronics & Communica!on Engineering, MACE Page 10 [...]... 13 Mp3 Player with pen drive & ZigBee Control CIRCUIT DIAGRAM Dept Of Electronics & Communication Engineering, MACE Page 14 Mp3 Player with pen drive & ZigBee Control Fig 3 Dept Of Electronics & Communication Engineering, MACE Page 15 Mp3 Player with pen drive & ZigBee Control LAYOUT TOP AND BOTTOM VIEW Dept Of Electronics & Communication Engineering, MACE Page 16 Mp3 Player with pen drive & ZigBee Control. . .Mp3 Player with pen drive & ZigBee Control Fig 1 RS-232 Fig 2 Dept Of Electronics & Communication Engineering, MACE Page 11 Mp3 Player with pen drive & ZigBee Control WORKING Dept Of Electronics & Communication Engineering, MACE Page 12 Mp3 Player with pen drive & ZigBee Control In our project all the mp3 songs that we would like to play have to be stored in a pen drive When this pen drive is... Communication Engineering, MACE Page 17 Mp3 Player with pen drive & ZigBee Control Fig 5 BOTTOM VIEW Dept Of Electronics & Communication Engineering, MACE Page 18 Mp3 Player with pen drive & ZigBee Control MODULE DESCRIPTION Dept Of Electronics & Communication Engineering, MACE Page 19 Mp3 Player with pen drive & ZigBee Control PIC18F6722 PIC is a family of Harvard architecture microcontrollers made by Microchip... each Enhanced USART module is controlled through three registers: Dept Of Electronics & Communication Engineering, MACE Page 23 Mp3 Player with pen drive & ZigBee Control • • • Transmit Status and Control (TXSTAx) Receive Status and Control (RCSTAx) Baud Rate Control (BAUDCONx) Dept Of Electronics & Communication Engineering, MACE Page 24 Mp3 Player with pen drive & ZigBee Control Dept Of Electronics... Electronics & Communication Engineering, MACE Page 29 Mp3 Player with pen drive & ZigBee Control Fig 8 Fig 9 Dept Of Electronics & Communication Engineering, MACE Page 30 Fig 10 Mp3 Player with pen drive & ZigBee Control MPEG-1 Audio Layer 3, more commonly referred to as MP3, is a digital audio encoding format This encoding format is used to create an MP3 file, a way to store a single segment of audio,... mode; setting the BRG16 bit BAUDCONx) selects 16-bit mode Dept Of Electronics & Communication Engineering, MACE Page 27 Mp3 Player with pen drive & ZigBee Control Fig 6 Dept Of Electronics & Communication Engineering, MACE Page 28 Mp3 Player with pen drive & ZigBee Control Mp3 decoder STA013 The STA013 is a fully integrated high flexibility MPEG Layer III Audio Decoder, capable of decoding Layer... Engineering, MACE Page 24 Mp3 Player with pen drive & ZigBee Control Dept Of Electronics & Communication Engineering, MACE Page 25 Mp3 Player with pen drive & ZigBee Control Dept Of Electronics & Communication Engineering, MACE Page 26 Mp3 Player with pen drive & ZigBee Control Baud Rate Generator (BRG) The BRG is a dedicated 8-bit or 16-bit generator that supports both the Asynchronous and Synchronous... Page 33 Mp3 Player with pen drive & ZigBee Control File structure An MP3 file is made up of multiple MP3 frames, which consist of the MP3 header and the MP3 data This sequence of frames is called an Elementary stream Frames are not independent items ("byte reservoir") and therefore cannot be extracted on arbitrary frame boundaries The MP3 data is the actual audio payload The diagram shows that the MP3. .. or MP3 After this, the values will differ depending on the MP3 file ISO/IEC 11172-3 defines the range of values for each section of the header along with the specification of the header Most MP3 files today contain ID3 metadata, which precedes or follows the MP3 frames; this is also shown in the diagram Dept Of Electronics & Communication Engineering, MACE Page 34 Mp3 Player with pen drive & ZigBee Control. .. detect’ etc There is 3×4 matrix keyboard which is used to control various MP3 player functions like ‘play’, ‘pause’,’ mute ‘stop’,’ next’ etc There is an extra ZigBee module for wireless communication which is used to control various functions of an MP3 player from a remote location ZigBee transceivers placed in MP3 player and at a distance communicate with each other A power supply source which produces . MACE Page 9 Mp3 Player with pen drive & ZigBee Control BLOCK DIAGRAM Dept. Of Electronics & Communica!on Engineering, MACE Page 10 Mp3 Player with pen drive & ZigBee Control Fig 2 Dept Electronics & Communica!on Engineering, MACE Page 5 Mp3 Player with pen drive & ZigBee Control INTRODUCTION Dept. Of Electronics & Communica!on Engineering, MACE Page 6 Mp3 Player with pen drive. encouragement without which our project could not be completed. Dept. Of Electronics & Communica!on Engineering, MACE Page 1 Mp3 Player with pen drive & ZigBee Control ABSTRACT MP3 PLAYER WITH PEN