What to use for timing in alarm circuits?

Hi, I would like to make a small timed alarm to gift a friend. What I have in mind is an input consisting of 3 'up arrow-marked' buttons so that the user can cycle through all values of input (hours, minutes and seconds). Then, when user presses the alarm enable button, this value is fed to a timing circuit that makes the alarm ring after the set time. Now, here is where I need help. The only reliable timing circuit I can think of (with my admittedly limited electronics knowledge) is a microprocessor, but that seems an overkill for such a simple thing. I have also heard about a programmable timer 8253, but it has always been explained in terms of interfacing with a uP, so I'd like to know whether I can use it as an independent timer. And as a side note, I would also like the user to be able to choose among a few alarm sounds. Would it be better to design something like here:

formatting link
or would it be more sensible to use one of those multi-tone generator ICs? I'm ready to take a little PITA if that would mean a significant reduction of cost.. :)

Reply to
sundar
Loading thread data ...

Hi, Sundar. You might not have heard about microcontrollers. They're one chip microprocessors with program memory, RAM and (usually) peripherals built in. They're an ideal solution for this.

The fact is, you're looking at a timing circuit to measure seconds, a counter which can count down seconds, minutes and hours, a display and user interface, a countdown comparator which will activate the alarm, and a device which will provide multiple user selectable alarm sounds. Doing this with discrete logic ICs will result in an "Acres O Digital" project which will not only cost you big time, but also will take forever to put together and debug. (PITA)^3.

I'd normally suggest a BASIC Stamp for newbies for something like this. But they can get a little pricey, so you might want to try the Picaxe, the BASIC Stamp's kissin' cousin which is available as a standalone chip for significantly less than the Stamp usually goes for. The Picaxe, like the BASIC Stamp, is built around a microcontroller that runs a line-by-line compiled BASIC which can be downloaded from any PC with a serial port. The PC takes care of the line interpretation, converting commands to tokens which are downloaded to the microcontroller. You can then disconnect the PC, and have the chip run the program on its own -- it retains the program when you power down, so it doesn't have to be tethered to the PC.

The thirteen I/O pins of the PICaxe or the sixteen of the Stamp will be more than enough to achieve what you want. The sysem clock of the microcontroller should be accurate enough (within 1%) to satisfy, and the complexity of the program looks like it's within the range of either device. Neither has a built-in clock peripheral, though, so you'll have to count out seconds with the BASIC commands, and carry to minutes and hours in software. Either device can drive hi-intensity LEDs directly. You might want to use an extra transistor or two to drive the speaker.

You can set up with a Picaxe-18 starter pack for =A315.10 (inc. VAT). The BASIC Stamp itse;f is $50 or so, and the development kit usually runs somewhere around $70 to $120 depending.

Either one will be a good solution. Here are some links to get you started:

formatting link
formatting link

Good luck with your project

Cheers Chris

Reply to
Chris

You won't be able to beat the cost of a commercially available timer. Go here:

formatting link

Put timer in the search box.

Ed

Reply to
ehsjr

the 8253 is not really suited it's basically a programmable clock divider

hmm, you'd want something like a 14553 but one that could count both up and down.

the easiest way is may be to salvage the timer from an old microwave oven

If you want to build from scratch, IMO best solution is the microcontroller, something like a ATTiny2313 could do most of the work.

Here's how to get a melody out of it's predecessor with minimal external components (I wired it the out pin straight to the amplifier input) The same code should work on the new chip too... if I remember I'll test it tomorrow.

Clock applications using microcontrollers have no doubt been done to death elsewhere on the WWW. No introduction to microcontrollers is complete without atleast 1 lcd clock.... :)

Bye. Jasen

Reply to
jasen

Look in stores for an electronic cooking timer.

Reply to
Homer J Simpson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.