Designing a small PCB to play a tune when a button is pressed

Thread Starter

theodavidwilliams@icloud.

Joined Jan 10, 2024
11
Look, I'll cut to the chase, I have no idea what I'm doing. I know I can likely set up a buzzer or something with a microcontroller, but haven't touched this stuff for two years since I got out of school and even this tiny task now seems insurmountable.
Essentially, I want to make a tiny surface-mounted PCB that can sit under (or if it comes to it, inside sculpted structures,) on the underside of a Warhammer 40K Noise Marine miniature, meaning about 3mm deep (negotiable,) and in a 25mm wide circle. The basic idea is that when a button is pressed it plays a midi file of E1M1 from the original doom game, stopping when the button is pressed again. Any help is appreciated. (Bonus points if someone finds a way to get it to play The Only Thing They Fear is You)
 

Thread Starter

theodavidwilliams@icloud.

Joined Jan 10, 2024
11
A MIDI file needs to be played by a synthesizer. Do you mean that the board should incorporate the synthesizer? Or do you mean it sends it out on a a MIDI output?
Like I said I have absolutely no idea. When I say MIDI I'm basically just thinking that simple kind of music. Honestly whatever works I'll go with.
 

Ya’akov

Joined Jan 27, 2019
9,117
Welcome to AAC.

My solution to this would be an MP3 module. My go-to module [datasheet]is one based on the JR-6001 chip. It offers an extensive feature set and a really easy way to load up the file(s) to be played. It has an amplifier that can drive a speaker directly.

1704884234814.png
19mm x 25mm

One of the interfaces is to a set of switches which covers your button to play idea. It is a bit confusing at first glance, but really simple when the ideas are untangled.

It is also cheap as dirt. I have had excellent results with these, and can certainly recommend them without hesitation if they will fit within your space constraints.

Don’t forget you will need a speaker and power source, and it should be as big as you can fit. This whole thing is often accomplished with some kind of plinth for the figure to stand on and offers a chance to build in exactly as much space as you need.

If you go this route feel free to bring any questions concerning the implementation.
 

BobTPH

Joined Jun 5, 2013
8,932
I think you are dreaming. You said you have a cylindrical space of 3 mm x 25mm diameter. In that space you need:

board
speaker
battery

typically, none if these would fit in the space you require.
 

Thread Starter

theodavidwilliams@icloud.

Joined Jan 10, 2024
11

Thread Starter

theodavidwilliams@icloud.

Joined Jan 10, 2024
11
Well, these days you don't make such things, you just buy them. For example:

https://www.aliexpress.com/item/1005005852232669.html
Ok I might give this one a go. If I could find some way to use a "proper" audio input instead of a microphone then in theory I could just get it to record an output played from another device, right? And then once it's working simply... remove that and the recording button to reduce size and suchlike.
 
Top