Shop OBEX P1 Docs P2 Docs Learn Events
Problems with DS1302 trickle circuit — Parallax Forums

Problems with DS1302 trickle circuit

ArchiverArchiver Posts: 46,084
edited 2001-11-13 12:08 in General Discussion
Hi guys,

was hoping someone could help me out with a problem i am having
connecting a 1Farad supercap for the backup of my DS1302 RTC.

I have connected everything up and am running the demo program from
the application kit (Title: DS1302_1.BS2 Author: Jeff A Martin Date:
5/18/98). I have built my own developemnt board with an 800mA 5V
regulator onboard.

Everything works fine without any backup. When I connect a 3V disc
type battery between the 0V (gnd) and the Vcc2 pin of the DS1302 it
all works fine and I can happily disconnect the power and the clock
keeps runing.

I then disconnected the battery and connected the 1Farad supercap. It
is connected to 0V and Vcc2 with an IN4007 diode between Vcc2 and
+5V. I have checked the diode is connected correctly.

When I try to run the program it has a date of 1/1/00 and a time of
00:00:80 (even though the program sets the date to 3:00pm 5/18/98)
This time does not change does not change even though the PC debug
screen indicates there is data being received.

It seems to lock the BS2 up as when I try to reload the program it
hangs or has no effect. I have to turn everything off and disconnect
the supercap and leave it turned off for 30 mins or so before I can
get the program running again. But if I connect the supercap to the
+5V again the program fails.

Any ideas?

