How do I sync up two Arduino Nano with BMP 180?

Hi everyone.
I need to measure a difference in pressure and I have resolved to do this using a BMP180 and an Arduino Nano. The BMP180 has a fixed I2C address and requires a multiplexer if I want to use the same Nano. So, instead, I'm using two Arduino Nanos and BMP 180s.

Now, I record the data using MS Excel via Data Stream. To calculate the pressure difference I need to have an exact time stamp if not the calculation will be erroneous.

How does one do this?

Do you need an exact time stamp, or do you need both Nanos to measure the pressure at the same time? If the latter, write a sketch to wait for an external input to go active, and have the Nanos do the measurement then.

Send both millis() and the data and process them in Excel.

Just use a single nano, and run software I2C for the 2nd sensor.

Thank you. I'm assuming this is likely an interrupt?

Would it be simulcast or would the software just alternate the I2C reading for both sensors?

It would not be possible to read both sensors simultaneously on a single nano, so you would have to alternate between them.

If you are running two Nanos, the only way to get both to read the BMP180s simultaneously would be to have a timing pulse synchronizing the boards. If there is enough time between readings, you could send the data from one Nano to the other, and let it send the combined data to the computer.

1 Like

you could use a microcontroller with two I2C ports, e.g. ESP32 scan two I2Cports
e.g. ran scanner on an ESP32 with a LMS9DS1 9-axis iNEMO inertial module on Wire1 and a BMP280 pressure sensor on Wire

14:44:44.491 -> ---------- Scanning Wire -------------
14:44:44.491 -> Scanning...
14:44:44.525 -> I2C device found at address 0x76  !
14:44:44.525 -> done
14:44:44.525 -> 
14:44:44.525 -> ---------- Scanning Wire1 ------------
14:44:44.525 -> Scanning...
14:44:44.525 -> I2C device found at address 0x1C  !
14:44:44.525 -> I2C device found at address 0x6A  !
14:44:44.525 -> done
14:44:44.525 -> 

Can you please explain why you are using two Nano instead of a multiplexer? You are already discovering the disadvantages of that approach!

How much will the pressure change in the few microseconds it takes for two readings?

Does it have to be two BMP180 ?
Could one BMP180 (I2C address 0x77) and a BMP280 (I2C address 0x76) do the job?
BMP280 SDO pin can select a different I2C address (0x77 or 0x76), so two BMP280 could also be used.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.