I have an existing Arduino Uno project. It uses a third-party 3.3V I2C OLED display. I want to add a Sparkfun I2C RTC clock (1st link below) and put all I2C devices on Qwiic, to reduce cabling. I don’t have a space for a new shield. My understanding: for the existing 3.3V I2C OLED (no Qwiic), i need the small Qwiic breakout (2nd link), then just connect it to the RTC with an Qwiic cable. But how do I link this new Qwiic arrangement to the Arduino’s I2C/power?
You need the real-time RTC. It has 2 Qwic connectors, that are connected, so you can daisy-chain to the next device.
You will properly need 2 cables( ( https://www.sparkfun.com/products/14425):
cable to connect the RTC to the Arduino
cable to connect from the RTC to your OLED
You can also consider buying the cable kit (https://www.sparkfun.com/products/15081)
Thanks, Paul. So on Arduino’s side, I just solder the Qwicc leads to GND/3.3V/SDA/SCL and that’s it? Reading the Qwiic description, I read something about autom. conversion between 5V and 3.3V, so I thought attaching the Qwiic cable to an Arduino needs some voltage circuit in-between. I gather from your post that as long as my Qwiic breakout boards or displays are 3.3V or have Qwiic connectors, I don’t have to worry about the voltage on the Qwiic
Yep, you are correct in the connection to the Arduino. Qwicc is about connector and cable. No logic or level converter involved.
One more thing that’s confusing to me. On an Uno, the SDA and SCL logic levels 5V. So, with an Uno, Qwiic takes 3.3V for the power voltage and 5V for the logic levels?
The Arduino can handle 5V, but on I2C it is not PUSHING 5V. I2C is only PULL-DOWN to GND. Hence on I2C you always need a Pull-up resistor on the SCL and SDA line. An Uno does not have pull-up resistors on the board. The RTC has pull-up resistors to 3V3.
Normally a 3V3 signal is sufficient for the Arduino to detect a 'High", meaning the line is not pull-down low by any device on the I2C channel.
The only aspect ‘could’ be if your display ALSO has pull-up resistors on the board. Too many in parallel can cause problems. Hence you are able to cut a link on the RTC board to disable pull-up on that board.
I would give it a try first without modifying.
I hooked up the RTC (1st link below), it works OK via Qwiic leads soldered to the Arduino (3.3V/GND/SCL/SDA) and its Github lib. But now the 3rd-party OLED display doesn’t work. It worked in the past via I2C, using a 5V->3.3V level changer (including on SCL & SDA). Now the screen is black, the Arduino code stops on the display’s first SSD1305_begin() statement, With the RTC attached, the OLED works neither in its previous setup (5V->3.3V level changer), nor via the tiny Qwiic adapter (2nd link, connected to the RTC). Originally, there were 0 Ohm resistors on the back of the OLED (image below). I removed them and soldered the pads for the I2C configuration directly (this is how the display worked in the past on I2C). The display is connected to the Qwiic adapter per the WIki: VCC->3.3V, GND->GND, DIN->SDA,CLK->SCL. Any idea how I should proceed?
https://i.ibb.co/X83YDGP/Brave-005078.jpg
https://www.sparkfun.com/products/16281
not sure you should remove the resistors completely. I2C needs pull-resistors. Looking at the schematics of the board I see they are connected to DC, CLK and DIN (I assume these are the middle points on where to solder the resistor). BUT maybe these resistors (4k7) are connected on the I2C side. Try to solder the middle point with the bottom (i2C) and the connection wire.
What does an I2Cscanner (like https://playground.arduino.cc/Main/I2cScanner/) do? Does it detect the OLED Hat ?
Are you sure you have not switched the SDA and SCL line? Maybe try it…
Thanks. By “resistors” I meant the 6 sets of 3 pads on the right, where you select the interface (default SPI / I2C). In the Wiki, they’re described as “0R resistors” (quote below) To me, they sound like jumpers: no resistance, just connection. On the schematic, I think they’re the H1-H6 pads, bottom left. I didn’t touch the actual resistors on the left in the photo (presumably where the 4.2 pull-ups are). I have an I2C scanner in the code, I’ll run it tomorrow. First I wanted to verify hardware connections. I checked the continuity Arduino/RTC/OLED on 3.3V/GND/SDA/SCL: it’s OK.
Wiki: “The interface of 2.23inch OLED HAT is default SPI interface, that is 0R resistors are soldered to SPI sides. If you want to use I2C interface, you need to solder the 0R resistors to I2C side”
Hm, I just checked continuity between the middle points (SPI/I2C pads) and the pin connectors, For some reason, there’s no continuity on 3.3V. Tomorrow, I’ll try to connect 3.3V directly to the leftmost middle point, bypassing the pin. If it still doesn’t work, it’s possible that the 3.3V line on the OLED is fried.