Servo motor + joystick module = 10v....I have 9v battery


Sorry if this is potentially a silly question but I'm just getting started.

I have a Elegoo Uno board (from starter pack) on which I'm attaching a joystick module and a servo motor. When the joystick is moved - the servo motor operates. This works fine when plugged into my laptop via usb. The issue comes when it is unplugged and powered by the 9v battery.

The issue is that the servo moto only vibrates - i've realised that this is likely because the servo motor and joystick module require 5v each so there's simply not enough power available.

What is the solution to this? Obviously I need a bigger battery, but what type? My whole project probably won't require much more power than this so I'm just looking for something simple and low cost.



Use a battery of lower voltage, best 7V, or power everything from a 5V supply. A 9V block battery is not sufficient as a motor supply.

Your question suggests you are powering the servo from the "5V" pin on the Arduino and this works when powered from the USB port. Generally, a servo requires more current than the USB port is rated for but if not significantly loaded and only moving intermittently, it will likely work for the moment. :roll_eyes:

You connected the battery to "Vin" or the "barrel jack", didn't you?

The clear and oh-so-frequent blunder is not comprehending what the "Vin" or "RAW" terminal is. The regulator on the Arduino UNO/ Nano/ Pro Mini/ Mega2560/ Leonardo/ Pro Micro has very little heatsink, so will not pass very much current (depending on the input voltage and thus, how much voltage it has to drop) before it overheats and (hopefully reversibly) shuts down. It is essentially a novelty provided in the very beginning of the Arduino project when "9V" power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.

Nowadays, 5 V regulated switchmode packs are arguably the most readily available in the form of "Phone chargers" and switchmode "buck" regulators to regulate down from 12 V or other available voltages are cheap on eBay so these can be fed into the USB connector or (more appropriately) 5 V pin to provide adequate power for most applications. Unfortunately, many tutorials or "instructables" are seriously outdated or misleading and have not been updated to reflect the contemporary situation.

Not to mention that this is not a suitable battery for powering any serious project: :astonished:

Thanks for the replies.

The project is very simple - I want to train my budgie to tap the joystick / jump on & off it, and when she does the servo motor will open a little door and let some food come out for her. The joystick only needs to detect the slightest of movements. Ideally, I want this project to be battery powered - as it's essentially no more than what you see in the images.

As you can see I have both modules attached to 2x 5v pins on the expansion board I have plugged in. And then the 9v battery attached to the barrel connector.

I need to do some more learning about all of this as it confuses me why going from a 9v battery to a 7v, or a 5v would be the solution - in my mind I automatically think surely less voltage wouldn't be the answer... not that I'm disputing what you're saying! Only that I need to learn about this stuff!

Should I approach it in a different way or just get a different type of battery? Or would a stepper motor be better? (if that uses less power?)

The on-board 5V regulator supports limited power, i.e. the less input voltage the more output current. If you find a battery within the controller and servo operating voltage range then use it without any regulator.

A stepper motor consumes the most energy while standing still, not a good solution.

So certainly do not - never - use "Vin".

The standard supply for a servo motor - unless I am wrong - is a holder with four AA Ni-MH rechargeables. That voltage, nominally 5 but up to 6 when freshly charged - is within the acceptable limits of the Arduino so you can connect it to both

Your problem is not with the available voltage. That is enough - arguably too much even.

Your problem is the available current. That is quite certainly NOT enough. A 9V battery can not deliver much current; a pack of AA batteries delivers far more.

Just something like this then?



That's the one!

Note Ni-MH rechargeables, not alkaline "dry" cells; that would be too much voltage for the Arduino.

3x alkaline works fine, too. Enough for both the Arduino and the servo (fresh cells are about 1.65V so x3 = 4.95V), but torque will be a little less than when running with 4x NiMH.

I am building a rather small project which I would like to be battery powered. 4x rechargeable AA's should do me fine but I've been unable to find a cheap battery holder with a barrel plug to suit.

I have however found an 8x one - I'm just wondering if this would still work with only 4 batteries or whether I would need to occupy all available slots for it to work?

8x battery holder with barrel plug



Though I only see 4 slots on the battery holder shown in the pic, if the battery holder is for 8 batteries, then the holder is wired that way. If you have a solder iron you could modify the 8 slot battery holder. otherwise the holder will want 8 batteries.

Four slots shown on top, four slots not shown on bottom.

Some additional wiring will be necessary.

Some Arduinos use electrical current for other things in addition to the microprocessor, such as USB, power LED, linear regulators, etc. I hope that rechargeable AA batteries will have enough energy.

Questions to answer: How much energy is actually needed? How much energy is actually available?

Question: To what do you intend to connect the "barrel plug"? Clearly not an Arduino UNO or Mega 2560. :astonished:

You will need to solder a wire to short out four of the battery positions. This is a little tricky as on that plastic holder, soldering to the rivets tends to melt the plastic.

You can get holders for 4 cells, you can get wire ended battery clips to connect to the battery holder and you can get barrel plugs to solder to the ends of the wires from the battery clip.

And you can make dummy batteries from lengths of wooden dowel by using wire to connect thumb tacks in each end of the dowel.

4x AA holder

4 rechargeables are ~ 4.8V, no?

Connect to 5V on power header.

Basic holders

Or go with 6 or more batteries if you want connect the barrel jack so the reverse polarity protection diode and regulator can knock if down to 5V.



Could you take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum.

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