Giter Club home page Giter Club logo

esp8266_wifi_speaker's Introduction

ESP8266_WiFi_Speaker Build Status

ESP8266 ESP12E MP3 WiFi Speaker with OLED screen, DAC & AMP

This project has been replaced by ESP32 ESP8266 WiFi Speaker OLED

Overview

During a recent pantomime production we were unable to get the internal building sound system working and had to come up with a cheap solution to pipe music into the dressing rooms. Cobbling together a Raspberry Pi with sound card, ffmpeg and node rmtp server we were able to stream live AAC audio to a couple of mobiles running VLC Player. However due to the limitations of running live streaming on a PI, also on poor WiFi and the buffering lag of VLC we ended up with a live stream that could be upto 40 seconds behind depending on the numer of connections, which was difficult for the cast and callers.

Having a couple of node mcu ESP8266 12E development boards that were destined for some extra home automation, I decided to see if it was possible to make a WiFi speaker that would perform better than our previous solution.

Components

  • ESP8266 ESP-12E Development Board NodeMcu
  • 2x 4ohm 3W Loudspeaker
  • Mini 3W+3W DC 5V Audio Amplifier PAM8043
  • I2S PCM5102 DAC Decoder ( Earle F. Philhower, III ESP8266Audio does allow for no decoder, but I have not tried it. )
  • 0.96" I2C IIC Serial 128X64 White OLED LCD LED

First major component problem was figuring out the DAC connections to use with AudioOutputI2S in the ESP8266Audio library.
The configuration I finnally manages to get to work was:

3.3V from ESP8266 -> VCC, 33V, XMT
GND from ESP8266 -> GND, FLT, DMP, FMT, SCL
GPIO15 (D8,TXD2) from ESP8266 -> BCK
GPIO3 (RX,RXD0) from ESP8266 -> DIN
GPIO2 (D4, TXD1) from ESP8266 -> LCK

The 5V Audio Amplifier PAM8043 needs a lot of juice and I found that as mine has a potentiometer I needed to turn it fully down to be able to program or run the ESP when only connected by USB serial connection. Powering from a USB power adapter for normal use, I had no problems.

IDE settings & Library Versions

Please check/review instructions and screenshots in the Wiki

Known Issues

Depending on the streaming service and the quality of the stream you are connecting to stability of the connection and the speed at which HttpClient gets the data can vary. issue #2

Putting it all together

Due to the possibility of frequent IP changes of the Raspberry Pi server I have used WiFiManager as it allows the use of custom paramters. I did find that after an upload a manual reset was sometimes needed if trying to use the access point. After trying lots of different configurations for the server mp3 encoding(ffmpeg,darkice) and distribution(icecast2,shoutcast), I have settled on using Icecast2 and DarkIce with the following Darkice configuration.

Thanks

Many thanks to the authors and contibutors for the main libraries that made this project possible

Stuart Blair (smurf0969)

esp8266_wifi_speaker's People

Contributors

smurf0969 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

esp8266_wifi_speaker's Issues

ESP8266 Core using ESP12E

It seems that the ESP8266 Core HTTPClient has got slower over recent versions causing connection problems to IceCast2 on my Raspberry PI.

ESP8266 Core

  • 2.4.0 Works
  • 2.4.1 Sometimes connects, but stutters
  • 2.4.2 Wouldn't connect
  • 2.5 Could only get it to connect via IP6, but audio drops out randomly

I have seen that the new SDK used in the development of ESP8266 Core 2.6 have seen HTTPClient speeds increase and connections stabilise, but its not been released yet.

Currently I am switching between versions using the Board Manager in the Arduino IDE.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.