How to use wemos d1 mini and ds1302 rtc module together

I am doing a project for ringing a buzzer at specified times by fetching real-time data from ntp server using the wemos d1 mini using that I was able to fetch the real-time data from ntp and made a webserver for ringing the bell via a phone on the same network where on the webpage there is trigger button for ringing the buzzer. A time input option for ringing the buzzer at times that are not specified in the program now I need to use a ds1302 rtc module with the project so that there is no need to use the wifi module continuously what I want is the ntp data is fetched daily 2 to 3 times and that data is being given to the rtc module so that after that rtc module will work to ring the buzzer on the specified times and the correct ntp data given to rtc module will make the rtc module time accurate. the problem I'm facing is that when I use the ds1302 rtc module alone it works and shows the exact time and date but when used together with the ntp data the time and date shown are incorrect.

It's hard to follow what you are describing. I have read it through 3 or 4 times now and I still do not understand all of it. It might help if you use sentences and punctuation. Also please try to make it more succinct and less rambling.

Another thing you should do is read the forum guide in the sticky post. This will help you understand what you need to include in your post so that others can help you. This includes code and schematics.

From what I could understand, you want to add an RTC to the Wemos, but your reason for wanting to do that does not make sense to me. It seems the Wemos will always have a WiFi connection, so there is never a need for an RTC.

2 Likes

I suggest you redo your questions and put it in some semblance of order. What type of accuracy do you need, nanosecond or is 1 hour close enough? A few seconds a month is very achievable. Look at the DS3231 is accurate to 2ppm at 0-40 °C range.

You need to post your annotated schematic, we are not clairvoyant. Show an annotated schematic of exactly how you have wired it. Be sure to show all connections, power, ground, power sources, components such as caps, resistors, etc. You also need to post your code, use code tags as explained in the forum guidelines.

Please read the advice in the topic "How to get the best from this forum". How to get the best out of this forum

This page (click) shows you how to combine NTP with a RTC.
Leo..