Timing Circuit - check how long power was OFF

Discussion in 'The Projects Forum' started by danielb33, Aug 15, 2014.

  1. danielb33

    Thread Starter Member

    Aug 20, 2012
    105
    0
    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?
     
  2. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    When the "user shuts the system off", can the MCU remain powered by an alternate power source such as a battery?

    Ken
     
  3. danielb33

    Thread Starter Member

    Aug 20, 2012
    105
    0
    Unfortunately, no. Too expensive. Warranty void if customer opens case holding PCB.
     
  4. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Can you post a schematic of the circuit going to the "case"?

    Ken
     
  5. danielb33

    Thread Starter Member

    Aug 20, 2012
    105
    0
  6. danielb33

    Thread Starter Member

    Aug 20, 2012
    105
    0
    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.
     
  7. crutschow

    Expert

    Mar 14, 2008
    13,028
    3,238
    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: Aug 16, 2014
  8. Alberto

    Active Member

    Nov 7, 2008
    169
    36
    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
     
  9. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    I think you misread my question. I wasn't asking about the plastic case. I was asking about the circuit,

    Ken
     
Loading...