Shop OBEX P1 Docs P2 Docs Learn Events
Long-Term Prop clock — Parallax Forums

Long-Term Prop clock

QUARKSPINQUARKSPIN Posts: 36
edited 2010-09-07 23:26 in Propeller 1
I have a cousin, who got married about a year ago. His anniversary is coming up and I'd like to get him something propeller-related, as he is a geek himself. However he doesn't have enough time to play with a development board, do I decided to to make a micro-controlled picture frame. My idea is to have a LED display at the bottom, displaying how many seconds he has been married.

So my question is: Is it even remotely practical to have an accurate propeller-based clock that will run for the rest of his life and not reset during power outages? And more importantly, would a electronics noob like me be able to make it?

Comments

  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-09-06 19:34
    I would have a gps module and get the time from that.
    Once you have the accurate time it is just a calculation
    to get the number of seconds from a specific date and time.

    There are almost certainly algorithms somewhere on the web
    for doing this. So I'd google.

    There are things to remember like leap seconds that are
    occasionally added to the time so You would need to allow
    for them to get an absolutely accurate count.

    Expecting this to run for many decades is a bit of a stretch
    though. The gps system might change protocols on you.
    WWV has a low frequency time signal that you can buy
    cheap receiver modules for...that might be more stable
    long term.

    My parents have an anniversary clock that they wind just once
    a year on their anniversary.. It runs a year on a winding. One of
    those would be a cool gift.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2010-09-06 20:18
    GPS would be an overkill for such simple use. RTC chip with a coin backup battery or supercap fits best here.
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-09-06 21:46
    It is my experience that GPS does not work indoors. GPS is typically used for outdoor navigation robots. Likewise, I have a Parallax GPS being flown into space. It does not lock onto satellites indoors. Holly, if you have a GPS that works indoors, I'd like to hear about it. Thanks sincerely.

    Humanoido
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-09-06 21:59
    Hi Quarkspin,

    Depending on the accuracy you require.. Beau Schwabe has created a fantastic Object found on the OBEX. See the Propeller RTC Emulator at

    http://obex.parallax.com/objects/425/

    This object emulates an RTC (Real Time Clock) using the timebase of the Propeller. Accuracy is only as good as the crystal. In my testing, there was about 2 seconds lost over the course of 1 day ( ~ 12 minutes a year)

    Humanoido
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-09-06 22:09
    Peter informs me it is possible to use GPS indoors. Now if we can adapt this to work with the Propeller chip..

    Humanoido
    I use this one Here (https://buy.garmin.com/shop/shop.do?cID=144&pID=8705&ra=true) with CAP and for T-Hunts. It Locks on in the oddest of places and It seems to be the most sensitive GPS I have found yet. Its Not a Module but it is Serial NMEA out so it can be used like a module. It will work indoors Sometimes in a wood house !! as long as there is no Foil flashing on the Roof Plywood. Peter KG6LSE
  • QUARKSPINQUARKSPIN Posts: 36
    edited 2010-09-07 08:57
    Accuracy is not an incredible demand here, I don't expect him to actualy check the number. The biggest chalenge here is getting some sort of incredibly reliable battery backup system. I am not currently aware of anything that can stand that many charge cycles... However, if it had a self-setting feature, that would become a nonissue. Does anybody here know how long a Propeller can run off of a single 9v lithium cell?
  • Mike GreenMike Green Posts: 23,101
    edited 2010-09-07 09:09
    The trick here is not to try to run the Propeller off the backup battery. Run a real-time clock like this one off a lithium battery. These are designed to use very very little power in backup mode, much less than a Propeller. A lithium battery like those used to run the real-time clock in a PC should be able to backup the clock for at least 10 years, particularly if you use an insulating coating over that portion of the PCB (to keep moisture out).

    Here's another real-time clock from SparkFun in a ready-to-go module complete with a backup battery good for 10-15 years (without power). You can even wire this in parallel with the Propeller's EEPROM since it also uses the I2C protocol. That way you don't need to use other I/O pins.

    In both cases, you can replace the backup battery every 10 years without losing the time by making sure the rest of the circuit is powered since the clock will run from either the power supply or the backup battery if the power supply is off.
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2010-09-07 09:26
    What about Internet sync? Use a WiFi module and hit:http://www.nist.gov/physlab/div847/grp40/its.cfm for updates?
  • jmspaggijmspaggi Posts: 629
    edited 2010-09-07 09:33
    I think here the issue is more power related than accuracy. So as Mike proposed, the DS1307 might be good. Will it be possible to add more Lithium coin cell batteries? Instead of one, just put 6 in //, and you will have it for at least 60 years...

    Then use a 9V battery for the propeller and the LEDs display.

    When you brother will change the 9V batterie, the clock will still be running. He will not lost a second.

    Also, you can add a EEPROM, and stop the date every day. That way, even if the 2 batteries died, you can still restart from a close date? That will mean 365 write operation a day. The EEPROM can take it.

    JM
  • QUARKSPINQUARKSPIN Posts: 36
    edited 2010-09-07 17:29
    Himm... Sounds like work.


    I think I'm going to go for the SparkFun RTC module, if I just load it with lithium cells then I could skip the external power.

    EDIT: It just hit me, If i have the output in binary, I can double the geekyness and skip an external LED controller! (27 bits gets me ~102 years)
  • Mike GreenMike Green Posts: 23,101
    edited 2010-09-07 17:37
    It's generally not a good idea to parallel batteries. If one of them is weaker than another, the weak one can drain power from one of the better ones. It's better to just get a bigger battery. Keep in mind that batteries do wear out even if not connected to anything (due to "self-discharge"). Lithium cells are better at this than other types of batteries, but anything over 10-15 years is pushing it.

    You wouldn't need an external LED controller. A Propeller is perfectly capable of handling a couple of 7-segment LEDs. You do need to keep maximum current load low, so you may need to multiplex them (turn on one digit at a time). It depends on the size and brightness of the LEDs.

    Consider using a small LCD display instead of an LED display since the LCD displays use much lower current.
  • QUARKSPINQUARKSPIN Posts: 36
    edited 2010-09-07 17:46
    It could handle two 7 segments, but I think they've been together for more than 99 seconds.

    The LCD is a good idea, I'll look in to that. (I wonder if I could add some sort of happy-birthday routine?)
  • jmspaggijmspaggi Posts: 629
    edited 2010-09-07 18:38
    QUARKSPIN wrote: »
    It could handle two 7 segments, but I think they've been together for more than 99 seconds.



    On my demo board, I drived the 6 times 17 segments LED display with only 23 pins...

    So you can do more than two 7 segments digits.

    JM
  • TimmooreTimmoore Posts: 1,031
    edited 2010-09-07 20:18
    I have a MTK3329 gps module. So far I have used it in 2 different houses. I got fixes with 9 satellites in both houses, it took longer for 1st fix than outdoors but still only a couple of minutes. The module is 3V so connects directly to a prop.
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-09-07 21:53
    A Propeller Platform SD + LCD UI would work well - that's what I built my talking clock with. It has an RTC with Super Cap backup and a little UI in case there's a need to change the display, turn on the backlight, etc.
  • potatoheadpotatohead Posts: 10,261
    edited 2010-09-07 23:26
    It is possible to just run the clock on solar power, charging something that can go a few days?

    Maybe clock it with one of those 32Khz time xtals?

    Have it display a "feed me" warning, when things get risky. Somebody can set it outside, or leave a room light on, or something like that.

    The appeal to that is the clock is kind of a living clock. As long as they take care of it, the thing keeps track of the together time.
Sign In or Register to comment.