Help using Brown Out Detection

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi
I want to make a system, which when turned off saves the data in some registers by writing to EEPROM. I've enabled the brown out detection at 4.0V, so that when it drops to 4V, it will reset and enter the subroutine which will write into the EEPROM. For this I've put a 3300uF cap across Vcc to slow the rate of the voltage drop.

I want to know whether such a setup is possible. I will post the code if anyone wants it.

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

AFAIK, the brown out stays in reset as long as the voltage is below the threshold.

So i recommend to use the acomp and set it´s thresold slightly obove the brownout threshold.

In the acomp ISR I´d write the data to the EEPROM and go to sleep.
But when to wake up? Maybe automatically with the watchdog..

Klaus
********************************
Look at: www.megausb.de (German)
********************************

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks. I think that's the problem. The power to the system is intended to completely go off. So the next time the unit is turned on, it should retain the value.

I also want to know if there is any minimum voltage level required for EEPROM read and writes. I tried searching the datasheet but with no luck.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I also want to know if there is any minimum voltage level required for EEPROM read and writes. I tried searching the datasheet but with no luck.

If no explicit minimum operating voltage for EEPROM access is given I´d say it´s the common minimum operating voltage

Klaus
********************************
Look at: www.megausb.de (German)
********************************

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What about a Pre-Brownout-Detector?

Please look at the attached picture:
To reduce the needed buffer capacitor size the AVR is powered by its own regulator.
If the power supply is switched off, the INT input is set low and a ISR is triggered which saves all neccessary data to EEPROM.

If your AVR has a cpu clock prescaler, decrease the cpu clock speed when entering the ISR to save power. The EEPROM write time is independent from the cpu clock speed.
The newer AVRs like ATmega88 have a reduced EEPROM write time, so you might prefere those chips.
This will help to reduce the capacity of the big elko.

Regards
Sebastian

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks. I'll try using that. I think one zener diode will also have to be added across the 400n cap, as the voltage at INT cannot be higher than Vcc + 0.5V.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A zener diode isn't neccessary, the AVR has build in protection diodes and the 47k resistor will limit the current to a reasonable value.

Regards
Sebastian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 100nF capacitor was meant for debouncing the INT pin, so I think you better don't remove it. However, using a voltage divider would make the voltage drop detection more accurate.

Regards
Sebastian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the advice. I'll try it and see what happens :)

-Aakash