The inspiration for this project comes from a large Lightning Whelk shell I bought on Sanibel Island, Florida. The interior is quite large - it can easily hold a couple batteries and an ESP8266. The obvious device to put inside a seashell? A web radio, of course! Then you can hear the ocean, no matter where you live.
My goal for the project is to create a device which looks like just a seashell to the casual observer, but emits live ocean sounds. It should be battery powered and rechargeable. It will need to have a concealed on/off switch. It will need a wireless radio for streaming the content to the device and a speaker for sound output.
My hope is to complete this device by December 25th, 2016 - so I can give it away as a Christmas present.
Now your esp8266 Seashell can stream MP3 radio stations, great! Now what about the ocean?
I've had great success with the orcasounds network (orcasound.net). Clicking on any of their "Listen" links downloads a file called playlist.pls. Open this file in Notepad, and you will see the address of the stream itself. For instance, the file looks like this:
Now you know that the address of the stream is "http://ice.stream101.com"; and the port is 8047. This is the information you need to add the stream to the Ka-radio station list.
The Jupiter Foundation also hosts hydrophone streams (http://jupiterfoundation.org/). Unfortunately, they only stream while there are whales in their area, which is around December to April. The same system can be used to find the stream information.
The hardware setup for this build is fairly straightforward. The ESP8266 (I used Adafruit's Feather HUZZAH) is connected to a VS1053 decoder chip with the SPI bus. The VS1053 is connected to a small powered speaker (I just used one I already had laying around). The speaker and feather are connected to a battery - the VS1053 is powered by the Feather's voltage regulator. The Analog 0 pin on the Feather is tied to ground, which signals to the Ka-radio software that there is no front panel.
Unlike the schematic, my speaker driver board has left and right channel inputs - but it only has a single speaker.
The Internet Of Seashells is here! I was able to complete the first seashell before Christmas. Unfortunately, in order to preserve the secrecy of the project I didn't keep a careful build log, but I will share what I learned. I started off with an Adafruit Feather HUZZAH with 500mah LiPo battery, Adafruit's VS1053 breakout board, a cheap battery-powered speaker unit, and my seashell. At the moment, the program I am using is the Karawin Ka-Radio with the web front end (no hardware panel). That project is also hosted on Hackaday at https://hackaday.io/project/11570-wifi-webradio-with-esp8266-and-vs1053
The device must have a radio for streaming content
The device must have a speaker for sound output
The device may need to process the streaming content, to convert it into suitable output
I will need to find a suitable source of live ocean sounds
The most obvious solution to the hardware goals would be to repurpose a small bluetooth radio. The bluetooth radio could be taken out of its case and placed inside the seashell. The bluetooth radio could then be paired with another device that would select and decode the content stream, leaving the hardware side of the project done. At the moment, I don't like this approach for a couple reasons. First, I would need a second device to pair with the seashell, which would have to stay near the shell. Second, that approach seems less magical (more magical is a non-functional project requirement) than making the shell entirely self-contained. The Bluetooth speaker option would still meet the project goals though, so I will keep it as a backup option.
My preferred choice of hardware is an ESP8266. The ESP8266 can theoretically handle connecting to a WiFi router, opening an mp3 stream, decoding the stream, and driving a small speaker. This project ( https://github.com/espressif/esp8266_mp3_decoder ) describes an mp3 decoder running on the ESP8266. The Hackaday article about the web radio shows the ESP8266 offloading the decoding and speaker driving to a VS1053 chip ( https://hackaday.io/project/11570-wifi-webradio-with-esp8266-and-vs1053 ).
For the source of the ocean sounds, a good candidate seems to be the Salish Sea hydrophone network ( http://www.orcasound.net/ ) which consists of several hydrophones in North-west Washington. Listeners report hearing Orcas during their migration, but otherwise there is a soothing ocean noise. VLC reports that the stream is "MPEG layer 1/2 (mpga)". OrcaSounds notes that this is a ShoutCast stream. Unfortunately, I don't know how compatible these codecs are, or how easy it will be to decode them.
Haha, what a novel place to put an IoT device! Very neat gift idea. Great work!