Problem using Arduino Mega with a 9v battery instead of usb

Hi! As you can know from the title, I've testing my project (with servos and HCR04) with arduino mega using usb port. Everything was going great but I decided use a 9v with an adapter (as seen in the image below) and nothing happened, the lights on arduino went on like usual but the program didn't do anything and my servos started to move like crazy (not as they were programmed)

Does someone know what could be the problem?

You make a huge mistake trying to use that battery. That is a voltage source, not the current source You need.
When will beginners stop using that battery? This helpers write several times per week.

1 Like

The 9V battery is made up of 6 tiny 1.5V batteries wired in series.
The assembly is unable to provide current.
Switch to a modern battery

what do you mean with a modern battery? sorry

When they stop putting 9v battery clips with 5.5mm plugs in the starter kits.

OP: I’m surprised that the USB port was able to supply enough current for servos which can require an amp each at peak. You’ll need a proper 5 volt 2 or 3 amp power supply, it depends upon the servo sizes, quantity and loads.

Perhaps new USB 3.

Then you still have the problem of the 500mA poly fuse that's inline with the USB supply of the Mega. And maybe a long/crappy USB lead with too much volt-drop.

A servo never should be powered through an Arduino.

Carbon-zinc PP3-sized 9V batteries like that have the smallest current capability of any 9V battery - 50mA is probably pushing it.

Alkaline PP3's might handle 100mA or so, and NiMH rechargables more than that, but basically these small format 9V batteries are low current and often not suitable for projects - they certainly cannot power motors or servos which demand an amp or more.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.