Adding SD card input to Si4713 FM transmitter

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ghulse
 
Posts: 97
Joined: Tue Nov 30, 2021 10:49 am

Adding SD card input to Si4713 FM transmitter

Post by ghulse »

I have set up an Si4713 FM transmitter with an Arduino Uno, and all works great! However, I'd like to use an SD card (with MP3s) for my input instead of 1/8" audio in. What would be involved with something like that?

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adding SD card input to Si4713 FM transmitter

Post by adafruit_support_mike »

You’d need an entire MP3 player with its audio output connected to the Si4713’s input.

Making an MP3 player has gotten a lot easier since the patent on the format expired. We have boards like the Music Maker which uses a VS1053 hardware codec:

https://www.adafruit.com/?q=music+maker&sort=BestMatch

And our CircuitPython libraries can decode MP3s in software:

https://circuitpython.readthedocs.io/en ... index.html

You can also use any old MP3 player still floating around in a junk drawer. As long as you have an audio output, the Si4713 can use it as input.

User avatar
ghulse
 
Posts: 97
Joined: Tue Nov 30, 2021 10:49 am

Re: Adding SD card input to Si4713 FM transmitter

Post by ghulse »

adafruit_support_mike wrote:You’d need an entire MP3 player with its audio output connected to the Si4713’s input. . . . You can also use any old MP3 player still floating around in a junk drawer. As long as you have an audio output, the Si4713 can use it as input.
Thank you for your response. It would probably be easiest to use an old MP3 player, but just out of curiosity, could you use the Music Maker shield on the same Arduino Uno as the FM transmitter? Would you need two power supplies?

https://www.adafruit.com/product/1790

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adding SD card input to Si4713 FM transmitter

Post by adafruit_support_mike »

ghulse wrote:could you use the Music Maker shield on the same Arduino Uno as the FM transmitter?
It can work, but you’ll need to pay attention to the message timing.

Both the Si4713 and the Music Maker use SPI to communicate with the microcontroller. The Music Maker actually has two SPI devices: the VS1053 MP3 codec and the SD card. When a track is playing, the microcontroller has to shuttle data from the SD card to the VS1053, so the SPI bus ends up full of time-critical transfers. If you want to talk to the Si4713 while that’s going on, you’ll need to make sure to fit those messages in the gaps.

That’s a non-trivial problem if you use the Music Maker’s interrupt code to keep the VS1053’s input buffer full. Your main code won’t know when the next update might happen.

You can also control the update timing from your main code, which would probably be the way to go in this case.
ghulse wrote:Would you need two power supplies?
Probably not, unless you want to drive speakers too. The VS1053 doesn’t use a lot of power itself, but speakers are power hogs.

User avatar
ghulse
 
Posts: 97
Joined: Tue Nov 30, 2021 10:49 am

Re: Adding SD card input to Si4713 FM transmitter

Post by ghulse »

adafruit_support_mike wrote:
ghulse wrote:could you use the Music Maker shield on the same Arduino Uno as the FM transmitter?
It can work, but you’ll need to pay attention to the message timing.

Both the Si4713 and the Music Maker use SPI to communicate with the microcontroller. The Music Maker actually has two SPI devices: the VS1053 MP3 codec and the SD card. When a track is playing, the microcontroller has to shuttle data from the SD card to the VS1053, so the SPI bus ends up full of time-critical transfers. If you want to talk to the Si4713 while that’s going on, you’ll need to make sure to fit those messages in the gaps.

That’s a non-trivial problem if you use the Music Maker’s interrupt code to keep the VS1053’s input buffer full. Your main code won’t know when the next update might happen.

You can also control the update timing from your main code, which would probably be the way to go in this case.
ghulse wrote:Would you need two power supplies?
Probably not, unless you want to drive speakers too. The VS1053 doesn’t use a lot of power itself, but speakers are power hogs.
Thank you for information.

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

Return to “General Project help”