Skip to content

educ8s/ESP32-S3-Web-Radio-with-Arduino

Repository files navigation

ESP32-S3 Internet Radio with AMOLED Display

Overview

Build your own Internet Radio in under 10 minutes for just $32! This project combines an ESP32-S3 microcontroller with a stunning AMOLED display to create a modern, wifi-enabled radio that streams music from your favorite stations worldwide. Unlike traditional radio projects that require external MP3 decoders, this build leverages the dual-core power of the ESP32-S3 to decode MP3 streams directly while delivering crystal-clear audio through a digital I2S interface.

The sleek AMOLED display shows the current station, song information, time, and WiFi signal strength, while simple push buttons provide intuitive control over station selection and volume adjustment.

Video Tutorial

ESP32S3 Web Radio Project

🎥 Watch the Full Build Tutorial

Features

  • Crystal Clear Audio: I2S digital audio output eliminates noise and interference
  • Stunning AMOLED Display: Low power consumption with excellent visibility
  • Dual-Core MP3 Decoding: No external decoder needed - everything runs on the ESP32-S3
  • WiFi Streaming: Connect to internet radio stations worldwide
  • Battery Ready: Built-in battery charging circuit for portable operation
  • Simple Controls: Four push buttons for station and volume control
  • Real-Time Info: Display station name, song title, time, and signal strength
  • Ultra-Low Power: Less than 1 Watt power consumption (~150mA at 5V)
  • Easy Assembly: Just 5 minutes of wiring with minimal components

Parts List

Everything you need for this build:

Total Project Cost: ~$32

Note: The I2S interface outputs stereo, but MAX98357A plays mono. For true stereo, use two MAX98357A modules with two speakers.

Software Setup

Arduino IDE Configuration

  1. Install ESP32 Board Support:

    • Go to File > Preferences
    • Add this URL to Additional Board Manager URLs:
      https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
      
    • Open Tools > Board > Boards Manager
    • Search for "ESP32" and install "esp32 by Espressif Systems"
  2. Required Libraries: Install these libraries via Tools > Manage Libraries:

    • ESP32-audioI2S (for MP3 decoding and I2S output)
    • TFT_eSPI (for display control)
  3. Board Configuration:

    • Board: ESP32S3 Dev Module
    • CDC on Boot: Enabled
    • Flash Size: 16MB
    • Partition Scheme: 16MB Flash (3MB APP)
    • PSRAM: OPI PSRAM (crucial for audio streaming)

Code Structure

The project uses object-oriented design for clean, maintainable code:

  • ESP32_InternetRadio.ino – Main program with WiFi setup and control logic
  • StreamPlayer.cpp/.h – Handles MP3 streaming and I2S audio output
  • DisplayUI.cpp/.h – Manages AMOLED display rendering and UI
  • RadioStationManager.cpp/.h – Manages radio station list and navigation
  • rm67162.cpp/.h – Low-level AMOLED display driver
  • pins_config.h – Hardware pin definitions

Configuration

WiFi Setup

Update your network credentials in the main .ino file:

const char* ssid = "YourWiFiNetwork";
const char* password = "YourWiFiPassword";

Radio Stations

Customize your station list by editing the RadioStation array:

RadioStation stations[] = {
  {"Station Name", "http://stream-url-here"},
  {"BBC Radio 1", "http://stream.live.vc.bbcmedia.co.uk/bbc_radio_one"},
  // Add your favorite stations here
};

Key Features Explained

I2S Digital Audio

Unlike analog audio outputs that suffer from noise and interference, I2S maintains perfect digital audio quality throughout transmission. The ESP32-S3 sends decoded MP3 data digitally to the MAX98357A amplifier, which converts it to analog audio only at the final stage before the speaker.

Dual-Core MP3 Decoding

The ESP32-S3's dual-core architecture allows real-time MP3 decoding without external hardware. One core handles WiFi and system tasks while the other dedicates to audio processing, ensuring smooth, uninterrupted playback.

AMOLED Display Advantages

  • Ultra-low power consumption - only draws current for lit pixels
  • Perfect blacks with infinite contrast ratio
  • Excellent outdoor visibility with bright, vibrant colors
  • Fast response time for smooth UI updates

Controls

  • Button 1: Next radio station
  • Button 2: Previous radio station
  • Button 3: Increase volume
  • Button 4: Decrease volume

Power Consumption

  • Active Streaming: ~150mA at 5V (less than 1 Watt)
  • AMOLED Display: Minimal power due to efficient OLED technology
  • Battery Life: With a 2000mAh battery, expect 10+ hours of continuous playback

Troubleshooting

Common Issues

  • No Audio: Check I2S pin connections and ensure PSRAM is enabled
  • WiFi Connection Failed: Verify network credentials and signal strength
  • Display Not Working: Confirm SPI connections and display initialization
  • Station Won't Play: Check stream URL validity and internet connection

Audio Quality Tips

  • Use high-quality stream URLs (128kbps or higher)
  • Ensure stable WiFi connection to prevent dropouts
  • Keep speaker wires short to minimize interference

Future Enhancements

  • Custom Enclosure: 3D-printed case for a professional finish
  • Larger Battery: Extended operation time for true portability
  • Bluetooth Connectivity: Stream from mobile devices
  • Web Interface: Configure stations via browser
  • Equalizer: Audio processing and sound customization
  • Alarm Function: Wake up to your favorite radio station
  • Multiple Speakers: True stereo output with dual MAX98357A modules

Technical Specifications

  • Microcontroller: ESP32-S3 (Dual-core, 240MHz)
  • Display: 1.28" AMOLED, 240×240 resolution
  • Audio: I2S digital output, 16-bit/44.1kHz
  • Connectivity: WiFi 802.11 b/g/n
  • Power: USB-C charging, battery ready
  • Memory: 8MB PSRAM, 16MB Flash

License & Contributing

This project is open source and contributions are welcome! Feel free to:

  • Add support for new radio stations
  • Improve the user interface
  • Optimize power consumption
  • Add new features and functionality

About

🛠 Built by Nick Koumaris
📺 Follow for more projects: YouTube Channel
💬 Community Support: Check the video comments for help and discussions

⚡ Build your own Internet Radio today and enjoy endless streaming possibilities!

About

An ESP32 S3 based project using the MAX95387A I2S Module.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published