go away spammer

Author Topic: power up problem on AVR  (Read 5814 times)

0 Members and 1 Guest are viewing this topic.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
power up problem on AVR
« on: February 19, 2008, 10:45:24 AM »
I am having problems with my ATmega not powering up properly.

Sometimes I turn it on and it runs fine. Sometimes it just doesn't turn on at all. And sometimes it goes into a highspeed power reset loop. It doesn't matter if I have my programmer plugged in or not while flipping the switch.

However, I found that the process of plugging in the programmer always properly resets and turns on the AVR.

There is only one power source (I originally thought it was USB power leeching but apparently not). I allow my LED power light to turn fully off before I try to turn the AVR back on again (not powering down fully?). I also have five .1uF caps and a 3300uF cap across power (perhaps power up edge isn't sharp?). I don't have a resistor or anything else on the reset pin (floating reset pin causing the problem?).

Anyone with ideas on what could be causing my problem?

Offline benji

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: power up problem on AVR
« Reply #1 on: February 19, 2008, 10:56:57 AM »
Quote
I don't have a resistor or anything else on the reset pin
maybe you should use a 10k resistor to pull it up , thats what i notice in most schematics

i also have a problem with my atmega that it can be programmed but it doesnt run
, i checked the pins states and they are all vcc
,,the thing i didnt put is the caps between vcc and gnd , could these be the cause?
good ol' BeNNy

Offline Steel_monkey

  • Full Member
  • ***
  • Posts: 85
  • Helpful? 0
Re: power up problem on AVR
« Reply #2 on: February 19, 2008, 11:37:44 AM »
First, pull-up RESET to VCC with  5-10 kOhms and ground with 100 nF, it will most likely solve the problem ( RESET in 50$ robot tutorial is also floating. If someone deals with AVR first time, he can get bad habit of floating reset, and spend much time stepping rake).
If you use crystal, try internal RC. It is not rare to have problems with proper crystal operation.
Check fuse bits of Brown Out detector-it might be set higher than VCC (or it is straight 5V from USB?).    
« Last Edit: February 19, 2008, 12:02:32 PM by Steel_monkey »

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
    • Jon's Place
Re: power up problem on AVR
« Reply #3 on: February 19, 2008, 12:02:44 PM »
Make sure you put the pullup on reset, and set the brown-out fuse to 4.x volts if you're using a 5 volt regulator.

I typically have problems with bleed current coming through the Rx pin of my UART if the AVR is plugged into a USB -> TTL or something like that. If you put a 100 ohm resistor in series with that line, it should stop that current leak. You can see if that is a problem by just putting a multimeter on the Rx pin when the system is plugged in but powered down...

- Jon

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: power up problem on AVR
« Reply #4 on: February 19, 2008, 02:13:54 PM »
The pull-up resistor did not work.

Unplugging USB (to stop bleed/leech current) did not work.

Setting the brown-out fuse from disabled to 4.3V fixed the problem. Jon, can you explain this one?

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
    • Jon's Place
Re: power up problem on AVR
« Reply #5 on: February 19, 2008, 02:34:48 PM »
Sure - the brown-out fuse functionality basically measured the voltage on Vcc, and if it is less than the value specified by the fuse setting, it keeps the processor in reset.

The concept is you don't want the processor to be "browned out", where things start to go hokey - you either want it working, or shut down.

- Jon

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: power up problem on AVR
« Reply #6 on: February 19, 2008, 03:28:04 PM »
Hmmmm but that doesn't really explain why it wasn't working . . .

Perhaps turning on the brown-out fuse forces a reset whenever I turn on the AVR (assuming non-instant 5V)?

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
    • Jon's Place
Re: power up problem on AVR
« Reply #7 on: February 19, 2008, 03:49:44 PM »
Well, you must have some current coming from something that is hooked up to it... What do you have plugged in?

- Jon

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: power up problem on AVR
« Reply #8 on: February 20, 2008, 07:54:11 AM »
Just a single power supply as the power source.

(the problem occurs with and without the USB plugged in)

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
    • Jon's Place
Re: power up problem on AVR
« Reply #9 on: February 20, 2008, 09:19:07 AM »
I suppose its possibly your big cap may hold on to a tiny amount of current - I know when I have an LED as a power indicator with a big cap (3300 uF), it takes a number of seconds to go out, dimming as it goes.

Since AVR chips require so little in the way of current when they are in sleep mode (micro-amps), its possible that the cap may be powering the AVR for hours at a really low voltage level.

I guess the definitive test would be to short the cap once you're removed power and the USB connector. Note that you have to plug in power and turn the thing on before plugging in the USB, or you will get the current leakage through the Rx pin.

- Jon

Offline benji

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: power up problem on AVR
« Reply #10 on: February 20, 2008, 10:06:15 AM »
Quote
I also have five .1uF caps and a 3300uF cap across power
i think using a 3300uf cap is too much capacitance, why that much?
, suppose you disconnect power ,this would still power your avr for a little more time,,
good ol' BeNNy

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: power up problem on AVR
« Reply #11 on: February 20, 2008, 02:53:40 PM »
Quote
i think using a 3300uf cap is too much capacitance, why that much?
when you have up to 40 servos on one power bus, or a few DC motors, 3300uF is almost no capacitance at all  ;D

Offline silo_xtreme

  • Robot Overlord
  • ****
  • Posts: 173
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: power up problem on AVR
« Reply #12 on: February 20, 2008, 03:15:07 PM »
Not sure if this is the same problem, but I started having this problem when I updated the USB drivers from ATMEL.


Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: power up problem on AVR
« Reply #13 on: February 20, 2008, 04:49:43 PM »
I just updated my drivers like 2 hours ago . . . so nope its not related.

Offline benji

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: power up problem on AVR
« Reply #14 on: February 21, 2008, 04:04:24 AM »
Quote
when you have up to 40 servos on one power bus

 :o , 40 servos?? whut are ya tryin to do? this would want 25 amps ,,,
good ol' BeNNy

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: power up problem on AVR
« Reply #15 on: February 22, 2008, 11:07:06 AM »
Quote
when you have up to 40 servos on one power bus
i don't think he is using 40 servos it is just that it has the ability to handle 40 servos
« Last Edit: February 22, 2008, 11:08:04 AM by Trumpkin »
Robots are awesome!

 


Get Your Ad Here