TV remote controller 160KHz High Quality Stereo MMC WAV player using ATMEGA32

Summary of TV remote controller 160KHz High Quality Stereo MMC WAV player using ATMEGA32


This AVR-based hobby project is a high-quality 8-bit mono/stereo WAV player using an ATmega32 microcontroller. It supports sampling rates up to 160kHz for mono and 96kHz for stereo, delivering audio quality comparable to PC playback. The device features control via a Philips TV remote (RC5 protocol) with functions like play, pause, skip, and speed adjustment. Unlike previous attempts, this design avoids external FAT libraries by implementing custom MMC code.

Parts used in the High Quality Stereo MMC WAV Player:

  • ATmega32 microcontroller
  • Micro SD Card (MMC)
  • Philips TV Remote (RC5 protocol)
  • PWM module
  • Audio output circuitry

Introduction:

This is my first AVR based hobby project and the most successful one compared to my all previous stuff. I am 100% satisfied with this work. Few months ago, I tried to make a wav player using a PIC16F877A. It worked anyway, but the audio quality was not so good for higher sampling rate because that chip doens’t have enough ram and thus I couldn’t implement a good data buffer. But when I bought an atmega32 microcontroller, the first thing came to my mind is to make a good wav player…Now, I have completed my work and the audio quality is really amazing…  NOW I can say that, my wav player IS ABLE TO PLAY 8 BIT MONO/STEREO with maximum bitrate of 1300kbps for mono and 1600kbps for stereo … ie it can play an 8 bit mono wav of sampling frequency upto 160KHz and stereo upto 96KHz  without any noise or trouble!!!!! (at OSC 16.450MHz).
(updated the complete source code + makefile + hex + asm + .out files on bitbucket repository)  link is provided below the source code.

Note:

[The full range of human hearing is between 20 Hz and 20 kHz. The minimum sampling rate that satisfies the sampling theorem for this full bandwidth is 40 kHz. The 44.1 kHz sampling rate used for Compact Disc was chosen for this and other technical reasons.   High-end audio equipment, such as in SACD or DVD-Audio players or studio equipment, can reach as high as 192 kHz.]
Now I believe this is a perfect 8 bit stereo wav player. Because I compared the same converted files played in my PC and in my player, but I couldn’t find any difference in the playback quality. You can see it on the video (it is taken through my mobile phone, so the recorded audio may not be as good as the real one). Any way,  since the PWM have some limitations, I also tried the R2R ladder DAC… But I couldn’t find any more improvement because it is already at it’s top quality. Also, I think since I converted MP3 to WAV, so even if I increase the sampling rate in the conversion process, just for testing the maximum capacity of the player, but that couldn’t help me to find the difference of PWM and R2R because the original audio is having a sampling rate of only 44.1KHz… So I am not going for an R2R dac and instead I am using the PWM itself…
TV remote controller 160KHz High Quality Stereo MMC WAV player using ATMEGA32
Another interesting feature of my player is that, it could be controlled with a Philips TV remote (RC5 protocol). Also I had implemented few functions on the remote control, ie NEXT SONG, PREVIOUS SONG,  PAUSE, PLAY, FORWARD 15 SECONDS, and some funny effects like PLAY SPEED INCREMENT and DECREMENT. Also I am still trying to include more features on the remote… The player is now a beta_version ;-)….
Also, I didn’t used any external FAT libraries for the low level MMC accessing. Instead I had written my own code for that… So you may not be able to find any standard ‘C’ FILE operations on my source code.

Quick Solutions to Questions related to High Quality Stereo MMC WAV Player:

  • What is the maximum sampling frequency supported?
    The player can handle up to 160kHz for mono and 96kHz for stereo.
  • Can the device be controlled with a remote?
    Yes, it uses a Philips TV remote operating on the RC5 protocol.
  • Does the project use external FAT libraries?
    No, the author wrote their own code for low-level MMC access without standard C FILE operations.
  • What are the supported audio bit depths?
    The player is capable of playing 8-bit mono or stereo files.
  • How does the PWM performance compare to an R2R ladder DAC?
    The author found no improvement using an R2R ladder DAC as the PWM was already at top quality.
  • What specific remote control functions are implemented?
    Functions include Next Song, Previous Song, Pause, Play, Forward 15 Seconds, and Play Speed Increment/Decrement.
  • Is the source code available for download?
    Yes, complete source code, makefile, hex, asm, and .out files are available on a Bitbucket repository.
  • What clock speed is used for operation?
    The system operates at an oscillator frequency of 16.450MHz.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top