Microcomputer power failure control circuit

Abstract: A VCR or other microcomputer controlled equipment may be subjected to AC supply interruption resulting from many causes, such as, plugging or unplugging the AC supply with the unit switched on, contact bounce on the AC power switch, AC supply drop outs caused by heavy load switching, lightning etc. Short term AC disconnects should not result in the VCR user settings being lost or the user having to manually reset the control system to restore operability. To gain the earliest indication of imminent supply interruption, the AC supply is monitored (Q1) and a control signal (STOP) is produced that instructs the microcomputer system to save current parameters and assume a low power dissipation mode. With the reappearance of the supply, a RESET signal is generated (Q3) which enables commencement of the microcomputer system. AC interruptions as short as two cycles are detected and STOP and RESET signals are produced.

Description: This invention relates generally to the start up and shut down of a microcomputer system at power supply cessation and resumption, and in particular to the generation of a RESET pulse in response to short duration AC power interruption. In a consumer product, such as a VCR, a microcomputer system may drive a fluorescent display and control multiple functions such as on-screen programming, tuning and channel numbering, audio and video switching, servo mechanism control and motor control logic. When the AC supply is connected or the supply is resumed following a discontinuity, it is essential that the microcomputer be powered up or reset in a prescribed manner in order to avoid possible physical damage to the mechanism or recording medium, and user inconvenience and annoyance. In a consumer environment a VCR may be subject to AC supply interruption resulting from many causes, such as, plugging or unplugging the AC supply with the unit switched on, contact bounce on the AC power switch, AC supply drop outs caused by heavy load switching, lightning etc. Short term AC disconnects should not result in the VCR user settings being lost or the user having to manually reset the control system to restore operability. To satisfy these requirements it is often necessary to monitor for supply interruption and produce appropriate control signals such as stop, halt, watch, etc., and at the reappearance of the supply to generate a reset signal appropriate for the microcomputer system. One method employed to detect AC supply interruption, and imminent power supply failure, is by monitoring one of the DC power supply output voltages. A drop in the monitored supply voltage signals to the microcomputer system that a power shut down is imminent. The microcomputer assumes an appropriate mode, i.e. stop, halt, watch, standby etc. wherein certain parameters values are stored in non-volatile memory. Usually the microcomputer power is sustained by a backup system such as a battery or a large value capacitor for a period sufficient to perform an orderly shut down. In a consumer product, such as a VCR, power supply loading may vary significantly with operational mode. Hence monitoring a DC power supply voltage to detect an external AC supply interruption, may prove insensitive if the detection level is set to cope with the normal supply load variations. Monitoring an AC supply after rectification, filtering, and possibly regulation, will only detect an AC supply failure after an undesirably long period of time has elapsed. In fact the cessation of the AC input supply will be indicated by the drop, or progressive disappearance of the monitored DC supply. The time period between the AC supply failure and the DC supply disappearance may be maximized by the selective use of battery or capacitor back up of specific system elements. However, both batteries and large value capacitors may represent both cost and size / volume penalties. Figure 1 shows a prior art reset circuit for a key display board (KDB) microcomputer used in a consumer VCR. The purpose of this circuit is to monitor a power supply voltage and at power up, or after a power interruption, generate a microcomputer RESET pulse. When the AC supply is connected or the supply is resumed, the power supply produces + 5 volts which feeds the circuit. Transistor TR1 is off since the voltage on C1 is less than the voltage required to turn on the base emitter junction of the transistor. With TR1 off, the +5 volts supply voltage, will charge C2 via R5, causing the RESET line to be at the supply voltage. A microcomputer may typically be reset by a potential equal to supply voltage applied to the RESET input and it remains in the reset condition until the RESET line switches to zero volts. To switch the RESET line to zero volts, capacitor C1 starts to charge to a voltage level Vc, determined by voltage divider R1 and R2. When the voltage on capacitor C1 exceeds the base emitter turn on potential of TR1, the transistor switches on, drawing current from the supply and C2. The discharge of C2 forces the RESET line to a low, near zero volt potential. With zero volts on the RESET line the microcomputer starts to execute the internal instruction set. When the power is switched off or interrupted, and the +5 volt supply disappears, diode D1 provides a discharge path for C1. However, if the interruption is of short duration between e.g. 32 ms to 273 ms, capacitor C1 will not discharge below the turn on potential of TR1 base emitter junction. Thus when the supply returns immediately, TR1 turns on, since the base emitter junction has remained conducting due to the potential on C1. With TR1 on, the circuit fails to produce a RESET pulse upon resumption of the supply voltage. For power interruptions that occur without the +5 volts supply disappearing the circuit again fails to produce a RESET pulse upon resumption of the supply voltage. In US-A -4 234 920 a power fail monitor is coupled to a ripple filter capacitor which in turn supplies a voltage to a regulator. The object of this ripple filter capacitor is to minimize ripple, i.e. remove the periodicity of the AC supply, and prevent appreciable voltage drop between AC cycles at the input of the voltage regulator. Thus, the typical requirements of a ripple filter capacitor prior to voltage regulation imposes limitations on the timeliness of power failure monitoring. An input AC failure can not be detected until the monitored, filtered supply voltage drops. German journal Funkschau (vol. 62, no.12, 1 June 1990, Munich, DE, pp.106-108; T. SCHAERER: "Einschaltautomatik für Atari-ST") discloses a boot delay system which monitors the period of the main power supply and upon detecting a power failure of more than three periods, a reset pulse is generated which immediately switches off a hard disc and a computer and deletes the content of the frequency divider. When the main power switches on again, a reset takes place over a period of approximately six periods.. WO-A1-9 006 552 discloses a device which monitors the supply voltage to determine when an out of tolerance condition occurs. The voltage supply is constantly monitored, and if a certain number of consecutive out of tolerance samples are detected a microcomputer will be caused to power down. US-A-4 943 762 discloses a device which directly monitors the supply voltage. Based on the monitoring of the supply voltage a determination as to an insufficient supply of operating power is made FR-A-1 333 401 relating to an electric power supply device for a digital computer discloses a control device for influencing the behavior of the computer in the case of failure of the power source whereby the control circuit monitors the AC source and, if the AC signal is lacking or falls to an insufficient value for keeping the computer in normal operation, the computer will no longer operate. According to US-A-4 531214 a DC voltage is compared to different reference values to determine if a loss of a regulated DC voltage is imminent. Upon making such a determination, an alert signal indicative of an imminent power disruption is supplied to a microprocessor. US-A-4 523 295 discloses a device which acts to compare the presently sensed voltage of a power supply with a previously sensed voltage of the power supply. When the presently sensed voltage drops below the previously sensed voltage by a predetermined amount a signal is provided to a memory IC indicating an impending loss of power and causing the contents of a volatile memory to be read therefrom and written into a nonvolatile memory. EP-A2-0 182 971 discloses a power on/off reset generator for monitoring a power supply for a logic system powered from the monitored power supply. DE-A1-4 022 887 discloses a device for extending the life of an auxiliary battery. This device switches between a normal operating mode and a low consumption operating mode based upon whether the electric device being driven is actuated. EP-A2-0 385 774 discloses a power failure protection for a data processing apparatus which is provided by the use of a standby power module which supplies power to the data processing apparatus when the normal power supply is interrupted. To overcome the limitations of AC power failure detection and to generate an earlier indication of AC failure, a power failure control circuit according to the invention as defined in claim 1 is provided. FIGURE 1 illustrates a prior art reset circuit. FIGURE 2 illustrates a power supply with a power failure control circuit according to the invention . FIGURE 3 illustrates a microcomputer and a detailed embodiment of the power failure control circuit of Figure 2 FIGURE 4 illustrates waveforms at AC power loss. FIGURE 5 illustrates waveforms at AC power up. FIGURE 6 illustrates waveforms at AC power interruption. In the power supply of FIGURE 2, the 120 V AC, 60 Hz mains supply is stepped-down to 13 volts by a transformer T1. The 13 volts is full wave rectified and heavily filtered by a capacitor C807, 3,300 microfarad, to generate an unregulated, +18 volts DC supply. This +18 V supply is coupled through a current limiting resistor R802 to power various motor circuits of the VCR. The +18 volt supply is also coupled via a fuse F to filter capacitor C808, 100 microfarads, and various voltage regulators. The +18 volts feeds a +6.6 volt series pass regulator, the output of which is filtered by an inductor L803 and a capacitor C809, 1,000 microfarads. The +6.6 volt supply is continuously available and is termed an EVER supply. This supply is available continuously, whether the VCR is powered ON (run mode) or OFF (standby mode). The +6.6 volt supply is coupled to a +5 volt regulator to generate a continuously available +5 volt (EVER) supply. This supply powers such circuits as the IR remote receiver and the STOP and RESET signal generators shown in FIGURE 3. Capacitors C809 and C810 are of large capacity which is sufficient to maintain DC supplies and circuit operation for approximately 80 milliseconds after an AC input interruption. The waveform A in FIGURE 4 depicts the +5 volt supply and indicates that the supply is sustained from t 1 to t 2 , approximately 80 to 140 milliseconds after the STOP signal, waveform B, has decayed to approximately 70% of the peak +5 volt value. Time t 1 represents the approximate point at which the microcomputer detects a STOP signal and ceases program execution. The +5 volt supply is coupled through an on/off switch to generate a switched +5 volt supply (+5V SW). The on/off switch is responsive to a power ON/OFF command signal generated by the microcomputer, shown in FIGURE 3, in response to either an IR remote control or, keyboard power off command generated by the user. The microcomputer ON/OFF command is a low logic level, zero volts, for power ON, and a high logic level, +5 volts for power OFF. The +5 V SW supply powers circuitry that is operative only when the VCR is switched on. The supply is turned off when the VCR is off. A switched +9 V regulator takes the unregulated + 18 V supply and generates a switched +9 V SW voltage that is only available during VTR on or run mode of operation. To accomplish this switching, the 9V regulator is made responsive to the power ON/OFF signal. The +6.6 V supply is coupled to a +5.6 V regulator to generate a +5.6 volt backup supply for the microcomputer. At power down or during a power interruption, this supply is sustained by capacitor CX41, 6,800 microfarads, which is connected to the regulator output. Capacitor CX41 is coupled via diode DX81 and provides several minutes of backup supply current to the microcomputer. The normal supply for the microcomputer is Vcc and is generated at the emitter of transistor QX80 which is coupled to the +6.6 V and +5 V supplies. Failures or interruptions of the AC power input are detected by an inventive STOP signal generator 100 of FIGURE 3, which generates a STOP signal output. The STOP signal is +5 volts when AC power is present, and decays towards zero volts when more than two input AC cycles are missing. Generator 100 is connected to the 13 volt AC supply which is half wave rectified by a diode DX20 and one of the bridge rectifier diodes of bridge DB804. The voltage is level shifted down by voltage divider resistors R803 and RX12 and coupled to filter capacitor CX8 by diode DX20. Diode DX20 in combination with CX8 form a charge pump circuit where, in this instance, positive voltage peaks rapidly charge CX8 positively via resistor R803. Diode DX20 is reverse biased by the voltage on CX8 during the negative AC cycle period which results in a discharge path for CX8 via RX12 and the input impedance of Q1. The charging time constant of the charge pump circuit is largely determined by R803, 47 kilohm and capacitor CX8, 0.1 microfarad, and is approximately 4.7 milliseconds. The discharge time constant is significantly longer than the charge time constant. It is largely determined by capacitor CX8, and the parallel combination of RX12 and the input impedance of Q1 (approximately the product of current gain and emitter resistance), which in this instance may be approximated to 45 milliseconds. The discharge to charge time constant ratio is thus approximately 10 to 1. The discharge time constant is advantageously chosen to be short in comparison with values usually selected for supply filtering or pre-regulation. The short discharge time constant provides a rapid drop in stored potential when a few cycles of the input AC are missing. This requirement for rapid decay is contrary to the requirements of a filter capacitor in power supply. In a typical power supply, DC supply ripple is to be minimized by selecting filter capacitors to provide a discharge time constant of many, often hundreds, of input AC cycles. The use of a short discharge time constant provides a rapid indication of an input AC interruption within a few cycles, which otherwise is not achievable if the monitored DC voltage is part of a DC power supply. The voltage developed on CX8 is connected to a sense terminal at the base of transistor Q1. The STOP signal is generated by the emitter voltage of transistor Q1 and is fed via a series impedance resistor RX22. According to an inventive aspect, the STOP signal is connected to both an input pin 18 of the HD 404729A87S microcomputer shown as 400 in FIGURE 3, and a RESET signal generator shown as 200 in FIGURE 3. When an AC interruption of a few cycles, e.g. two occurs, the STOP signal decays rapidly towards zero volts on a time constant of approximately 45 milliseconds. The + 5 volt circuit supply to the STOP and RESET generators is sustained by capacitors C809, C810 and CX5. The microcomputer samples input pin 18 periodically, and when a drop in STOP voltage is detected, the microcomputer is programmed to enter the WATCH mode initially, followed after ten minutes by the STOP mode. The microcomputer WATCH mode inhibits all input sampling and ceases instruction execution and stops the internal oscillators with the exception of a timer which generates input polling once per second. In addition the WATCH mode retains various internal data. In the STOP mode, instruction execution ceases, input sampling is inhibited and various internal data are lost. The WATCH and STOP modes are terminated by a +5 volt pulse applied to the RESET input of the microcomputer. During an AC interruption or absence the microcomputer power is sustained in excess of ten minutes by capacitors CX5 and CX41. The inventive RESET signal generator 200 receives an input from the STOP signal generator and produces a RESET output signal which is connected to the RESET input pin 47 of the microcomputer. The STOP signal is coupled to the base of an emitter follower transistor Q2 via a series resistor RX49, 100 kilohms. The transistor Q2 is cut off since the voltage applied to the base terminal is essentially equal to the emitter potential due to RX46 and CX6. When the STOP signal generator detects an input AC interruption, the STOP signal falls towards zero volts which is coupled to the base of Q2 and results in a voltage of approximately 0.7 volts at the emitter. This emitter potential is applied to capacitor CX6 causing it to discharge, via Q2 emitter to collector, from approximately 5 volts to approximately zero volts. The voltage on CX6 is coupled to transistor Q3 base terminal via resistor RX52, 56 kilohms. The collector of Q3 is connected to load resistor RX50, 8.2 kilohms, capacitor CX5, 10 nanofarads and the RESET input pin 47 of the microcomputer. When the voltage on capacitor CX6 has fallen by approximately 0.7 volts, transistor Q3 turns on and the potential at the collector terminal rises rapidly to + 5 volts, charging CX15 and applying the voltage to the RESET input, which causes the microcomputer to enter the Reset mode. An AC interruption of two cycles is shown in FIGURE 6A which depicts the STOP signal at pin 18 of the microcomputer. At time t 1 capacitor CX6 starts to discharge from approximately 5 volts. Three AC cycles later, at time t 2 , the AC supply is restored and the STOP signal is rapidly charged to 5 volts. The microcomputer samples the STOP signal periodically and when the STOP signal is between 0.7 Vcc arid 0.3 Vcc the microcomputer is programmed generate a WATCH or STOP mode instruction approximately at time t 3 . The RESET signal is generated responsive to the AC interruption. The RESET signal is depicted in FIGURE 6B which shows at t 4 the start of rising edge of the signal. A valid RESET pulse width of greater than two clock cycles ( 80 microseconds, according to the microcomputer specification, which states that the minimum RESET pulse width must be equal to or greater than two cycles of the microcomputer clock oscillator, which in this application is 80 microseconds at 0.8 Vcc exists between interval t 5 and t 6 . A valid fall time of less than 20 milliseconds is depicted between intervals t 6 to t 7 . When the AC interruption or absence is terminated or when power is initially applied, the STOP signal generator produces a +5 volt output, indicating the presence of an AC input supply. The STOP signal shown FIGURE 5A is advantageously coupled, as before, to both the microcomputer input pin 18 and the RESET signal generator. The +5 volt STOP signal turns off transistor Q2 which allows capacitor CX6 to charge, via resistor RX46, 1 kilohms, towards the +5 volt supply. During the charging period of capacitor CX6, transistor Q3 remains conducting and the collector terminal remains at approximately +5 volts. This +5 volts is coupled to the RESET line and constitutes the microcomputer RESET pulse shown in FIGURE 5C. The RESET pulse is specified to have a minimum duration of at least two cycles of the microcomputer oscillator, which in this application is approximately 61 microseconds. After a time period of about 80 milliseconds the voltage on CX6 has risen and is sufficient to turn off transistor Q3. With transistor Q3 turned off, capacitor CX15 is discharged, via resistor RX50, to zero volts. Since the RESET line is connected to CX15, the RESET signal falls to zero volts which terminates the microcomputer RESET mode, and allows the execution of the internally stored program. FIGURE 5 depicts various waveforms after power up time t 0 . FIGURE 5A shows the STOP signal which is almost full amplitude within the period of the first AC cycle after time t 0 . The time to reach full amplitude will depend on both the charge time constant and the relative phase of the AC supply at time t 0 . FIGURE 5B shows the rise time of the 5 volt supply at time t 0 . FIGURE 5C depicts the RESET generator output signal pulse. The pulse starts shortly after time t 0 and continues at the reset level until time t 1 producing a duration of approximately 90 milliseconds. The fall time, t 1 to t 2 , is approximately 15 milliseconds which is within the maximum value specified for the microcomputer. The inventive STOP, and RESET signal generators provide the microcomputer with an earlier indication of imminent DC power supply interruption or resumption, than is provide by circuits, such as that shown in FIGURE 1, which monitor the status of a DC power supply voltage. The earlier generation of microcomputer control signals indicating supply status, may result in greater design latitude in the selection of circuitry, and components required to provide back up supplies to the microcomputer at power down or during an AC interruption. The STOP signal generator indicates the presence of the AC supply within approximately one cycle of the input AC power supply, and a supply interruption or absence within two cycles of the input AC power supply. The STOP signal is an analog voltage which rises rapidly to a peak value when the AC supply is connected and falls to zero when the AC supply is disconnected or interrupted. The RESET signal generator will generate a RESET pulse for AC supply interruption of a few cycles, e.g. two cycles.

Claims: An apparatus (300) coupled to a source of AC voltage having repetitive alternating polarity excursions of a nominal frequency and to a power supply having an output voltage which decays at a predetermined rate when said AC voltage is interrupted, said power supply also being coupled to said source of AC voltage, said apparatus characterized by: sensing means (100) coupled to said AC source and separate from said power supply for generating at a sense terminal (STOP) a potential generated by repetitive like polarity excursions of said source and having a magnitude which varies within a range, said magnitude decaying at a significantly faster rate than said predetermined rate when said AC voltage is interrupted; a microcomputer system (400) powered by said power supply, having a reset input (47) and at least one other input (18), said other input being coupled to said sense terminal for detecting a reduction in said magnitude beyond said range, said detected reduction beyond said range causing said microcomputer to cease normal program execution; and a reset pulse generator (200) having an output coupled to said microcomputer reset input, and an input coupled to said sense terminal, said reset pulse generator generating a pulse for resetting said microcomputer system (400) when said potential returns to said range upon termination of interruption of said AC voltage. The apparatus in accordance with claim 1, characterized in that said means for generating a potential responsive to the periodicity of the AC voltage comprises a capacitor (CX8) coupled between a reference potential and a first resistor (R803) and diode (DX20) combination charging path, said charging path being coupled to said AC source for charging said capacitor to a value in one AC cycle, and a second resistor (RX12) coupled in shunt with said capacitor to significantly discharge said capacitor in a few AC cycles. An apparatus in accordance with claim 1, characterized in that said output signal causes said microcomputer system (400) to enter a watch mode wherein normal program execution ceases and periodic input polling is sustained. An apparatus in accordance with claim 3, characterized in that microcomputer system (400) enters a stop mode following a predetermined watch mode period. The apparatus in accordance with claim 1, characterized in that said signal generator comprises a capacitor (CX8) coupled between a reference potential and a first resistor (R803) and diode(DX20) combination charging path, said charging path being coupled to said AC source for charging said capacitor to a value in one AC cycle, and a second resistor (RX12) coupled in shunt with said capacitor to significantly discharge said capacitor in a few AC cycles. The apparatus in accordance with claim 1, characterized in that said signal generator comprises a capacitor (CX8) coupled between a reference potential and a first resistor (R803) and diode (DX20) combination charging path, said charging path being coupled to said AC source for charging said capacitor, and a second resistor (RX12) coupled in shunt with said capacitor for discharging said capacitor, where the ratio of discharging time to charging time is approximately 10 to 1. The apparatus in accordance with claim 1, characterized in that said signal generator further comprises a pulse generator having a pulse output signal generated responsive to said signal generator output signal transitions such that a two cycle AC loss causes an output pulse, said pulse being coupled to reset said microcomputer system (400).

Inventors: CHANG CHIEW MUN, WEE CHOW SUNG, CHANG, CHIEW MUN, WEE, CHOW SUNG
Applicants: THOMSON MULTIMEDIA SA, THOMSON MULTIMEDIA
Application year: 1992
Main classification: G06F1
IPC codes: G06F1, H02H1, G06F15