Software apps and online services
Wireless Bluetooth speakers have made life a thousand times more fun. Imagine a life without them! They are essential to any party, and once the party starts going, no one wants the good vibes to stop. Well, many Bluetooth speakers are designed to shut off automatically if no audio is being played. This means that if someone pauses the music and forgets to resume it, the speaker will turn off.
What if there were a way to receive a notification warning you of this imminent shut off? Well, this is what our little project is all about.Speaker
The speaker used in the project is the Tribit Stormbox Portable Speaker. It contains 2 12W speakers with Bluetooth V4.2 capabilities. After about 15 minutes of inactivity, the speaker will automatically shut off.Sensors
To achieve the goal of receiving shut off warning notifications, two sensors are used: a shock sensor and a microphone.
The sensors are shown below.
The shock sensor works on a 3.3 to 5V supply to its center pin. The ground pin is the pin marked "-", and the sensor outputs a digital value from its leftmost pin marked "S." The module output signal is normally HIGH, at the same voltage as the input supply. When tapped, the module outputs LOW.
The microphones takes a 5V input on the "+" pin and a ground connection on the "G" pin. There is a potentiometer on the microphone module that can be turned to adjust the microphone sensitivity. The "A0" pin outputs an analog value of the detected sound, and the "D0" pin outputs a digital value of either HIGH or LOW, corresponding to when the microphone detects sound or not.Circuits
The corresponding circuits for both sensors are shown in the images below.
The shock sensor circuit is configured so that the digital output of the shock sensor is sent to pin D2 of Argon 1, which is set to an INPUT_PULLUP mode. The shock sensor is fed by the Argon 3v3 supply and also connected to the ground of the Argon.
The microphone digital output is connected to pin D3 of Argon 2, and the analog output is connected to pin A0.Communication
The Argons are coded such that when the Argon connected to the microphone flashes its LED, the LED on the Argon connected to the shock sensor is also flashed. A flowchart for communication between the two is shown below.
The project is setup so that the shock sensor picks up the vibration from the speaker drum. The microphone is placed near the speaker such that it picks up only the speaker noise and not any stray noise in the background. This is shown below.
The analog output of the microphone is sent to the cloud and also graphed on ThingSpeak as shown below.
The link to the ThingSpeak graph is given: https://thingspeak.com/channels/1962695/charts/1?bgcolor=%23ffffff&color=%23d62020&dynamic=true&results=60&typVideo
A short video Regarding the project itself: