Bot'n Roll MP3 Sonar

 

Bot'n Roll ONE A

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.

Relay module not included! We suggest MRE01013 or MRE01026.

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.

 

 

DIP switch settings

 

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:

  • Relay1 is active during the entire music
  • Relay2 paired with the sonar

S1 ON and S2 OFF:

  • Relay1 is active during the entire music
  • Relay2 triggers a 250ms signal in the beginning of the music

S1 OFF and S2 ON:

  • Relay1 paired with the sonar
  • Relay2 triggers a 250ms signal in the beginning of the music

S1 and S2 ON:

  • Relay1 is active during the entire music (inverted logic signal)
  • Relay2 paired with the sonar (inverted logic signal)

S3 and S4 OFF:

  • Plays the song 1 by the end ignoring the sonar. 0001.mp3 file placed in the “mp3” folder of the memory card!

S3 ON and S4 OFF:

  • Plays the song 2 by the end ignoring the sonar. 0002.mp3 file placed in the “mp3” folder of the memory card!

S3 OFF and S4 ON:

  • Plays the next song until the end ignoring the sonar. All mp3 files must be placed in the memory card inside the folder “mp3”.

S3 and S4 ON:

  • Stops the current music and begins the following whenever the sonar is triggered. All mp3 files must be placed in the memory card inside the folder “mp3”.

 

 

Add-ons

 

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!

 

Buy

 

O MP3 Sonar and all add-ons can be acquired in our online store!

 

Connecting to computer and Programming

 

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!