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
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:
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:
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.