Timing Circuit - check how long power was OFF

Thread Starter

danielb33

Joined Aug 20, 2012
105
I designed a PCB that controls 2 actuators. PCB limits actuator duty cycle. When duty cycle maxed out, flags are set in firmware to prevent actuator movement. If the user shuts the system off, these flags reset. Flash is only good for 10K writes, so flash does not help - plus I will not know if the customer shut the system off for 2 hours or 1 second.

I would prefer to have some sort of timer to notify the MCU that duty cycle time is up. This could be used during operation or when the system is shut off.

My first thought - RC circuit + ADC. Seems simple and cheap. Managers don't like it. Not sure why, but they want something "simpler".

Thoughts/Ideas?
 

Thread Starter

danielb33

Joined Aug 20, 2012
105
The PCB mounts in there. Ideally I would buy a simple IC that holds a logic 1 for X amount of time. This seems simple but cannot find one. Making one with some FETS/OP AMPs/RC seems like a waste of space and money if an IC exists that does this.
 

crutschow

Joined Mar 14, 2008
34,283
How do you expect to keep track of time if there is no power to the circuit? Any time-keeping device will require power. You may have to add a battery compartment in the case to power a time circuit.

Edit: How long a time does the circuit need to wait before the actuators can again be operated after the duty-cycle is maxed? If it's not more than a minute or two you could likely use an RC delay circuit with a comparator.
 
Last edited:

Alberto

Joined Nov 7, 2008
169
If it is mandatory to keep track of the time the circuit is off you will need a battery to keep alive the system when power is off. If you can do without the time off (saving on eeprom the logic conditions of the limits and other relevant condition of the system at shutoff) then with a diodes and a capacitor you can delay the MCU shutoff and detect in real time when system is disconnected (checking the logic state before the diodes) when MCU detect the shutoff it will save the contest on eeprom. At start up MCU will read the eeprom and act conseguently.

Cheers

Alberto
 
Top