Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Most practical way to use lots of audio inputs/outputs.

  1. #1

    Most practical way to use lots of audio inputs/outputs.

    I'm designing "control boxes" which act as the io for my teensy project. They have cv inputs and outputs as well as potentiometers and LEDs. The general idea is that I could connect multiple control boxes to one teensy, and it would use them to control various functions. For example one control box could control an LFO, while another could control a filter. However, these boxes need a lot of IO. I hope to be able to use 6+ control boxes with one teensy, and at 32 io per box, that is a total of 192 analog inputs and outputs - far to many for the teensy.

    My first idea was to multiplex the input signals using a binary counter, and while this should work for the inputs, it wouldn't be able to hold the output signal.

    Is there any way of approaching this problem which could allow me to hold all 192+ output signals for the duration of the audio sample before they are updated?

    Any help is much appreciated.

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,829
    I would think of using satellite processors to control a subset of the signals. The main teensy talks to each of the satellites and tells it what to do with a special protocol (serial, spi, maybe i2c). The satellite processors could be told to ignore certain devices, raise/lower volume, etc. One advantage of using multiple processors is it is easier to check for connections, and if something goes wrong, you just replace the satellite rather than 192 separate connections. It also allows you to scale the system, in that you don't have to build all of the satellite processors at once. Presumably you would make some spares to allow for growth and testing. Using shielded cables (like rt45 cat6 cables for ethernet) allows the control boxes to be somewhat removed from the Teensy, but with longer lengths you do have to worry more about electrical characteristics of the system..

    You will have more complexity in that you have to program each of the satellite and main processors. With that many input/outputs, you will need to also think of how to power the system.

  3. #3
    Member
    Join Date
    Apr 2020
    Location
    Tucson
    Posts
    80
    I think this is what midi is for. If what you are needing is a lot of dacs, a 16 channel 12 bit pwm driver is two bucks. If what you want is 192 channels being updated at audio sample rates, I can tell you it takes one mother of a workstation to handle 256 tracks in Reason. But 192 CV channels, that's a teensy and a dozen chips.

  4. #4
    Could one of the teensy's analog output pins update at 192x the audio sample rate? if so, would it be possible to output a serial signal through the tx pin and then multiplex it when it arrives at the control box (separating all the channels), then use sample and hold ics to hold the output as the multiplexer outputs for each channel?

  5. #5
    Member
    Join Date
    Apr 2020
    Location
    Tucson
    Posts
    80
    No. No Teensy can output audio at 192x sample rate. That's what codecs are for. What you are talking about is sampling a signal changing 192 times 44100 times per second. That's several MHZ and there's a reason we didn't do things like this before the digital age.

    S/H sucked when we HAD to use it for this sort of thing. Why would you use 192 expensive low leakage op amps (because they don't come in quads), 192 analog switches, 192 s/h signals when you can get 192 PWM DAC outputs in 12 tsop ICs? You still need the 48 opamps for buffering, but they don't have to be expensive and a single Teensy 4 could handle the control of all that with a fairly small pc board.

  6. #6
    Thanks for all the help, I think I have found a solution which uses much fewer audio rate channels. I'm going to try the satellite idea and have the satellites convert potentiometers and sliders to midi. That way, I will only really need maximum 4 audio rate channels per module (most likely only need 1).

    https://imgur.com/a/Znp6iKP
    This is my current idea for an approach. Perhaps the TDM input in the audio library could work for this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •