Shop OBEX P1 Docs P2 Docs Learn Events
Scribbler S2 Real Time Clock — Parallax Forums

Scribbler S2 Real Time Clock

bee_manbee_man Posts: 109
edited 2012-04-05 17:20 in Robotics
I always seem to need a RTC so I decided to add one to the S2. Its an easy upgrade with a DS1307 since it is I2C.
There always seems to be a discussion as to which RTC is the best. I prefer the DS1307 because it is easy to piggyback on the I2C
bus thus taking up no I/O pins. It is a 5v device but most boards, even prop boards, have 5v somewhere.

Required parts:
DS1307 RTC SO
32,768kHz Crystal 12.5pF
3v lithium battery


Step 1: Straighten pins 1,2,3,7,8
Bend pins 4,5,6 slightly downward

Step 2: Solder the crystal across pins 1 & 2

Step 3: Piggyback the DS1307 onto one of the EEPROMs of the S2
(I choose the forward one since it was easier to access when soldering the leads)
Carefuly solder pins 4,5,6

Step 4: Solder a short piece of wire from pin 8 to TP19 (5v) on the S2 black wire running forward in the photo ~1in long

Step 5: Solder a small 3v button battery across pin 3 (+) and pin 4 (gnd) I tucked the battery on the far left side of the S2 where
there is several small out of the way cubby holes

Step 6: Test it with the DS1307_RTCDemo program from the object exchange.

Next project is to get a pen lifter so I can write the time and date.
1024 x 768 - 51K
1024 x 768 - 31K
1024 x 768 - 150K
1024 x 768 - 159K

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-04-04 22:33
    That's a nicely done addition to the S2, bee_man!
    Next project is to get a pen lifter so I can write the time and date.
    Why not incorporate a whiteboard eraser, too, while you're at it. Then you could have a continuously-running digital clock! :)

    -Phil
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-05 06:51
    Good project! A clock is a nice addition to any robot and I've been meaning to add one and play around with it. You can have the robot do a set of different fixed actions based upon time. (e.g. wall follow at one time, roam at another, photovore). So the robot's behavior set becomes more rich.

    I think for microcontrollers that support I2C the 1307 is the better chip. As you say no additional pins are consumed and odds are there's an interface library to hide the serial protocol. Although the BS2 can do I2C via bit banging, it uses up code space and is slower, so I would think the 1302 is a better choice. I've never run out of space on the BS2e and setting aside one bank for an I2C library that uses the scratch pad for inputs and outputs would make the 1307 useful there too.

    BTW You have nerves of steel. I don't think I could take a soldering iron to a working surface mount board.
  • ercoerco Posts: 20,256
    edited 2012-04-05 09:16
    Nice app, bee_man! Your I2C solution is more straightforward than mine, which required the ADC0831 shown. :)
    612 x 816 - 54K
  • ercoerco Posts: 20,256
    edited 2012-04-05 09:24
    Why not incorporate a whiteboard eraser, too, while you're at it. Then you could have a continuously-running digital clock! :)

    -Phil

    That would finally outdo this guy: http://www.ebaumsworld.com/flash/play/918898/
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-04-05 09:35
    Heh, that's pretty cool. I don't think we'd require the S2 to do seconds, though, just minutes. :)

    -Phil
  • PublisonPublison Posts: 12,366
    edited 2012-04-05 12:30
    erco wrote: »
    Nice app, bee_man! Your I2C solution is more straightforward than mine, which required the ADC0831 shown. :)

    I think H.G. Wells already had a patent on that.
  • bee_manbee_man Posts: 109
    edited 2012-04-05 17:20

    Why not incorporate a whiteboard eraser, too, while you're at it. Then you could have a continuously-running digital clock! :)

    -Phil

    I'll get right on it. Maybe I'll have it ready for the UPEC.
Sign In or Register to comment.