Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Brown-Out detection

Brown-Out detection

2013-01-24 by Chuck Hackett

How does one detect that VCC is dropping so that one can do cleanup
activities (reset external controllers that would leave devices in an
unknown state, etc.) before a BOD reset occurs?

From my reading of the ATMega1284 datasheet I don't see any detection other
than the BOD reset which halts/resets the processor when BOD is detected.

I know I could detect the VCC drop with some extra external hardware to
generate an interrupt but I would like to implement this on boards that
already exist (i.e.: can't add external HW) so hopefully I can do it with
ATMega1284 internals without needing external hardware support.

Pointers?
 
Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844
http://www.whitetrout.net/Chuck

Re: [AVR-Chat] Brown-Out detection

2013-01-24 by John Samperi

At 10:30 AM 25/01/2013, you wrote:
>I know I could detect the VCC drop with some extra external hardware to
>generate an interrupt

That's about the only way you can do it, once the power is low enough
to trigger the BOD it's too late to do anything.

You may be able to use the Analog comparator pins, if not used, to detect
an impending power failure, but you will still need external parts.

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: Brown-Out detection

2013-01-25 by bayramdavies

--- In AVR-Chat@yahoogroups.com, "Chuck Hackett"  wrote:

> How does one detect that VCC is dropping
> so that one can do cleanup activities ...

Ideally, you would detect loss of power *before* VCC starts to fall, for example the failure of the AC input at the main power supply.

Anyway, you've said that you have to use existing hardware.  But, you've told us nothing about that hardware.  What is the nominal supply voltage?  What is the lowest brownout voltage that you can set?  How fast does the supply fall when power is removed?  How is the A-to-D wired up.

If there is enough time between the supply starting to fall and reaching the brownout level, you may be able to configure the A-to-D to measure the 1.1 volt band-gap using AVCC as a reference.  If this rises sharply, then AVCC has started to fall.

On a different subject, I don't suppose you could use a bunch of ATmega1284P-AU (TQFP-44)?  I have 25 I bought for a project which then disappeared and I would let them go for $100 the lot.

Graham.

Re: [AVR-Chat] Re: Brown-Out detection

2013-01-25 by Philippe Habib

You can also set the BOD to different voltages.  Are you able to run the part at a high enough voltage to allow enough time to run some cleanup stuff in the interrupt before the voltage goes all the way down?  Maybe just increasing the size of some of your capacitors would give you the extra few milliseconds to do something worthwhile.  That wouldn't help your existing hardware but it would let you add the feature without a board spin.
Show quoted textHide quoted text
----- Original Message -----
From: "bayramdavies" <Yahoo37849@ecrostech.com>
To: AVR-Chat@yahoogroups.com
Sent: Friday, January 25, 2013 10:23:42 AM
Subject: [AVR-Chat] Re: Brown-Out detection

--- In AVR-Chat@yahoogroups.com, "Chuck Hackett"  wrote:

> How does one detect that VCC is dropping
> so that one can do cleanup activities ...

Ideally, you would detect loss of power *before* VCC starts to fall, for example the failure of the AC input at the main power supply.

Anyway, you've said that you have to use existing hardware.  But, you've told us nothing about that hardware.  What is the nominal supply voltage?  What is the lowest brownout voltage that you can set?  How fast does the supply fall when power is removed?  How is the A-to-D wired up.

If there is enough time between the supply starting to fall and reaching the brownout level, you may be able to configure the A-to-D to measure the 1.1 volt band-gap using AVCC as a reference.  If this rises sharply, then AVCC has started to fall.

On a different subject, I don't suppose you could use a bunch of ATmega1284P-AU (TQFP-44)?  I have 25 I bought for a project which then disappeared and I would let them go for $100 the lot.

Graham.




------------------------------------

Yahoo! Groups Links

RE: [AVR-Chat] Re: Brown-Out detection

2013-01-26 by Chuck Hackett

> From: bayramdavies
> 
> ....
> On a different subject, I don't suppose you could use a bunch of
> ATmega1284P-AU (TQFP-44)?  I have 25 I bought for a project which then
> disappeared and I would let them go for $100 the lot.
> 
> Graham.

Hi Graham, 

That's the part I use but timing is everything ... a couple of weeks ago I
ordered 25 from Mouser ... sorry ...

If I have a need to order more in the near future I'll try to remember to
contact you.
 
Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844
http://www.whitetrout.net/Chuck

RE: [AVR-Chat] Brown-Out detection

2013-04-14 by Benny Smith

I have used Codevision AVR to develop a program for lighting control.

 

We are about to go into production and I need to program the ATMega chip on
each board as part of the production flow.

 

I have a single-user license for Codevision, which I use on my development
system (PC).  I am trying to avoid purchasing another license just to
program AVR chips in production.

 

Once the program is compiled on my machine, a set of files is produced that
are then used to program the AVR.

 

There must be a way to use these files on another PC to program ATMega chips
without installing a copy of Codevision to do it.

 

Any ideas?

 

Thanks,

 

Benny Smith

Inchworm Solutions

Santa Rosa, CA

 

 



[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.