Talking Arduino | Playing MP3 audio with Arduino | Arduino PCM audio without audio or mp3 module

Sdílet
Vložit
  • čas přidán 1. 05. 2018
  • Hello guys , in this video i've shown how to play any mp3 audio with your Arduino without any module you just need a speaker for that and if available then use a Audio amplifier as here i am using a transistor TIP 120 for amplification of audio but the Arduino can only play 16 bit PCM 8kHZ audio mp3 & that mp3 should be coded using a encoder software the only down side is the low memory of Arduino uno allows us to play a audio of approx 4-5 sec but you can use ARDUINO MEGA to solve this, well practically this concept is not of much use but its kind a educational & fun too , so try this & i hope you liked it if yes then don't forget to like the video & if you are new to my channel don't forget to subscribe.
    Thanks for watching...
    Like my Facebook page for updates-
    / electronicguru001
    instructables guide link -
    www.instructables.com/id/Talk...
    DOWNLOAD Audacity -
    www.audacityteam.org/download/
    Download PCM.ZIP & Encoder software (file named as Arduino MP3.zip) -
    drive.google.com/file/d/1LSb-...
    or
    github.com/shveytank/Arduino-MP3
    Items to Buy (affiliate link) -
    Arduino Uno-
    www.banggood.com/UNO-R3-ATmeg...
    Speaker -
    www.banggood.com/2-Pcs-3-Inch...
    www.banggood.com/50MM-0_5W-Cu...
    www.banggood.com/3-Pair-4-Ohm...
    TIP 120 transistor -
    www.banggood.com/10pcs-TIP120...
    www.banggood.com/30pcs-TIP120...
    www.banggood.com/50pcs-TIP120...
    Previous videos-
    Neopixel ws2812 LED Strip or LED Ring 12bit with Arduino Tutorial
    • Neopixel ws2812 LED St...
    DIY Power Supply | Original Hiland 0-30V 2mA 3A Adjustable DC Regulated Power Supply Module DIY Kit
    • DIY Power Supply | Ori...
    Arduino OLED Clock using DS1307 ic | Arduino OLED clock project
    • Arduino OLED Clock usi...
    ESP 32 Getting Started with Arduino IDE -
    • ESP 32 Getting Started...
    Raspberry pi zero W Tutorials Announcement Video-
    • Raspberry pi zero W & ...
    How to use Digispark ATtiny85 smallest & cheapest Arduino compatible board
    • How to use Digispark A...
    DC 0 100V 0 10A Digital Ammeter Voltmeter with dual display
    • DC 0 100V 0 10A Digita...
    I2C LCD with Arduino | convert a SPI LCD to ko with PCF8574
    • I2C LCD with Arduino |...
  • Věda a technologie

