When the sonar detects... the music plays!
This device comprises a sonar that validates the presence of an obstacle every 150ms and a potentiometer allows you to set the detection distance. Once the sonar detects an obstacle, the MP3 player will play songs stored in the memory card!
The sonar perform a measurement every 50 ms, however, a filter that requires three consecutive readings with hurdle for validation is applied. This avoids false positives! |
|
The potentiometer allows you to adjust the detection distance! Obstacles are detected at distances from 3 centimeters to 4 meters! Note that for large distances, major obstacles are easily detected. |
|
The MP3 player has a slot for a memory card. It must be formatted in FAT32 file system and the mp3 files should be placed in a folder named "mp3". Micro SD Card Not Included! We suggest INF01012 or INF01006. |
|
The DIP switch sets out how the songs are played and which signals appear on the relay module connector. The selectors 1 and 2 configure the signals to the relay module, selectors 3 and 4 set the operation mode of the MP3 player! |
|
An Arduino Pro Mini previously programmed controls the entire system: performs readings from the sonar, the potentiometer analog voltage and the DIP switch configuration. According to the DIP switch setting, it controls the MP3 player and the signals to the relay modules connector. |
|
To hear any sound you must connect the 6.5mm stereo jack audio output to an amplified speaker or headphones. You may need a 6.5mm to 3.5mm stereo jack adapter. |
|
The relay module connector allows you to connect two relay modules with single channel, or a relay module with two-channels. From bottom to top: GND, 5V, Relay1, Relay2 are power and digital signals for the relays. |
|
Plug the 2.1mm barrel power connector with a voltage between 5V and 7.5V DC so everything works properly! Power supply not provided! We suggest FAL01029. |
The DIP switch has four selectors (S1, S2, S3, S4) that define different operating modes of the system. The four selectors must be seen as two sets of two selectors: S1 and S2 configure the signals to the relay module, S3 and S4 set the operation mode of the MP3 player:
S1 and S2 OFF:
|
|
S1 ON and S2 OFF:
|
|
S1 OFF and S2 ON:
|
|
S1 and S2 ON:
|
|
S3 and S4 OFF:
|
|
S3 ON and S4 OFF:
|
|
S3 OFF and S4 ON:
|
|
S3 and S4 ON:
|
A PLA 3D printed box allows the packaging of the entire system and fixing to a wall using screws. |
|
Grove to 4 Pin 2.54 Female Jumper Wire with 30cm CAB01016. |
|
6.5mm male to 3.5mm female stereo jack adapter. Ideal for connecting the system to computer speakers. |
|
Adding a relay to the system one may control any external system or actuator, such as a light or electro-valve: |
|
Micro SD memory card to storage of mp3 files: |
|
5VDC 2A power source FAL01029 with 2.1mm jack barrel conector. |
|
USB-Serial converter CNV01013 for programming your code to the board! |
MP3 Sonar and all add-ons can be acquired in our online store! |
You can program the module to suit your needs! Edit the sample code using Arduino IDE and upload it to the board using the USB-Serial converter. Use the available pins in the controller to connect the programmer!
The connector for relay modules can be used to implement I2C communication as Relay1 and Relay2 are connected in SDA and SCK pins of I2C bus respectively! Using communication between devices opens a new range of possibilities for networking and creating a modular system that is more complex and clever! Dare!