0

I have a small DS3231 RTC module, like the following, that I am trying to get to work with my PI 3 Model B. However it is not correctly being detected by the Pi.

DS3231 RTC module

Connected like so (ignore cables, they are for a 1-wire temp sensor)

enter image description here

Setup so far:

Enabled I2C with raspi-config

Contents of /boot/config.txt:

dtparam=i2c_arm=on
dtoverlay=i2c-rtc,ds3231
dtoverlay=w1-gpio,gpiopin=22 # unrelated to this topic

Contents of /etc/modules:

i2c-dev

Output of i2cdetect -y 1

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

I have confirmed the wiring of the board. VCC, SDA, SCL on the chip itself goes to the correct pins on the PI.

I also tried to wire SDA directly to ground, in which case, i2cdetect shows every possible address (which is expected seems to indicate i2cdetect, and the pi i2c interface works fine).

With a multimeter, I tried to take some measurements of the SDA pin, while simultaneously running i2cdetect. Doing this indicates that the SDA pin does go low for a short period of time when i2cdetect is run. I believe this indicates that the device is actually responding to the request of i2cdetect (as far as I understand it i2cdetect checks addresses by pulling SDA up, and waiting for a module signal its existence by pulling SDA down).

Running timedatectl I get no time on the RTC part.

Any suggestions on how to proceed? Could the RTC module be faulty if so is there some way to verify that? Is there some setup steps I have missed?

Thanks!

  • Could you provide a clear photo of the connections between the Pi and the RTC? – joan Nov 28 '18 at 19:57
  • @joan the module plugs directly into the PI with the headers on the module itself. Exactly like this (but stole the photo from elsewhere): cdn.shopify.com/s/files/1/0176/3274/products/… – Jacob Nov 28 '18 at 20:52
  • A photo would still be nice. People have been off by a row of pins, some people have plugged them in at the wrong end of the expansion header. – joan Nov 28 '18 at 21:35
  • Added an image of the connection. – Jacob Nov 29 '18 at 8:26
  • Unfortunately I can see nothing wrong. I suggest trying my piscope or monitor.py to try to see what is going on. Also confirm that the I2C pins are in I2C mode (e.g. pigs mg 2 mg 3 should return 4 4). – joan Nov 29 '18 at 10:37
0

This turned out to be a defective module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.