Hello, I want to do some serious audio processing with Arduino DUE. How better performance can I get with an external hardware A/D with more than 10 bits? What is the best resolution + sampling I can achieve? With which hardware A/D? In previous post in this thread I have read that external hardware communicates with Arduino through SPI. Any suggestion is appreciated. Thank you...
You can use external SPI ADC such as AD5662 DAC and AD7680 ADC with 4.5V Reference such REF194.
More details and a schematic for one channel of sampling to SD card and playback using 16 MHz 8-bit processor here
https://forum.arduino.cc/index.php?topic=180769.0
(forum adds some extra characters at the front, I can't seem to clean it up)
I really don't know, but I'd assume you can read & write digital data at any "normal" audio resolution (i.e. higher resolution than "CD quality".)
Any limitations you may run-into are likely to be related to whatever audio processing you're doing. But, you may need to write some assembly language. I haven't used the Due, but the Uno seems "slow" running a loop running in C++.
You can probably do simple processing (maybe changing the volume) with high resolution digital audio (higher than "CD quality").
CrossRoads:
You can use external SPI ADC such as AD5662 DAC and AD7680 ADC with 4.5V Reference such REF194.More details and a schematic for one channel of sampling to SD card and playback using 16 MHz 8-bit processor here
https://forum.arduino.cc/index.php?topic=180769.0
(forum adds some extra characters at the front, I can't seem to clean it up)
Thank you. Because the circuits you suggest are SMDs and I cannot solder them, I used the characteristics you gave and a DIP I have found is this:
Can I use it?
Also for the DAC I cannot find any DIP with this characteristics. Can I use something else instead? Also, can a ~80MHz CPU like Arduino's DUE handle 100 KSPS? Does SPI help to transfer those data quickly?
Can these do something better, and achieve CD-quality?
Thank you
Does SPI help to transfer those data quickly?
Yes.
Yes but the Link says it is now no longer stocked.
Your final throughput or sample rate will depend on what sort of signal processing you want to do. Is this digital filtering?
These links may help you out:
http://schianorobotics.altervista.org/Arduino_DUE___DAC_MCP4922.pdf
Grumpy_Mike:
Yes.
Yes but the Link says it is now no longer stocked.Your final throughput or sample rate will depend on what sort of signal processing you want to do. Is this digital filtering?
I want to input sound and do some special effects with that. Bass, echo and things like this....
If you are looking for sound distortion effects, what's the use of external ADC and DAC rather than the on board 12-bit ADC and DACs ?
ard_newbie:
If you are looking for sound distortion effects, what's the use of external ADC and DAC rather than the on board 12-bit ADC and DACs ?
Don't I achieve better quality with more bits resolution?
What better quality ???? you are going to distort the input sound, IMO you won't be able to ear much difference between a 12-bit and a 16-bit distorted sound (far from a symphonic music).
My fault. Sound including voice... As I see more carefully, Arduino DUE has 12-bit ADC and 12-bit DAC so I believe that's enough for real time sound processing. I was thinking going to 13-bit SPI ADC and DAC DIP modules I described in previous posts. But 1bit more won't make something more accurate to CD-quality, right?
But 1bit more won't make something more accurate to CD-quality, right?
Well right it is closer but you will be hard pushed to it to here the difference.
It is a matter of diminishing returns rather the same as a video display more pixels means a better quality picture but each time you double the resolution the increase in quality gets smaller and smaller until it is hardly noticeable.
Just use what you have onboard and see what sort of sample throughput you can get. There are tricks to make the internal A/D run faster by altering the clock pre-scaling registers.
I have done this sort of thing on a Uno with extra memory chips and an external D/A. You will find it in my book, but the software is online to download as well. Delay, echo, multiple echo, pitch doubling pitch halving and even sort of real time backwards speaking.
When it comes to audio processing with Arduino, nothing beats PJRC's Teensy boards.
Just combine them with an I2S ADC+DAC. You can even get them as a shield for the Teensies.
There's also a graphical audio design tool available.
Except for educational purposes, I don't think trying to program everything yourself is a good idea.
Audio is hard, because all processing has to happen on time, and setting up the necessary DMA controllers is not easy either.
Even if you decide to use the Arduino Due, using an existing I2S audio libraries is probably going to be easier than trying to implement it yourself using SPI DACs.
I2S is designed specifically for audio, SPI is not.
Pieter
I am reading a lot of things about this in this forum. What I want to ask is if I take this circuit here:
http://interface.khm.de/index.php/lab/interfaces-advanced/arduino-realtime-audio-processing/
and instead of connecting the output on PWM, I connect it to the DAC of the DUE, will it work? Will I take sound on the output?
Also this here:
What modifications should I do to play sound from Arduino DUE's memory and not from the SD card?
Thank you
@PieterP: Ok, I will look at it, I didn't know that.
alex5678:
Hello, I want to do some serious audio processing with Arduino DUE. How better performance can I get with an external hardware A/D with more than 10 bits? What is the best resolution + sampling I can achieve? With which hardware A/D? In previous post in this thread I have read that external hardware communicates with Arduino through SPI. Any suggestion is appreciated. Thank you...
Does anyone know is there's library support for I2S on the Due? The https://www.arduino.cc/en/Reference/I2S library seems not to include it...
This library claims to support it, but I haven't tried it yet.
Ok, because I have no idea...this
can be programmed using Arduino IDE and use the same libraries with Arduino?
alex5678:
Ok, because I have no idea...thiscan be programmed using Arduino IDE and use the same libraries with Arduino?
Yes, it can be programmed just like an Arduino.
See this link and the video on that page:
https://www.pjrc.com/teensy/td_libs_Audio.html
PieterP:
See this link and the video on that page:
Teensy Audio Library, high quality sound processing in Arduino sketches on Teensy 3.1
Amazing! As I can understand the higher the frequency of the processor the better results I have. Right? Won't it be better if I use Arduino Yun that has 400 Mhz clock? I am thinking of buying a Teensy 3.6 that has the 180Mhz processor to play with, however.