View previous topic :: View next topic |
Author |
Message |
nina
Joined: 20 Apr 2007 Posts: 111
|
countdown |
Posted: Sun Feb 15, 2009 2:41 pm |
|
|
hi everybody
what is the best way to develop a system do countdowns 5000 hours. I have a machine that I need do maintenance after 5000 hours. So I would like to develop a system, using pic and lcd to show me how many hours are remaining to stop that machine and do maintenance.
Which pic and what way is the best to do this?
tks
nina |
|
|
Ttelmah Guest
|
|
Posted: Sun Feb 15, 2009 3:50 pm |
|
|
Almost any PIC, can potentially do this.
Best method, depends massively, on what 'else' you want it to do. Display the countdown?. Nature of output at the end?. What power is available?. etc. etc..
However I also have to query, whether it is worth 're-inventing the wheel'. Programmable service interval timers, are readily available.
Best Wishes |
|
|
nina
Joined: 20 Apr 2007 Posts: 111
|
idea |
Posted: Sun Feb 15, 2009 3:55 pm |
|
|
My idea is after countdown reach 5000 hours activate a relay and a message is show on LCD. That's all...
Do you think should I use a external hardware or just use timer?
tks Ttelmah
Ttelmah wrote: | Almost any PIC, can potentially do this.
Best method, depends massively, on what 'else' you want it to do. Display the countdown?. Nature of output at the end?. What power is available?. etc. etc..
However I also have to query, whether it is worth 're-inventing the wheel'. Programmable service interval timers, are readily available.
Best Wishes |
|
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Sun Feb 15, 2009 5:37 pm |
|
|
Just set up a timer to run as long as you can, producing a "tick" every time it overflows. Set an Hour variable to so many ticks per hour, and Maint to 5000 hours per maintenance cycle. Decrement Hour each tick. When Hour = 0 decrement Maint and rest Hour. When Maint = 0 trigger you display and reset Maint to 5000.
Any trivial PIC can do this. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Sun Feb 15, 2009 5:48 pm |
|
|
Of course, now it gets more complicated for him...
What if power is lost then restored?
Does he want it to keep time while power is off?
Does he just want it to start back where it left off?
Oh the possibilities!!! |
|
|
nina
Joined: 20 Apr 2007 Posts: 111
|
|
Posted: Sun Feb 15, 2009 7:24 pm |
|
|
thank you very much SherpaDoug for all information provided. what is the best timer0,timer1 or RTC??
dyeatman....during the equipment is running I'll get power from it and when it is turn off I'll will supply from a battery.
Does he want it to keep time while power is off? YES, HE DOES. Any suggestion to implement this?
First of all, I'll try implement just the decrement 5000 hours after that I'll try the rest of the program.
So, is it possible countdown 5000 hours just using internal timer???
tks again |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Sun Feb 15, 2009 7:46 pm |
|
|
There are basically three choices.
1. Use the nanowatt PIC version and keep time internally
2. Use an RTC module with a battery and store the start time in EPROM.
3. You could also get a DS1307 and implement one yourself with a little work.
Personally, I would choose the second one. It makes the whole thing pretty simple. Sparkfun sells one for $20.
The next question would be:
Is the 5000 going to be actual machine run time? If so you will need to somehow monitor the equiment to keep track of the run time. |
|
|
nina
Joined: 20 Apr 2007 Posts: 111
|
counter |
Posted: Sun Feb 15, 2009 8:07 pm |
|
|
dyeatman...I'll use the lcd to follow the time and when it reach 5000 hours this system will activate a relay to shutdow the machine.
tks again for all information dyeatman. You have helped me a lot |
|
|
crystal_lattice
Joined: 13 Jun 2006 Posts: 164
|
Service Timer/Counter |
Posted: Mon Feb 16, 2009 1:21 am |
|
|
Have a look at Maxim product range, they have a interval timer that can do what you want. Look at: DS1372, DS1318, DS1904, DS1371, DS1374 |
|
|
|