Having read around the forums here for the best way to hook up the bazillion connectors on my 2560, the pictured male IDC connector seemed ideal. I need to hook up all of the digital I/Os on that big 36-way bank, plus the grounds, and I don't need the 5V connections, so the 34-way connector was perfect. It also clamped very nicely onto my ribbon cable.
But, when I insert it into the Arduino, its legs are too short, and it just sits loosely. I have to press against it to make a connection, and it easily falls out.
Any ideas how to get around this? I wondered if some of those long legged female headers would do the trick? https://ebay.us/UkA1WZ But then I'm afraid I'll just duplicate the problem higher up and the legs of the IDC will still be too short to get into those?
(I should declare that rather than a branded Arduino, I bought the cheap copy off eBay. But I can't so far see any differences between the two). Any help would save my day!! Thank you.
It's really hard to tell what that is from the picture. It looks like maybe it's intended to be soldered to a board, rather than being used with female headers.
It should be possible to use the long male headers to connect a common female IDC connector to the female header on the Mega. I don't know whether there are male IDC connectors. I've only ever seen the female ones, connecting to standard male headers on the board.
IDE wire re-pluggable connectors are female only. You have the PCB direct-to-pcb headers which are not
re-pluggable, you solder into a PCB and then press on the ribbon cable for good.
You can get pcb male dupont headers like this:
But again they are designed to solder into PCBs.
You can probably find some double-sided male headers that can simultaneously plug into an IDE ribbon
plug and Arduino headers.
You can get them to plug into IC sockets of various sizes Or as a simple double row. But that is the problem they are all double row. This is because the ribbon cable is 0.05 inch pitch and the sockets are 0.1 inch pitch. So if you do use them on the single row of an Arduino board then you waste half the wires. The IDC plugs of the double row type always come with a plastic surround at the ends and also along the length. The end ones will stop them physically being plugged into the sockets on an Arduino because they will interfere with the other components on the board.
So you can get IDC connectors of both genders but they are not much use in the Arduino world.
I know you can get 0.1 inch spaced ribbon cable, these have a membrane between the wires to double space them, but these are not at all common.
philassheton:
Thanks a lot @pert. Then I'm probably better off starting again with a female IDC connector and some of these if I understand you right?
No.
You want the double height headers, that is the ones with the same length of connector sticking out on both sides of the plastic strip. Otherwise you are back to square one and they will fall out.
This is about the 2x18 header on the back of the Mega
Doha!
I have just been checking a Mega against the 2 x 10 male connector, which is the only one I have on hand. The problem seems to be at the end next to analogue pin 15. The connector's shell is just catching the connector for this pin. the other end, pin 21, is fine.
It looks like if you bought a 2x20 header, then you could get inventive with a Dremel and cut a slot in the side wall of the connector's shell, to make it go on.
Ok looks like I was wrong about only having one size of IDC male connector.
This is a photograph of a 17X2 IDC header, and as you can see it just fits on.
The only snag is that there is no access for pins 52 and 53 at the end of the header. But it would work without having to resort to using a Dremel to cut a slot in it.
The lugs on each side make it easy to pull off, but I can't seem to find one with lugs on them online now. I bought these about 30 years ago from Farnell and they don't seem to stock them now.
@pert@MarkT@Grumpy_Mike thank you all for your help!! This forum is so much better than others I've used for other things -- I had assumed I had had all the feedback I would get and ordered female IDCs and those male headers last night. I've just got back from work to find this treasure trove of info!! It sounds like the best option will be to add some double-length headers to my list, as the female IDCs are already in the post. I think that combo will do the job admirably (I hope!!)
For the remaining pins, and regarding the double width problem -- I am thinking I can fit two female IDCs to one cable and attach one half of each to the two opposing sides of the Arduino (D0-7, D14-21 on one side and A0-15 on the other -- I hope that works!!) then programmatically decode the interlaced signals. I've tested my "wrong" 34-way male IDC and it fits perfectly across digital pins 0-7 and 14-21 with the spare pin dangling between the two rows of connectors, so I'm hopeful that three 34-way IDCs should give me 64 connections on two 34-way cables... I'm using a clock though, so I'll have to shed a few from the edge, but should still give me a good set of connections.
(In case of interest, this is being used to wire up my piano to capture the notes I'm playing -- lots of copper tape and ribbon cables involved -- initial tests seem to work!! My first Arduino project and I'm quite excited for what this amazing stuff can do.)
I am thinking I can fit two female IDCs to one cable and attach one half of each to the two opposing sides of the Arduino (D0-7, D14-21 on one side and A0-15 on the other -- I hope that works!!)
I don’t think it will.
On the analogue side of the Mega you have consistent 0.1” spacing with a 0.1” gap between Vin and A0 and between A7 and A8.
But on the other side the gap between Pin 0 and pin 14 is 0.1” but the gap between pin 7 and pin 8 is only 0.05”. This means you can’t attach any IDC to the top 10 pins, that also attaches to the other pin on that side.
Is the spacing the same on your clone?
Also fitting two IDCs on every other wire on a ribbon cable is going to be a challenge to say the least. I know I would not attempt such a thing.
@Grumpy_Mike -- I think the spacing on my clone does work with my idea -- I've tried sitting my "wrong" IDC connectors in the holes and it appears to sit perfectly.
The thought I had was not to fit the IDC to every other wire (I did attempt that initially, but agreed, was a nightmare!!), but rather to fit two whole 34-way IDCs to the entire 34-way ribbon (with an Arduino's width between them) and then plug one side of one IDC into one side and one side of the other into the on the opposite side of the board. Effectively, each wire would have one useful and one redundant connection -- but I can't see any reason from the design of those plugs why current shouldn't be able to flow past the reduandant connection and on to the useful one (I think?). I suppose just one set of pins might not be enough support for the IDC, though... Either way, the goods are in the post as I ordered them yesterday, so I will see if it works and report back! If it fails, I'll need a new idea . I have plenty of ribbon cable to experiment with, though.
Ok that sound perfectly feasible.
If these are female connectors I would glue the double size headers into them so you don’t accidentally connect up the same side of the cables to the different sides of the boards.
A little hot melt glue applied to the sides should be fine.
Brilliant -- thanks a lot for your thoughts! Definitely a good idea to make sure I don't mis-plug it. I'm wondering if I might be able to find some double-length double-row right-angle headers too so that the plugs can actually have two rows to slot onto -- and I think it would keep the two sets of IDCs out of the way of each other... Currently hunting for that...