Adafruit Audio FX - Use Switch (not button) to play sound on

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
JimmyDanDee
 
Posts: 6
Joined: Sun Apr 17, 2022 12:28 pm

Adafruit Audio FX - Use Switch (not button) to play sound on

Post by JimmyDanDee »

I just set up my new Adafruit Audio Fx to play sounds and it works great. I’m so excited!!!

I’m trying to figure out how to have the sound only play once when I press and hold the button because I plan to use a switch, instead of a button, to produce a sound when I turn on the prop I’m creating.

I found this post which sounds similar to what I’m trying to do - viewtopic.php?t=94261

But I’m failing. I think I have it set up correctly, but I obviously do not because I can’t get it to work.

I’m hoping the attach photos are clear enough to see what I have wired up on my breadboard.

Any advice or guesses are very much appreciated. I’m extremely new to this electronic stuff but I’m very excited to be learning.
Attachments
0289790E-8092-4BFE-A6AA-7ABA392037B4.jpeg
0289790E-8092-4BFE-A6AA-7ABA392037B4.jpeg (221.01 KiB) Viewed 253 times
8B437863-AFC8-484F-959D-AD0654FD7694.jpeg
8B437863-AFC8-484F-959D-AD0654FD7694.jpeg (221.01 KiB) Viewed 253 times
FAA0E1C2-745A-4177-A675-0D099261DB28.jpeg
FAA0E1C2-745A-4177-A675-0D099261DB28.jpeg (221.01 KiB) Viewed 253 times

User avatar
JimmyDanDee
 
Posts: 6
Joined: Sun Apr 17, 2022 12:28 pm

Re: Adafruit Audio FX - Use Switch (not button) to play soun

Post by JimmyDanDee »

Sorry about the same photo 3x. It kept showing no photo selected. See the second photo attached here for a view of the entire breadboard with the diagram I’ve been referencing from the other post.
Attachments
3DDBACC4-6B53-482F-BC32-09CA3ADFF705.jpeg
3DDBACC4-6B53-482F-BC32-09CA3ADFF705.jpeg (228.12 KiB) Viewed 252 times

User avatar
JimmyDanDee
 
Posts: 6
Joined: Sun Apr 17, 2022 12:28 pm

Re: Adafruit Audio FX - Use Switch (not button) to play soun

Post by JimmyDanDee »

I used the following…
(2) 1M resistors
(2) 104 + (2) 103 capacitors to = 220nF
(1) and this transistor https://www.onsemi.com/pdf/datasheet/ss8050-d.pdf

User avatar
JimmyDanDee
 
Posts: 6
Joined: Sun Apr 17, 2022 12:28 pm

Re: Adafruit Audio FX - Use Switch (not button) to play soun

Post by JimmyDanDee »

Well, I got it to work. Sort of...

I replaced the four capacitors with one of the correct size and that seemed to do the trick, but it took me a while to understand why it only worked once. I eventually realized that the capacitor needed to be discharged, so added in my switch, at a temp location near the capacitor, which worked as long as it connected the two leads of the capacitor when I switched it off. That drained the capacitor. Not sure if that's ok but it does work.

The problem I now face is I can't figure out how to actually use the switch to power the Adafruit Audio FX and trigger the sound. When I put the switch directly on the power to the board it doesn't "fire" the audio, but when I attach the switch between the power and the capacitor it works perfectly, but everything else still has power at that point, which is not what I want.

Any suggestions are very much appreciated. Thank you!

User avatar
JimmyDanDee
 
Posts: 6
Joined: Sun Apr 17, 2022 12:28 pm

Re: Adafruit Audio FX - Use Switch (not button) to play soun

Post by JimmyDanDee »

I just had another thought...

It might be cool if the Adafruit Audio FX handled the startup sound with a filename, similar to the way the other sounds are triggered.

The file could be T00S.wav/ogg for startup.

I'm sure I'm not the first person to think of this, so forgive me if it's already been suggested.

User avatar
JimmyDanDee
 
Posts: 6
Joined: Sun Apr 17, 2022 12:28 pm

Re: Adafruit Audio FX - Use Switch (not button) to play soun

Post by JimmyDanDee »

Thanks for providing a place for me to have a conversation with myself. :-)

I finally solved my latest problem above by adding a 1M resistor between the power and the capacitor and it works flawlessly! Woohoo!!!

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”