I'm trying to get audio data from an ADC connected to an Arduino into a host PC. I've done some digging and found LUFA, which I think Arduino uses under the hood. Is it possible to use the Arduino as a USB device, and if so, are there any examples? Thanks!
|
LUFA is used for the USB to serial firmware on the separate USB-serial bridge AVR found on Uno and newer Megas. The firmware is compiled using a supplied makefile. Otherwise LUFA isn't used by Arduino. But LUFA is probably the right choice if you want to make a USB audio device. It comes with examples of both input and output audio devices. But you will have to compile using the supplied makefile, unless you are really ninja. On a Linux distro it's easy - don't know about other OS'es. The demo "Audio Input Device Demo" comes with LUFA and is ompatible with the atmega32u4 used on Leonardo. It can be set up to sample analog input and send it to the pc. From the documentation:
|
|||
|
I am confused on what your end purpose is. do you want something that works or you want to make a project for self-learning purpose. For ready-made products that you can buy, if you want the PC to be able to input and output sound, there are hundreds models of a) sound card plug into PC b) external sound card link to PC via USB cable They ranges from a few USD to 50 to 200 with huge range of performance in terms of sampling rate and number of bits (low noise). Ardu build-in ADC is 10 to 12 bits. These card are 16 to 24 bits. See http://www.bestbuy.com/site/computer-cards-components/sound-cards/abcat0507003.c?id=abcat0507003 24 bits 116 dB SNR very low noise http://us.creative.com/p/sound-blaster/sound-blaster-z I used them as test instrument for commercial/university projects with success. I saw on TV news that same setup (high bit card, at -110dB or lower noise level) used in the underwater signal search for MH370 down plane months ago. |
|||
|