Using multiple analog inputs with an ADC

Status
Not open for further replies.

lychrel

Member
I've run into another question with my project. Fair warning, this is probably a really stupid question.

I have six electret condenser microphones in my project, and, of course, only two ADCs (I'm using the Teensy 3.1). I want to pass the signals to the Teensy and convert them to digital and from there I know you can select a pin for the ADC at the program's start; but is there any way to "reassign" the ADC to a new pin during a program's execution? What's the best way to accurately sample from all six microphones during program execution? (I know this is a really stupid question.) I've looked in a few places (like here) and I don't think I've found an answer yet; though, if this has been covered before, I apologize.

Thanks!
 
AFAIK the Teensy 3.1 has 10 analog inputs along the edge, two more on the interior and even more if you want to solder to pads on the backside. So converting six signals is not a problem. The only issue is what sampling rate you need. Since there are only two physical ADC modules, I don't think full quality audio on six channels is possible on Teensy 3.1. Anyway, when you say x = AnalogRead(PIN); you are connecting an ADC to the specified pin number at runtime. Using the Teensy ADC library it is easy to set up any two of the analog inputs for simultaneous sampling. https://forum.pjrc.com/threads/25532-ADC-library-update-now-with-support-for-Teensy-3-1
 
Status
Not open for further replies.
Back
Top