Esp32 with RTC ds1307 - do not work

Hi,

I have tried to use de RTC DS1307 - PCB HW-111 on ESP32 - TTGO, but nothing happening.
I just tried to check the SDA and SLC port, but nothing....

Maybe someone have any idea?

When you ran the I2C scanner what were the scanner results?

Uh, what's a I2C scanner? Use the internet to find out.

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

And now you know how to properly post your code, right?

DS1307 is a bad choice for an ESP32. Because it pulls up its I2C lines to 5V.

Hi,
Do have you the pull up resistor installed? Try connect a 10K resistor to the sda and clk to the 3.3 volts.

Why not use the ESP32's internal RTC?

Thanks for your attention.
I used the same procedure mencionated in the link this post. The I2C scanner did not found nothing, I have tested with other shild and I2C scanner found correct.

I did not put my code, because I just trying to running the examples of library.

Thanks.
I used it, because I had it...

You also have a hammer ?

If there is internet access, see this thread:

Thanks!
I did not try use resistor on SDA and SCL.


I have tried to use VCC with 5V and 3.3V, but nothing happening.

Do I need batery to use it?

Hahahaha
Yes!

The ESp32's RTC does not have a battery. Upon boot and once every 24 hours I have the ESP32 request an updated time.

If the I2C scanner cannot find the device then it may be a hardware issue.

And don't forget post number 3. The GPIO pins may have been destroyed with 5V on them.

Hi,
Found the schematic for the RTC ds 1307 it is attached and it had the pull-up resistors already installed to the VCC that it is 5 volts. You may need a voltage divider to drop the voltage from 5 volts to 3.3 volts to sda and the scl.

Hi,
One thing you can try it is connect the Vcc to the 3.3 volts. I do not know what voltage your are using for the Vcc.

DS3231 is a better choice. Works on 3V3 and has better accuracy.

DS3231 don't need extern crystal. Accuracy ±2ppm from 0°C to +40°C. ±5sec./month. 86400s/day * 30 = 2 592 000s/month * 2 / 1 000 000 = 5,184s.

Accuracy ESP32 5% accurate. = 86400s/day * 5 / 100 = 4 320s/day or 180s/hour.

Normal not. The battery is only used if the IC hasn't external power to run the RTC and hold the correct time info.

no 32 khz crystal. less accurate than a cuckoo clock.

I have the same aggravation with Lilygo T Beam and T3 V1.6 OLED LoRa ESP32s. They do not see I2C devices on pins 21 and 22. The T3 V1.6 OLED LoRa ESP32s see their attached OLEDs, the T Beams see the OLED that comes with them if you connect it, but devices connected to the specified pins do not show up, with or without 2.2 k pullup resistors

Thanks!

I tryed with 3v3, but nothing... I will try putting a resistor.

Hi,
In post 2 Idahowalker asked you if you ran the I2C scanner. You should run it to see if it can find the rtc module. To run it go to FILE/Examples/ look thru the list to find I2Cscanner and select one of the 3 showed. Once you run it it should showed the address of 0x68. If not then you need to find out why it does not find the module.

1 Like