Arduino does not work well with external 9V battery jack

Hi,

My code and prototype works well when connected to usb to power it. However, when I connect to an external 9V battery to power it, the code sort of only goes through the first function in the loop. Any advice whats going on?

A 9V battery is for low currents only. Just a few leds might already be too much for the battery. Which Arduino board do you have ? Do you have a power adapter (wall wart) ?

Caltoa: A 9V battery is for low currents only. Just a few leds might already be too much for the battery. Which Arduino board do you have ? Do you have a power adapter (wall wart) ?

Hi, I am using a Arduino Uno with motorshield. Do you know where I can get a power adapter?

Do you know where I can get a power adapter?

Not until you set your profile to show where you are.....

(I was going to suggest AP Electronics which is 500m from my house but that might not help you. Especially since it burned down a few weeks ago.)

But any electronics, hobby, radio place should have them. Try the guys where you got your Arduino.

Can you tell which motor shield ? and what motor you use ?

I don't know how the power adapters are called in your country, but almost every house has a few. http://en.wikipedia.org/wiki/AC_adapter Look at the picture in the middle of that wikipedia page, it says: "Millions of still-usable AC power adapters are thrown out annually". You need one of those millions as long as the output is DC and between 7 and 12V.

Do you have a multimeter to measure the voltage of the power adapters ? Some power adapters have a higher voltage without load.

I'm using this on a RC car project so plugging in to my laptop using usb or ac adaptor isn't going to work. Are there other alternatives to make it portable? I'm using a L298P motorshield. Thanks.