Skip to content

Carlo47/ESP32WebRadio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Internet Radio

Yet another version of an ESP32 Internet radio, implemented using Phil Schatzmann's versatile Arduino audio tools library. The program runs as an independent task in Core 1. The main loop is idle or performs other tasks.

Working principle

The mp3-encoded ICY or HTTP stream from the Internet passes through the pipeline consisting of a copier, decoder, and volume control and is finally forwarded as an I2S stream to the DAC/Class-C amplifier MAX98357.

                                                       ch1    .----------.     _ /|
                                                       .----> | MAX98357 |--> |_| | spkr
                                                       |      `----------´       \|
         .--------.     .---------.     .--------.     |
 icy --> | copier | --> | decoder | --> | volume | ----+ i2s
         `--------´     `---------´     `--------´     |
                                                       |      .----------.     _ /|
                                                       `----> | MAX98357 |--> |_| | spkr
                                                       ch2    `----------´       \|

Web Interface

GUI

After establishing a WiFi connection to the local router using AutoConnect, go to http://webradio. You can now listen to the preset radio station and operate the radio via the web interface.

Features

  • Selection of a Radio URL from a predefined list
  • Adjustable volume via a slider
  • Speaker on/off
  • Display of meta data (composer, opus) and time and date
  • The last station played and the volume setting are saved and recalled the next time the device is started

Wiring

The ESP32 supplies the LRC, BCLK, and DIN signals to its pins 21, 27 and 22. To separate the stereo channels, the two MAX98357 modules are connected from 5V to the SD inputs with different resistors. At an operating voltage of 5V, they have values of 560k and 180k, respectively.

                      .-----------------.
           21 -->     o LRC             |
           27 -->     o BCLK       MAX  |
           22 -->     o DIN       98357 |
                      o Gain            |   Spkr right
  5V Vin ---[560K]----o SD              |    _/|
          GND -->     o GND             o---|  |
          5V  -->     o Vin (5V)        o---|_ |
                      `-----------------´     \|
                      .-----------------.
           21 -->     o LRC             |
           27 -->     o BCLK       MAX  |
           22 -->     o DIN       98357 |
                      o Gain            |   Spkr left
  5V Vin ---[180K]----o SD              |    _/|
          GND -->     o GND             o---|  |
          5V  -->     o Vin (5V)        o---|_ |
                      `-----------------´     \|

Libraries used (see platformio.ini)

  • AsyncTCP @ 3.4.10
  • ESPAsyncWebServer @ 3.9.5
  • audio-tools @ 1.2.2+sha.053efdb
  • libhelix @ 0.9.2+sha.0d70b7f
  • LittleFS @ 3.3.5
  • WiFi @ 3.3.5
  • Preferences @ 3.3.5
  • Ticker @ 3.3.5

Credits

Thanks to Phil Schatzmann for his audio tools and to Stéphane Calderoni for his inspiring CSS designs for the web interface.

About

ESP32 Internet Radio with web interface

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published