I was trying to set the time in my new Tiny RTC but it doesn't work.
The last code I proved is this one:
The monitor says:
The current date and time is: 165, 20165 153:165 PM
I believed that the direction in the code wasn't the right one, so I decided to try out this code to see which one is the correct:
As a result I get: "No I2C devices found"
Why it doesn't recognized the device?
I am using Arduino UNO and Tiny RTC I2C DS1307
I have made the conections as this:
Can anybody help me out?
How do you power your setup? Just by USB? The DS1307 is quite picky about the voltage of the supply power, especially if the module has a fresh backup battery. If the voltage drops below 1.25 times the battery voltage the module stops talking to the MCU. Fresh batteries often provide a voltage of 3.5 to almost 4V. If your USB voltage drops a little bit below 5V (which is often the case) you cannot communicate with the DS1307.
To set the time I conect Arduino to the PC by USB and I put the battery in the RTC. I've got more or less 6V of supply with the Arduino (I don't know why if it is said to be 5V) and 4.48 V in the battery, so at first it doesn't seemed to be the problem.
I don't know...
Are you sure your multimeter is measuring correctly? I think both values are relevantly bigger than usual. Try powering the Arduino with a 9V power supply.
Thank you for your answers.
.. I'm interested in the combination Arduino UNO + Tiny RTC so I only have 5 V to supply the RTC.
What I need is a the REAL time. I have just recieved the Ethernet Shield, could I conect to a server and take the real time? How can I do that?
First off, replace the battery in your multimeter. If it reads too high (like it does now)
Second, in Arduino Examples → Ethernet there is a NTP-example thar retrieves the time over the internet, and writes it to the serial terminal. You could easily change the code to suit your needs.