This is an outdoor speaker box that can be used to allow passersby to turn on sound (e.g. for a Xmas show). It only requires power (120V), everything else is wireless. It uses a FM receiver to pick up the sound to play.
This repository contains the firmware that runs on a ESP8266 NodeMCU board (probably will run on a ESP32 as well) to control these hardware features:
- A big button with a built-in LED
- A LED Strip to illuminate the box
- A FM Receiver powered by a relay
In the idle state, the box flashes the LED in the button and the LED strip is on. When the user presses the button, the flashing stops, the lightstrip turns off and the FM receiver turns on.
This state remains for 8 minutes. For 30s after that, the button LED flashes with increasing frequency, the LED strip gets brighter. If the button is not pressed during that time, the FM receiver turns off, the LED strip turns on, and the button LED starts flashing (so back in Idle state).
If the button is pressed at any time during the 8.5 minutes, the timer starts anew at zero.
The board also serves a webpage that shows the speakers current state and allows you to control the sound and the light. In order for this to work, your pedestal must be within reach of your Wifi network.
The following items can be configured via #define
s:
- XmasPulpit.hpp
#define SWITCH_INPUT_PIN D3
#define SWITCH_LIGHT_PIN D5
#define RELAY_CONTROL_PIN D6
char *ssid = "<YOUR_SSID>";
const char *password = "<YOUR_PWD>";
The defines above determine what pins to use to read the button press, flash the LED in the button, and turn on the relay for the FM receiver. You also need to enter the Wifi SSID and password to connect to.
- Pulpit.hpp
#define RUNTIME_OF_SOUND (8L * 60L * 1000L)
#define WARNING_PHASE_OF_SOUND (30L * 1000L)
This determines how long in milliseconds the two phases of operation are. The first one is the length of the normal listening phase, the second one starts flashing things at you to make you extend the time.
- LightSource.hpp
#define LEDSTRIP_DATA_PIN D7
#define NUM_LEDS 72
These defines determine what pin to use to send the brightness data via WS2811 and to how many LEDs to send it to.
- Blinker.hpp
#define LIGHT_ON HIGH
#define LIGHT_OFF LOW
These determine to use HIGH or LOW on the output pin to turn the button LED on.
I used an old 12V subwoofer computer speaker I had left over, so you may need to source that from somewhere. Other than that, these are the parts I used for my box, but you can probably find alternatives and other suppliers. You may beed some wires and connectors not listed below. Also the switch in the wiring diagram is not needed, I usually just cut power. Also, some kind of breadboard (solderable) is probably useful to hold the microcontroller and to be able to solder wires to the board instead of the microcontroller directly. A 3D printer can be used to print a holder for all the components.
Item | Description | Link |
---|---|---|
Power plug | Placed this in the back panel to receive the end of an extension cord | Amazon |
Big Button | This blinks and allows users to press it to start listening | Experience Lights |
FM Receiver | Receives the FM signal from your show (or other sound source) | Amazon |
ESP8266 Microcontroller | The brains of the box that controls everything. This runs the code in this repository | Amazon |
Two Speakers | These are placed in a panel | Amazon |
Speaker Cloth | This covers the panel that contains the two speakers | Amazon |
2 x Buck Down Converter | Used to convert the 12V power source to 5V needed for the relay, the receiver, the ESP8266 and the LED strip lights | Amazon |
Relay | Used to power on the FM receiver and Subwoofer | Amazon |
5V LED Strip | This is used to light up the front to indicate that the buttons should be pressed. Any WS2811 LED strip will do, but a density of at least 60/m is recommended | Amazon |
2 x Micro-USB Power cable | These are needed to provide 5V power to the FM Receiver and ESP8266 | Amazon |
12V Power Supply | Connects to 120V and produces 12V | Amazon |