Combatting impedance of a ribbon cable - Page 1
Forum section: electronics / projects

author: jackg6409
author_rank: Newbie
timestamp: November 20, 2021, 06:42:38 pm
content: Hello,I am trying to upgrade an old Yamaha psr 170 keyboard to give it MIDI capability. I am trying to accomplish this by having inputs/outputs of keyboards button matrix go to the inputs of a 328p mcu and also to the motherboard of the keyboard. The problem I am experiencing is that there seems to be a lot of impedance on the ribbon cable which is causing the signals from button presses to sort of echo and also cause nearby outputs to send high when they are not supposed to. I have tried using capacitors to combat this which has helped a lot but I don't really know what im doing when it comes to this because I don't know what value to use I have just been increasing the capacitance value (which has worked a bit) which seems redundant.If anyone could point me in the right direction with this I would really appreciate it. Thanks

author: Gyro
author_rank: Super Contributor
timestamp: November 20, 2021, 07:09:36 pm
content: Rather than impedance, it sounds more like capacitive coupling between adjacent cores in the ribbon. This is often a problem when edges are fast, or you are feeding into high, uncontrolled impedances.Any chance that you can widen the ribbon and interleave grounded cores between active ones? That's pretty much the standard solution for this sort of crosstalk problem.P.S. Welcome aboard.

author: wraper
author_rank: Unknown
timestamp: November 20, 2021, 07:31:20 pm
content: Aren't you by chance using a weak pull-up in MCU?

author: Benta
author_rank: Super Contributor
timestamp: November 20, 2021, 08:22:57 pm
content: Quote from: wraper on November 20, 2021, 07:31:20 pmGood question.If the cables are longer than 30 cm, you need to think about correct termination. Ribbon cable with alternating ground and signal wires have an impedance of 100...150 ohms.

author: jackg6409
author_rank: Newbie
timestamp: November 25, 2021, 01:10:47 am
content: On the data sheet it says between 20-50k ohms.

author: EPAIII
author_rank: Super Contributor
timestamp: November 26, 2021, 08:24:48 am
content: Yes on alternating ground and signal on the ribbon's conductors. Be sure the outside wires are ground.You say there is an echo or reflection. If the impedance of the signal conductors in the cable is about 100 Ohms, 100 Ohm source and termination resistors should stop that. You should be able to see what is going on with a scope. An analog scope would be best: the more bandwidth, the better, well within reason. Run a test signal on one conductor and look at both it and the adjacent ones at the destination end.Experiment with the value of those resistors if needed. The source resistor is in series with the output and equal to the characteristic impedance of the cable minus the equivalent series resistance of that output. The destination resistor goes to ground and the high impedance input of the receiver circuit is in parallel with it. If that input impedance is not at least ten times the characteristic impedance, then you need to combine the two impedances with the parallel resistance formula to get the proper value (the characteristic impedance).If all that does not work, use coax.

author: EPAIII
author_rank: Super Contributor
timestamp: November 26, 2021, 08:50:50 am
content: You can also get ribbon cable where two adjacent conductors are twisted, forming a twisted pair. There are short areas where they are not twisted to allow standard, insulation displacement connectors to be installed. The best way to use this style of cable is with a differential signal.A variant of this has twisted pairs in a shield and those are bound side by side to form a ribbon. But standard, insulation displacement connectors can not be used. The individual pairs and their shields must be terminated individually.And then, you can get ribbon style coaxial cable: miniature coaxial cables are bound side by side to form a ribbon. But I do not think you can use standard, insulation displacement connectors. The individual coaxial cables must be terminated individually.https://www.highspeedint.com/ribbonized-coax-cable-assemblies/

author: Someone
author_rank: Super Contributor
timestamp: November 26, 2021, 09:06:40 am
content: Impedance is something to work with, not something to fight.Regardless, this is going about it all backwards. For the armchair experts above the schematics are readily available so you haven't even made an effort. Ribbon cables are not the major problem in this system, it already works well with the short sections of ribbon designed into the system and ribbon effects are swamped by the intentional loading:47k pull-ups, 2x470pF shunt capaitance, and ferrite beads on the drivers for series termination.Quote from: jackg6409 on November 20, 2021, 06:42:38 pmWhat do you meant by high value nearby outputs? Is that from scope measurements at the micro controller? Are the outputs open collector or push-pull?The code for the microcontroller needs to be done very well (worst case interrupt latency becomes critical) or you'll miss the timing of the multiplexing. Start by having the outputs of your microcontrollernotconnected to the rest of the keyboard, and see if it works as expected from just the inputs. Then add more bits (or approximations of them, like the shunt termination or a section of ribbon) of the system one at a time.

author: Terry Bites
author_rank: Super Contributor
timestamp: November 26, 2021, 06:46:35 pm
content: Yamaha psr 170 has midi already doesnt it?yam.pdf(3513.15 kB - downloaded 275 times.)EPAIII is right. Grounding between pairs works really well. If your stuck with a particular cable width or connector, then there's good old twist and flat.It wants about 110 ohms to correctly terminate it. You may see ringing if you leave it out.There is also shielded ribbon cable. It reduces capacitive coupling between adjacent conductors. Expensive!Big discussion herehttps://electronics.stackexchange.com/questions/439213/ribbon-cable-cross-talk-is-there-a-fix-after-the-fact

author: jackg6409
author_rank: Newbie
timestamp: December 02, 2021, 01:45:38 am
content: Schematics for what? Schematics for the keyboard? I already look for that. I tried researching this with google I found info that was already provided in one of the replies to my post (putting ground wires in between each signal wire). What I mean by high is a logic 1 signal. I am not trying to read data from a multiplexer I am directly wiring my IO pins to the button matrix which I have already figured out. Ill try what you suggested. Thank you