Current draw when using servo

Hello! I'm very new to using Arduino and slowly figuring things out as I go. I am working on making a small robot that avoids obstacles using a HC-SR04 ultrasonic sensor mounted on a very small servo that will allow me to pivot the ultrasonic sensor without moving the entire robot. I am also wanting to add simple encoders (the cheap slotted IR type) to the two TT motors that I will be using to move the robot.

A lot of the parts that I will be using are from a robot kit that I purchased to get started since I initially had no idea what parts I needed. The main electronic components that I will be adding myself are the two encoders, so given that the Arduino (UNO R3) was able to power all of the other components, I believe that exceeding max current draw shouldn't be an issue. I am a bit concerned, however, because I read that the SG90 servo that I will be using draws 100-250 mA, and I know the Arduino UNO R3's overall max is ~200 mA. Additionally, I will be controlling the speed of my DC motors using two extra digital pins that were not utilized in the original kit. How would I go about determining whether or not I'm going to fry my board when I plug everything in?

If this really is a danger, I would appreciate guidance on how to power the servo. The servo requites 6V, but I will be using a 12V power source to run the Arduino and therefore cannot simply plug this into my sensor shield to power the servo.

I know this is a lot but I am very new as I said so I appreciate any help.

In other words, you'll be wasting 7V in the linear regulator.
The servo will have its own supply of around six volts.

Why 12v volts ?

Do you know what a buck converter is ?

Ok so looks like I was a bit confused about the voltage--I will be supplying 6V to the Arduino and the motors only require 6V. So I guess I directly plug my power supply into my sensor shield and power the servo from there?

I guess now my issue would be that from what I've read there will be a 2V drop in my motor driver if I use the analog pins to vary the speed. Not sure if there is any way around that or if I should just not worry about messing with the speed of the motors.

I just looked up a buck converter--hadn't heard of that.

Exceeding max current is an issue.
For example, let's say you have a servo that requires 6V 2A and you only have a 6V 1A power supply. The servo will not work properly because it needs the full 2A (especially under load). This may also cause your power supply to overheat, and you also risk a brownout on your electronics. Instead, use a 6v 2A or higher power supply because having extra current is fine (The servo will only take what it needs), but having to little current is bad.

The amperage provided by your power supply must match or exceed what the device being powered requires.

Here's some images/schematic for how to wire an external power supply to a servo:
Multiple Servos to one power supply
Power Supply to Single Servo Wiring

I recommend you use an external power supply for your SG-90 servo (whether it's a battery pack or a plug in power supply).

If your powering ONE micro servo (SG-90) use a 6v 1-2A power supply (1A should be enough because the max an SG-90 servo should take is 750ma). Plus, servos are power hungry devices and for all my micro servos I use a 6v (1A or higher) power supply.

Hope this helps.

I'm assuming that if I power the Arduino with 6V I could use the same power source for the servo?

You can't connect 6v directly to the 5V pin because 6V is too much.

If I were to do this I would take a 9v battery and plug it into the barrel jack of the Arduino Uno, like so:

or keep the Uno plugged in via USB, like so:

You can hook up your servo like the images above and try it out (This should work). If the servo stutters (stops and go) or shakes/vibrates, then it requires more amperage (then you would need an external 6V 1A or higher power supply).

The Arduino 5V supply is not suitable for powering servos. It may work with tiny servos for the sake of learning or experimentation, but if you're building something, it is asking for trouble.

Well, you might, but no-one who knew what they were doing, would! :roll_eyes:

The Arduino - UNO - does not supply power. It is not a power supply.

If you are powering it via the USB connector, you can with due care, draw up to nearly 500 mA from the "5V" pin presuming that the PC's USB system will supply at least 500 mA as it generally will. The UNO incorporates a "polyswitch" rated at 500 mA which is like a very slow 500 mA fuse which will eventually reset itself when disconnected.

But even small servos tend to draw more than 500 mA when working hard,so beyond a very brief test, this is not an appropriate way to power servos. You need a separate supply rated at least 1 A per servo (for the small ones anyway). And the servos generally work better at 6 V.

Now the situation is even worse for "Vin" or the "barrel jack" as the on-board regulator of the UNO(/ Mega/ Leonardo/ Nano/ Pro Mini) has basically no heatsink and will at most provide a couple of hundred milliamps before overheating and (hopefully reversibly) shutting down.

So generally you need to assume that "Vin" or the "barrel jack" are useless for powering the Arduino for projects where anything requiring any significant current is connected. If you are not powering it via the USB port, connect a regulated 5 V supply to the "5V" pin and ground.

1 Like

Sorry for the crummy circuit diagram but I haven't worked with any software for this stuff before so this is what I have to work with (if anyone has any suggestions for good, easy FREE software for making these types of diagrams I would love to hear them).

This is how I was thinking about plugging in the servo--I saw a video that used different power sources for the Arduino and servo, but I would like to use the same power source for both to cut down on the mass of the robot if possible. Would what I drew above make sense? (Assuming the power source is plugged into the barrel jack properly.)

Well, two problems with that circuit.

One is that the regulator on the UNO is not a LDO (Low Dropout) so fed with 6 V it will not manage to reliably provide 5 V. Therefore my comment in #9 seriously suggesting that you do not consider the "barrel jack" or "Vin" as actually usable in any way.

Secondly, a misunderstanding that servo signals are in any way related to PWM and require the use of a pin denoted on the UNO (by a "~") as "PWM".

This is possible if you use "buck" voltage regulators from a higher voltage battery source. I would use a 5V regulator for the Arduino, connected to Vcc and a 6V, high current regulator for the servos (1 Ampere per servo for small servos, 3 A/servo for large ones).

If your robot uses motors, post a link to the motor product page.

The data sheet for the servo:

I'd mentioned that this servo pulls around 100-250 mA when running--that information is not included the data sheet. Its just a value I googled.

The TT motors:

2 questions:

  1. If the servo does not use a PWM pin why does the data sheet label one of the three wires for the servo as "PWM"?
  2. If I do not use the barrel jack how am I supposed to power the Arduino when it is not plugged into a computer via the USB connector? Obviously I will have a motor driver for the large DC motors, but I do not plan to have a separate power source for all of my sensors.

Servos do use PWM, but at a very low frequency and duty cycle, typically 50Hz and 5 to 10%

Answered in reply #12. For successful use of this forum, read the responses to your questions.