Help for multiple Analog Input project

Status
Not open for further replies.

Mack

New member
Hi Folks

I am building a wireless Midi controller (musical instrument) with a variety of sensors intended to trigger Midi notes and CC values.

Ignoring the later processes for now (eg Midi stuff) my current challenge is deciding what architecture to use for the ADC stages, and was hoping someone could advise. I have at least settled on using one (or more) Teensy 3.# / 4.# as microcontroller.

Pertinent spec:

• 50 Analog Inputs needed (mostly from FSR type sensors).

• 10-bit resolution needed on all (will convert to 7-bit further down the line for Midi, but need 10-bits to allow for response processing first).

• Lowest possible latency (sub 3ms, hopefully much lower).

• Sample Rate – ideally no lower than 10kHz for each ‘channel’ / input.

• Power consumption – will be powered using rechargeable 5v/12000mAh battery packs. Need to get a sensible amount of usage time out of a fully charged battery (eg no less than 1 hour, ideally much more).

• Sampled data is to stream wirelessly using nRF2401 module to a separate receiving module (USB connected to PC). I am considering a second onboard microcontroller for the transmitter, partly because there will also be an OLED screen to drive on the device, and maybe data to receive back from the USB module as well (to display on the OLED screen), and the first Teensy may be 100% occupied just sampling data.

• Space on board the device should not be an issue. I have room for 2 maybe 3 teensys and other circuit boards for external chips, input signal pre-processing etc as may be needed.


As the maximum Teensy Analog input count is 24, my need for 50 immediately means I’ll need something extra.

I have looked at external ADC chips, which I am happy to use if they will do what I need, but there is a huge range available and I can’t get much confidence that they will work with a Teensy as needed, and crucially that my limited programming knowledge will enable me to get them working as needed. I have also concluded I will likely need op-amp buffers in front of each ADC input, sometimes just to get the signal at the right level/range, but also I understand without buffers there are impedance issues that start to play havoc with fast multichannel sampling (something to do with the time to charge the capacitors in the ADCs). I mention this because I understand some ADC chips include such buffers integrated into the chip, which sounds tidy if appropriate.

Alternatively I think I could use multiplexer(s) to expand the input count for the on-board Teensy analog inputs. Again I have no experience of these.

Ideally what I would appreciate is some advice as to which option is likely to perform best to my needs AND be most manageable for me to implement.

Also suggestions of specific Chips and how to implement (eg which libraries might support, how to connect etc) would be much appreciated.

Any comments on using two Teensys (ie a separate one to transmit the data), including how to connect the two, would also be welcome.

Hopefully that's all the pertinent info without drowning readers in the rest, but will provide anything more if needed.

Many thanks for reading.
 
Mack:

You should be able to use the Teensy (I used the T4.1) + 74HC4067 16:1 analog MUXs to expand the number of analog inputs. That's the combo of hardware I used in my <TeensyMIDIPolySynth> project (take a look at the referenced Google Drive link to see the pseudo schematic of how I interconnected everything). My project took analog inputs (pots) & digital inputs (pushbuttons) thru the MUXs (reading every pot, reading every pushbutton, & driving all the LED indicators & LED segments in the loop(), every input is sampled every 3-5ms - you could certainly do better with your reduced number of inputs), & used that to adjust settings as a MIDI-to-sound instrument. My project is also battery powered, & I typically get 4-8 hours of continuous operation from a 2500mAH LiPo (& it's running 48 LED indicators & 2 x 7-char LED displays as well). Your nRF2401 module will probably have a significant influence on battery life. With the Teensy & some minimal additional hardware (74HC4067 MUXs), you should probably be able to accomplish what you're seeking fairly quickly & easily.

The MUXs require one analog input/output & 4 digital addressing pins. You can cascade the MUXs (I used this approach in the TeensyMIDIPolySynth), so the primary MUX would use these 5 pins as described. The secondary MUX input/output pin would be wired to the 16 input/output pins on the primary MUX. Doing it this way, you would need an additional 4 addressing pins for the secondary MUXs. Therefore, you would only need 9 pins (4 primary addressing, 4 secondary addressing, & 1 input/output) to give you 256 analog inputs/outputs. The MUXs work for both analog signals & digital signals. You can use the 16 side of any MUX for either input or output, or any mix of both.

Sorry I don't have any recommendations on using multiple Teensys talking to each other - haven't plowed that ground yet in any of my several Teensy projects.

Feel free to ask any other related questions.

Good luck & have fun !!

Mark J Culross
KD5RXT
 
Status
Not open for further replies.
Back
Top