Thanks
Col

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-11-11 05:57
    Col:
    I don't know about the 1302 but the 1307 has a voltage limit of 2
    volts to 3.5 volts max. You might check the appnote for the 1302 also check
    and make sure your 5 volt power supply can handle the instant charge current
    of the capacitor, might want to limit the current of the instant charge.
    Build a voltage divider to obtain 3.5 volt charge at the capacitor.
    Marv
    Original Message
    From: <aussiecol39@y...>
    To: <basicstamps@yahoogroups.com>
    Sent: Saturday, November 10, 2001 10:39 PM
    Subject: [noparse][[/noparse]basicstamps] Problems with DS1302 trickle circuit


    > Hi guys,
    >
    > was hoping someone could help me out with a problem i am having
    > connecting a 1Farad supercap for the backup of my DS1302 RTC.
    >
    > I have connected everything up and am running the demo program from
    > the application kit (Title: DS1302_1.BS2 Author: Jeff A Martin Date:
    > 5/18/98). I have built my own developemnt board with an 800mA 5V
    > regulator onboard.
    >
    > Everything works fine without any backup. When I connect a 3V disc
    > type battery between the 0V (gnd) and the Vcc2 pin of the DS1302 it
    > all works fine and I can happily disconnect the power and the clock
    > keeps runing.
    >
    > I then disconnected the battery and connected the 1Farad supercap. It
    > is connected to 0V and Vcc2 with an IN4007 diode between Vcc2 and
    > +5V. I have checked the diode is connected correctly.
    >
    > When I try to run the program it has a date of 1/1/00 and a time of
    > 00:00:80 (even though the program sets the date to 3:00pm 5/18/98)
    > This time does not change does not change even though the PC debug
    > screen indicates there is data being received.
    >
    > It seems to lock the BS2 up as when I try to reload the program it
    > hangs or has no effect. I have to turn everything off and disconnect
    > the supercap and leave it turned off for 30 mins or so before I can
    > get the program running again. But if I connect the supercap to the
    > +5V again the program fails.
    >
    > Any ideas?
    >
    > Thanks
    > Col
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-11 08:57
    Hi Marv,

    thanks for such a fast response, you are a life saver :-)

    The 1302 can handle up to 5.5 volts, but of course I didn't think
    about current.

    One 47k resistor later, (was the only one I had on hand) and
    voila .... everything working again.

    Thanks again.

    Cheers Col

    --- In basicstamps@y..., "Marv Skinner" <marvskinner@e...> wrote:
    > Col:
    > I don't know about the 1302 but the 1307 has a voltage
    limit of 2
    > volts to 3.5 volts max. You might check the appnote for the 1302
    also check
    > and make sure your 5 volt power supply can handle the instant
    charge current
    > of the capacitor, might want to limit the current of the instant
    charge.
    > Build a voltage divider to obtain 3.5 volt charge at the capacitor.
    > Marv
    >
    Original Message
    > From: <aussiecol39@y...>
    > To: <basicstamps@y...>
    > Sent: Saturday, November 10, 2001 10:39 PM
    > Subject: [noparse][[/noparse]basicstamps] Problems with DS1302 trickle circuit
    >
    >
    > > Hi guys,
    > >
    > > was hoping someone could help me out with a problem i am having
    > > connecting a 1Farad supercap for the backup of my DS1302 RTC.
    > >
    > > I have connected everything up and am running the demo program
    from
    > > the application kit (Title: DS1302_1.BS2 Author: Jeff A Martin
    Date:
    > > 5/18/98). I have built my own developemnt board with an 800mA 5V
    > > regulator onboard.
    > >
    > > Everything works fine without any backup. When I connect a 3V disc
    > > type battery between the 0V (gnd) and the Vcc2 pin of the DS1302
    it
    > > all works fine and I can happily disconnect the power and the
    clock
    > > keeps runing.
    > >
    > > I then disconnected the battery and connected the 1Farad
    supercap. It
    > > is connected to 0V and Vcc2 with an IN4007 diode between Vcc2 and
    > > +5V. I have checked the diode is connected correctly.
    > >
    > > When I try to run the program it has a date of 1/1/00 and a time
    of
    > > 00:00:80 (even though the program sets the date to 3:00pm 5/18/98)
    > > This time does not change does not change even though the PC debug
    > > screen indicates there is data being received.
    > >
    > > It seems to lock the BS2 up as when I try to reload the program it
    > > hangs or has no effect. I have to turn everything off and
    disconnect
    > > the supercap and leave it turned off for 30 mins or so before I
    can
    > > get the program running again. But if I connect the supercap to
    the
    > > +5V again the program fails.
    > >
    > > Any ideas?
    > >
    > > Thanks
    > > Col
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@y...
    > > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-11 17:29
    Hi Col,

    I've seen two differents app notes about the DS1302 on Parallax's website
    (or elsewhere...). The good one is "DS1302 Timekeeping Chip.pdf" 162 KBytes
    (see DS1302_3.BS2 for the Trickle Charge). The other one, "DS1302 Real-Time
    Clock.pdf" 100 KBytes is uncomplete.

    You don't need any external component to use the trickle charge function !
    You just need to connect the supercap between Vcc1 (pin 8) and ground. The
    normal power supply comes on Vcc2 (pin 1).
    There are two diodes and three resistors built-in. You can enable one or two
    diodes and one of the resistor. The configuration is made by writing a bit
    pattern to the DS1302.

    I think you'll find the best way to use the DS1302 properly in Application
    Note 82 on DALLAS SEMICONDUCTORS's website. It's very complete and useful.
    If you can't find it, I can send it to you.

    Enjoy,

    Phil.


    Original Message
    From: <aussiecol39@y...>
    To: <basicstamps@yahoogroups.com>
    Sent: Sunday, November 11, 2001 6:39 AM
    Subject: [noparse][[/noparse]basicstamps] Problems with DS1302 trickle circuit


    > Hi guys,
    >
    > was hoping someone could help me out with a problem i am having
    > connecting a 1Farad supercap for the backup of my DS1302 RTC.
    >
    > I have connected everything up and am running the demo program from
    > the application kit (Title: DS1302_1.BS2 Author: Jeff A Martin Date:
    > 5/18/98). I have built my own developemnt board with an 800mA 5V
    > regulator onboard.
    >
    > Everything works fine without any backup. When I connect a 3V disc
    > type battery between the 0V (gnd) and the Vcc2 pin of the DS1302 it
    > all works fine and I can happily disconnect the power and the clock
    > keeps runing.
    >
    > I then disconnected the battery and connected the 1Farad supercap. It
    > is connected to 0V and Vcc2 with an IN4007 diode between Vcc2 and
    > +5V. I have checked the diode is connected correctly.
    >
    > When I try to run the program it has a date of 1/1/00 and a time of
    > 00:00:80 (even though the program sets the date to 3:00pm 5/18/98)
    > This time does not change does not change even though the PC debug
    > screen indicates there is data being received.
    >
    > It seems to lock the BS2 up as when I try to reload the program it
    > hangs or has no effect. I have to turn everything off and disconnect
    > the supercap and leave it turned off for 30 mins or so before I can
    > get the program running again. But if I connect the supercap to the
    > +5V again the program fails.
    >
    > Any ideas?
    >
    > Thanks
    > Col
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-11 19:21
    I have successfully used the DS1302 with the trickle charger and a supercap.
    Remember that you have to turn on this feature with a software command. You
    have control over how much charging current you want to provide. The Vcc1
    and Vcc2 seem backwards to me but they do work as advertised. I have left the
    circuit unpowered for about 6 months and the RTC still has kept track of time
    and date when I powered it back up again.
    George (azeasi)
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-12 05:58
    Why the 1n4007 diode? You don't need it! Sounds like your supercap is
    connected backwards (wrong polarity) or shorted! The markings on the
    supercaps are somewhat confusing. I have used several different supercaps and
    all work fine.
    george (azeasi)
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-13 12:06
    Hey Phil,

    thanks for the advice. i checked the Parallax site and found the
    better app note. Also found AN82 on the Dallas site. it explains it
    all. Now it makes sense :-)

    Haven't had a chance to rip the extra bits out and try, but I am sure
    it will be the answer.

    Cheers, and thanks again.

    --- In basicstamps@y..., "Philippe Derenne" <derennep@s...> wrote:
    > Hi Col,
    >
    > I've seen two differents app notes about the DS1302 on Parallax's
    website
    > (or elsewhere...). The good one is "DS1302 Timekeeping Chip.pdf"
    162 KBytes
    > (see DS1302_3.BS2 for the Trickle Charge). The other one, "DS1302
    Real-Time
    > Clock.pdf" 100 KBytes is uncomplete.
    >
    > You don't need any external component to use the trickle charge
    function !
    > You just need to connect the supercap between Vcc1 (pin 8) and
    ground. The
    > normal power supply comes on Vcc2 (pin 1).
    > There are two diodes and three resistors built-in. You can enable
    one or two
    > diodes and one of the resistor. The configuration is made by
    writing a bit
    > pattern to the DS1302.
    >
    > I think you'll find the best way to use the DS1302 properly in
    Application
    > Note 82 on DALLAS SEMICONDUCTORS's website. It's very complete and
    useful.
    > If you can't find it, I can send it to you.
    >
    > Enjoy,
    >
    > Phil.
    >
    >
    >
    Original Message
    > From: <aussiecol39@y...>
    > To: <basicstamps@y...>
    > Sent: Sunday, November 11, 2001 6:39 AM
    > Subject: [noparse][[/noparse]basicstamps] Problems with DS1302 trickle circuit
    >
    >
    > > Hi guys,
    > >
    > > was hoping someone could help me out with a problem i am having
    > > connecting a 1Farad supercap for the backup of my DS1302 RTC.
    > >
    > > I have connected everything up and am running the demo program
    from
    > > the application kit (Title: DS1302_1.BS2 Author: Jeff A Martin
    Date:
    > > 5/18/98). I have built my own developemnt board with an 800mA 5V
    > > regulator onboard.
    > >
    > > Everything works fine without any backup. When I connect a 3V disc
    > > type battery between the 0V (gnd) and the Vcc2 pin of the DS1302
    it
    > > all works fine and I can happily disconnect the power and the
    clock
    > > keeps runing.
    > >
    > > I then disconnected the battery and connected the 1Farad
    supercap. It
    > > is connected to 0V and Vcc2 with an IN4007 diode between Vcc2 and
    > > +5V. I have checked the diode is connected correctly.
    > >
    > > When I try to run the program it has a date of 1/1/00 and a time
    of
    > > 00:00:80 (even though the program sets the date to 3:00pm 5/18/98)
    > > This time does not change does not change even though the PC debug
    > > screen indicates there is data being received.
    > >
    > > It seems to lock the BS2 up as when I try to reload the program it
    > > hangs or has no effect. I have to turn everything off and
    disconnect
    > > the supercap and leave it turned off for 30 mins or so before I
    can
    > > get the program running again. But if I connect the supercap to
    the
    > > +5V again the program fails.
    > >
    > > Any ideas?
    > >
    > > Thanks
    > > Col
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-13 12:08
    Hi George,

    Thanks for the advice. The app note I had suggested I needed an
    external diode - and who am I to question an App Note :-)

    Thanks to everyones help I now have it sorted, with no external
    components.

    Cheers
    Col

    --- In basicstamps@y..., azeasi@a... wrote:
    > Why the 1n4007 diode? You don't need it! Sounds like your supercap
    is
    > connected backwards (wrong polarity) or shorted! The markings on
    the
    > supercaps are somewhat confusing. I have used several different
    supercaps and
    > all work fine.
    > george (azeasi)
Sign In or Register to comment.