How to fix brown out reset in AVR?

822 views Asked by At

In my ATMEGA32 developer board, I am working with servo motor and I guess that causes the problem. I have two working subroutines in assembly, which make servo rotate opposite directions. They are definitely fine when they are called alone but when I call them with a 1 sec delay between I got this warning

"Brown-out reset occured during last operation, please check power supply voltage."

I learnt from my research on the internet, if I try to rotate servo too quickly, this can happen but it can go back and forth rapidly in an another code, is the reason that I wrote them in seperate subroutines? But I need to do that way.

1

There are 1 answers

0
Throwback1986 On

While the question might be more suited to electronics.stackexchange.com or arduino.stackexchange.com, one possible solution is pretty straight-forward.

I'm using a couple of these servomotors on an Arduino (ATMEGA 2560). The application is a pan-tilt head, and the motors can pull too much current for the Arduino to source. My problem seemed intermittent at first: my test code did not always cause a processor reset. I later determined that the occurrence of the brownouts varied with the starting position of the motor, desired turn angle, etc. (which makes complete sense in retrospect: I didn't consider motor start-up current demands, etc.).

My solution was to provide an dedicated 5VDC 1.5A power source for the motors - which completely resolved the processor reset issues. Note that following this approach, you must establish a common ground between the motors and the ATMEGA32 board.