Tuesday, April 3, 2012

Servo Problems - Part 2 - A Demonstration

If you have read the post Servo Problems With Arduino you will recognise the following as an apparently working circuit for driving one or more servos -

Lets have another look at this circuit -

In the following video I have replaced the 4 AA batteries that are powering the servos with a single 9 volt PP3 Battery. This battery is providing power to the servos and two LEDs through a 7805 regulator. This is a common regulator used in many Arduino's such as the Boarduino and standalone Arduinos. It is a reasonable replica of the 9V PP3 battery and on board regulator powering my Arduino UNO in the first video.

PP3 9 Volt Battery and The 7805 Regulator (red highlight) That Power A Boarduino

I have made one change to the circuit and introduced two series LEDs (and a current limiting resistor). Like all LEDs these two require a minimum voltage to light, in this case, combined they require around 4.5 volts. Thats about the minimum operating voltage of an Arduino so lets imagine that the LEDs are infact an Arduino sharing the same power circuit as the Servos.

Now lets see what happens under load -

Servo Under Static Load

When the LEDs go out, it is because the are no longer getting their minimum 4.5 volts.

When we apply a load to the servo, it draws more current, in this case it draws more current than the battery is able to deliver, when this happens, the battery voltage drops.

If this really was your Arduino it would have 'browned out' or at the very least your project would begin to behave oddly.

In the following video the servo is being instructed to sweep, even less effort is required to get the servo to take our imaginary Arduino out of service -

Loading Servos In Motion

Something else interesting is also happening, its easier to see in the following videos, but even without a load applied the servo is able to take down the LED Arduino -

In this circuit I have added another LED in the top left corner for comparison, this LED is driven by the Arduino power circuit (+5v -> 680 Omh resistor -> GND). The other two LEDs remain on the servo power circuit, note how the Arduino LED remains at a constant brightness whereas the imaginary Arduino LEDs flash noticeably -

Three Servos Overloading The Power Circuit

The camera is not fast enough to capture the full extent of the flashing in the LEDs, but if we can see it at all , you can be sure the Arduino is feeling it.

So what is this noise, where is it coming from and what can we do about it ?

Its not really noise, its our battery telling us that it just can't deliver the current we are asking for. The video is produced with no load, applying even a light load takes the LEDs out completely - thats not noise, thats your circuit telling you something.

The flashing is in sync with the servos changing direction at the end of their sweep. I don't have the means to investigate this further but suspect its down to the following effects -

1) The servos internal motor driver will be switching one set of transistors off and another on in order to reverse the motor
2) Momentum, the servo has to stop its internal motor and gears and get them moving in the opposite direction, this will require a burst of power.

Ok, but how do we get rid of the noise ?

As its not really noise, just our circuits way of telling us it doesn't have enough power, the solution is to add power.

Repeating the tests with the original four AA Battery pack provided improved results however it was not until I powered the circuit with a high power LIPO battery that the LEDs would remain lit at a constant brightness.

More on LIPOs and other batteries in a future post and some suggestions on using a similar LED set up to 'let the hardware do the work' in monitoring the power situation.

