2
\$\begingroup\$

I'm creating a two-part, bass guitar-style MIDI controller, where the left hand plays a small fretboard which detects which frets are being played, and the right hand "plucks" strings (actually senses touch on four separate wires). The right-hand device contains an Arduino and the MIDI output port, while the left-hand device just consists of shift registers to serialize the data from its frets. The right-hand device (with the Arduino) currently communicates with the left-hand device via five wires (clock, latch and data for the shift registers plus 5V and ground).

My question:

What is the best way of connecting the two devices? I would like a detachable cable, so I'm imagining something like a D-sub connector on each device, or maybe an RJ45 or DIN. Ideally, I'd like it to be a fairly common type of cable so that it's not too expensive, and preferably something with a few extra pins in case I want to add some LEDs to the left-hand device. Also, the lighter the cable, the better, so that movement isn't restricted (this might rule out D-sub?).

EDIT - additional info, as requested (answering as best I can!):

  • The cable would be about a metre in length
  • The current is about 40mA
  • The code is currently running about 50,000 times per second (I think), but it doesn't really need to if that's going to affect the cable choice; 1,000 times per second would be fine
  • The shift registers are both 74HC165
\$\endgroup\$
1
  • 2
    \$\begingroup\$ Useful information that you need to provide: how long is the cable, what is the maximum clock rate, what sort of logic devices are used for shift registers (TTL? CMOS?), and how much current is provided on the power lines. \$\endgroup\$
    – Joe Hass
    Commented Nov 27, 2013 at 14:16

1 Answer 1

3
\$\begingroup\$

The cable would be about a metre in length

The current is about 40mA

The code is currently running about 50,000 times per second (I think), but it doesn't really need to if that's going to affect the cable choice; 1,000 times per second would be fine

The shift registers are both 74HC165

Based on that, it would be fine. RJ45 connectors, and Cat5/5e/6/6e cables have low resistance, and are designed for high frequency communication (Fast Ethernet and Gigabit, 100MHz and 1000Mhz respectfully). 100 METER runs without active repeaters are standard. And POE standards allow for up to 25 Watts of power over standard Cat 5e cable. That's 5 Amps at 5v.

You arn't even at 1% of the maximum rating for either RJ45 or Cat5.

An off the shelf ethernet cable and some RJ45 jacks would be your best bet. Don't even bother with crimping your own.

\$\endgroup\$
7
  • \$\begingroup\$ Worth remembering that Ethernet does specify correct termination, otherwise you can get reflections even at low frequencies (look at RS-485 for reference) \$\endgroup\$
    – John U
    Commented Nov 27, 2013 at 14:47
  • \$\begingroup\$ @JohnU only if you are actually using it for Ethernet. OP's one meter, 50khz signal is nothing, especially with a commercially made twisted pair cable. \$\endgroup\$
    – Passerby
    Commented Nov 27, 2013 at 14:56
  • \$\begingroup\$ Mind the twisting of the pairs. As the two wires in a single pair are bound to exhibit a lot of crosstalk, the optimum pinout would be to have the 5V and GND as one pair and shorting the other three pairs together (one each for latch, clock, and data). Unlikely to matter for 50kHz TTL or CMOS level signals, but still important to understand. \$\endgroup\$
    – Mels
    Commented Nov 27, 2013 at 15:15
  • 1
    \$\begingroup\$ Small point - don't confuse bit rate with frequency bandwidth - Gigabit ethernet does not have a 1000MHz bandwidth, it's 40dB down above about 120MHz - see Fig 2 here: octoscope.com/English/Collaterals/Articles/… \$\endgroup\$ Commented Nov 27, 2013 at 15:38
  • \$\begingroup\$ Agreed @MartinThompson, your comment is correct and I have removed mine. \$\endgroup\$
    – David
    Commented Nov 27, 2013 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.