0

Better sound for short interval beeps needed
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Better sound for short interval beeps needed

by Systembolaget on Sun Aug 04, 2019 5:04 am

I need some sound advice ; )

For a patient mobilisation re-habilitation (uh, without dash it's a banned spam word?!) gymnastics project, I have a Metro Mini, MaxBotix MB1242, APA102C LED-strip and buzzer setup.

Changing the distance to an exercise mat results in short interval beeps that accelerate as the distance decreases and decelerate as the distance increases. It works exactly like a car parking sensor alert https://www.instructables.com/id/BEEP-L ... ar-Sensor/

However, issuing beeps via a buzzer sounds nasty, so I want to use a mono https://www.adafruit.com/product/3351 or maybe, but not absolutely necessary, stereo https://www.adafruit.com/product/1669 speaker setup, driven by a https://www.adafruit.com/product/987 amplifier.

Which product do you sell that I could use to either 1. generate a short single three-note chord or 2. play back a short single audio sample to replace tone() issued via a buzzer?

Thanks in advance!

Systembolaget
 
Posts: 154
Joined: Wed Mar 08, 2017 1:01 pm

Re: Better sound for short interval beeps needed

by adafruit_support_bill on Sun Aug 04, 2019 8:43 am

One of the Fx boards would do it. The 'mini' version is probably sufficient for your needs: https://www.adafruit.com/product/2342

adafruit_support_bill
 
Posts: 74659
Joined: Sat Feb 07, 2009 10:11 am

Re: Better sound for short interval beeps needed

by Systembolaget on Sun Aug 04, 2019 9:19 am

Sounds good; just to be sure, thinking out loud:

I put an uncompressed 0.2 seconds long mono or stereo WAV sample file on that thing. Then I can programmatically trigger it from the Metro Mini via millis() to not block the loop() when having to rapidly re-trigger the WAV as the distance decreases? Maybe it's best to buy the version with the built-in amplifier so the set-up more compact?

"From the moment the SFX board sees a ground level on the pin, it takes ~120ms to play a WAV file" holds true also when triggering from a microcontroller? When triggered faster, will that simply, eventually, result in a continuous "beep" (the "too long" sample then being cut off with each new trigger)? It also says "If 'repeating' a file by keeping the button hend down, or doing a latching trigger type, theres a ~20ms delay (imperceptable) between WAV replays" and is that true also when triggering via a microcontroller?

The reason I'm asking is if have to make sure in the code that at closest distance, the re-trigger interval does not go below ~120 + 20 microseconds!

Systembolaget
 
Posts: 154
Joined: Wed Mar 08, 2017 1:01 pm

Re: Better sound for short interval beeps needed

by adafruit_support_bill on Sun Aug 04, 2019 9:38 am

holds true also when triggering from a microcontroller?

Triggering via the serial interface will have slightly more latency. But you can trigger it from the trinket by simply connecting a Trinket GPIO pin to one of the trigger pins on the Fx board and use digitalWrite. If you want to trigger at the maximum rate, just keep the pin held LOW.

adafruit_support_bill
 
Posts: 74659
Joined: Sat Feb 07, 2009 10:11 am

Re: Better sound for short interval beeps needed

by Systembolaget on Sun Aug 04, 2019 6:09 pm

Understood, sounds good!

Systembolaget
 
Posts: 154
Joined: Wed Mar 08, 2017 1:01 pm

Please be positive and constructive with your questions and comments.