Arudino countdown timer?

I'm looking to make a countdown timer for my local card shop for games of Magic (nerdy, I know). However, I think I jumped the gun, as I have no idea how to do this. 

My plan is to us an arduino nano/barebone arduino as the brains to this, make my own 4 digit 7 segment display, and have give it a programmable time (nothing over 50 minutes) along with a start, stop, and reset button. 

I've done quite a bit of looking, and have yet to find something that matches my needs or comes close to it so I can reverse engineer the code a bit. Any sort of help on this would be greatly appreciated! 

Should also mention I'm a tad bit of a newbie to C. I know enough to know where i need to look for a good chunk of things, but thats for simple things like "make this LED blink according to these random inputs"

sort by: active | newest | oldest

There are 3 examples listed to the right of this page.

DoctorWoo (author)  mpilchfamily3 years ago

But each one does not quite match what I need. One only allows you to quicky increase, seconds at a time. The other uses a matrix. And the last one starts at 99 seconds.

Do you want this for tracking life points in card and miniature games or do you want a timer? Cause you can go to any local grocery store and get a digital timer for that. It can be set to count down a time or can count up and so on. Only run you 1/3 the cost of the Arduino alone.

If you want to track points then you need to be searching for an Arduino Counter like this one.

https://www.instructables.com/id/1-4-Digit-Arduino-...

If you animate about making an arduino based timer then i have a few questions. How accurate does it need to be. Are you willing to have a timer that may run a few seconds slow over the course of an hour? If not then you will want to use a Real Time Clock (RTC). So search for RTC Arduino timer and you'll get some good results. Also check the Arduino forums for more projects, ideas and help.

DoctorWoo (author)  mpilchfamily3 years ago

Its going to be for time, counting down from various times (50 minutes, 1 minutes, 45 seconds, and 15 seconds). I know it's cheaper to just use a kitchen timer, but with all the parts I have laying about, it's no skin off my nose. Even more so that I plan to use a barebone arduino in the setup once I have it going like it should. On top of that, I can make it as big as I want (making the 7 seg out of single LED's) as to make it easy to see regardless where you are on the playing floor.

As for Arduino forums, I have been checking them out. I've been able to reverse some of the codes on there to make something that should work, but its slow going.

Like i said go with an RTC. Otherwise you'll run into problems trying to use the arduino's mills function. Start simple and work your way up. I'm sure you'll pick it up quickly. Just go through people's codes line by line and learn the function and logic behind it all. Before you know it you frame of mind will sync up with the programming logic and it will flow easily.

DoctorWoo (author)  mpilchfamily3 years ago

It's already getting there! I've always been a 'learn under fire' kind of guy, so this is helping my C skills greatly.

However, I am curious: why an RTC? I know what it does and all that, but couldn't I just set the sketch to run off of milliseconds? For example, delay 1000ms, subtract a second.

I'd check the accuracy of the timer function.

If you look at my project

https://www.instructables.com/id/Arduino-Based-Many...

I use a MAX7221 chip to drive LEDs like you want.

DoctorWoo (author)  steveastrouk3 years ago

Running the LED's won't be too much trouble. I've already plowed a lot of work and research into driving large amounts of LED's for another project of mine.

I did check out your ible, though, and like always, it helped be understand a few things better then I did before hand! However (rather off topic to the orginal question) I am curious if you understand shifting out. I'm looking to do that with some 595's I have laying around, but I don't fully understand how it "shifts out" to the second, third, fourth, etc IC in the chain.

what don't you understand ? There's a connection that just 'carrys' the data out of one chip and into the next. Think of it like a bucket brigade. Every clock, the buckets get moved along.

DoctorWoo (author)  steveastrouk3 years ago

That was the issue that I didn't quite understand. And it makes sense now. thanks!!

Djandco3 years ago

I have used the "Crazy Countdown Timer" for a few things, in fact I am working on a variant right now with a different problem, anyhow for what you need it should be fine, there are three buttons pre-set but you can change the function of the input to pre-set different times.

You can also map out the pins and use a transistor array (or chip) to drive larger LED 7 segment displays, I have driven a 3" display instead of the 617 so it can be seen from a good distance.

Have fun :-)

DoctorWoo (author)  Djandco3 years ago

That was the orginal idea [to use the crazy countdown and reverse the code to work for me]. I did kind of do that, but I ended up building the main code myself (which took *way* long then it should have!).

I ran it through the paces against the timer on my phone, and it works like a charm! The only issue I'm at now is the 7 segment display and the buttons. But, as with the coutndown itself, I'm reversing some of the code of other projects to work with what I need.