DS1307 battery discharge to quickly.

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I face some problem. I start to use real time clock module with EEPROM 32K -> DS1307:

Battery should power clock chip in case outer power down and keep clock ticking.

But module share same power supply as main microcontroller board and other modules...when main power out battery start to akt as main power supply for all...buttery quickly discharge down to 0 (as I guess) and clock brake down (less then 24 hours).

How long 3V battery can hold clock chip running I don't know. I need more than 24 hours. Any suggestions how fix can be done???

Also I have DS3231 but do not test this module. Witch module is better DS1307 or DS3231??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Witch module is better DS1307 or DS3231??

DS3231 is MUCH, MUCH better. However if the board is not designed correctly then you will have the same problem.

 

Do you have diagrams for the boards? Does the battery also power up the memory chip? (I see it's EPROM not RAM) The battery should be isolated from VCC by low drop out diodes or clock chip internal electronics in case of the DS3231.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Thu. Feb 28, 2019 - 01:27 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A CR2032 battery should keep the DS1307 running for years. With the cheapy boards out of china, the batteries are suspect and the DS1307 is suspect. I'd try another battery. If it only lasts 24 hours, then there's other problems methinks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So DS3231 has electronics witch protect internal battery from trying to powering all other boards and modules witch connected to main power supply?

Last Edited: Fri. Mar 1, 2019 - 10:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

All RTC chips protect the VBAT from powering external components.

 

If the RTC chip detects that VCC < VBAT,  it will turn off I2C and just maintain the XTAL clock and RTC registers.

 

Think about it.    Coin cells have limited capacity.

Note that some Ebay modules deliberately f*** the VBAT circuitry.

You can do your own detective work e.g. follow pcb traces and draw schematic for your module.

 

I think that the Coin cell in your photo is a "rechargeable" type.    Hence the crap performance.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When I disconnect main power supply my Atmel-ICE (still connected to board) detect that board with power supply (green LED on Atmel-ICE is on) and I can read microcontroller in AtmelStudio.

So coin cells battery akt as main power supply... quickly discharge... clock stop ticking. I guess VCC and GND module pins connectes straight to battery in DS1307.

DS3231 will tested and report my results (if someone interested).

If some know good way to manage two power supply (first battery akt as main...second akt as emergency) with instant switch from first to second in case first battery go down...share plese electronic schema...apreciate it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So DS3231 has electronics witch protect internal battery from trying to powering all other boards

So has the DS1307 from looking at the datasheet provided it has been wired correctly.

 

I was confusing the DS1307 with another RTC chip (from Dallas or NSD??) I used a few years ago that could use rechargeable super capacitor, it required low drop out diodes from VCC.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Get a diagram from the people you got the board from or draw your own.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I found this:

 

https://www.itead.cc/wiki/IIC_EE...

 

 

They mention a rechargeable Lithium battery - so that needs to be charged and will take some time (10 hours??). The circuit needs to be modified if you use a standard CR2032 button cell - R4 and R5 need to be removed.

 

Also - power the board via the VCC pad, not BATT.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

CR2032 are non rechargable, while the LIR ..... are rechargable button cells.

https://en.wikipedia.org/wiki/Button_cell

 

For trouble shooting you can also connect a Lab Power Supply to the battery terminals via a 10kOhm series resistor (remove battery) and then measure the voltage over the 10k resistor.

U = I * R => 

I = U / R =>

1V / 1e4 = 1e-4 = 100uA, or each mV is 100nA.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com