Microcontroller Brown-out detection

Mostly all microcontrollers have built-in Brown-out Detection (BOD) circuit, which monitors the supply voltage level during operation. BOD circuit is nothing more than the comparator, which compares supply voltage to a fixed trigger level.

If the microcontroller doesn’t have an On-Chip Brown-Out detector, then there can be an external circuit used :

external brown out circuit

In the image above, there is a discrete brown-out detector circuit. There are particular IC where additional delay circuitry and hysteresis used to normalize supply voltage may take some time in a real word. Such ICs are cheaper than one built from discrete components.

Brown-out meaning

Brownout is an important safety feature in electronics and microcontrollers. There are two main tasks of brown-out function in microcontroller – hardware and software.

  • The hardware brown-out feature resets the microcontroller and keeps it until the power supply is returned to the operating range. This ensures that all parts of the circuit work correctly.
  • Software brown-out part – an interrupt-based functionality that detects falling voltage, which allows the software to take care of critical components like saving vital information to non-volatile memory before resetting.

What causes a brown-out

For example, let us see how the Atmega128 microcontroller, which has an On-chip Brown-out detector, reacts to the brown-out event. The trigger level can be set to 2.7V or 4.0V by programming Fuse bits. Trigger level also has a hysteresis to avoid spiky operation. The hysteresis can be interpreted as VBOT+=VBOT+VHYST/2 and VBOT-=VBOT-VHYST/2.

ATmega 128 BOD

If the Brown-Out circuit is enabled by the Fuse bit and Vcc voltage decreases to a value bellow the trigger value (VBOT-), then the Brown-Out reset is activated. After the supply voltage rises above the triggered level (VBOT+), the delay timer starts counting, which keeps MCU on the reset stage for some time, giving enough time for the power supply to normalize. After the timer counts up, the internal reset signal is released.

How do you prevent brownouts in microcontrollers?

Here are some ways to prevent brownouts in microcontrollers:

  1. Power supply regulation: Use a stable and regulated power supply with adequate current capability to ensure that the voltage remains within the operating range of the microcontroller. This can be done using voltage regulators, DC-DC converters, or batteries.
  2. Capacitors: Use decoupling and bulk capacitors to filter out the noise and transient voltage spikes that can cause brownouts. Decoupling capacitors should be placed as close to the power pins of the microcontroller as possible to provide the shortest path for current flow.
  3. Low-power design: Design the microcontroller circuitry to minimize power consumption and reduce the risk of brownouts. This can include using low-power sleep modes, optimizing software algorithms for power efficiency, and minimizing unnecessary peripherals or components.

Preventing brownouts in microcontrollers requires careful attention to power supply design, as well as the use of appropriate circuitry and components to ensure stable and reliable operation.


  1. Thank you for brown out detector explanation.
    please provide an example sample project showing how to use on-chip brown out detector of AVR microcontrollers

  2. Hello,
    Thank you for brown out detector explanation. Its is very helpful.
    Please provide an example sample code showing how to use built in Brown-out detection (BOD) circuit of AVR Atmega128 microcontroller.
    Amol G

  3. hello,
    can somebody please explain in simple language, what is burnout?

  4. Hi,

    Thanks for the explanation of the brown-out, but would it be better to go with an external brown-out or an internal programmed brown-out? And could a programmed brown-out be corrupted if there are power problems?

    Thank You

  5. The internal brownout detector is hardware, not software.

  6. You can either use a Voltage Detector, on a simple TO-92 package can help you reset your microcontroller when voltage goes lower than 4.5V


  7. “Trigger level also has a hysteresis to avoid spikes. The hysteresis can be interpreted as VBOT+=VBOT+VHYST/2 and VBOT-=VBOT-VHYST/2.”
    Well, that’s not entirely correct.
    Hysteresis is there to avoid constantly triggering and releasing the brownout reset if the voltage is exactly at the threshold level.
    Hysteresis means that the high-going threshold (that releases the BOR) is significantly above the low-going threshold (that triggers the BOR), so after a BOR, the voltage has to raise significantly (by the size of the hysteresis) before the brownout condition is considered to be over.
    Since VBOT is the trigger level, (VBOT-) == (VBOT) and (VBOT+) == (VBOT)+(VHYST)

Leave a Reply