Arduino propely booting only if usb powered

Hi guys, I have an arduino controllinga few leds and sensors + an lcd and it propely boots only if usb powered. If I power it via the 9v connector tit powers up but does not execute any code until i press the reset button. On the other hand if i plug it to the pc it gets up and running immediately and flawlessy. I do not have big loads connected to it (8 leds with proper resistance), why does that happen?!? tnks!

If I power it via the 9v connector tit

The 9V connector tit? What are you talking about?

i just mispelled "it"... "...if I power the arduino via the 9v connector (the "jack" near to the usb connector)"..... any ideas? Im pretty puzzled! the battery I am using is heavy duty so no prob there.... when it is powered via usb does the same power regulator is used as if it were powered by a battery or the voltage is taken straight from the usb? If the second option I may have some excessive load on startup, ie a capacitor in the lcd :expressionless:

Heavy duty? What is the current capacity of the battery?

USB doesn't use a regulator. The 5V is provided from the USB rail.

the battery I am using is heavy duty so no prob there....

And I had "jumbo' scrimp last night. :wink:

The battery is good for 9V 100mA before the regulator does its magic. Dunno after. New battery?

That's to run the board, a few leds and sensors and an LCD. The startup seems to hang on power-up but works on reset. You're just the tiny power-up surge short on oomph. Does the LCD get power and turn on right at power on?

Can you use 2 batteries in parallel to double your current current capacity? :grin:

GoForSmoke:
The battery is good for 9V 100mA before the regulator does its magic. Dunno after.

New battery? No use a different battery type, those 9vdc batteries are really useless for arduino projects and end up costing far more per energy consumed. A battery pack made up of 6 AA Alkaline cells is the
minimum in my opinion.

That's to run the board, a few leds and sensors and an LCD. The startup seems to hang on power-up but works on reset. You're just the tiny power-up surge short on oomph. Does the LCD get power and turn on right at power on?

LCD power up is probably requiring more current then your 9vdc can supply momentarily, like I said they are
pretty useless with arduino projects.

Can you use 2 batteries in parallel to double your current current capacity? :grin:

Yes, batteries in parallel will double the current capacity and mah rating, however again 9vdc are an
expensive and almost useless battery for arduino projects, save them for your smoke alarms.

Lefty

Thnks you all guys for the replies,

I have 6 aa batteries powering the thing. I tried to power on the thing with the lcd unplugged and then plugging it back: everything worked fine. So the problem clearly is the built in regulator,
it can`t take the current surge requested by the lcd (wich is absolutely necessary in this project) on startup.
How can I fix that?? I was thinking to some sort of capacitor on the rest pin of the ardu to reset it a coople of 100/ths of seconds after initial power on but sounds a very rough solution to me, what else should I do, beside using a separate power source for the screen?

using a 9 volt wall wart? Using C batteries instead of AA's? What about using a battery pack?

I'm using an 8.4 4200mAh RC car pack for my current weather station project. Figuring the Arduino only draws 300mA at absolute max (rated to only 200ma with a 150% factor), that's 14 hours of battery hypothetically.

Alternatively, can you put a delay(500) at the very beginning of setup()? That way the LCD will have 500 ms to turn on before the arduino "wakes up"?

I tried to power on the thing with the lcd unplugged and then plugging it back: everything worked fine.

If 1 9V can do that then 2 should work without the fiddling.

OTOH, got a pin left to control power to the LCD? 1st power the board, then the LCD.

If I power it via the 9v connector tit powers up but does not execute any code until i press the reset button. On the other hand if i plug it to the pc it gets up and running immediately and flawlessy.

I think you are concentrating on the power supply aspect when you should be concentrating on the other things that are going on (or not going on). When you power up it is definitely executing code, the bootloader code. What is probably happening is that it is getting confused and it not executing your program, it is waiting for a new sketch.

Don

Ludo91:
I tried to power on the thing with the lcd unplugged and then plugging it back: everything worked fine. So the problem clearly is the built in regulator,

Wait what? You unplugged the LCD and that clearly indicates a problem with the regulator? That seems like a tenuous cause-effect relationship.

Ludo91:
it can`t take the current surge requested by the lcd (wich is absolutely necessary in this project) on startup.

If this were actually true, then you have much larger problems. Most LCD backlights are a couple of LEDs. Not exactly a huge "current surge" kind of device, when implemented properly.

Ludo91:
I was thinking to some sort of capacitor on the rest pin of the ardu to reset it a coople of 100/ths of seconds after initial power on but sounds a very rough solution to me

I'm not really certain what this would accomplish. The 5V reg, 3V3 reg, and 8U2 consume the same amount of power is RESET is asserted or not, since they don't pay attention to the RESET signal.

You used the phrase "everything worked fine". If this is true and you verified "everything" works fine, then the problem seems to point to the device you removed. It sounds more like a code initialization problem than a current issue.

A couple of quick measurements with a multimeter might be in order to prove it. (Amount of current drawn with and without this, apparently massive, LCD.)

Sounds like this is wraped up but I had a problem that I consider to be related and thought I would share. One I received my Arduino (in a kit with a 9V adapter) depending on the orientation of the wires conected to the barrel conector it would short. Took me a sec to figure out what that smell was :slight_smile: Been meening to resolder with some heat shrink in case i need the adapter in a pinch. Just thought I would share.

Lcd not letting the board run? Maybe something along these lines -

http://arduino.cc/forum/index.php/topic,76395.0.html