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

Thread: Connecting together multiple boards

  1. #1

    Connecting together multiple boards

    I am working a project to make a midi controller with 64 analog inputs. I was wondering if their is a way to either connect multiple teensy 2.0's together either in code or through a usb bus to send 1 midi channel. Is it possible to just have the CC inputs for each board set to a different value on the same channel. For example for first board sending 12 inputs would be channel 1 CC 0-11, board 2 Channel 1 CC 12-23 ect. Any help would be appreciated.

  2. #2
    Senior Member
    Join Date
    May 2017
    Posts
    123
    Hello,

    maybe you try the following approach:
    - take 5 teensy 2.0 and connect 13 analog inputs each, one only 12 inputs (5 * 12 - 1 = 64)
    - connect all 5 teensys with a bus system, either I2C or SPI (preferably)
    - one of the 5 teensy has a bit more work to do, it is the master of the bus (SPI or I2C) and transfers the data via USB

    Possible problem is 4 teensy have to work in slave mode, I do not know whether the libraries for I2C or SPI enable this for teensy 2.0, possibly using 5 teensy 3.2 is a solution

    It should also be considered whether the 64 analog inputs are not easier to reach with a multiplexer and only one teensy.

  3. #3
    Senior Member
    Join Date
    Mar 2016
    Posts
    353
    Hmmm, why T2.0? The LC is cheaper and faster. Though to do 64 you will need 6 LCs. (still cheaper than T2s) Or, you could use T3.2s that support up to 20 Analog inputs each. Is 64 a sacred number? 3 T3.2s or 5 LCs would get you 60.

    Also, what are your sample rates and sample bit sizes? Have you figured out your total data rates? I can see how it would be easy to need up to 10s of megabits/sec in raw bit transfer rate with all inputs going. DMA could be your friend...

  4. #4
    Quote Originally Posted by PhilB View Post
    Hmmm, why T2.0? The LC is cheaper and faster. Though to do 64 you will need 6 LCs. (still cheaper than T2s) Or, you could use T3.2s that support up to 20 Analog inputs each. Is 64 a sacred number? 3 T3.2s or 5 LCs would get you 60.

    Also, what are your sample rates and sample bit sizes? Have you figured out your total data rates? I can see how it would be easy to need up to 10s of megabits/sec in raw bit transfer rate with all inputs going. DMA could be your friend...
    I have only used the 2.0 before so thats why. I did make a schematic for using the 2.0++ and 8 multiplexers to get to 64 inputs but I worry about voltage drop. The boards only need to be 8 bit because its only sending midi data.

    I currently use a Livid Brain V2 but livid is pretty much defunct at this point so I am trying to make something that emulates that same idea of a central brain bus that can connect to other pcbs using ribbon cables.

  5. #5
    Senior Member
    Join Date
    Mar 2016
    Posts
    353
    Except for dealing with the 3.3V issue, the ARM based Teensys are head and shoulders above the 8 bit stuff. Particularly when it comes to speed but lots of great peripherals. You'll find that it's super trivial to move up to them. And 3.3V is not a problem at all, just something to keep in mind.

  6. #6
    Senior Member
    Join Date
    Jun 2013
    Location
    Torrance CA
    Posts
    415
    How about a Teensy reading the analog inputs of 4 of these over I2C

    https://www.adafruit.com/product/732

  7. #7
    Quote Originally Posted by potatotron View Post
    How about a Teensy reading the analog inputs of 4 of these over I2C

    https://www.adafruit.com/product/732
    I looked into this with CD4501 from TI. About 50 cents a chip and can achieve the same thing result for less cost I think.

  8. #8
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    4,090
    Quote Originally Posted by potatotron View Post
    How about a Teensy reading the analog inputs of 4 of these over I2C

    https://www.adafruit.com/product/732
    But that is a MCP23017, which is digital only (i.e. with it you can do either digitalWrite or digitalRead, but not analogRead). I think you meant either the ADS1115 or ADS1015:


    <edit>
    But even so, you can only have 4 ADS1015 or ADS1115's on an I2C bus due to address limitations. That would at most 16 analog single ended inputs (or 8 differential channels).

    You can go to an I2C multiplexer to get 8 separate I2C buses, but then the question is can you read all of the inputs with all of the switching fast enough that the human won't notice.

    Now, a Teensy 3.6 has 4 I2C buses, so in theory you could get up to 64 inputs without using a multiplexer. Plus of course, the Teensy 3.6 has 25 pins that can do analog input (but 4 of the pins are used for the 1st and 2nd I2C buses).

    The Teensy 3.5 only has 3 I2C buses, but it has 27 pins that can do analog inputs (and again 4 analog pins are used for the 1st and 2nd I2C buses).

    I tend to think this is getting complicated, and it is better to have 8 cheaper processors that each have 8 analog inputs, and output via some communication method. I2C may be too slow, but perhaps using a UART line, and have the processor return all 8 inputs in one I/O (complete with a checksum).

    Perhaps a Teensy LC for simplicity of programming, perhaps a raw AVR 328p chip running at 8Mhz and 3.3v. If you have more processors, each with 8 inputs, it becomes easier to test, and you can build a few spares, so that when one goes on the fritz, it is easy to replace 8 inputs, than 32.
    Last edited by MichaelMeissner; 04-08-2020 at 06:18 AM.

  9. #9

    ADS1115.....is slow....but I use them..

    use 2 teensy 4.1 w 2 I2C and 1 of these ...on each buss.......not fast tho....here is a pic... the ADS chips on the back and terminals/jumpers on the top....

    Click image for larger version. 

Name:	1115bus.GIF 
Views:	65 
Size:	189.8 KB 
ID:	20919

    board file is zipped......below...
    Attached Files Attached Files

Posting Permissions

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