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

Thread: Two Teensy's and Two Computers (Redundant Midi Controller)

  1. #1

    Two Teensy's and Two Computers (Redundant Midi Controller)

    I found this thread quite useful for a project I'm working on (a midi controller that uses button presses from a single-button to control two separate teensy's and therefore, two separate computers at the same time).

    However, I wanted to verify that using diodes like this are also a good way to connect a variable resistor to two separate teensy 3.2 boards. Same use case, computers need to get a midi signal at the same time and both need to operate independently if one fails.

    I'm also wondering if I need a diode (5817) between the wiper + the power of the slide resistor and both boards. Thanks for any help you can offer. Relevant portion of schematic attached.

    Click image for larger version. 

Name:	Screen Shot 2019-07-10 at 6.52.38 AM.jpg 
Views:	14 
Size:	53.2 KB 
ID:	16946

  2. #2
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    1,138
    Consider connecting inputs only to one Teensy and using Tx on it to send MIDI as send data to the Rx of the other as a MIDI THRU port.

    They'd have to share common ground so I think you'd want to check about power issues but I recall it's possible.

    At the time of the following the issue was library inconsistencies that made it difficuit. These have since been resolved making the coding part of this thread moot
    https://forum.pjrc.com/threads/31708...m-host-to-host

    ...you can also put an opto-isolator between the Teensys, where it becomes a regular hardware MIDI circuit without the DIN cconnectors

  3. #3
    Rushed the schematic a bit and made a couple confusing mistakes. Here's what I'm trying to do. I assume the wipers also need diodes but I don't know that this even works so I wanted to get some input before I plug things in.

    Click image for larger version. 

Name:	Screen Shot 2019-07-10 at 9.06.05 AM.jpg 
Views:	7 
Size:	60.9 KB 
ID:	16948

  4. #4
    Thanks for the input, Oddson. However, part of the problem is that this is a redundant system, meaning if computer A goes down and Teensy A loses power, I still need to send midi information from my inputs (buttons and sliders) to the other Teensy. So the data needs to go directly from inputs to Teensy, not relayed over serial communication, etc.

  5. #5
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    1,138
    Then you need to have a redundant power supply that powers both teensy if either has 5v.

    Otherwise I can't see how you power the voltage dividers.

    You can't use regular MIDI? Seems to me you just want a splitter really.

  6. #6
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    1,138
    ...also... my PC maintains power to USB when frozen and even when off.

  7. #7
    Yeah external power was my only other idea. It has a couple features that make USBmidi appealing for this project. Thanks again!

  8. #8
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    1,138
    Then use separate power.

    I finally read the diode thread... they are there because of the pull-up voltages.*

    With voltage dividers the issue is the hot rail*

    If you power the voltage dividers separately then you should be able to connect the wiper to the high input-impedence analog pins on each Teensy.

    The problem in the digital example is the pull-up. But analog input pins don't source or sink current at any significant amount so I believe* this will work.

    * Caveat.... I am not an EE...
    Last edited by oddson; 07-10-2019 at 02:16 AM. Reason: Might be all wrong

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,327
    Maybe using a pot with 2 separate circuits would be simpler?

    Name:  pot.jpg
Views: 34
Size:  9.1 KB

    The one possible gotcha is to check the pot's taper spec. You probably want linear taper, not "audio" or "reverse audio". Many of these dual circuit pots are meant for audio use, but they're also made with linear taper. Check the specs before buying.

  10. #10
    Quote Originally Posted by PaulStoffregen View Post
    Maybe using a pot with 2 separate circuits would be simpler?

    Name:  pot.jpg
Views: 34
Size:  9.1 KB

    The one possible gotcha is to check the pot's taper spec. You probably want linear taper, not "audio" or "reverse audio". Many of these dual circuit pots are meant for audio use, but they're also made with linear taper. Check the specs before buying.
    Yes! I wondered what dual-gang meant as I was researching pots. Thanks for this suggestion Paul. Definitely will try this option first. And thanks for the taper heads up. I'll be sure to look for linear taper sliders.

Posting Permissions

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