500 Hour Countdown Timer

Hey everyone, I'm fairly new to this side of things but I am pretty computer savvy but keep in mind that this side of the technology is new to me but I have a decent understanding of how everything works and a good background in DC electrical.

So here is what I'm looking for

Runs on 12V

Has a programmable Hour countdown Selectable (250, 500, 1000 Hours)

Once Timer hits the selected countdown, system creates a 12V output signal

(Not a must but would be favorable) - Has the option of a small Battery Back-up in the event of power loss, would maintain countdown position.

It is a fairly simple system from what I understand but all of the timers I have found are only 1 hour, 2 hour etc.

As long as I could program in the option for what interval to use, the only external button I think I would need would be a "reset" to start the timer over.

If it wasn't too complicated I wouldn't mind adding in a display of the time remaining.

Thanks for your time.

Jordan Rousseau

real time clock.
put in a value for 1,000 hours from now
then 'are we there yet' for the next 999 hours

time then - time now = time left

display time left

So what would be my best options for modules to acquire in that case? Since I am doing such a basic task, the only extras like I said are battery back up and a small display for countdown.

Thanks again for your help.

arduion uno or similar standard pin locaitons

RTC shield, you need to get the optional extender pins.

pick a shield for the display.

use the serial connector

to reduce pin connecitons

or go with a display that accepts serial AND has buttons.

Hi Jordan,

To control the 12V output, I would recommend a logic-level power-FET.

What current will be drawn by the device? Can it be switched either high-side or low-side? (e.g. does it have a metal case that must be earthed?)

You may be able to squeeze a display, the RTC and the power FET onto a single prototyping shield. Alternatively, get an Arduino Nano, Mini Pro or Micro Pro and build the whole thing on stripboard or design your own PCB.

Paul

Thanks for the info on products Dave,

Paul; as for the current output I plan on running 1 green LED for Time still left on Counter and 1 Red LED for when Counter has expired. So the current will be relatively low but if required I could use a relay.

I plan on putting the entire setup into a plastic case which I have yet to figure out which size, etc I'm using. I don't know if I have enough knowledge to build my own PCB at this point but I'm willing to give anything a try if it means the system will work.

Thanks for your help again guys. If you ever have any questions regarding heavy equipment feel free to ask me lol :slight_smile:

Ok, so here is the idea of what I have in my head as best as I could put it down on paper so to speak. I apologize if this is incorrect but this is just trying to purvey my thoughts so I'm not unclear.

The idea is that the Timer will only countdown when the 12v reference/signal wire has a voltage on it
Green Led will be active if Counter still has time left
Red LED will be active if Counter has run out of time
Hitting Reset button will RESET counter to 500 hours and begin counting down again(providing 12v reference/signal wire has voltage on it)

should be pretty workable.

the real time clock has a battery. you can keep track of elapsed time.

if you power the unit from the 12, you will be able to run a LCD and get a display of hours elapsed, time left, even average time the unit was running.

if you want to power the unit from a battery then you could have the LCD go into sleep mode after 15 minutes or some such. I used to have a car that had a bright clock, back in the days before LED's, I could push the button and the clock would light for a few minutes. you could do the same. have a button that would energize the display without counting off time.

the only problem I see is that you need to be able to power off completely and not loose track of elapsed time.
if you can run from a battery that is always available, you could have the unit log the system stopping point, then write to memory and then shutdown a few minutes later.

how accurate do you need too be ? withing seconds or within minutes ?

The Accuracy just literally has to be within hours, this is a project is just basically a reminder every 500 hours (roughly) It could be 2 or 3 hours out and still work the way I want it to.

That is all great info I really appreciate it :slight_smile:

The unit will be hooked up to a constant 12V battery (full size vehicle battery) all of the time but there is a battery disconnect switch so in the event that the disconnect switch is hit and MAIN battery power is lost I like the idea of writing last time to memory and resuming once MAIN power has been re-established.

there are RTC's with eeprom on ebay for a few dollars. not shields that plug in, but at least pre-assembled.

since you could monitor the ON/OFF of the device, you could store the date/time ON, then as the unit runs, you could keep track of the accumulated hours, then when the unit is shut down, you could write that to memory. that way if the battery dies, the data is still usable.

you could also data log the times as well as temperatures. when that 1,000 hours is up, you could pull the data and see how well the unit was running. ( or have been run)

in one way, a hard thing will be to remember to re-set after the time elapsed and to prevent anyone from doing a re-set before it should be done.

Sounds good, and as far as the "remembering to reset" portion, I will pretty much be me dealing with the system and the reset will be done @ service intervals, and if someone was to inadvertently reset it, there is always a paper log of the hours that could be gone back on to verify correct amount of usage/upcoming interval.

So I need the
-RTC
-A shield as my base
-My Display
-Now for power, most charging systems actually run @ around 14.4V when under charge, is that going to be a problem? same with the 12V reference wire can have up to 14.4V depending on the system when the equipment is running. Should I run a converter to drop the voltage down or wire in resistors on the board to drop the voltage down to a suitable level for the system?

Hi Jordan,

Tell us a little more about the reference signal. Is it on/off or could its voltage vary and needs to be compared with a threshold? Could it be present when the power is not? Could the circuit run off current from the reference signal (might only be a few mA)?

And these LEDs: do they need 12V or will 5V do? Why the external connector for them? If they are 12V, I suggest a couple of BC337 transistors to drive them.

I'm beinning to think the circuit you are proposing may be overkill. Maybe no RTC is needed, if the circuit could get power from the reference input (the Arduino will be able to keep time well enough without it, and already has some built-in eeprom memory). The Arduino could be a mini pro to save space, cost and power, especially if you need to build several units.

The 14.4V max should not be a problem. As long as the current drawn is only a few 10s of mA, the Arduino's regulator should cope. For the reference signal, a voltage divider will be needed to bring it down to around 4¬5V.

Paul

for the intial testing, you could use an UNO or similar so that you have the ability to use shields.

a data logging / RTC shield
http://www.ebay.com/itm/Arduino-Data-Logging-Shield-SD-Card-Real-Time-Clock-RTC-Prototyping-Plate-Board-/271346127736

this has a prototyping area so you can add external memory -eprom, to keep track of the running time.
http://www.ebay.com/itm/AT24C256-Serial-EEPROM-Module-I2C-EEPROM-Data-Storage-Module-Arduino-PIC-LS4G-/121228906309?pt=LH_DefaultDomain_0&hash=item1c39ce4f45

you could use a power module that can take up to 40v and output 5 volts.
http://www.ebay.com/itm/3-15V-To-0-5-30V-Auto-DC-DC-Solar-Converter-Regulator-Boost-Buck-Module-25W-New-/141150576527?pt=LH_DefaultDomain_0&hash=item20dd3adf8f

you might have room on the board for an opto and input. that way, you do not have to worry about input too much.

and of course a display
http://www.ebay.com/itm/New-for-Arduino-IIC-I2C-TWI-1602-Serial-LCD-Module-Display-Blue-new-/330810324593?pt=LH_DefaultDomain_0&hash=item4d05d4f671

all you need is a couple of switches to set and re-set things.

if you put into an enclosure, some gland connectors. make sure you check the cable size and clamp range. these can be worthless if they are too large or too small.

http://www.ebay.com/itm/10-x-PG7-Black-Plastic-Waterproof-3-6-5mm-Dia-Cable-Cable-Glands-/271323163450?pt=LH_DefaultDomain_0&hash=item3f2c1eeb3a

now the fun part will be learning to program.
the beautiful thing about using shield is that many others have used them so you will find lots of help.

once you determine what works and what is required, you can make a single board that does it all.

Thanks so much, this will definitely get me started :slight_smile: Programming I wont mind learning because I've dabbled in it before but the biggest thing i was concerned about was just acquiring the wrong hardware but thanks to you guys it doesn't look like it will be a problem.

PaulRB:
Hi Jordan,

Tell us a little more about the reference signal. Is it on/off or could its voltage vary and needs to be compared with a threshold? Could it be present when the power is not? Could the circuit run off current from the reference signal (might only be a few mA)?

And these LEDs: do they need 12V or will 5V do? Why the external connector for them? If they are 12V, I suggest a couple of BC337 transistors to drive them.

I'm beinning to think the circuit you are proposing may be overkill. Maybe no RTC is needed, if the circuit could get power from the reference input (the Arduino will be able to keep time well enough without it, and already has some built-in eeprom memory). The Arduino could be a mini pro to save space, cost and power, especially if you need to build several units.

The 14.4V max should not be a problem. As long as the current drawn is only a few 10s of mA, the Arduino's regulator should cope. For the reference signal, a voltage divider will be needed to bring it down to around 4¬5V.

Paul

Hi Paul,

As for the reference wire it is an ON/OFF signal, Pressure is created @ the switch during run, closing the circuit, and allowing voltage to pass through. The other side of it is I could just make a relay to make a ground signal out of that if it would be better for the system instead of trying to make the chip handle the 12V from the signal.

The LEDS well that's where I'm doing some looking right now, I'm trying to find something that will be able to handle the outdoor conditions and will be bright enough to be spotted so I'm currently looking into what I'm going to use.

I do like the idea of it being smaller and cost effective if I was to go with a mini-pro, I especially need to put it into a housing that is waterproof and able to handle -45 Celsius @ times so that is another concern for me.

J-Rousseau:
-45 Celsius @ times

Yikes!

Welcome to the world of Heavy Equipment Mechanic in the oilfield! It's a Balmy -52 out on some of the colder days and you are outside for at least 12 hours!

does the equipment have heaters ? I thought engine oil becomes solid at those temperatures.

Equipment has block heaters and is running 0W40 oil... sometimes requires a heavy dose of ether to get them to kick over :slight_smile:

To keep this as simple as possible, instead of just having data logging, etc (Most machines if not all already have an Hour meter for accumulated time on them) If I all I wanted was this in the simplest design of Purely having it consist of a main board, Screen, button or keypad for selection of hour increment (100, 250, 500, 1000) and having an External LED and Switch for resetting and restarting Timer.

Could this be achieved with say an Uno? instead of adding in all this RTC, Data Logging Shield, Etc? I'm a big believer in KISS (Keep it Simple, Stupid)

J-Rousseau:
As for the reference wire it is an ON/OFF signal, Pressure is created @ the switch during run, closing the circuit, and allowing voltage to pass through.

So does this mean the reference signal cannot be present if the power is out? Or does it come from another source? If it is a pressure switch, it should be no problem to draw a few 10s of mA, to run the Arduino as an alternative to the main 12V power.

J-Rousseau:
The other side of it is I could just make a relay to make a ground signal out of that if it would be better for the system instead of trying to make the chip handle the 12V from the signal.

Sorry, didn't understand what you meant there.

When you initially described the requirements, I too immediately thought of an RTC. But the way I am thinking now, that would mean no RTC needed, needs careful thought.

My idea is: the Arduino can time an hour reasonably accurately (as long as it has a crystal, which most Arduino boards do). I don't know how accurate that would be at -45C. The crystal on an RTC might not be accurate at those temps either. The Arduino could use its internal 1K byte of EEPROM to record the passing of each hour. That way, if power is lost, it can pick up where it left off when power is restored. If the Reference signal comes from an independent source, it could be used to power the circuit whenever the machinery is running.

Downsides to this idea are: 1. when power is out, the Arduino will have no idea how much time has passed, when power is restored (but it will still know how many hours the machine has been running while the power was present) and 2. the EEPROM has a 100,000 write-cycle lifetime (11 years if written to once per hour, it may be possible to extend this by some kind of "wear-leveling", I'm not sure).

The other concern in my mind is the LCD display: will it work at -45C? They can be temp sensitive. My wife has a heated seed propagator she keeps in the greenhouse. On hot days, the LCD on the controller is unreadable, the whole display goes completely dark!

Paul