Saving an audio file to a recorder

Thread Starter

luca290799

Joined Apr 4, 2022
59
Hi everyone! hope this is the right section of the site for this thread, otherwise redirect me.

I would like to create a small circuit less than the size of the palm of my hand (perhaps I create the pcb or use the thousand-hole board) that, when powered by a battery, will play an audio track (a song of a few MBytes) that I input via software during the creation/programming phase of the project. I don't have to change the track in the future so when I load it the first time ... I don't change it anymore.

Basically I want to modify this circuit (https://www.amazon.it/1PCS-LM386-amplificatore-amplificatore-consiglio-V-12/dp/B07BW8GRTD) by substituting instead of the 3.5mm audio jack ... a component that has a song stored in it.

Therefore, the blocks of this project are three:

1. Programming a component that allows the storage of a few mega-byte audio track (a memory?)
2. connect the output to the amplifier circuit
3. add the speaker from a couple of watts

On point 2 and 3 I have no problem because I can create the amplifier circuit myself or buy the already integrated modulator (to have better quality) ... but on the first point I don't really know where to start
So I am asking how to solve the first point by suggesting what component I can use and what program I can program it with. This is my first time doing something like this so please argue your answers as much as possible;)
Thanks!
 

Papabravo

Joined Feb 24, 2006
21,226
Too bad Apple just discontinued the iPod because that sounds like just the ticket. I think making it the size of your hand is not a problem. There is some serious engineering involved in duplicating an iPod along with the ongoing supply chain issues. You might want to think about alternate projects.
 

Ya’akov

Joined Jan 27, 2019
9,170
Here is a module (among the many available) that has both an MP3 player that can use an SD card or a USB drive for storage and can be programmed to play at power on. It is very small and you can get 5 for $12 on Amazon though I am sure they are available from AliExpress and other sources for a similar price.

1658066242448.png
 

Attachments

Ian0

Joined Aug 7, 2020
9,840
My main question would be:
Are you just trying to get an audio-file player - in which case just buy one, such as the one @Ya'akov* suggested.
OR
Is your intention to learn how to make an audio-file player?
If so:
1) it's a lot easier to put your file on an SD card than to try to transfer it to your player. You can read an SD card through the SPI interface.
2) .wav and .aif files are far easier to play than anything else.
3) Wolfson DACs can be controlled from the SPI port of an ordinary microcontroller. Other makes need a micro with an I2S interface.
4) You can get Class-D audio amplifier ICs with I2S interfaces, so you can eliminate the DAC if you want a built-in amplifier.

*(Ya'akov, you seem have a diacritical mark that my computer doesn't seem to want to reproduce)
 

Thread Starter

luca290799

Joined Apr 4, 2022
59
Here is a module (among the many available) that has both an MP3 player that can use an SD card or a USB drive for storage and can be programmed to play at power on. It is very small and you can get 5 for $12 on Amazon though I am sure they are available from AliExpress and other sources for a similar price.

Unfortunately, the one you linked is not available (either because they ran out of it or maybe it's not available in my country), but I should have found a similar one: https://www.amazon.it/HiLetgo®-decodifica-amplificatore-alimentazione-lossless/dp/B0797T1T87/ref=cm_cr_arp_d_product_top?ie=UTF8

I just ask you one more thing: the description said that the single channel integrated amplifier is 2 watts while in the picture it says 3 watt. In case it is 2 watt and I decide to attach 3 watt speaker, what are the risks? Does it sound like a 2W speaker even if the speaker is 3W? Does it sound worse?

Very helpful that they sell two pieces, so one I use while the other I disassemble and study for scholastic purposes.
 

Thread Starter

luca290799

Joined Apr 4, 2022
59
My main question would be:
Are you just trying to get an audio-file player - in which case just buy one, such as the one @Ya'akov* suggested.
OR
Is your intention to learn how to make an audio-file player?
If so:
1) it's a lot easier to put your file on an SD card than to try to transfer it to your player. You can read an SD card through the SPI interface.
2) .wav and .aif files are far easier to play than anything else.
3) Wolfson DACs can be controlled from the SPI port of an ordinary microcontroller. Other makes need a micro with an I2S interface.
4) You can get Class-D audio amplifier ICs with I2S interfaces, so you can eliminate the DAC if you want a built-in amplifier.

*(Ya'akov, you seem have a diacritical mark that my computer doesn't seem to want to reproduce)
I need it both because I need to use it for a gift and to learn for educational purposes such a project. In fact I buy 2 pieces so I can disassemble one and study or replicate it.

If I'm going to build it I know I would need an audio amplifier (in the module that I linked there is a Class-AB audio power amplifier "8002A") and another integrated that I think it's a DAC? I tried to read which one is used in the module I linked but I don't understand the writing, it's too blurry.
Is any other integrated circuit missing or are these two sufficient? If it's a DAC ... which one do you recommend?

I will probably make the schematic and pcb in a while and open another thread for specific questions on the more technical aspects: the connections, pcb tracks, coupling capacitor etc. whereas in this thread I just want to figure out which ICs I need and understand the pattern blocks
 

MrChips

Joined Oct 2, 2009
30,821
I just ask you one more thing: the description said that the single channel integrated amplifier is 2 watts while in the picture it says 3 watt. In case it is 2 watt and I decide to attach 3 watt speaker, what are the risks? Does it sound like a 2W speaker even if the speaker is 3W? Does it sound worse?
You can connect 2W amp to 3W speaker or 3W amp to 2W speaker.
It depends on how loud you need the sound to be. 2W output is very loud.

The quality of the sound is more than just the speaker wattage and size.
The enclosure of the speaker (the speaker cabinet) is more important than the speaker transducer itself.
 

Thread Starter

luca290799

Joined Apr 4, 2022
59
I built mine a few years back, before all these I2S Class-D amplifiers arrived.
Texas Instruments and Infineon seem to be the market leaders.
https://www.ti.com/lit/ds/slos781c/slos781c.pdf?ts=1658013644980
Thank you! i will have a look at the datasheet


You can get Class-D audio amplifier ICs with I2S interfaces, so you can eliminate the DAC if you want a built-in amplifier.
Can you explain this statement to me? Being able to eliminate the DAC if I use an amplifier with I2S interfaces.

I only know that I2S is a serial bus used for connecting digital audio devices together, but I don't understand your statement because I've never dealt with it

Thanks!
 

Ian0

Joined Aug 7, 2020
9,840
Thank you! i will have a look at the datasheet




Can you explain this statement to me? Being able to eliminate the DAC if I use an amplifier with I2S interfaces.

I only know that I2S is a serial bus used for connecting digital audio devices together, but I don't understand your statement because I've never dealt with it

Thanks!
Don’t confuse I2S with I2C. I2S is an audio interface
 
Top