I2C .96" OLED needs another I2C device on bus to work

Hi Guys,

I picked up a couple .96" I2C displays from fleaBay. One is by Heitec and the other Bangood and I have the same problem with both.

Using the I2C scanner sketch no I2C devices are detected if they are the only I2C devices hooked up, but if I hook up my I2C I/O expander then it finds the address of both the I/O expander and the OLED. And I can run the OLED on the ADAFruit and U8GLIB libraries just fine as long as the I/O expander is left hooked up.

Do these need pull up resistors? I don't have any 4.7K resistors on hand, I tried 10K and it didn't work, but if I hooked up the I/O expander and booted up and the display was working and then pulled power to the I/O expander the OLED will keep running, but it flickers.

What's the deal with these? Why don't they run like the I2C LCD displays and I/O expanders I've used in the past with zero issues? I found where some need pull ups, but no explanation as to why they would be needed.

Once running, they're pretty neat looking!

Thanks!

Steve

The i2C signal lines ALWAYS require pullups. This is because it is an open drain bus. Which means that pullups create the 1s on the bus signals and the slave and the master create the 0s. If there are no pullups, then there is nothing to "pull up" the signal to create the needed high level signals.

The Arduino wire library turns on the internal pullups for the i2c signal pins but they are very weak. While they can work in some situations, they are way out of spec and that is why it may work sometimes or with certain devices without external pullups on the bus signals.

10k should probably work, how did you hook them up? They don't go in series on the signals. One end of the resistor connects to the voltage (3v or 5v depending on your devices) and the other end connects to the signal. You only need 1 set of pullups per bus. (one on each signal)

If you have more than one keep in mind that the pullup resistance is reduce by the product divided by the sum of the ndividual resistances. Try to avoid reducing the overall resistance below about 1k.

--- bill

4.7K to 5V , 2.7K to 3.3V are better. If you look with an oscilloscope you'd see a big difference vs internal, and 10K.

Ah, I see, the internal pullups are turned on but are too weak for some things.

I installed them correctly, I know what a pull up resistor does, but it wouldn't fire it up on it's own, if I powered up the I/O expander then it would fire up and with the 10K pull ups I could then unhook the I/O and it'd keep running, it just flickered while it did it.

I'll pick some 4.7K up tomorrow and report back, I'm sure that'll work though.

Interesting the LCDs work without no hassles though..they're bigger though, probably got 'em built in to the backpack.

Thanks!

Steve

OK, picked up some 4.7K resistors and they work great if I'm running any of the U8glib demo programs, but they won't run the ADAFruit demos, when they boot up they just show random pixels on the screen. But once again, if I hookup another I2C device to the unit them the ADAFruit demos run.

What's up with that? Maybe I need a lower value resistor for the pull downs?

It's intersting U8glib runs perfectly.

Thanks!

Steve

OK, I found some 2K resistors, so I used them for the pull ups and now the ADAFruit library runs perfectly too.

Any issues running this lower value?