element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Arduino Audio Button
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 9 replies
  • Answers 2 answers
  • Subscribers 417 subscribers
  • Views 880 views
  • Users 0 members are here
Related

Arduino Audio Button

e14 Contributor
e14 Contributor over 12 years ago

Hello,

 

     This year in our 8th grade science class, I was in the advanced class and we referred to ourselves as the "smart class." One of my friends had a specific way of saying it that cracked my teacher up.

I have some Arduino experience and wanted to make a bare-bones system in an enclosure that when she pressed the button it played a recording of my friend saying "The Smart Class" in his voice.

 

How will I go about doing this with a bare bones system? I know I can get a mp3 player pcb from sparkfun but it is too expensive for this novelty item. I wanted to use an ATMEGA328 or similar. And how would a drive a small .5 ohm speaker and amplify it. Any and all help is appreciated.

Thanks,

Austin

  • Sign in to reply
  • Cancel
Parents
  • Robert Peter Oakes
    0 Robert Peter Oakes over 12 years ago

    well you can use a pulse width modulated output to create the sound and drive a transistor to get the gain necessary to drive a small speaker

     

    btw, speakers are not normally .5 Ohms, they would typically be 4, 8 or more ohms.

     

    You would not need to smooth the PWM as the speaker would do that for you (Much like a class D amplifier)

     

    the biggest issue is getting the recording into a format that can be sent to the PWM timer and also if it will fit within 32K along with a boot loader and basic routine to read a switch and output the binary stream,

     

    If the sound bite is not too long it may well be doable which looking at your message should fit.

     

    all of this could be done with a ATMEGA328 (32K program space)

     

    You could also use 8 output pins (Or less) and create a simple R/2R digital to analog convertor but the issue still remains about digitizing the sound bite

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • e14 Contributor
    0 e14 Contributor over 12 years ago in reply to Robert Peter Oakes

    How would I get the audio onto the chip without having to wire up, say a micro-sd card reader? And then get it to play. And also, how exactly do I set up the transistor circuit? You are correct the speaker was 8 ohms, and .5 watts.

    Thanks,

    Austin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 12 years ago in reply to e14 Contributor

    you could define it as a char[] long enough to hold the data as part of the program, then you just have to loop through it when the button is pressed

     

    a char is 8 bits, same as a byte so as long as you have enough program space for it all, you good to go

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • e14 Contributor
    0 e14 Contributor over 12 years ago in reply to Robert Peter Oakes

    Okay, and the audio recording itself. Can it be imported into the system memory? Or do I have to convert it to a char or something? I am not an audio person, nor am I super advanced with Arduinos.

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 12 years ago in reply to e14 Contributor

    well that's where my current skills fade, I have not looked much at converting audio into a form consumable with an Arduino or other device

     

    If I find something I will post it but I suggest you try google "Waveform convert to WAV from MP3" or something

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • e14 Contributor
    0 e14 Contributor over 12 years ago in reply to Robert Peter Oakes

    Okay, what about pairing an SD card reader without the shield, since I am making it bare-bones? That might be an easier alternative.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • e14 Contributor
    0 e14 Contributor over 12 years ago in reply to Robert Peter Oakes

    Okay, what about pairing an SD card reader without the shield, since I am making it bare-bones? That might be an easier alternative.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • Robert Peter Oakes
    0 Robert Peter Oakes over 12 years ago in reply to e14 Contributor

    well you can get a board for a couple of $$ for example http://www.banggood.com/Arduino-Compatible-SD-Card-Module-Slot-Socket-Reader-For-Mp3-Player-p-74105.html?currency=CAD&utm_source=google&utm_medium=shopping&utm_content=miko_ruby&utm_campaign=Electronic-xie-ca&gclid=CIDz06W0wL4CFVQFMgodjwQA3g

     

    and this should simply work with the SD software

     

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 12 years ago in reply to Robert Peter Oakes

    then you can have as long a sound file as you want

     

    there are plenty of examples to play a file from SD

     

    For example http://forum.arduino.cc/index.php?topic=75359.0

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • e14 Contributor
    0 e14 Contributor over 12 years ago in reply to Robert Peter Oakes

    Okay thank you, I have been experimenting with a transistor amp, with a 2n 3904. And the first method may work. I will just need to experiment some.

    Thanks for all the help,

    Austin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube