DS3231 SCL/SDA Resistors

Simple question, the wiring diagram for the DS3231 Adafruit module shows a 10K resistor on the SCL and SDA lines leading to VCC, are these meant to be in series as current limiting resistors, or are these supposed to be I2C pull down resistors? See diagrams, is the right or left one correct?

Neither is correct.

I don't understand why you correctly said:

Then posted 2 schematics neither of which shows the resistors going to Vcc. The resistors go to Vcc, not to ground and not in series with anything. They are pull up resistors.

1 Like

I would concur, neither of those schematics look correct.

But why does a 'DS3231 Adafruit module' have a ATmega328 processor on it in the first place ?

Sorry, I should have been more clear here. The drawing provided are of a microcontroller project I am working on. That's why there is an ATMEGA, the actual Adafruit module shows this:

I want to make a custom PCB with a DS3231 on the same board as essentially an Arduino NANO.

My confusion is that SDA and SCL should be going to the corresponding pins on the ATTMEGA (usually pins A5 and A4) but then why are there resistors here?

I2C needs pull up resistors to work. The resistors are not provided in the chips that use I2C, they have to be provided externally. Many boards that use I2C have pull up resistors provided on them so you don't have to add them yourself, as is the case here.

1 Like

Okay so if I understand correctly, the circuit should look like this?

Yes, that's better.

Note you only need 1 set of pull up resistors. However, as many boards come with them fitted it's easy to end up with several in parallel. Ideally the resistance between Vcc and SCL / SDA should be between about 1k and 4k (rule of thumb). Do you know how to add resistors in parallel to get the total?

Also, if it works don't worry about it too much.

Perfect thank you, I'm getting that the resistors should be around 3.3Kohms by:

1Kohm < (1/R1+1/R2)^-1 < 5Kohm 3.3Kohm gives 3Komh Req.

1 Like

Read this discussion on I2C:

http://www.gammon.com.au/i2c



4.7 K looking okay:
image


2.2k good


1K getting bad:
image

1 Like

The schematic of Adafruit has the 5V pointing upward and the GND downward.
I fixed it for you :wink:


I leave it up to you to rotate the resistors 90 degrees and put the DS3231 in a normal orientation.

1 Like

Is this just a standard practice for formatting and clarity of is that change actually important in other ways?

Not important, just to make it look nice.

O no, this is the newest Arduino schematic : Arduino Uno Mini limited edition
There are twelve GND symbols pointing sideways and a few 5V pointing sideways and even a 5V pointer downwards :face_vomiting:

1 Like

Certainly is - avoids confusion. Convention always has been, up on the diagram indicates the positive supply voltage (certainly from the olden days of using "valves" or "vacuum tubes") and down indicates "ground" or the negative supply voltage. Not the use of "HIGH" and "LOW" as logic terms.

Similarly, inputs come in from the left and outputs go to the right. Possibly different for Arabic or Hebrew readers. :rofl:

1 Like