I am starting some Arduino's projects with different sizes (very small based on Arduino Nano and bigger using Arduino Mega). These projects will be manipulated by students and they will connect and disconnect many times the wires. I will try to not use breadboard if I can. In order to develop very versatile projects, the idea will be to use very useful plug sockets. Currently I have no idea of which kinds of plug sockets I can use.

Do you have any idea about the existing plug sockets (from 2 to 6/8 wires) and which one it is preferable to use?


  • Some shields and components I already have and want to use have sometimes some plugs sockets (similar to this) but sometimes only some classical pins
  • I want also to build my own shields by integrating plug sockets to the arduino or to another shield
  • Some parts will be also composed by small electrical circuit on which I want to integrate plug sockets aswell
  • I will also use LiPo batteries (for example this one which have a connector I can't buy currently because I don't know the reference)
  • Communications will be also achieved using SPI and I2C
  • Without knowing exactly what you are doing with these plugs and sockets, and what signals will be going down the wires, no one can say for sure. In some situations IDC connectors (like you used to have on older hard drives - or the smaller versions of them) could be ideal, but ribbon cable is ghastly for I2C or SPI. 9 Pin D connectors might be good, or they might be too bulky. There's just too many variables to be able to say "This is best".
    – Majenko
    Apr 18, 2016 at 19:46
  • Actually, I have also had similar considerations over a few educational projects. After many hours of strolling against the wind, I had to realize that probably there is nothing wrong with the plug-in breadboards and the readily available jumper wires. Actually, those are pretty easy to replace, inexpensive, and give the feeling of a full control of the connections, instead of using some yet another connection scheme and pinouts to learn.
    – Gee Bee
    Apr 18, 2016 at 21:59
  • 1
    @GeeBee It also has the advantage that they are actively learning the circuit, not just plugging together LEGO® bricks.
    – Majenko
    Apr 18, 2016 at 22:33
  • @Majenko, agreed! This is what I wanted to say, thanks for making this point very clear. I agree with you that lego bricks (e.g. lego wedo, lego NXT, littlebits) totally hide the electric connection aspect by using a much higher level of abstraction of "just put together". While this is great for preschool students since it hides a lots of complexity they are not interested in, it may not be a sufficient approach for an EE students course. It is much easier and inexpensive to let them blow up a few 1$ components for real than explaining all the underlying magic of connections for weeks.
    – Gee Bee
    Apr 19, 2016 at 0:11
  • @Majenko I have extended my initial post with more comments.
    – Guuk
    Apr 19, 2016 at 14:36

1 Answer 1


Ok, so more info from the OP:

  • non-electrical engineering students needs a prototyping platform
  • minimize possible damages, support hot plug-and-play
  • not too expensive

Dedicated connector

I suggest using standard subD9 connectors. Sensors shall have male pins, while the control board female socket (this makes very hard to do accidental short circuits on the control board). We were using these connectors in a daily basis in a lasershow system, and I was very statisfied. Inexpensive, easy to solder, works with a wide range of cables or separate wires.

In many cases, you can integrate the sensor into the housing of the connector. For example, an IR receiver, an accelerometer, etc. fits well.

You can use off-the-shelf serial cable extenders which makes it very versatile.

Since it is a D shaped connector, there is only one possible way to connect a sensor to the mainboard, and we're golden.

Dedicated connector light

NSL25 and NSG25 are my favorites: http://www.soselectronic.hu/?str=371&artnum=4927&name=nsl-25-2-g

Although these are inexpensive wire to board connectors, it is very hard to misconnect them. Criping is a PITA, but you can purchase pre-crimped connectors with wires such as http://www.soselectronic.hu/?str=371&artnum=6175&name=-p-35003 One 3 wire female connector with wires costs about 50 USD cent.

Note though that in this case, the control board has the male connectors. By accidentally dropping a coin to the connector, or using a screwdriver, it is easy to run into short circuits. This leads us to the next plan...

Any inexpensive connector with proper electric protection

Probably the most inexpensive solution is to use standard headers and pins. Here you may also wish to buy ready made cables, than start crimping yourself: http://www.soselectronic.hu/?str=371&artnum=6171&name=-p-2543

This however opens up a can of worms of misconnection:

  • connection by one or multiple pin off
  • connection in reverse direction
  • shorting the pins on the board

Against sorting, you shall have a multifuse on the power pins, say, 250mA. On each IO pin, you shall have a series resistor of 470 ohm, this ensures that no miswiring can destroy the Arduino.

On the sensor-side, things are a little more tricky. You need a shottky (or an equivalent P fet diode) to ensure that reverse polarity connection will not destroy your sensor. If the sensor has output pins, also use a series 470 ohm resistor.

Considering all the hassle, using a standard subD9 connector is a way easier:

  • it has enough dedicated pins for I2C, SPI, and a generic IO for dumb sensors
  • the pins can handle more current, and there are more pins you can connect in parallel to have enough power for small motors
  • it is impossible to misconnect (once all sensor sockets use identical wiring)

Don't forget ESD protection

In any case, it is a good idea to have some sort of ESD protection whenever you have connectors, and wires, and rough external world.

Have at least a TVS diode on the power pins (say, an 5.8V or 6V unidir TVS will do). On IO pins you can use a simple series resistor, or you can opt for a TVS.

During hot plug and play, it may happen that sensitive sensors get powered in a strange way. E.g. first 5V then the sensor output is getting connected, but no GND for a short moment. Some sensor may get damaged in this case. Use diodes to fix this.

For sensors requiring sudden current peaks (e.g. WIFI, or a motor), add at least 470uF/16V electrolyte capacitor right to the sensor end of the connector. This way once the sensor is connected to a long extension wire, you still have acceptable power to use in sudden current peaks.

Some sensors (e.g. IR receivers) are sensitive to power glitches. Consult their datasheet, use the suggested RC filtering network on the power pins.


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.