1

I need to connect two sensors like this https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcRDDlL2AK_eYo9BKbImJcekMZ0PgIYC2GL0OLIMVGzkWAtq54zG to rpi 3 b.

I found that it is not a problem and only thing is that you have to connect another sensor to same pins as previous. However, I am wondering what is best way to do so. Currently I am using GPIO wires. Is there some king of splitter for GPIO or something?

tlfong01
  • 4,847
  • 3
  • 12
  • 24
PostarLakogSna
  • 91
  • 1
  • 1
  • 9

2 Answers2

1

Question

And without boards, is it possible to solder two gpio wires into one?


Answer

Yes, I often do it, not soldering, but the following:

(1) Strip two jumper wires, one longer than the other.

(2) Twist two ends together,

(3) Crimp to a duPont pin and insert it into female connector.

But I almost never do it for joining two GPIO wire together灶.

Usually I do it on the device side, where the device has one common ground for two two data/power lines. In this case, I "split" the common ground into two grounds, one for power ground, another for signal ground. This reduces noises.

Looking at the GPIO pins side, there are two or more wires/signals going into the same GPO pin. So it is more appropriate to say two or more wires/signals join/merge into one.

This time I don twist many jumper wires together. Instead I use duPont male pin stripes solder on the protoboard (top left corner of second picture). It is more flexible than hard twisting or soldering many wires together, because it is easy to add/merge/join/connect or remove any wire any time.

join pin

join pin 2


References

(1) PC-board Design - Properly ground your circuits - EDN 2017jan06

(2) Removing Pullups in MCP23017 - tlfong01 2018

(3) I2C Spike Problem


Appendices

Appendix A - Sensor Ground Problems (Ref 1)

Analog ground


.End of answer

tlfong01
  • 4,847
  • 3
  • 12
  • 24
1

I encountered the same problem and after not finding an easy way to stack stuff on GPIO pins, I decided to try a daisy-chain approach.

It looks like your sensor is typical in that it requires a header to be soldered on:

sensor

Often they come with headers in the bag. But you can also purchase a header with longer pins.

long header

This one has 21mm "total height", and the plastic mold is usually 2mm. So we can have 9mm on each side if we forcibly center the pins as shown in Suggestion 8 here:

header with centered pins

Actually the female jumper wire sockets only need about 6mm, anyway if you solder the long-pin header properly to the sensor, then you should be able to leave enough length of wire sticking out on both sides of the circuit board so that female jumpers could be attached on each side. One side will connect to the Pi, the other side to the next sensor.

Maybe I'll attach a picture when the product arrives. There may be problems with I2C maximum cable length - but I only have a few sensors, with low bandwidth needs.

Metamorphic
  • 283
  • 1
  • 3
  • 12