Komentáře • 512

  • @RezaZhafiri
    @RezaZhafiri Před 6 lety +101

    I've been searching for a very long time, across the galaxy, to find a tutorial about how to play audio sound without any SD card and MP3 module at all.
    And now the journey has ended..
    Thank you, my friend.
    You get a new subscriber.

  • @Jondoesntlikecoffee
    @Jondoesntlikecoffee Před rokem +2

    I've been looking for this exact video for over a month. Thank you for going out of your way to make this. Your not talking to a wall

  • @hyperhektor7733
    @hyperhektor7733 Před 5 lety +43

    1:50 "we heard an italian person saying arduino dumelalu" xD

  • @heshanmahela9606
    @heshanmahela9606 Před 5 lety +2

    Thank you very much for this video.I really appreciate this project.

  • @matiassoriamonge9911
    @matiassoriamonge9911 Před 4 lety +2

    Thank you very much. I´m having lot of fun! Great and easy video.

  • @tanimashraf
    @tanimashraf Před 2 lety +3

    Hi, thanks for the project. My Arduino Uno only plays like half second of the file, although it says "Sketch uses 4090 bytes (12%) of program storage space. Maximum is 32256 bytes."
    Can you help? I'm new to Arduino.

  • @venkateshwarareddy8379
    @venkateshwarareddy8379 Před 5 lety +2

    sir, will voice recognition module recognizes only our voice or everybody's voice who give same command

  • @TuanTran-id3hc
    @TuanTran-id3hc Před 5 lety +1

    How do I make it play louder? My speaker is connected to the TIP120 for power, but the volume is pretty low.

  • @your.free.electrons
    @your.free.electrons Před 3 lety +1

    Thanks bro for this tutorial
    Was looking for something like this for long...

  • @hermanhermitz9101
    @hermanhermitz9101 Před 5 lety

    Thank you for this. I learned a lot from this short video.

  • @firatyildirim9316
    @firatyildirim9316 Před 2 lety

    hello sir i have a question i am trying to do the same job with stm32f4disco, after I changed the format of my audio file to 16 bit pcm, I managed to run the encoder and see the same window, but then I don't know what to do. Where can I find the series you created?

  • @M3F01
    @M3F01 Před 5 lety +1

    Do you know why I have a sound different when I put it on the card ? :(

  • @naryamulyadi
    @naryamulyadi Před 4 lety +1

    Can the transmitter be replaced with a mini ampifier?

  • @Esteapen
    @Esteapen Před 5 lety +3

    THANKS SO MUCH SIR!!!

  • @janicemigratoriusencanada5083

    Could it support speakers with 100 or 200w? Also, what kind of power source uses the system? Does it need to be connected to the electricity or does it need a battery?

  • @joselhdezmedina9749
    @joselhdezmedina9749 Před 5 lety

    Man, you're just more than awesome

  • @LBSiUK
    @LBSiUK Před 5 lety +1

    Absolutely awesome! Thank you so much for this!

  • @CoolEngineers
    @CoolEngineers Před 4 lety +2

    you solved my biggest problem
    thanku so much

  • @manaraver13
    @manaraver13 Před 4 lety

    hello,i have a question!
    can i record wav files to micro sd?

  • @shivambankar1079
    @shivambankar1079 Před 2 lety

    bro im gettin very low voice when i place emmiter pin on GND ! IT PALYS WELL When pin placed no where!!? can u tell why?? Initially it was noting like this!

  • @yadwindersingh9494
    @yadwindersingh9494 Před 4 lety

    Thanks man....
    Great video

  • @mayaramchaudhary1549
    @mayaramchaudhary1549 Před 3 lety +1

    this is what I need ! Really help in my project..

  • @swatipadole8997
    @swatipadole8997 Před 5 lety

    ok, can u tell me how to put short 2 or 3(only for 2 or 3 ms) mp3 because i am trying but "sketch to big" error is occur.

  • @irenexu5131
    @irenexu5131 Před 2 lety

    Why the number code I transferred only will give "bip-bip" inconsistent sound? But it work when it goes with default sound code. IDK what's going on...

  • @Shori5
    @Shori5 Před 5 lety

    Hi! Can I make it say more than one thing and move a motor at the same time?

  • @marindedic441
    @marindedic441 Před 2 lety

    Hey sir, can we do this without the transistor for the 8 OHM 0.5W speaker?

  • @timonmilon
    @timonmilon Před 8 měsíci

    Hey hey :) I can't open AudioEncode, Windows tells me that javaw.exe is missing... Is it still working for you ? Thx

  • @amerrickankiwi3953
    @amerrickankiwi3953 Před 2 lety +1

    when i open encode.exe it says (on mac) this file can only be opened on windows

  • @alokcom
    @alokcom Před 3 lety

    Excellent work, It would be nice if you play some Low Frequency ( Drum Beat, Bell Sound ) and Higg frequency Sound.

  • @Awsometurtle20
    @Awsometurtle20 Před 2 lety

    Is there a way u can make it play when powered up ? Like a start up sound

  • @venkateshwarareddy8379

    will voice module able to distinguish two different people if they are given the same command ? please Reply

  • @richardmurray7726
    @richardmurray7726 Před 5 lety +1

    Out of curiosity, why do you need the transistor in this circuit? If an arduino's output pins already supply 5v only when the logic says to, can't the transistor be omitted(removed)?

    • @richardmurray7726
      @richardmurray7726 Před 5 lety

      (I'm not much of a electronic component guy, I knew very little about it) Oh, well would it be possible then to amplify the speaker voltage as much as you like by telling the Arduino to turn on and leave on say 2,3, or 5 pins and connect them all to the connector pin so young getting 3 or 6 times the tiny amperage? (Assuming your not overloading your transistor). I tried a similar project reading from an SD card to play sound but it was so quiet. I put a stop to the project because I didn't have any amplifies it know how to make one.

  • @Beginner_intraday_wallah

    Bhai yrr m ek robot project p kaam krr rha hu Usme mujhe chahiye ki jaose mne hello bola to bhi hyy sir bole fir mne kuch bhi bola to wo uska reply d kese Hoga ye..???? Plz bta doo

  • @Sky-Wired
    @Sky-Wired Před 3 lety

    When I try the circuit, my speaker plays the music, but the speaker and the Arduino both get really hot and smell like burning? I'm guessing that isn't normal. Is it?!

  • @swatipadole8997
    @swatipadole8997 Před 5 lety

    sir,that is my question , can we play multiple mp3 without sd card.

  • @maheshkumarmallasani9901

    When I use pro mini, instead of voice output the speaker got heated up very high instantly.

  • @muhammaddanial212k
    @muhammaddanial212k Před rokem

    can i play audio by appending same array from usb serial 0 pin of arduino?

  • @manuthplayzyt7000
    @manuthplayzyt7000 Před 2 lety

    excuse me sir, can i use any transistor??? please reply soon, Why doesn't the encoder software says not correct java

  • @jakemakes
    @jakemakes Před 3 lety +1

    Can't seem to make this work with an arduino Mega... is there any differences in code that would change things?

    • @electronicGURU
      @electronicGURU  Před 3 lety

      to run it on mega , you have to rewrite the library

  • @sanatjha4
    @sanatjha4 Před 4 lety

    can we use buzzer and leave using transistor?

  • @swatipadole8997
    @swatipadole8997 Před 5 lety

    hello can we play multiple mp3 in arduino without sd card

  • @arjungupta3531
    @arjungupta3531 Před 5 lety +1

    can i run 0.25 watt speaker???

  • @sumit2k
    @sumit2k Před rokem

    how many different audio can be store in one program?

  • @mug1wara262
    @mug1wara262 Před 4 lety

    can i use a transistor other than TIP 120

  • @alokcom
    @alokcom Před 3 lety +4

    It would be nice if we can store Mp3 in External EEPROM and interface with Arduino , this way large mp3 file can be palyed.

  • @SciTyeTech
    @SciTyeTech Před 6 lety

    Very interesting! I did not know you could do that with Arduino.

    • @SciTyeTech
      @SciTyeTech Před 6 lety

      Thanks, that means a lot to me! Your videos are very educational too!

  • @ismailkhouna9222
    @ismailkhouna9222 Před 4 lety +3

    Hello , i want to try this project but i have a question about it:
    can i use another transistor like TIP42C TO-220 TRANSISTOR

    • @electronicGURU
      @electronicGURU  Před 4 lety +2

      Yes you can, any transistor will work. Most of the transistor will work. It will just affect the audio quality/loudness but most of the transistor should work.

  • @sreenand.k2706
    @sreenand.k2706 Před 2 lety

    Can i connect this to arduino mega???????????? Which pin is used to connect with arduino mega?

  • @YashJain-qh5tn
    @YashJain-qh5tn Před 2 lety

    How many watt speaker have you used

  • @shaanstefan2849
    @shaanstefan2849 Před 3 lety +3

    Need help!! When I try to open the audio encode application file, it gives me an error message saying that windows cannot find a flie called "javaw.exe" and than a message saying "Error calling ShellExecuteEx()". Thank you!

  • @edgarwideman737
    @edgarwideman737 Před 2 lety

    The encoding software won't install on Windows 10. Any help?

  • @auzworld
    @auzworld Před 4 lety +1

    I see your sound example file was 13k in size..... i''m using a 9k file and keep getting when compling the sketch the following .. "Global variables use 24388 bytes (1190%) of dynamic memory, leaving -22340 bytes for local variables. Maximum is 2048 bytes." ...... ... the size of the data in the clipboard is massive.... compared to your pasted data which is a quick scroll back to start of sketch ... mine has scroller way over to right ....... could it be the software not running right ?? any ideas /tips ? i'm only importing 9k but the txt size of clipboard is 150k lol ?? super converting there !!!

    • @electronicGURU
      @electronicGURU  Před 4 lety

      What is the duration of your mp3 file? Is it properly encoded as i instructed?

  • @SriLankaEntertainment
    @SriLankaEntertainment Před 5 lety

    To use one of the speakers with 12v, give a name

  • @danielwilliam29
    @danielwilliam29 Před 5 lety

    Hello, how about to raise the sound volume, could it?

  • @manjureddy984
    @manjureddy984 Před 3 lety

    from where you powered the arduino board???

  • @rmsadwarikhal243
    @rmsadwarikhal243 Před 5 lety

    Sir please tell me how i can play it with ldr as a switch

  • @antonio889
    @antonio889 Před 3 lety +1

    encodeaudio generate a byte array? i can do a simple java software that take byte array? is the same?

  • @alaaameen362
    @alaaameen362 Před 4 lety +1

    Nice Video, thank you. I have a question when I'm adding PCM.h with Servo.h an error msg appears and it seems like I can't use these two libraries together (maybe because they're using the same timer). So any solution please?

    • @electronicGURU
      @electronicGURU  Před 4 lety

      Yes thats correct they use the same timer. You need to change the library.

  • @examplestudent8518
    @examplestudent8518 Před 4 lety

    Please send me the code so I can play on any pin other than 11. I did not understand the PCM.c library. Please help me because I want to run SPI as well in which pin 11 is being used. Mere changing pin number in PCM.c library did not work!

  • @shard2217
    @shard2217 Před 2 lety

    it is possible for earphone?

  • @johnsnow5510
    @johnsnow5510 Před 4 lety +3

    Great video, sir! I have 2 questions regarding the subject:
    Can I implement more than 1 audio sample in the code (I would need 15 sound samples for a project, is it possible if I use Arduino Mega)?
    Can I use potentiometers to control the sample message I want to receive according to certain analog values I want? (For example: If analogRead < 100 start playback(sample1..))
    I would kindly appreciate your answer :)

    • @electronicGURU
      @electronicGURU  Před 4 lety +3

      Yes thats possible but as it can support only Arduino uno , so no can't use mega. And since it can play upto 4sec of sound so until and unless you use 1 seconds of 3 or 4 clips then you can do that. Otherwise its not possible. You have to go with some another approach.

    • @johnsnow5510
      @johnsnow5510 Před 4 lety +1

      Thank you very much for your answer!

    • @electronicGURU
      @electronicGURU  Před 4 lety

      Your welcome

  • @Cavi0
    @Cavi0 Před 5 lety

    i have a problem
    arduino send me "clipboard coes not contain a string"
    help me

  • @user-qm9di1dx4o
    @user-qm9di1dx4o Před 5 lety

    Can I use it on arduino mega?

  • @isaacwinson-bushby2962

    Hello, is there any way at all to get a pcm library to use on a the arduino mega? My mp3 is too long to play on the uno! (by 1 second! maybe i could decrease the sample rate to make the file smaller?) thanks

    • @isaacwinson-bushby2962
      @isaacwinson-bushby2962 Před 4 lety

      if there was a way to decrease the sample rate from 8000khz to 4000 or 6000 that would be awesome! thanks

  • @patrickregis1
    @patrickregis1 Před 3 lety +1

    Hello, thanks for this tutorial that is very self explainatory !
    Can you recommend us between 4ohms or 8ohms with this setup please.

  • @SriLankaEntertainment
    @SriLankaEntertainment Před 5 lety

    How to connect this circuit 12v horn

  • @alenninan5524
    @alenninan5524 Před 3 lety +1

    Hi i have a doubt . I need to play songs according to if conditions in arduino . Can i write the constant statement (outside setup and loop function that is written in the code) with audio code (128 167 .....)in those condition so that i can play various songs according to the if condition in loop condition?

    • @electronicGURU
      @electronicGURU  Před 3 lety +1

      Yes you can.!

    • @alenninan5524
      @alenninan5524 Před 3 lety +1

      @@electronicGURU i want to share the same code to my friend . So will it play in his arduino too fr the same code ?

    • @electronicGURU
      @electronicGURU  Před 3 lety

      Yes it will.

  • @sagarghode9016
    @sagarghode9016 Před 3 lety

    Great video

  • @sauravmechrulz
    @sauravmechrulz Před 5 lety

    How can we make chanting box ?pls do it in your next project

  • @anushkajadwani429
    @anushkajadwani429 Před 3 lety +2

    I'm on a Mac and I can't use the audio encoder. Are there any alternatives for me?

    • @electronicGURU
      @electronicGURU  Před 3 lety

      Try this : tomeko.net/online_tools/file_to_hex.php?lang=en
      It might help.

  • @codeproducer4788
    @codeproducer4788 Před 3 lety

    How you change text into mp3

  • @MVTech
    @MVTech Před 6 lety

    Great 👍

  • @kevinbartolo780
    @kevinbartolo780 Před 2 lety +1

    Can anyone explain or do a new video for how to achieve this on the new Nano33BLEand Sense boards. I need to only play a few one and two word mp3 files and don't want to add an sd card module as trying to keep the project to bare minimum components

    • @electronicGURU
      @electronicGURU  Před 2 lety

      well this library won't work on nano 33 ble sense , as of now ut only supports atmega328 but if you have capability you can modify it for any mcu but that will take a lot of time & skill

  • @noureldin8652
    @noureldin8652 Před 6 lety

    Sir, my speaker is connected to a circuit and has three wires coming out of the circuit. I had salvaged it from an old toy. Can you tell me what the circuit is for? I was thinking it played the sound effects for the toy but I don't understand the three wires coming out of it.

    • @noureldin8652
      @noureldin8652 Před 6 lety

      electronic GURU I have sent you the pictures sir. Thanks.

  • @ehhh7330
    @ehhh7330 Před 4 lety +1

    thanks bro very useful

  • @vincenthavenga9569
    @vincenthavenga9569 Před 5 lety

    Hi Great Video.Can you tell me why it works on the arduino uno and not the Mega?

  • @guys_animations
    @guys_animations Před 3 lety +2

    "ArDuInO DuMeLaLu" *distorted smiley face here*

  • @corbinmacphee6505
    @corbinmacphee6505 Před 5 lety +1

    tried your demo and worked great with my uno trying to use my mega and having issues is the pin 11 that we use on the uno different for the mega?

  • @muhayminazlan8882
    @muhayminazlan8882 Před 5 lety

    Want to ask something
    Can use TIP31C instead of TIP120?
    Is there any different about these 2 transistor?

    • @muhayminazlan8882
      @muhayminazlan8882 Před 5 lety

      @@electronicGURU thanks a lot bro.🖒🖒thanks for your helping

  • @RenuSingh-hy9cw
    @RenuSingh-hy9cw Před 5 lety

    The encoder software is not working it is showing 'jovaw.exe' not available

  • @marek4695
    @marek4695 Před 3 lety +1

    can you make it that the sound play after pressing button not resset button just normal button connected to arduino pls

    • @electronicGURU
      @electronicGURU  Před 3 lety

      Yeah it can be done call the function in loop instead of setup and just put the function call inside if

  • @reinielantonio2278
    @reinielantonio2278 Před 4 lety +1

    what pins should i used to connect arduino mega 2560?
    ive tried pin13 and pin 12 and pin11 but there's no sound coming out from the speaker

    • @electronicGURU
      @electronicGURU  Před 4 lety

      It will not work on any mcu other than atmega328p

    • @reinielantonio2278
      @reinielantonio2278 Před 4 lety

      Ahh ok thanks men, what should i do to make my arduino mega talk thanks a lot

  • @hasibal-ahmed7385
    @hasibal-ahmed7385 Před 2 lety

    Good tutorial. How can I make this library compatible for ESP32 chips?

  • @venkateshwarareddy8379

    sir, using voice recognition module if one person's voice command is dumped into arduino and if another person tells the same command will it accept? please reply

    • @venkateshwarareddy8379
      @venkateshwarareddy8379 Před 5 lety

      thank you sir and one last question is which voice recognition module will be the best

  • @adityavarghese3339
    @adityavarghese3339 Před 4 lety +1

    Thanks bro, it is working :)

  • @Python_Dev-1
    @Python_Dev-1 Před 2 lety +1

    I can't open the encoder

  • @vinaymadira3835
    @vinaymadira3835 Před 4 lety

    After making this whole project . Does it work after disconnecting the cable from laptop???

  • @fireblaze__________7837
    @fireblaze__________7837 Před 3 lety +1

    when I try to run EncodeAudio.exe there's an error that says "A Java Exception has occurred". I tried reinstalling java and everything, even allocating more memory but nothing has worked so far. Is there any fix?

    • @electronicGURU
      @electronicGURU  Před 3 lety

      Try to capture that exception i think we can handle the exception but we need exact exception name

    • @SankeerthMSGEC
      @SankeerthMSGEC Před 2 lety +1

      czcams.com/video/66crhKstr70/video.html

  • @kennethtadifa3559
    @kennethtadifa3559 Před 3 lety +1

    can i connect this to the input in the sound amplifier to boost the sound?

  • @arjungupta3531
    @arjungupta3531 Před 5 lety

    Sir I am unable to play any audio through arduino

  • @samiullah3695
    @samiullah3695 Před 4 lety

    Hi! I want to play a 22 second audio, Every thing is working but it only plays first 3-4 seconds of the audio. Even that I have put the delay of 22 seconds. What can I do t play full audio?

  • @saharavo8819
    @saharavo8819 Před 2 lety

    hello!! i would like to thank you verrrrry much this is the only thing that worked!!!! but the sound is really really low, how can i make it louder

  • @alexlcm9773
    @alexlcm9773 Před 4 lety +2

    Is there a way I could make it play only when I press a button?

    • @electronicGURU
      @electronicGURU  Před 4 lety +1

      Yes you can add a pushbutton condition in the code.

  • @gd.ritter
    @gd.ritter Před 4 lety +1

    Why is the transistor needed? Can you plug in the speaker directly to gpio?

    • @electronicGURU
      @electronicGURU  Před 4 lety

      Yes we can but the output which comes out from Arduino is very low power which won't be enough for speaker, even if we find a very small speaker and we plug it without the transistor then we will get a very low volume audio. So the transistor is just acting as an audio amplifier here and boosting the sound

  • @BadrulAmeen
    @BadrulAmeen Před 2 lety +1

    Hi Sir, I have a question. What is the specifications of speakers used in the video?

  • @arunrangrej6643
    @arunrangrej6643 Před 3 lety +1

    Encode audio software not opening in my pc. Any idea??

  • @arjungupta3531
    @arjungupta3531 Před 5 lety

    Sir encode audio is not opening in my pc

  • @VCETSOLECTHON
    @VCETSOLECTHON Před 5 lety

    which audio converter you had used . pls send link!!

    • @corbinmacphee6505
      @corbinmacphee6505 Před 5 lety

      @@electronicGURU my converter did not work please updat asap and let me know when you do ...thank :)

  • @MachineFunda
    @MachineFunda Před 6 lety

    Nice one

  • @ittehadchowdhury975
    @ittehadchowdhury975 Před 5 lety +4

    it gives error while running audio encoder it says javaw.exc is missing and when i install java it says java now installed correctly
    please helppp

    • @pranngowda80
      @pranngowda80 Před 5 lety +2

      i am getting same error .. wht do u mean by installing java?

    • @dch789
      @dch789 Před 4 lety +1

      Seems to be the result if you do not have Java installed, or if it is out-of-date. Installing/Updating Java fixed the problem for me.

    • @electronicGURU
      @electronicGURU  Před 4 lety

      Thanks for sharing the details 😊👍