Does anyone know how to send audio data to an arduino through the serial monitor or through other means? I recently acquired a speaker and an audio amplifier, and I wanted to play music from the speaker. Since I don't have any means of storing files (e.g the SD card shield), I cannot store the actual file on the arduino to play independently of the computer. Can anyone point me to any resources/material that may help me with my project?
I fear that you're lost with the small memory of an Arduino, incapable of holding audio data for just a single second of music ![]()
You'll need at least an DAC (digital to analog converter), in addition to a mass storage extension.
Sending audio data online to the Arduino doesn't make much sense, your PC offers better and easier means to play audio immediately. But as an exercise you can write a program to transfer raw audio data, e.g. from a WAV file, and use some digital pins and a R/2R ladder network for an simple DAC. I've built such an DAC myself, many years ago, using some readily available resistor network chips. See Wikipedia "Resistor Ladder" for details.
You could send 'audio' data - (let's just say data) - across serial, but at the speeds involved to play/access/do whatever with it will be low quality if you want any semblance of 'real-time' processing...
And yeah, the storage issue, that's if you want it to remain on board ...
DrDiettrich:
I fear that you're lost with the small memory of an Arduino, incapable of holding audio data for just a single second of music
You'll need at least an DAC (digital to analog converter), in addition to a mass storage extension.Sending audio data online to the Arduino doesn't make much sense, your PC offers better and easier means to play audio immediately. But as an exercise you can write a program to transfer raw audio data, e.g. from a WAV file, and use some digital pins and a R/2R ladder network for an simple DAC. I've built such an DAC myself, many years ago, using some readily available resistor network chips. See Wikipedia "Resistor Ladder" for details.
Why is it so hard for people to grasp that I'm not trying to store any data??
The system is supposed to work like this...
I have a computer interface that is receiving my audio input via a microphone or something I want to send this data over to arduino and give in to the speaker so it can oitput the same sound.
Like if I say "[edit - profanity deleted] you" on the computer,
The arduino speaker will say "[edit - profanity deleted] you" as well....
Why would I need an sd card to do this??
I'm looking at instantaneous communication.
Arduino's memory should be able to handle that...
It can store a few seconds of audio data.
Arduino can’t store a few secnds. An Uno for example has just 2048 bytes of SRAM to hold data coming in from a PC.
At telephone quality data rates, one needs 8,000 samples per second to recover voice at 4K data rate, Arduino can’t even hold one second of that.
I don’t see why data coming in at 115,200 couldn’t be buffered and immediately passed to a DAC for playback tho, with the Arduino acting as a FIFO from PC to the DAC.
It would be an interesting exercise in pushing the data through fast enough and not chewing the audio quality, but why?
The 8-bitters and limited RAM would offer no practical benefit for the audio or user experience.
Hi,
Why can't you output your stored audio, that is on your PC, out through the headphone socket on your PC directly into your amplifier?
No Arduino needed.
Tom... ![]()
Is curtis119 trying to tell us that he is AmateurArduinoGuyback from the grave after five years asking the same question as to why an Arduino is not a PC sound card? ![]()