Duane B


  1. Hi, great post! I have a doubt: if I use only one battery for both circuits (arduino and servo), it's ok or I could have some problem?

    1. Investment plansPROMO PACKAGE �� BASIC Invest $70 earn $600 Invest $100 earn $1000  Invest $200 earn $2,000  Invest $300 earn $3,500  Invest $400 earn $4,500  Invest $500 earn $6,000 
      �� PRO  Invest $1,000 earn $15,000  Invest $2,000 earn $25,000  Invest $3,000 earn $35,000  Invest $4,000 earn $45,000  Invest $5,000 earn $60,000  Invest $10,000 earn $100,000. 
      �� PREMIUM  1BTC earn 5BTC  2BTC earn 10BTC  3BTC earn 16BTC  4BTC earn 22BTC  5BTC earn 30BTC. 
      MODE OF PAYMENT. Any, Suitable For Investors, But Terms and Conditions Apply.
      ⭐️HURRY NOW!!! Refer a Friend or Family member to invest same time, and Receive an instant $50 Reward. 
      To set up an INVESTMENT PLAN, Contact Admin: totalinvestmentcompany@gmail.com
      WhatsApp: +1(929)390-8581
      View more on YouTube: https://www.youtube.com/channel/UC3KWT9dTpFLi0S0vJTWuCJg

  2. Hi, If you look at the last video where the bottom two LEDs are sharing power with the servo, you can see that they flash, particularly when the servo changes direction. This is due to the power the servo is drawing which is causing the voltage available to the LEDs to drop. If you Arduino was sharing this same power you could expect problems. A basic solution is to power your Arduino from a 9volt pp3 battery and your servos from four AA batteries. Thats what is used in the video and it is why the LED at the top left does not flash, it is sharing power with the Arduino, not the servos.
    Duane B

  3. Hi, Really a great post... Thanks for the video tutorials. That help me to understand it well..

  4. A simple solution to use a single power supply is to feed the Arduino through a series diode on the positive rail followed by a generous (220uF +) capacitor to ground. The diode will prevent the motors from "drawing voltage" from the Arduino during the current peaks, while the capacitor holds up the voltage on the Arduino side. This works very well.

    1. Very interesting solution. I hadn't thought of this before. Why did you choose 220uF?

  5. awesome man, thanks for posting this. Now i can find why my project doesnt work!

  6. Hi there,

    I am trying to drive 12 rc servo motor for my quadruped project. I used 4 standard AA batteries and nothing happened. But when i fixed the batteries to only 3 servos it operated well. That would mean i need 16 AA batteries to drive 12 servo motor. Is this normal?

    I am using an SG90s servo.


  7. Hi,
    Hobby servos can require around 1 Amp each if they are working against a load. For 12 Servos you could look at using LIPO Batteries, they are smaller, lighter and deliver more power - they do require a LIPO Specific charger though.

    Duane B

  8. Great article.. (more troubleshooting tips would be awesome!)

    * how to solve jitter/twitching? I see it sometimes twitch when its in its end position?

    * (more important) how do you compensate for the initial position the servos move to when powered? (before you can send any type of servo.write() command?)

    ie: if you have two servos two to lift/move a platform together.. when you power they both individually move to their random/default positions before the code is attached/write a position to them?

    * (maybe specific to library or other user fault/error) ServoTimer2 uses pulse instead of angle...

    Im using this instead to help understand/use the library itself:

    #define degreesToUS( _degrees) (_degrees * 6 + 900) // macro to convert degrees to microseconds

    as in:

    myservo.attach(9); // attaches the servo on pin 9 to the servo object myservo1.attach(3); // attaches the servo on pin 3 to the servo object

    myservo1.write(degreesToUS(pos - 10));

    it also seems I need to 'off-set' one of these servo's to the get both servos to the same angle/position..

    ie: if I write


    to both servo & servo1.. they do NOT match/end at the same place. (maybe just mis-aligned arm placement?)


  9. Intead of Reverseing the Servo Direction / Power.
    - Why not Turn Servo OFF , then Switch Direction , then RePower Servo to ON ...
    Ie: No Conflict of Transistors ON.

  10. Thanks for sharing the valuable points, i think it still works.

    touch screen

  11. PLC SCADA 4/6 Weeks Summer Industrial Training  | Best PLC SCADA Industrial Training in Delhi- 9818293887
    The best PLC SCADA summer training company in Noida due to facilitating students with affordable course fee, placement solution and world-class practical summer training to the participants. Call @9953489987.

  12. https://www.w11stop.com/arduino

  13. I feel so happy writing this review about the Wizard Charles Group! you can as well hire him today.

    My Credit Card was on the poor side and I couldn’t get a house, a car or even a truck for my new business. I Couldn’t get approved for any type of loan until I read a comment about a private hacker online on how he helped some people fix their credit in the space of 2 Weeks. I gave it a try and reached out to him and to my surprise he came through. He increased Credit score boost to 850 and he also topped up my Credit Balance to $280,000 he did it perfectly well and removed all The negative items I had on my credit,  Notice: If you are looking for a professional hacker to provide hacking solutions on Recovering Scammed funds, increase your Credit score and top up your Credit  to any amount,  Bitcoin Lost funds recovery, Social media hacks  Bitcoin mining, DMV database, Access your spouse/partner social media, Monitor your colleague and a lot more, search no further.  hire them now by  Email: wizardcharles@consultant.com

    WhatsApp: +1 (385) 273 0329

    visit their website to read more about them:  https://wizardcharlesgrouphackers.com/.n/

  14. On this day 10/04/2021, I testify truly about wizardcharles1@gmail.com that indeed they are honest and truly the best to be contracted for any cyber fraud solution mostly when it comes to funds recovering cause I made a huge mistake that almost ruined my life and that of my families whereby both my credit score and funds amounted to $346,000.00 US Dollars were gone simply because I wanted to invest with a broker who made me believe I can become a multimillionaire within 6 months not knowing it was just only a way out to fraud me but all thanks to wizardcharles1@gmail.com

    visit their website to read more about them:  https://wizardcharles1.wixsite.com/mysite/services 

  15. Awesome Article! Thanks for sharing this types of article is very helpful for us! If you looking for car removal services than contact any time for Quotes. Our services are:

    Cash for Car in Capalaba
    Cash for cars Kangaroo point
    free car removal Southport
    Free Car Removal Service in Wellington Point


  16. Great Article! Thanks for sharing these types of article are very helpful for us! Looking for take Fire Design Studio services for contact us anytime.

  17. Do you need Personal Finance?
    Business Cash Finance?
    Unsecured Finance
    Fast and Simple Finance?
    Quick Application Process?
    Finance. Services Rendered include,
    *Debt Consolidation Finance
    *Business Finance Services
    *Personal Finance services Help
    contact us today and get the best lending service
    personal cash business cash just email us below
    Contact Us: financialserviceoffer876@gmail.com
    call or add us on what's app +918929509036