Electronics > Beginners

Why do these modules refuse to work together?

(1/4) > >>

Rishles69@:
so when i connected the modules (bmp180, mpu6050, hmc5883l, ssd1327 oled) one by one, the modules worked fine. But when i connected the modules together, the oled glitched. i connected Scl and Sda of the modules together (no power) the display doesn't turn on and the ide says display not initialised. i connected the mpu6050 and hmc5883l together with power, it works fine and when i connected the mpu6050, hmc5883l, ssd1327 oled , the display glitches! (without bmp180) whats happening here? is the scl and sda are glitching? (when i connected all of them together, i uploaded the code only for display and it glitches out!) what the hell is happening now?

microbug:
Each module probably has its own I2C pull-up resistors. With all the modules connected, the pull-up resistors are in parallel and the effective pull-up resistance is much lower (so more current goes through the switching transistors). When the pull-up resistance is too low, the OLED driver IC can't pull SDA or SCL low.

First, measure the pull-up resistance with all modules connected (the resistance between SDA and VCC, and the resistance between SCL and VCC). If it's less than 1kOhm, remove the pull-up resistors from one of your modules and try again. Keep going until the pull-up resistance is >1kOhm.

selcuk:
Since the drivers of the I2C bus only pull down, and the resistors pull up, the impedances of the logic levels are different. When you drive the clock line to ground strongly, it causes glitches on the data line via capacitive coupling while data is at high level through the resistor. You didn't mention but if you make I2C connections with cables, I recommend you to separate clock and data. For example, you may connect (twist) clock and ground together and data and vcc together. If you use a twisted pair cable and twist I2C clock and data together, that causes issues even with slow data rates.

Rishles69@:
ok..., when i take a look on these modules i saw a 10k pull up resistors. But it can't be seen on the ssd1327 display (as you can see in the image). I searched up for the schematics and saw a 4pin generic version and it has a 10k pullup! (see image 2) so is it possible to add a 10k pullup on the scl and sda of the display?. Also im using 2x mcp23017 16bit gpio expander and should i add a 10k pullup for that also?

LM21:
You need only one pull-up resistor.  No  need to to ADD a resistor.  If the problem is what others here suspect,  your total resistance is too low. Adding resistors makes it worse.

How long is the total length of your SDA or SCL wires. I2C bus has a limit there.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod