Trouble with DS1307 battery backup


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: Trouble with DS1307 battery backup

    Very likely a wiring problem. Did you place two diodes to isolate the battery from power?

    You can have more help if you post the schematic.

    Cheers

    Al.
    All progress began with an idea

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Trouble with DS1307 battery backup

    Quote Originally Posted by aratti View Post
    Very likely a wiring problem. Did you place two diodes to isolate the battery from power?


    Al.
    You do not need your suggested diodes - if you look at the data sheet the backup battery has its own pin, and the battery should be connected to that and ground.

  3. #3
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Trouble with DS1307 battery backup

    I was thinking more like stray capacitance issues, or I2C resisters of wrong value (3K3)- something of that nature; maybe battery back-up voltage (3.32V) issue. Wiring the battery could hardly be easier and I've looked, until my eyes crossed, at the holder to be sure there was nothing wrong with it. I think I'll try a different battery, but I've already tried a different 1307 and a different 12.5 pF crystal, verified wiring- exact same result. Circuit is rock solid, just goes "404" on me when the battery is inserted.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Trouble with DS1307 battery backup

    What happens if you leave the battery inserted? Can you then reprogram the time?
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Trouble with DS1307 battery backup

    No... The LCD initializes, then displays "TEST" on startup or reset (both work fine, even with battery inserted), then clears the LCD and displays the time in a simple loop. Function is consistent regardless of battery, except the display remains fixed at 04:04:04 with the battery in place.

    Reprogramming sets the time registers to the startup value, but 04:04:04 continues to be displayed until the battery is removed.

    In exercising your suggestion, Dave, it appears that the clock continues to function correctly (and accurately) while the display is erroneous; rather it is some anomaly in the I2C that affects the output or display! What is the likelihood that different (lower? Higher?) I2C pull-ups would resolve this?

    EDIT: Appending or propending text before or after the time displays as expected as well.
    Last edited by Amoque; - 30th August 2014 at 16:15.

  6. #6
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Trouble with DS1307 battery backup

    Ok, mystery solved.

    It appears that noise, capacitance, or competing residual signal on the breadboard was causing issue. Running the voltage supply directly to the circuit board resolves all issues. Thanks all - and you particularly you Dave, for putting me on the right track.

  7. #7
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Trouble with DS1307 battery backup

    Ok, after further research, it appears related to battery voltage. The "new" battery I purchased reads over 4 volts. Just a head-up to others: something to look at if you're getting wonky readings from your DS RTC. I clipped a high draw LED to it for a bit - works flawlessly now. Sorry for the "Much ado about nothing."

Similar Threads

  1. Replies: 13
    Last Post: - 22nd January 2012, 04:48
  2. Without resetting....Switching PIC over to Backup Battery
    By financecatalyst in forum Schematics
    Replies: 5
    Last Post: - 29th December 2010, 14:23
  3. Sampling A/C with battery backup.
    By Dwayne in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th April 2004, 20:39
  4. Battery backup with long delay
    By Dwayne in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th January 2004, 20:38
  5. Battery Backup with PIC controlling switch
    By Dwayne in forum Schematics
    Replies: 1
    Last Post: - 27th December 2003, 13:16

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts