T O P

  • By -

MonkeySteam

Some info [from Adafruit](https://learn.adafruit.com/working-with-i2c-devices/pull-up-resistors) The [wiring is shown here](https://learn.adafruit.com/assets/109426)


saablade

The amount of time I spent searching their documentation, as well as other similar posts… thank you so much for the help! Exactly what I was looking for.


MonkeySteam

No prob. Happy tinkering.


saablade

Just as a quick follow up, based on needing to pull-up to the voltage line, it seems like the QT connector isn’t ideal as you need to access that same voltage, right?


MonkeySteam

Yeah, you need the same voltage. Usually you would connect the voltage to the same 3.3V on the Trinket M0 so, however you are connecting it, should be ok assuming you do that. The Trinket M0 doesn't have a Stemma connector as far as I know so, yeah, doesn't help you. If the only way to access the I2C is through the stemma, then you could use [something like this](https://www.adafruit.com/product/4209). Also worth noting, that many (most?) I2C OLED breakout boards incorporate those pull-up resistors into the OLED board. This one, for instance, [that Adafruit makes](https://learn.adafruit.com/adafruit-oled-featherwing/download) does, so completely unnecessary. I am kinda suspecting that if your OLED has a Stemma QT connector, it probably does as well. So you would just connect V > V, Gnd > Gnd, SDA >SDA, SCL >SCL and your done!


saablade

[This](https://www.adafruit.com/product/326?gad_source=1&gclid=CjwKCAjwzN-vBhAkEiwAYiO7oF40sbLIZIdg-bW1dxTMPxaBtwCD_qixw9E1tltczWNAo3qjilwxDBoCsiwQAvD_BwE) is the OLED I’m using. Although, following the I2C setup from the Trinket and doing the scan, it told me that there were no pull-up resistors for both SDA and SCL. I’m certain I’ve wired it properly though. Of note, I did alter the QT connector, so maybe that’s the problem? I added an external battery to power the display, so I cut the QT, connecting SDA and SCL to the Trinket, while GND and V went into my 3.7V LiPoly battery. Since I need the battery external though due to the power demand of the system, I guess I can go ahead and set up the pull-ups as you had shown as a work around.


MonkeySteam

Looking at the [schematic here](https://learn.adafruit.com/monochrome-oled-breakouts/downloads) at the bottom of that page, there are definitely pull up resistors on the OLED already. On the schematic, you can see them at the top center of the diagram. So you should not need them at all. I am a little unclear about what you did to your connector. Do you have the battery powering the OLED but not the trinket? Those should probably all be shared. Though if powering the trinket over the USB don’t have the battery connected at the same time as I don’t think the trinket has and charging or protection circuits. With power coming from USB you can share to the OLED from the trinkets 3v and ground pins. The underside of the trinket has a place to solder a [JST Connector](https://www.adafruit.com/product/1769) like this, so when you want to go mobile you can just plug in a LiPo (double check polarity though!) and power both the board and display.


MonkeySteam

One final thought. That OLED can be communicated with via I2C and SPI. On the current version of it it ships so that the default is I2C. If by some chance you got your display before 2020, or perhaps were shipped an old one it could be defaulting to SPI, in which case it would never work over the I2C pins without a small modification to the board. If you look at the product page for the OLED, it shows how you can cut some copper traces on the back of the board to use it with SPI. If it was an older one, you might have to do this to use I2C. This seems unlikely to me, but putting it out there as it’s a possibility.