GRYNX

9th 2005f November, 2005

Build an egg wakeup clock

by @ 10:52. Filed under

Alarm Clock of the Short Now
or
A beginner’s PIC project.

By Rafael

PIC Clock
I am unemployed at the moment, but I’m very busy. I tend to work late nights and wander over to bed when I run completely out of steam. The problem is that this happens at a different time every day. I end up being too lazy and stupid to re-set the alarm clock, so I don’t bother. I oversleep. Recently I realized that I need a special alarm clock that instead of going off at a particular time goes off after a set duration. Like an egg timer, but grand!.

So, I made one, and I realized that it would be a great beginner’s project. I could have added things like a snooze feature or a variable time span, but I opted to keep it simple. If you want something much more complicated, you can try my MP3 player project. Or add some crazy stuff to this one. This is also easily adapted to other timing and control projects.

Operation:

To use the clock, flip the switch to “on� and get in bed. The LED will blink once each second to let you know it’s working. Go to sleep. When the alarm goes off get up and flip the switch to “off�.

It’s a new day!

PIC breadboardConstruction:

The most fun part is the thing that actually makes the noise. I used a motor from a small toy and a strip of aluminium. I attached a small bit of wood to the shaft of the motor and glued the motor to the strip of metal so that the bit of wood smacks into it. It makes a really remarkably annoying sound. I also tried placing the motor in an old glass jar. You could try a cowbell, or a cymbal, or anything really.

Not much else to say here, other than that you should try things out on a breadboard first, and that if it doesn’t work, 90% chance that it’s a soldering mistake. Oh, by the way: I tested the code. It works. Really.

PIC SchematicsCode:

Here’s the C code, the schematic and the
hex file. The C is the source code, which you can modify to your heart’s content, the hex file is what the compiler makes from the C code.

Questions? I can be reached here: raphael@walrus.com

Inside the PIC clock

A nice cosy view of the innards. The glob on the right is the LED, the hole with the red and blue wire is the switch ( I replaced it later on with a three-wire one). On the right of the circuit board is an ICSP header. You don’t need that unless you want to program the chip while it’s still in the board. In fact, if you haven’t heard of ICSP yet, don’t worry about it.

Vibrating motor
Testing the motor with the little bit of wood. It’s actually loud enough to wake me just as it is pictured here.
Inside PIC clock
More innards. I am using 4 AA cells here. You could probably get away with using just two or three if space is a problem. If the motor seems weak, use more voltage (up to 5.5V).
A “wall wart� would work also, but you would need to add a voltage regulator.


The finished product!
Magnificent!

Links to get you
started with PIC’s:
“Basics” of the PIC Microchip
Beginners’ PIC and AVR page
picList beginners checklist

 


Return to the projects index page


This article has been reposted with the permission of the author.
The original article can be found here

3 Responses to “Build an egg wakeup clock”

  1. Ed Tapanes Says:

    Great project but in case you’d rather not reinvent the wheel – Screaming Meanie

  2. kumar Says:

    hey mate.can you please explain the code to me through email and is it possible if i use you code for modify it for my project

  3. kumar Says:

    hey .can you please explain the code through email and is it possible if i use you code for modify it for my project. thanks

Leave a Reply

You must be logged in to post a comment.

Host your project

Write for Grynx:

Do you have what it takes? If you're the right person then email us.

Archives:

Support Grynx:

Help us continue our work with a donation

Website promotion SEO Managed Advertising

5 Most popular articles:

Google

Categories:

Do it yourself - DIY
Our projects collection

18 queries. 0.084 seconds

Home