How to address two BMP388 on i2c

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
hotblack43
 
Posts: 3
Joined: Thu Jan 27, 2022 3:08 am

How to address two BMP388 on i2c

Post by hotblack43 »

Hi,
I have two BMP388 sensors on boards from Adafruit. I want to read them both from the same i2c port on an Rpi. I put them in parallel. I run the detection code

i2cdetect -y 1

and I get the table that shows addresses. I see one address in use: '77'. This must be the 0x77 address that these sensors+boards are born with. So I figure I need to change the address of one of them ... I try the 'connect SDO and GND' trick, and sure enough the address changes to 0x76. Still only one shown, at the test, however.

So now I figure that because they are in parallel the changes in one is controlling the access to both - somehow. I also tried soldering the ADDR patches on the back of one of them. Same as above.

I must be missing something here - can anyone point me in the right direction, please? Either the sensors should not be in parallel, or they should be re-addressed in another way?

Thanks.

Peter

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: How to address two BMP388 on i2c

Post by dastels »

Can you post clear photos of the connections to the boards and the wiring as well as the i2cdetect output.

It sounds like you're doing everything right, but I'd like to see what you're doing.

Dave

User avatar
hotblack43
 
Posts: 3
Joined: Thu Jan 27, 2022 3:08 am

Re: How to address two BMP388 on i2c

Post by hotblack43 »

Thanks for reply! At the moment I have stopped trying the 'different adresses way' and am going "the multiplexer way" - but if that also does not work I shall be back here. Thanks!

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: How to address two BMP388 on i2c

Post by dastels »

Grounding SDO on one board will set it's address to 0x76. ONLY VIN, SDA, SCL, and GND are connected in parallel. Notable NOT SDO.

There's no reason to use a multiplexer if you only need two of these sensors.

Dave

User avatar
hotblack43
 
Posts: 3
Joined: Thu Jan 27, 2022 3:08 am

Re: How to address two BMP388 on i2c

Post by hotblack43 »

Thanks for that Dave, I put ALL pins in parallel- including SDO. Hah. Tomorrow will tell! Thanks. Peter

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: How to address two BMP388 on i2c

Post by dastels »

It occurred to me that that's what might be happening. You were grounding both address pins, hence both switched to 0x76. Now you should be good to go... without the additional hardware & code that a multiplexor entails.

Dave

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”