I2c idling and communicating at 1v, should be 3.3v or 5v

Hello, I've just started with electronics and I got my own PCB to work, everything is working except my i2c bus. I've had a struggle finding out why. When I throw a i2c scanner on it, it says that it didn't find any devices which is strange, because I have a BMP280 and a MPU6050 connected. Both don't work.

I think the reason why they don't work is because it's only using 1V. This is a to low of a voltage for i2c which I've read and it should be 3.3v or 5v. Keep in mind that I'm new to this stuff and I don't know how to increase my voltage of the communication.

I've yet only tried searching on the internet and running the following code in my setup function for the i2c scanner code.

  pinMode(18, INPUT_PULLUP);
  pinMode(19, INPUT_PULLUP);
  digitalWrite(18, HIGH);
  digitalWrite(19, HIGH);

Can you show a schematic ?
Do you use a Arduino board on your PCB ? Which board ? A Teensy 3.1 / 3.2 ?
Do you use BMP280 and MPU-6050 modules ? Can you give links to every module that you use (preferably a link to where you bought it).

When you connect a 3.3V sensor to a 5V Arduino board, then there is a voltage mismatch on the I2C bus. The Teensy 3.1 / 3.2 is a 3.3V board, so then it is no problem.
The I2C bus also needs pullup resistors. Perhaps you have accidentally added strong pulldown resistors.

By the way, Arduino has the pins "SDA" and "SCL" already defined for you.

pinMode(SDA, INPUT_PULLUP);

I am using a teensy 4.0 on my PCB.

BMP280: Adafruit BMP280 I2C or SPI Barometric Pressure & Altitude Sensor [Assembled] : ID 4059 : $11.95 : Adafruit Industries, Unique & fun DIY electronics and kits
MPU6050: %product-title% kopen ? Conrad Electronic

Where are the pullup resistors on sca and sdl? You need something like 1k5~4k7 between both and Vcc.

I've got this recommended previously, do you maybe have a good article or video about this so I can know more about it?

I think that you need to remove the sensor modules. One of them could be broken or not powered or there could be a shortcut in the PCB.

Teensy 4.0:

  • ARM Cortex-M7 at 600 MHz
  • Maximum output current of a pin: 4mA
  • Pins are not 5V tolerant.
  • 250mA output on the 3.3V pin
  • I2C bus at pin A4 and A5 (SDA = A4 = 18, SCL = A5 = 19). No onboard pullup resistors, no onboard I2C devices.

The Adafruit BMP280 module is okay, you can power it with 3.3V and 5V, and 5V power to VIN is a little better :heavy_check_mark:

The MPU-6050 module can also be powered with 3.3V and 5V, and 5V power to VCC is a little better. On the photo there are SMD components of "222". Those are 2k2 pullup resistors on the I2C bus to 3.3V. I assume there is a 4k7 pulldown on the AD0 pin. :heavy_check_mark:

Your total pullup is:
I don't know the internal pullup resistor for a digital pin. I'm using 50k in the calculation.
50k // 2k2 // 10k // 10k = 1482 Ω
The sink current for SDA and SCL = 2.2mA :heavy_check_mark:
It should be less than 3mA, so it is okay.

Conclusion: I can't find a problem. It could be a shortcut in the PCB. That shortcut is about 650Ω or one of the modules is broken or not powered.

Google "i2c pullup resistors". There's about a million web pages on this. For the best information, consult the NXP application notes on I2C.

Let me know if it is any good: https://github.com/Koepel/How-to-use-the-Arduino-Wire-library/wiki/How-to-make-a-reliable-I2C-bus

So what I understand for now is that:

Either I need a pullup resistor to be placed (is this still achievable since I have everything soldered on a custom designed PCB board)

Or a component is not working, the BMP280 or MPU6050 so I have to test them invidually and desolder them.

I think to be honest I need to have a pullup resistor there, it is the more likely scenario. How can I achieve this?

These are your pullup resistors at the moment. I have already spotted four of them in your circuit: 50k // 2k2 // 10k // 10k = 1482 Ω

Right, so the question is, if I can still do this and if so, how? My whole circuit is already there and soldered on my custom designed PCB.

@Koepel diligently checked which pullups are already there on your modules. Combined, they account for around 1.5k of resistance, which is more than strong enough for I2C pullups.

I think you need to go with his previous suggestion to start removing I2C modules from your board one by one until you find the culprit. Some desolder wire (copper braid) and flux will be your friends. I cannot guarantee you'll be able to cleanly take them off your PCB. Next time don't solder everything on there all at once, but first bread board test your setup, then design your PCB, and when it arrives/when you've manufactured it, solder on components one by one, checking all the time if everything works as anticipated.

I've just checked my voltages for the BMP280. It has a 4.5V comming in, SDA has a 3.54V connection, and the SCL has around a 0.75V connection, strange. This is the first slave connected to the teensy master.

I've also checked my voltage for the MPU6050. It has a 4.5V comming in, SDA has a 0.75V connection just as the SCL trace.

I know probably why my 2 sensors were not working, and it is so stupid

I had to purchase this BMP280: Adafruit BMP280 I2C or SPI Barometric Pressure & Altitude Sensor [Assembled] : ID 4059 : $11.95 : Adafruit Industries, Unique & fun DIY electronics and kits Instead, I think I purchased the following one: MPL3115A2 - I2C Barometric Pressure/Altitude/Temperature Sensor : ID 1893 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits

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