How to Play audio with Arduino | Audio in Arduino | How connect Speaker with Arduino | Fair Electro

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 98

  • @ericgroen253
    @ericgroen253 3 года назад +4

    thank you so much for this video.
    It explains a lot of problems for me.
    For example; that the SD card works with files that can be called upon to play, rather than using memory addresses of EEPROM memory cards.

  • @snopz
    @snopz Год назад +3

    Can we take a file from the internet via wifi of esp32 and write it to the sd card and then play it?

  • @jannahersheybelarmino
    @jannahersheybelarmino Год назад +3

    is it okay to use 4ohms and 30 watts speaker????

    • @jannahersheybelarmino
      @jannahersheybelarmino Год назад +2

      the speaker u use is just 3 watts, so is it okay to use 30watts??

    • @fairelectro
      @fairelectro  Год назад +1

      If you want to use 30 watt speaker, i suggest you, use df player mini with audio amplifier. ruclips.net/video/kZr0vfhMojM/видео.html

    • @jannahersheybelarmino
      @jannahersheybelarmino Год назад +1

      @@fairelectro really? Even if the amplifier can only supply 6 watts or 3 watts? Amplifier PAM8403… I'm using arduino mega 2560. We'll use a speaker with 8ohms and 30watts. Also im gonna use a amplifier and dfmini player. Is it safe? I think the amplifier PAM8043 won't make it becausewe its just for 3 watts or 6

    • @Hafizsamsung-h6m
      @Hafizsamsung-h6m 4 месяца назад +1

      ​@@jannahersheybelarminouse big amplifier then connect it to df player mini

  • @pinangaypedro7840
    @pinangaypedro7840 2 года назад +3

    Nice video... i just wanna ask if it will be able to add sensor like utrasonic sensor to have a gesture control for the play, pause and volume?

    • @krishmakwane8824
      @krishmakwane8824 Год назад

      Bro if you know plz tell us too!

    • @yenterary3228
      @yenterary3228 Год назад

      you could add something like if your hand is a certain distance away the music will pause or increase the volume

  • @milespeterson5049
    @milespeterson5049 Год назад +2

    Can you do this without the transistor? does it just amplify the volume to the speaker. I just need a little information.

    • @fairelectro
      @fairelectro  Год назад

      You can use DF Player mini for audio, no need to use any transistor or amplifier. Please watch this video . ruclips.net/video/AWpRGvP-9Lo/видео.html

  • @KrampusVsChristmas
    @KrampusVsChristmas Год назад +1

    Awesome instructional video! Thank you!

  • @happyrabbit7944
    @happyrabbit7944 2 года назад +2

    Could you tell me please how the wiring would have been changed If we use trrs jack breakout instead of a speaker. Is It correct we have to connect d9 pin to the emmiter of the transistor and tip
    ing1 to the base and nothing to the collector? In this case I have a little bit of noise in my headphones :( I used bc547c instead of the required transistor in this video.

    • @fairelectro
      @fairelectro  2 года назад

      you can use df player mini for audio play. ruclips.net/video/AWpRGvP-9Lo/видео.html

    • @fairelectro
      @fairelectro  2 года назад

      please watch this video. ruclips.net/video/AWpRGvP-9Lo/видео.html

    • @happyrabbit7944
      @happyrabbit7944 2 года назад

      @@fairelectro thanks

  • @gregoriogregorino2217
    @gregoriogregorino2217 2 года назад +2

    Hi, nice video! Just a question: where you able to play 2 sounds simultaneously?

    • @fairelectro
      @fairelectro  2 года назад +1

      we can add 2 file name in the code, where I added 1 file name

  • @thekidmagician7920
    @thekidmagician7920 2 года назад +2

    Really, Thank You so much !!!

  • @kartikshukla5907
    @kartikshukla5907 5 месяцев назад +1

    will it work with esp32 ?

    • @fairelectro
      @fairelectro  5 месяцев назад

      Yes, it works with esp32

  • @crisjulianimperial69
    @crisjulianimperial69 7 месяцев назад +1

    Hi what if don't have transistor for project is this work?

    • @fairelectro
      @fairelectro  7 месяцев назад

      Use DF player mini. No need any transistor. ruclips.net/video/kZr0vfhMojM/видео.html

  • @thatclipguy61
    @thatclipguy61 2 месяца назад +1

    code works and thank you soo much but I have a problem .. my speaker sounds really low and the track plays too fast I tried to change hz and bit rate but it didnt change It got worse can you help me I also tried diffrent speakers

    • @fairelectro
      @fairelectro  2 месяца назад

      Use DF player mini if you want more sound.

    • @thatclipguy61
      @thatclipguy61 2 месяца назад

      @@fairelectro okey thanks😁

  • @wrk1221
    @wrk1221 2 года назад +1

    Thanks it is good. is it possible to play many file from SD card?, Sir

  • @rvnrobotics5437
    @rvnrobotics5437 4 года назад +5

    Can we use bc547 transistor ?

    • @MakerSL
      @MakerSL 3 года назад

      im interested to can you?

    • @happyrabbit7944
      @happyrabbit7944 2 года назад +1

      I used bc547c and It works

  • @JerryOhh
    @JerryOhh 3 года назад

    Can you make content for that video but without sd card so look aux type or like plug and play speaker?
    I will plan for my DIY Controller with Speaker

    • @fairelectro
      @fairelectro  3 года назад +1

      You can use df player mini for audio

  • @karahkost1697
    @karahkost1697 2 года назад +1

    Do we have to use the same type of transistor or can we use a different one?

    • @fairelectro
      @fairelectro  2 года назад

      we have to use same type of transistor

    • @TravelersRuneAlt
      @TravelersRuneAlt 2 года назад

      Hate to correct this dude but yes, this transistor is for amplifying sound, a woofer or a something to amplify the sound will do

  • @thekidmagician7920
    @thekidmagician7920 2 года назад +2

    THANK YOU VERY VERY VERY VERY VERY VERY VERY VERY MUCH..............................
    THANKS A LOT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @Andrei56789O
    @Andrei56789O Год назад +2

    okay but... How do i get the library???

    • @Andrei56789O
      @Andrei56789O Год назад +1

      i want to make this

    • @fairelectro
      @fairelectro  Год назад

      you can download library from github.com/TMRh20/TMRpcm

    • @fairelectro
      @fairelectro  Год назад

      You can use df player mini for audio. ruclips.net/video/AWpRGvP-9Lo/видео.html

  • @muhammaddanial212k
    @muhammaddanial212k 2 года назад +1

    How sd card is providing analog signal to the speaker?. If I use serial port to transfer audio file to Arduino the speaker doesn't sound as the original audio. Why is it so?

    • @fairelectro
      @fairelectro  2 года назад

      If you want to play original audio, I suggest you, use DF player mini ruclips.net/video/AWpRGvP-9Lo/видео.html

    • @muhammaddanial212k
      @muhammaddanial212k 2 года назад

      @@fairelectro i want to play media directly from serial port. Not from sd card

  • @Btunc
    @Btunc 2 года назад +1

    Giving This Error: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] what can i do?

    • @fairelectro
      @fairelectro  2 года назад

      Are you make any change in code?

    • @Btunc
      @Btunc 2 года назад

      @@fairelectro no its the same

    • @karahkost1697
      @karahkost1697 2 года назад

      Im having this problem too

    • @Btunc
      @Btunc 2 года назад

      ​@@karahkost1697 i solved it you need to change your sd card to 2gb or less

    • @koenkloosterhuis1710
      @koenkloosterhuis1710 2 года назад

      I have the same issue

  • @themakerchannel00
    @themakerchannel00 3 года назад

    Hi Nice video. I think playback is started when the SD card is present right? How would you make playback start by button push? Thanks

    • @fairelectro
      @fairelectro  3 года назад

      you can use df player mini

    • @themakerchannel00
      @themakerchannel00 3 года назад

      @@fairelectro Good idea, but this item is not available in New Zealand. Also I have made my circuit and all connections. The project is working as you designed it, but I just need to add a button to trigger play. Is there no way to add a button to your code? Thanks

    • @fairelectro
      @fairelectro  3 года назад +1

      it is possible. watch this video please. ruclips.net/video/ufO7mgQACbo/видео.html

  • @ProPro-li4mz
    @ProPro-li4mz 2 года назад +1

    Bro did this work with Arduino nano

  • @thronex4741
    @thronex4741 Год назад +1

    it is not working
    i am using a speaker driver from a toy no sound comes i did exactly what you said with arduino nano

    • @fairelectro
      @fairelectro  Год назад

      Use DF player mini if you want to use amplifier. ruclips.net/video/azcRVLsgWF0/видео.html

    • @thronex4741
      @thronex4741 Год назад

      @@fairelectro is it a library?

    • @thronex4741
      @thronex4741 Год назад

      No actually, something is wrong with the code, i wrote a different one and now it works

  • @randomguy6608
    @randomguy6608 2 года назад +1

    so i did it and wired everything correctly and have a WAV file but still nothing is happening like the arduino light flashes and then just nothing happens what do i do and it also says SD fail on the serial monitor

    • @fairelectro
      @fairelectro  2 года назад

      check SD card module is working?

    • @manan1295
      @manan1295 9 месяцев назад

      same problem. how did you solve it??

  • @iwilz9043
    @iwilz9043 Год назад +1

    I have a problem.
    Doing the same thing and using the same sketch my audio is very slow (something like 50% of original speed i suppose) and a lot "scratched"
    To solve the problem i've changed the MCU (from Nano to UNO), the sketch, the SD module with a second identical board and the SD card, but NOTHING solved my problem.🥵
    Any idea please????🙄

    • @fairelectro
      @fairelectro  Год назад +1

      If you need more sound, use DF player mini. watch this video please :- ruclips.net/video/AWpRGvP-9Lo/видео.html

    • @iwilz9043
      @iwilz9043 Год назад

      ​@@fairelectro thank you very much for your comment and yes i could try to change the SD module, but looking at this video, my SD module is exactly the same as yours (even the texts printed on the front and back of the module are the same).
      So i would like to understand WHY i couldn't produce a good sound...

  • @dannyflintoft2266
    @dannyflintoft2266 Год назад

    would it be possible to attach buttons, to input what file in the sd card you want to play, and to trigger it to play? and even attach a screen to show which file you have selected?

    • @serkratos1216
      @serkratos1216 Год назад +1

      It is obviously possible, why not?

  • @vijethjshetty8210
    @vijethjshetty8210 2 года назад +1

    Does this code works on mega ?

  • @Rihansgba
    @Rihansgba 2 года назад +2

    File convert kisi bhi Computer se ho sakta he

  • @kyriakosgeor
    @kyriakosgeor Год назад

    It didn't work for me! Also, the void loop section is empty and I don't understand why

    • @fairelectro
      @fairelectro  Год назад

      what problem you face?

    • @fairelectro
      @fairelectro  Год назад

      If you want to play audio file mp3 or wav with arduino, use DF player mini. Its better. ruclips.net/video/azcRVLsgWF0/видео.html

  • @TravelersRuneAlt
    @TravelersRuneAlt 2 года назад

    Hey even with my da card in the module and everything wired correctly it doesn’t work, my address card is 64 storage

  • @TheBowlerYT
    @TheBowlerYT 2 года назад

    What's the name of the song 0:20 ?

  • @Rihansgba
    @Rihansgba 2 года назад +2

    Audio file convert nahi ho rahi

  • @dhaksha9561
    @dhaksha9561 3 года назад +1

    how to increase the volume

    • @fairelectro
      @fairelectro  3 года назад +1

      it is difficult to increase the volume in sd card module. please use DF player mini, because it has built in audio amplifier , which gives 3watt audio output. Please watch this video I am using DF player mini. ruclips.net/video/azcRVLsgWF0/видео.html

    • @ericgroen253
      @ericgroen253 3 года назад +1

      There are many ways to increase the volume.
      But you have to use some RC filters to smoothen the sound before amplifying it

    • @dhaksha9561
      @dhaksha9561 3 года назад +2

      @@ericgroen253 thank u so much for the info

  • @qaiyyimag9055
    @qaiyyimag9055 2 года назад +1

    what is maximum size for the song file

    • @fairelectro
      @fairelectro  2 года назад

      This module support up to 2gb. You can use DF player mini module for audio. ruclips.net/video/AWpRGvP-9Lo/видео.html