5

Say I wanted to, purely hypothetically, set up a pirate radio station by connecting an Arduino to a WiFi network away from home, streaming music to the Arduino, decoding it, and broadcasting it with an FM transmitter.

Given an Arduino (Genuino) Uno, a Sparkfun ESP8266 Thing Dev breakout board for WiFi connectivity, and an Adafruit Si4713 Stereo FM Transmitter breakout board, how would I go about the actual streaming of music (in MP3 or WAV format) from a (Windows) computer to the Arduino over WiFi? Would an Arduino Uno be powerful enough for this? Which components would I need to decode the audio?

  • The limitations of the serial out of the ESP8266 and into the Arduino would be one big constraint--115200 baud doesn't leave much time for processing. Doing stereo D/A conversion with Arduino PWM would be an even more severe constraint. – Dave X Apr 13 '16 at 18:08
3

Well, a sort of... You can stream 64kbps MP3, get it via wifi from esp8266. Then for all the rest, forget the Arduino.

You need a dedicated MP3 decoder chip (many out there, sta013 was one of the oldest beasts) which can take the digital mp3 stream and convert it to analog output.

You can feed the line level analog output to the FM Transmitter, and then you're golden.

Note that you shall develop some application on the PC to actually stream out the MP3 - an off the shelf solution such as a Shoutcast server may not work, as the usual web-radio stations inject station data and currently played track metadata into the mp3 stream what you have to remove from the MP3 decoder chip.

Since the actual wifi bandwidth with ESP is limited (as well as the processing power of the Arduino), you may switch to a more efficient compression format. For example, a 64kbps WMA sounds far better than a 64kbps MP3, and at 64kbps AAC is superior to any of the other formats. Ensure that your decoder chip can work well with a modern codec comperssion format.

  • Great in-depth answer, thanks! For the encoding, would something newer like the VS1053B do? – Joris Apr 13 '16 at 19:06
  • Could - but you do have a full PC for encoding, no? If you wish, you can encode real time the microphone plus some music playback on the PC (called "stereo mix") and stream out via internet to your Wifi module in the wild. – Gee Bee Apr 13 '16 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.