noob arduino circuit question

Hello, I'm sorry to ask a noob question, but learning has to start from somewhere :o .

I'm building a quadcopter and I have my IMU (Sensors) hooked up to my Arduino Micro, as well as a BEC from an Electronic Speed Controller connected to the motors.

IMU ARDUINO 3,3V ---------------------3,3V GND----------------------GND (SAME GROUND AS ESC/BEC) SCL-----------------------SCL SDA----------------------SDA

ESC/BEC ARDUINO 5V------------------------5V GND---------------------GND (SAME GROUND AS IMU)

The question here is, is it bad to share a ground from a 5v loop/circuit with a 3,3V circuit?

cgreendyk: The question here is, is it bad to share a ground from a 5v loop/circuit with a 3,3V circuit?

Nope, ground is ground is ground. All the grounds should be connected together.

Ok thanks! By the way, I did forget to mention that the BEC is the power source for the board. But that still doesn't change the answer I assume

BTW, do you already know about the pullup resistors for I2C ? (it's open collector)

No I haven't heard about it yet. I'm looking into it now actually. I wonder if that could be the reason that my sensor is only being read when I don't have my Lithium polymer battery plugged in. The sensors will only be read when the arduino Micro is plugged in to the cp via usb.

I2C is bidirectional open collector. It won’t work without 4.7 k ohm pullup resistors to +5V. Most I2C breakout boards and modules include the resistors (Lcds might also have them) you have to measure the voltage on SDA & SCL to verify it is 5V before you try to run any code.

3,3V won’t work as a high?

pinMode(2, INPUT);
pinMode(3, INPUT);
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);

after adding that to my code the only difference was that when the SDA went from 0,5 Volts to 3,3V, however the SCL stayed at 0,5V. And the sensor still didn’t work with the battery. This is complicated

You you use 3.3V I2C pullups as the IMU is 3.3V. The ATmega will recognise 3.3V as logic HIGH.

While grounds should be common, you don't share ground wires between the high current parts of the circuit and sensors - separate ground wire from Arduino to IMU, not the same one used for the BEC, if possible. Keep all the sensor wiring well away from the ESC and motor where there is loads of interference generated.