Let's Make Robots!

AVR Chess Timer

Keeps chess games short and interesting by limiting each turn, alerting the user with a buzzer before time runs out.

This is a simple chess timer using a 20 pin AVR microcontroller.  It has up/down buttons on the front for adjusting the countdown time and an arcade button on top (for mashing on) to reset the coundown timer.  At 30 seconds a piezo buzzer outputs a 100ms beep to warn the user time is starting to run out.  At 5 seconds a double beep is output to warn that a chess move better be made immediately or the game will be over.  When time runs out the display flashes zeros and beeps repeatedly for a few seconds.  I have yet to add more features such as a mode for seperate opponent total game countdown times, louder piezo buzzer circuit with adjustable volume, low battery warning, pause, automatically save/load countdown times between power cycles.

I've included my C code which uses a 16 bit timer to fairly accurately keep track of time.  The quad seven segment display used was purchased for $2 from sparkfun.com.  It requires driving each segment with a common anode which requires flashing through the sequence of numbers fast so they all appear on simultaneously.  Driving the output display constantly while performing other operations posed a coding challenge.  You can view the code HERE.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks, I think it turned out well myself

Nice,neat, and elegant, I like it.

the clock is like a 3rd player in the game.