Hello all, perhaps someone can help me to cope with my challange
I'm constructing ECU system to control car airsuspension. It has a lot of valves controled with uln2803 and 5v sensors (most of them are potentiometers ). Mega 2650 r3 board, mpu6050, bluetooth hc06 and I2C 2.42 OLED 128x64 Graphic OLED are used as main components. oled and mpu are both on i2c line and they've 5k pullup resistors on both SDA and SCL lines. For mpu I've only +5v, gnd, scl and sda pins soldered to MEGA. The wires to oled are long(arround 5 meters) but to mpu are about couple centimeters.
Everything is working great unless I start using mpu6050. As soon as I'm including my logic to work with mpu my board randomly stops working. I've already tried different libs. even direct wire lib with the simpliest code produces the same result. Nothing seems helping. Currently I'm using I2c library with timeout set to 1000 ms. But it looks like it's not the metter of i2c timeouts.
Ive noticed one intersting moment if I test my ecu at home it takes a few hours to stop working but as soon as plug it into my car it takes up to a few mins (sometimes its even seconds) my ecu to be stopped.
Please anyone help me not to become crazy :)
Thanks a lot in advance