On wich side of the cable do I put the circuit... - Page 1
Forum section: electronics / projects

author: rhdf
author_rank: Contributor
timestamp: December 03, 2015, 07:38:31 pm
content: Sounds like a strange question maybe.I'm designing a pcb for my connectors so i can have them mounted independent of the mainboard(s)here will be a USB-B, 2 x DIN 5 for midi and 2 1/4 inch audio jacks.The USB and midi part will be connected to tha mainboard via flatcable.I realised that there will be a lot of unused space on this pcp, space that cost me money. So i start to thinking about putting the optocoupler and resistors belonging to the midi-interface on this board instead of the mainboard.Any downsides with this? The only one I can think of is the length of the datalines, but on the other side, the same length is there for the midi out and USB. (max lenght for the flatcable will be ~20cm)

author: Fungus
author_rank: Super Contributor
timestamp: December 03, 2015, 07:59:40 pm
content: Quote from: rhdf on December 03, 2015, 07:38:31 pmMore wires going to the daughterboard?

author: mich41
author_rank: Regular Contributor
timestamp: December 03, 2015, 08:37:08 pm
content: I think MIDI doesn't care, as long as the optos are there to provide galvanic isolation against ground loops.And since we are speaking of ground loops, make sure to separate analog and digital grounds on the connector board and this flat cable. It's something I had to fix in the front panel of my PC

author: rhdf
author_rank: Contributor
timestamp: December 03, 2015, 09:09:15 pm
content: Quote from: Fungus on December 03, 2015, 07:59:40 pmWith the midi-interface on the mainboard I need 2 wires / Din 5 With the interface on the connector-board i need 1 / connector +5V and digital gnd so no big dealQuote from: mich41 on December 03, 2015, 08:37:08 pmwell, I've seen some bodgy midi-connections, so whats happening "upstream" my optocoupler is less of a problem, it will just be a less optimal MIDI-cable that bitI'm more worried about possible problems having 20cm flatcable in the signal-way. on the other hand, its not directly high-speed we talking...Yes, the analog and digital will be well separated. The only thing they will share is the glassfiber-part of the pcb with good distance between the grounds.The analog-part will have its own connector

author: Fungus
author_rank: Super Contributor
timestamp: December 03, 2015, 09:21:45 pm
content: Quote from: rhdf on December 03, 2015, 09:09:15 pmI think you'll be OK.Noise sensitivity will mostly depend on how much current you're allowing through the optoisolator transistor. Make sure it's a few milliamps at least.ie. Don't rely on the 30k pullup resistor inside a microcontroller to take the line back to high state when the opto switches off, use a 1k-2k external pullup.(if that's what you're doing...obviously)

author: Ian.M
author_rank: Super Contributor
timestamp: December 03, 2015, 09:29:49 pm
content: Running USB down 20cm of flat cable may be an issue. Low speed will certainly work, Full speed will probably work, but High speed is unlikely to work.

author: mich41
author_rank: Regular Contributor
timestamp: December 03, 2015, 09:36:47 pm
content: Well, actually one problem with ribbon cables is that they are prone to crosstalk between neighboring wires during rising/falling edges. You may want to check for this with a scope and - if necessary - reduce rise rate by driving the conductors through series resistors. This, btw, can be an issue not only with MIDI-IN, but also with MIDI-OUT - even with the 220R series resistor specified by MIDI, rise rate can be quite fast so check things with a scope.

author: SL4P
author_rank: Super Contributor
timestamp: December 04, 2015, 03:38:05 am
content: Quote from: mich41 on December 03, 2015, 09:36:47 pmIt may also help to interleave ground/shield conductors with high-speed or balanced pairs.

author: rhdf
author_rank: Contributor
timestamp: December 21, 2015, 07:53:19 pm
content: Quote from: Ian.M on December 03, 2015, 09:29:49 pmI'ts for Midi over usb. No Idea (at the moment) wich speed it is.. My guess is Low Speed.If I understand correct it would help to just have a grounded conductor between 2 signal-conductors?

author: Ian.M
author_rank: Super Contributor
timestamp: December 21, 2015, 08:39:44 pm
content: Your guess is probably wrong. All but the cheapest/oldest USB devices tend to use at least Full speed signalling. The exception is corded mice that may use Low speed, because the slower signalling means they can get away with a thinner more flexible cord.The cable needs to provide a differential impedance of 90 ohms D+ to D- and 30 ohms from either to ground. You just cant get there with ordinary flat ribbon cable, but would need a custom double sided flat-flex.Seehttp://www.usb.org/developers/usbfaq#sig6andhttp://www.sigcon.com/Pubs/news/3_10.htm