STOP TX data from Sensors

Hi everybody,

using two breadboard, I link two sensors MPU6050 together. I receive data from sensors by I2C protocol. I use a bus for SCL and SDA transmission and other bus for supply. (view attach!...Scheme & Script)

I don't understand because sometimes the TX stop to send data!... When I check with serial monitor the TX led turn on and receive data; after (random) 30-50 sec.... STOP transmission! Why????

Script.txt (9.51 KB)

Scheme.pdf (90.5 KB)

First of all you don't have pullup resistors installed (to 3V3). Even if you do you might get problems because the Arduino and the sensors have different logic levels. Best would be to use a logic level converter (p.e. Logic Level Converter - Microcontroller Accessories Interface - Boxtec Onlineshop) although the pullups may be sufficient for your case. Use 2k2.

Consulting the MPU6050's datasheet I saw that there were two pullup resistors (R1 and R2)... or am I wrong?? (datasheet in attach).

Note: address first sensor is 0x68 and the second is 0x69

MPU-6050_Breakout V11.pdf (51.5 KB)

That's not the datasheet of the MPU-6050, that's the schematics of your breakout board, which you didn't provide a link for before. On this breakout there are the pullups but wrong values. Both boards together give about an acceptable value (5k) but it's bad design to include an I2C pullup into a breakout because pullups should be one pair per bus and not a pair per device on the bus.

I don't understand because sometimes the TX stop to send data!.

What does that mean? You get data from the devices and then one of them stops talking to you? Or both together? Where exactly does it stop? It is possible that it's related to the missing level converter. The 3V3 are at the limit of being recognized as a logical one on the Arduino side. Minimal changes may influence that.

Have you tried to look at the problem with a scope?

BTW: Opening the serial monitor resets the Arduino so it's almost the same as when you power it up.

Sorry, I wanted to say schematics and not datasheet... I'm confused..

So, do you advice me to put two pullup 2K2(or 5K) resistors per bus?? ... Initially on the serial monitor I see the values... sometimes (but not always) appears "FIFO overflow" and after a few seconds the TX stop... both together!

I didn't try with a scope.

With two 2K2 pullup resistors, doesn't appear FIFO overflow on the Serial Monitor.
The TX stays more on but after 1-2 min it stops.

Can you help me?!?

NOTE: In this days I will solder all together without breadboard.

Has anyone ever used two sensors on a single I2C bus???

So, do you advice me to put two pullup 2K2(or 5K) resistors per bus??

I'm not clear what you mean. I advice you to use ONE pullup resistor (2k2) per bus LINE to the 3V3 pin. So one 2k2 from SDA to 3V3 and one 2k2 from SCK to 3V3. You do that once on the bus not for every device you have on it. If your sensors are connected by a not too long wire (say not more than 0.5m), this should work.