Adding SD card input to Si4713 FM transmitter
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- ghulse
- Posts: 97
- Joined: Tue Nov 30, 2021 10:49 am
Adding SD card input to Si4713 FM transmitter
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?
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Adding SD card input to Si4713 FM transmitter
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.
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.
- ghulse
- Posts: 97
- Joined: Tue Nov 30, 2021 10:49 am
Re: Adding SD card input to Si4713 FM transmitter
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?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.
https://www.adafruit.com/product/1790
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Adding SD card input to Si4713 FM transmitter
It can work, but you’ll need to pay attention to the message timing.ghulse wrote:could you use the Music Maker shield on the same Arduino Uno as the FM transmitter?
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.
Probably not, unless you want to drive speakers too. The VS1053 doesn’t use a lot of power itself, but speakers are power hogs.ghulse wrote:Would you need two power supplies?
- ghulse
- Posts: 97
- Joined: Tue Nov 30, 2021 10:49 am
Re: Adding SD card input to Si4713 FM transmitter
Thank you for information.adafruit_support_mike wrote:It can work, but you’ll need to pay attention to the message timing.ghulse wrote:could you use the Music Maker shield on the same Arduino Uno as the FM transmitter?
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.
Probably not, unless you want to drive speakers too. The VS1053 doesn’t use a lot of power itself, but speakers are power hogs.ghulse wrote:Would you need two power supplies?
Please be positive and constructive with your questions and comments.