-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?

  • This post might help - raspberrypi.stackexchange.com/questions/103962/… – tlfong01 Oct 6 at 7:24
  • Thanks, the casw is how to connect both together to same pi pin? – PostarLakogSna Oct 6 at 7:26
  • Ah, yes, same two pins of both modules to the I2C bus's SCL and SDA pins. Choose either module, solder/cut its address decoder soldering pads, and the two modules now have different addresses. And even if cutting is badly done (not clean/sharp cut) , fake joint ("dry" soldering) etc, need not worry something might explode (99% sure!), you only get rubbish outputs. And in case you have too many I2C devices on the same bus, each device's pull up resistor in parallel might make the resultant pull up resistor value too small, causing problems. – tlfong01 Oct 6 at 7:44
  • Ah, yes, same two pins of both modules to the I2C bus's SCL and SDA pins - what is best way to do it? Connecting two pins to scl pin? – PostarLakogSna Oct 6 at 7:51
  • Ah, I might have overlooked that you are asking about the physical connections. If you are using breadboard, then two module pins and the I2C pin go to the same column. I am using proto board which has "strips" of three points connected. You might like to read my answer of the question below to see how my proto boards, and how to remove the pullup resistors of the devices: raspberrypi.stackexchange.com/questions/97995/… – tlfong01 Oct 6 at 8:00
0

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

  • 1
    First of all thanks a lot for your answer, you helped me a lot already. Can you explain a litrle bit more this part, or possible provide some kind of scheme/sctratch for this regarding bme pins and rpi pins? 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. – PostarLakogSna Oct 6 at 18:13
  • Hi @PostarLakogSna, Well, ground wiring is in the same area for PCB trace design. It is a bit hard to understand. You might like to read the article of Ref 1. An oversimplified picture is something like below. For your sensor case, there are three grounds points (1) Analog ground, (2) Digital ground, (3) Power ground. If you don't separate the three grounds, current flowing in the common ground wiring might affect the analog voltage, as offset or noise, ... Figure 4 shows the basic idea. – tlfong01 Oct 7 at 4:31
  • Often the power loop/ground unavoidably overlaps the digital/anglog loop/ground. Then you need to use bypass caps to reduce the noise effect. See Ref 3. Usually only when you have many devices on the same bus, or using many long wire, then you will have a noise problem – tlfong01 Oct 7 at 5:29
  • I encountered another problem, instead of temperature/pressure sensor, I have to connect MQ-7 CO sensor. Is it possible to do it in same way? Are there any issues with this sensor? – PostarLakogSna Oct 30 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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