Easy ESP32 Bluetooth Speaker

Поділитися
Вставка
  • Опубліковано 5 лют 2025
  • Watch the update video after this one to see the updated code for the v3.x ESP32 Toolchain:
    • Easy ESP32 Arduino Blu...
    If you want to create your own custom Bluetooth Speaker or Audio Receiver this simple project is a good way to get started....
    Using an ESP32 Dev Module, and the brilliant A2DP Library from Phil Schatzmann, you can quickly create a Bluetooth Audio receiver which can be plugged into some speakers as we have here, or into your old stereo system to add Bluetooth functionality to your old equipment.
    Documentation Guide:
    www.visualmicr...
    #Arduino #bluetoothspeaker #visualstudio

КОМЕНТАРІ • 39

  • @dafid
    @dafid Рік тому +10

    this works but it is only one side out of a stereo input, if you want to output stereo through the internal DAC, i have found that GPIO 25 has some background noise probably due to interference, so you might want to add a 100uF capacitor to the outputs. If you want to have a true mono output from a stereo input, you'll have to add "a2dp_sink.set_channels(I2S_CHANNEL_MONO);" before the start function, and only use the GPIO with the less noise
    (by true mono i mean both stereo channels as a single channel output)

    • @AvitoBot
      @AvitoBot Рік тому

      Добрый день, я правильно выбрал файл для загрузки, как указать GPIO 25?
      #include
      #include
      #include
      #include
      #include
      #include
      #include
      #include
      #include "BluetoothA2DPSink.h"
      BluetoothA2DPSink a2dp_sink;
      void setup() {
      a2dp_sink.set_channels(I2S_CHANNEL_MONO);
      a2dp_sink.start("ESP-32");
      }
      void loop() {
      delay(1000); // do nothing
      }

  • @euvo_sound
    @euvo_sound Рік тому +1

    adding a startup and a connection sound would be pretty cool, would love to add the jbl startup sound to it

    • @aimless3827
      @aimless3827 Рік тому +8

      Blue tood dewide leady to pal

  • @mradulbhardwaj3147
    @mradulbhardwaj3147 Рік тому +2

    Can we also control a bot using same Bluetooth ??

  • @chronobot2001
    @chronobot2001 21 день тому

    It may seem simple but showing a basic schematic would have been helpful.

  • @daniaalshakhe7944
    @daniaalshakhe7944 5 місяців тому

    Please sir tell me what all the components are used

  • @FuadAlFiroj
    @FuadAlFiroj 6 місяців тому +1

    Sir I Have a ESP 32 cam modeul so i dont have the gpio 25 pin access how can i change the outut in then

    • @sanetro4563
      @sanetro4563 5 місяців тому +1

      For your ESP32-CAM pin out is GPIO0 (for ADC2 - audio converter), probably one channel. To make sure it is right search your model diagram in internet and find pin outs responsible for ADC2 or A/D

  • @gufo_tave
    @gufo_tave 2 роки тому +5

    I made a try with this setup, but honestly i would not recommend it, if your goal is to get at least a decent audio.
    Not only the internal DAC of the ESP32 isn't the best choice, but the board generate a lot of noise.
    In short, it work, but is more an emergency setup, IMHO.

    • @dafid
      @dafid Рік тому

      have you tried the other dac gpio? on my board the 25 has some noise, but the 26 is a lot clearer, i commented above on how to output both channels of a stereo input to a single gpio

    • @dafid
      @dafid Рік тому

      by lot clearer sound i mean it's really clean, i use mine for a 40y old 170w amp and it's almost undistinguishable from an aux input

    • @shootin278
      @shootin278 11 місяців тому

      @@dafid I tried connecting ESP32 to ADAU1701 via I2S interface. Noise is still here. It seems to me that there is some problem with ESP32 and it's Bluetooth adapter

  • @Alypsat_kz
    @Alypsat_kz Рік тому

    Is it possible to make a wireless microphone using 2 esp32?

    • @visualmicro4389
      @visualmicro4389  11 місяців тому

      In theory it could work, though you may run into delays/lagging without enough buffering. If it was to be used for a "live" transmission then it may be better to use Bluetooth, or if the range of WiFi is required then hopefully there is a library for an RTSP style protocol for ESP.

  • @lautungho1
    @lautungho1 2 роки тому

    Awesome. I following the step and success. May I ask can I add a button to active the Bluetooth Pair function instead of Auto startup??

    • @visualmicro4389
      @visualmicro4389  2 роки тому +5

      Yes this can be done, just move the start() call into code detecting when the button is pressed, and then if you want to disconnect when pressing the button again, you can call the disconnect() function. then stop() to ensure the stream is stopped, and end(false) to end the sink object, a quick example:
      if (digitalRead(23) == LOW && sinkStarted == false) {
      a2dp_sink.start("vMicro BT Switch");
      Serial.println("Enabling BT Audio");
      sinkStarted = true;
      delay(500);
      }
      if (digitalRead(23) == LOW && sinkStarted == true) {
      Serial.println("Disabling BT Audio");
      a2dp_sink.disconnect();
      a2dp_sink.stop();
      a2dp_sink.end(false);
      sinkStarted = false;
      delay(500);
      }

  • @porloc
    @porloc Рік тому

    Is it works without external DSP and the sound quality is not 8 bit?

  • @Siloda605
    @Siloda605 Рік тому

    Hey, i cant connect to it through bluetooth, like it says it is there but i cant connect to it and also it isnt even visible on my iphone

    • @visualmicro4389
      @visualmicro4389  Рік тому

      Please ask questions in our forum here www.visualmicro.com/forums/ thanks

  • @jocksterover9000
    @jocksterover9000 2 роки тому +1

    Elegant!

  • @aslahaslu3616
    @aslahaslu3616 Рік тому +1

    Sir can i include voice commands,controls to this?

  • @TheOldKid
    @TheOldKid 8 місяців тому

    Never could get that to work

    • @visualmicro4389
      @visualmicro4389  8 місяців тому

      There have been a lot of changes to the ESP32 core and the Library code since this was published....
      We will publish an updated code example and a short video soon so it can be used on the latest versions now available.

  • @onurakyildiz
    @onurakyildiz 2 роки тому

    sir can we do the same project using ESP8266

    • @visualmicro4389
      @visualmicro4389  2 роки тому

      Please ask for support in our forum www.visualmicro.com/forums
      Thank you

  • @JehadurRE
    @JehadurRE 8 місяців тому

    Compilation error: 'i2s_config_t' does not name a type;

    • @visualmicro4389
      @visualmicro4389  8 місяців тому

      There have been a lot of changes to the ESP32 core and the Library code since this was published....
      We will publish an updated code example and a short video soon so it can be used on the latest versions now available.

  • @vitruze2068
    @vitruze2068 2 роки тому +1

    why not stereo?

    • @visualmicro4389
      @visualmicro4389  2 роки тому +5

      This was our first project with this setup, and checking the library you can use GPIO25 and GPIO26 from the internal DAC to play stereo if desired: github.com/pschatzmann/ESP32-A2DP#output-to-the-internal-dac
      Though trying this out it seems both pins output the same audio, so expect this has other uses when playing from embedded files/SD cards.

    • @dafid
      @dafid Рік тому

      @@visualmicro4389 i tested it and stereo works just fine for me (except for the noise on 25)

  • @mdsabbiralshafi8152
    @mdsabbiralshafi8152 9 місяців тому +1

    super

  • @cringefds1366
    @cringefds1366 5 місяців тому

    where is code?

    • @visualmicro4389
      @visualmicro4389  5 місяців тому

      It can be downloaded from the link on our documentation page:
      www.visualmicro.com/page/Easy-DIY-Bluetooth-Speaker-Project.aspx

  • @spoor4092
    @spoor4092 2 роки тому

    Hello! We are from Ukraine. Is it possible to make an mp3 player based on the esp 32 cam chip? It is necessary to implement access to the sd to delete and add mp3 files. It is very necessary to implement. Thanks for the tips !

    • @visualmicro4389
      @visualmicro4389  2 роки тому

      Yes it is. Please ask for support in our forum www.visualmicro.com/forums

  • @tchauish
    @tchauish 8 місяців тому

    It does not compile and I got the error code due "BluetoothA2DPSink.h"

    • @visualmicro4389
      @visualmicro4389  8 місяців тому

      There have been a lot of changes to the ESP32 core and the Library code since this was published....
      We will publish an updated code example and a short video soon so it can be used on the latest versions now available.