The main focus of this project is to play a sound when a sensor is activated, which can be utilized in various contexts such as Halloween events, art installations, or playful pranks. Initially, there was a consideration to modify the elevator's up and down buttons, but this idea was quickly dismissed due to safety concerns and the potential repercussions of interfering with critical infrastructure. Instead, a self-contained unit could be discreetly installed above the elevator's drop ceiling to detect the elevator's movement using an accelerometer. An accelerometer measures acceleration, which differs from velocity. For instance, during acceleration, the accelerometer reads values greater than zero, while it reads zero when the velocity is constant. Conversely, during deceleration, it reads negative values until the elevator stops, at which point it again reads zero. To analyze the accelerometer's performance, an Arduino, an ADXL345 accelerometer, and an Openlog were used for data collection. A quick trip in the elevator allowed for data logging, which was later analyzed using a spreadsheet to visualize the readings. The accelerometer data showed clear spikes when the elevator started and stopped, indicating that coding could be employed to detect these movements. The goal is to play back the TARDIS sound using a combination of a 3.3V Arduino Pro and an MP3 Shield. The Arduino will process the accelerometer data to determine when to trigger the sound, while the MP3 shield will play the sound directly from a microSD card. Additionally, two sets of stackable headers will be utilized to connect the components. The ADXL345 was chosen for its suitability for this application.
The circuit design for this project involves several key components that work together to achieve the desired functionality. The heart of the system is the Arduino Pro, which serves as the microcontroller responsible for processing input from the accelerometer and controlling the MP3 Shield. The ADXL345 accelerometer is connected to the Arduino via the I2C interface, allowing for efficient communication and data retrieval. The accelerometer is powered by the 3.3V supply from the Arduino, and its output is read through the digital pins to determine the movement of the elevator.
The MP3 Shield is connected to the Arduino through dedicated pins, enabling the playback of audio files stored on a microSD card. The audio files can be preloaded with various sounds, including the TARDIS sound, which is the primary sound effect intended for this project. The shield requires power and ground connections, as well as the appropriate data pins for audio playback control.
For the physical assembly, the components can be mounted onto a small prototyping board, ensuring that they are securely connected and placed within a housing that can be discreetly installed above the elevator's drop ceiling. The use of stackable headers facilitates easy connections between the Arduino and the MP3 Shield, allowing for a compact design that minimizes space usage.
In terms of programming, the Arduino code will include libraries for both the accelerometer and the MP3 Shield. The code will continuously monitor the accelerometer's output for significant changes in acceleration, indicating that the elevator is either starting or stopping. When such changes are detected, the Arduino will trigger the MP3 Shield to play the designated sound file.
Overall, this project combines elements of sensor integration, audio playback, and microcontroller programming to create an interactive sound effect system that can be applied in various creative scenarios. The careful selection of components and thoughtful circuit design ensure that the system operates reliably while remaining safe and unobtrusive in its intended installation location.The core of this project (play a sound when a sensor is activated) is applicable to all sorts of areas (Halloween, art installations, scaring your little brother, Burning Man, etc. ), so read this with an eye to applications you`d like to see. My first thought was to hack straight into the elevator`s up and down buttons, but I quickly came to my senses.
Building managers do NOT want you messing with critical infrastructure (for good reason), and I personally don`t want to get on the bad side of anyone who gets stuck in an elevator because of me. (Around here the winner has been known to choose the loser`s tattoo. ) However, it occurred to me that it might be possible to make a completely self-contained unit, discreetly placed above the elevator`s drop-ceiling, that could detect when the elevator starts moving all by itself.
How By using an accelerometer. An accelerometer measures, logically enough, acceleration. This is different from velocity - while a car (or an elevator) is accelerating from stopped to cruising speed, the accelerometer will read > 0. But once the car (or elevator) has reached cruising speed and the velocity is constant, the accelerometer will read 0.
When you decelerate, the opposite happens - the accelerometer will read < 0, until the car (or elevator) has stopped, at which point the accelerometer will again read 0. To see what kind of numbers we were dealing with, I hooked up an Arduino, an ADXL345 and an Openlog. (Tip: the Openlog is a great tool for early development work like this - it stores all the data you can generate, making it easy to analyze later and see what you can do with it).
I took a quick trip up and down in the elevator, popped out the SD card, loaded the data into a spreadsheet, and made a quick graph: In the above graph, the approximate elevator position is the red line, and the Z-axis data out of the accelerometer is the noisy blue line. You can see spikes in the accelerometer data when the elevator starts and stops, and at other times the readings hang around 230 (1g).
These spikes aren`t huge - the peaks aren`t far outside the 1g noise - but they look clear enough to pick up with a little coding. Let`s try it! The main requirement is to play back the TARDIS sound. SparkFun carries several products that could do this, but we`ll balance cost and ease of development and go with a combination of 3.
3V Arduino Pro and MP3 Shield. We`ll use the Arduino to read the accelerometer and decide when to play the sound, and use the MP3 shield to play the TARDIS sound directly off an microSD card. We`ll also grab two sets of Stackable Headers to connect the boards together. SparkFun carries a number of accelerometers that would work in this application. I went with an ADXL345 for its 🔗 External reference
A circuit design has been conceptualized, and an Assembly code program has been drafted for a three-level mini system.
The described circuit design focuses on a three-level mini system, which can be interpreted as a hierarchical structure where each level...
In the event of a sudden power failure in an elevator, it is crucial for the duty officer in the distribution room to be alerted promptly to prevent panic among passengers trapped inside. The following describes a sound alarm...
APM-81 lift includes the main circuit, safety circuit, and brake circuit.
The APM-81 lift system is designed with a comprehensive electrical architecture that integrates a main circuit, a safety circuit, and a brake circuit, ensuring reliable operation and enhanced safety...
We use cookies to enhance your experience, analyze traffic, and serve personalized ads.
By clicking "Accept", you agree to our use of cookies.
Learn more