1

I am looking to build a device that would countdown to a specific date and time (approx 6 months away); countdwon in days:hours:minutes:seconds. And when it reaches that date and time starts counting up in days:hours:minutes:seconds. The device should fit in 10x60x40mm (display included). 60x40mm is loose and could be little bigger but 10mm thick is important.

edit (by Steven)
Greg said in comment that he wants it to be battery operated.

stevenvh
  • 145,832
  • 21
  • 457
  • 668
Greg
  • 11
  • 2

3 Answers3

3

The obvious solution is a microcontroller, combined with an 9-digit LCD ("_DDD.HH.MM.SS"), but the 9-digit displays I found are a bit large, so let's see what we can do with this one. It's 52 mm x 22 mm x 2.7 mm, so dimensions are ideal. You can place the microcontroller and other components under the LCD.

enter image description here

This LCD is actually a character LCD, not a 7-segment, but you can ignore the segments you don't need. You're one digit short to display the number of days in three digits, but you could use the CA1 segment top left to indicate > 99 days.

For the microcontroller I suggest a TI MSP430, which has an LCD driver on-chip, and consumes just a few µA when running at 32.768 kHz. Note that a standard crystal has a 20 ppm frequency tolerance and therefore may have a 5 minutes error over 180 days. More accurate crystals exist, you'll pay a bit more for a 10 ppm and a lot more for a 5 ppm crystal, but I couldn't find the latter in a 32.768 kHz tuning fork crystal. This one is available in 20 ppm and 10 ppm precision. The 10 ppm version reduces your error to 2.5 minutes over 6 months. Keep in mind that this is initial frequency accuracy, and that temperature variations and aging (3 ppm/year) also add to that.

For battery operation you'll have to use a button cell like a CR2430 to fit in the given height. This holder is as low profile as you can get. This battery has a 290 mAh capacity (down to 2 V, no problem for the MSp430), so we'll have to keep current below 35 µA to run it for a year. For the MSP430 this is not a problem (I've done a project where it consumed 4 µA).
The battery + holder is a bit wider than the display, so you'll have to prevent display pins from protruding on the bottom side of the PCB. This is usually costly, but at 1k+ pieces you may have a tool made to cut of the pins, so that they can be soldered on the component side, like SMD.

edit
I thought of adding a DCF77 atomic clock receiver to solve the timing accuracy issue, but dismissed it because of the thick ferrite antenna; even with a 1 mm PCB we'll only have about 6 mm under the PCB. But there's a solution, albeit that the whole will become somewhat longer.

enter image description here

This SMD antenna is maximum 6.3 mm thick, so might just fit. The receiver module is not a problem, space-wise.

enter image description here

An advantage of a precision reference is that the MSP430 doesn't have to run off a 32 kHz crystal. If we clock it from a 1 kHz RC relaxation oscillator it will probably consume less than 0.5 µA. Sleep mode and a wake-up interrupt from the DCF77 receiver is not an option; the receiver should be off as much as possible, because it consumes too much power.

stevenvh
  • 145,832
  • 21
  • 457
  • 668
  • Something I didn't say is that utlimately I'd have to get thousands of these ;-) Would that solution be competitive in price? I saw something like 15p price tag for the MSP430... – Greg Jul 03 '12 at 09:24
  • @Greg - does this timer have to run autonomous, i.e. on batteries? – stevenvh Jul 03 '12 at 09:24
  • yes on batteries, is it possible to get better than 5mn error? – Greg Jul 03 '12 at 09:28
  • @Greg - I'll add a battery and a precision crystal to my answer. – stevenvh Jul 03 '12 at 09:37
  • Great, that will keep me going! I will research parts and someone who can program the TI for me to build a proto! I don't need it to last over a year so crystal aging is fine. – Greg Jul 03 '12 at 09:57
  • Have a look at this project that uses supercaps with MSP430 :) – abdullah kahraman Jul 03 '12 at 10:54
1

This could be done with hardware counters plus display decoder-drivers BUT

  • The overwhelmingly easy and flexible way to do it is with a microcontroller.

The basic program to do this is a simple one and a display can be bought 'off the shelf' or built from components if desired.

If you have no programming experience then an Arduino would be one excellent solution.

Olin will gnash his mandibles over an Arduino recommendation. Any of many PIC based systems could be used as well.


ARDUINO:

Arduino central note that sizes can be much smaller than seen here.

This Spanish workshop was 2011 but the university are apparently active in this area

  • Last week on 11/23/2011 two PhD candidates within the morelab group from the Univ. of Deusto (Bilbao, Spain) have organized an Arduino workshop. This event aimed to present the Arduino open platform as an easy and accessible prototyping tool to create, design and share pervasive applications that may be used in different contexts as Internet of Things, ambient intelligence or smart spaces.

Just missed Fablab Sevilla June 20thj - obviously people active with Arduino in Spain :-)

Wikipedia

Spanish distributors. See this link for links to the Spanish distributors below plus thjose in MANY other countries:

  • Spain: Libelium Cooking-Hacks, BricoGeek, e-lioness, TuxBrain, Cana Kit, Electan, Componentes Escobedos, OpenDomo, Voipminic, ardutienda, Microlog, Albacete Digital, Innova Didactic SL, Cetronic, ERA ROBÓTICA S.XXI S.L.U, Ro-botica Global, ELECTRONICA EMBAJADORES, S.L., Barcelona Cybernetics, Ingenieria de Microsistemas Programados
Russell McMahon
  • 150,303
  • 18
  • 213
  • 391
0

Use some MCU to query RTC chip, and compensate for summer/winter time.

avra
  • 1,872
  • 3
  • 14
  • 21
  • 1
    If it's a timer and not a clock you don't need to compensate for summer/winter time, and you probably don't need an RTC either, as the microcontroller can keep time too. – Federico Russo Jul 03 '12 at 10:01
  • 1 second resolution without RTC in a multiple of 6 months period? I would like to see that. I had a dilemma between a RTC and GPS to get such accuracy, but between timer and RTC I don't. Also what you do if battery runs out or somehow else your MCU looses power? Do you reprogram it every time? Are you that sure that your MCU will not have any interruptions during these long periods? – avra Jul 03 '12 at 10:39
  • 2
    @avra - the precision of an RTC isn't better than that of a microcontroller's oscillator if they use the same crystal. It's the crystal's 20 ppm accuracy plus temperature variation and aging that causes inaccuracy. The oscillator has little to do with it. – stevenvh Jul 03 '12 at 11:35
  • I somehow like the idea of supplying the controller and the display from a wall wart and powering a RTC from a battery. However, if you think about a separate chip for timekeeping you could go all the way and include a radio clock receiver module (about 15$ AFAIK) and have a even smaller error. – 0x6d64 Jul 03 '12 at 11:50
  • @0x6d64 - Yes, I've thought about a WWVB/DCF77 module, but I'm afraid the ferrite antenna will be too thick to fit in the 10 mm height. And OP wants to power everything from a battery, so no wall warts. – stevenvh Jul 03 '12 at 16:33