Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Store it quickly!

Rainer Reusch interrupt to the microcon-


(Germany)
TR1
troller. In the microcontrol-
Voltage
Regulator ler, the interrupt is used to
The EEPROM in a micro- D1 IC1 = LM393; TLC372 trigger the storage of es-
230V
controller is often used B1
sential data in EEPROM,
1N4001
to store collected data and because it must com-
or device settings so plete this process using
R1 R3 R5

82k

10k
that they are still avai- only the energy stored in

470k
lable even if the device 2
8 reservoir capacitor C2,
is switched off and then IC1.A
1
INT
MCU the value of this capacitor
on again. However, the- 3
must be sufficiently large.
re is a limit to the num- The microcontroller can
4

ber of write cycles that C1


R2
C2 C3
R4 power down any connec-
the EEPROM can endure ted loads (relays, LEDs
220k

470k
and so it is not always a 100n
1000µ
100n and the like) in order to
good idea to store data 080379 - 11
gain a little more time.
at the earliest opportu- The circuit shown is in
nity: an alternative is to principle also suitab-
store the data away quickly just have only added an extra diode voltage divider. The output of the le for devices powered by (re-
before power is lost. That leaves (D1) in the main supply path. In comparator is then high. chargeable) batteries, simply
the problem of detecting when normal operation smoothed DC When power is removed the out- by dispensing with the transfor-
the on-off switch is flicked or a levels appear at the output of the put voltage of the first voltage di- mer and bridge rectifier. In this
power failure occurs, a problem voltage dividers, and hence at vider falls very rapidly, as the time case, capacitor C1 can also be
which the circuit described here the inputs to comparator IC1. The constant of the circuit is small. dispensed with. Capacitor C2 is
is designed to solve. component values in the first volta- However, the voltage after diode also not strictly necessary, but it
The circuit is at heart a classical ge divider (R1, R2 and C1) must D1 is maintained for some time does suppress a brief low-going
linear power supply consisting of be selected so that its output volta- thanks to reservoir capacitor C2. pulse on the output of the compa-
a bridge rectifier, reservoir capa- ge, in the range 0.5 V to 1 V, is a During this time the output of the rator when power is applied.
citor and voltage regulator. We little higher than that of the second comparator is low, generating an (080379-I)

Advertisement

1/2009 - elektor 75

You might also like