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

36 comments:

  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?

    ReplyDelete
  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

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

    ReplyDelete
  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.

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

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

    ReplyDelete
  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.

    Jeremy

    ReplyDelete
  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

    ReplyDelete
  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

    myservo.write(degreesToUS(pos1));
    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


    myservo.write(degreesToUS(45));
    myservo1.write(degreesToUS(45));

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


    thanks!

    ReplyDelete
  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.

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

    touch screen

    ReplyDelete
  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.

    ReplyDelete
  12. Are you desperately in need of a hacker in any area of your life??? then you can contact; services like; -hack into your cheating partner's phone(whatsapp,bbm.gmail,icloud,facebook, twitter,snap chat and others) -Sales of Blank ATM cards. -hack into email accounts and trace email location -all social media accounts, -school database to clear or change grades, -Retrieval of lost file/documents -DUIs -company records and systems, -Bank accounts,Paypal accounts -Credit cards hacker -Credit score hack -Monitor any phone and email address -Websites hacking, pentesting. -IP addresses and people tracking. -Hacking courses and classes CONTACT THEM= hackintechnologyatgmaildotcom or whatsapp +12132951376 their services are the best on the market and 100% security and discreet work is guarante

    ReplyDelete
  13. If you require professional help to recover your stolen cryptocurrency/Binary/Forex, forgot your password, sent BTC to wrong wallet address or hack your spouse’s phone remotely, spying on cheating spouse deleted chat conversation retrieval contact vitorzprogrammer@gmail.com WhatsApp +1 519 398 1460

    ReplyDelete
  14. My name is Davies, I was in love with my wife and we were married for eight years with a son his is Liam,I loved my wife so much she had access to all my bank account and even my cash app which my accountant agreed to and said it was a great idea, then it took my wife and my accountant two month to get hold of all my properties,all accounts but I had a cash app which they knew nothing about,I was thrown out of my own house was sleeping in a hotel for weeks she also took possession of my son could only see him once a week then I found out she was in love with my accountant all these while so I went online and I came across a private investigator who help me get all my properties and my accounts back even my company back how he did these I don’t know but I gave all the information he asked for and followed all his instructions and now I’m happy my life’s better now.
    Thanks to premiumhackservices@gmail.com
    Text (407) 777-4240
    I just said I should share my own story here
    Thank you

    ReplyDelete
  15. i was lost with no hope for my wife was cheating and had always got away with it because i did not know how or
    always too scared to pin anything on her. with the help a friend who recommended me to who help hack her phone,
    email, chat, sms and expose her for a cheater she is. I just want to say a big thank you to
    HACKINTECHNOLOGY@GMAIL.COM . am sure someone out there is looking for how to solve his relationship problems, you can also contact him for all sorts of hacking job..he is fast and reliable. you could also text +1 213-295-1376(whatsapp) or telegram +16692252253 contact and thank me later

    ReplyDelete
  16. I strongly recommend the service of a GREAT Hacker to you
    I have used him quite a number of times and he has never disappointed me. He does all types of mobile hacks, get unrestricted and unnoticeable access to your Partner/Spouse, Skype, Facebook Account, Email(s), Whatsapp, Instagram, Text messages, In coming and Out going calls, Twitter, Snap Chats, Bank accounts, Viber, Deleted files, Emails and Password etc. Email here; WhitehatstechATgmailDOTcom

    ReplyDelete
  17. Are you having a very low FICO score, and are desperate for a perfect and urgent fix? I confidently recommend CYBER CREDIT GURU. They cleared all negatives, late payments and collections from my credit report and boosted my FICO score from 505 to 800 excellent score, across all three bureaus within four days. CYBER CREDIT GURU does a very neat and perfect job without leaving any form of trace behind. You can give them a trial today and I bet you will never regret it. Contact: CYBERCREDITGURU (AT) GMAIL DOT COM or phone/text: +1 (650) 239 7249

    ReplyDelete
  18. Hire Wizard Brixton for a clean hacking job, you can trust on him, I'm Maria James Amos from Atlanta Georgia who has been through scam victim several times and that include the process i was trying to get my first scammer and then came in contact with fake hacker online, immediately i reached out to Wizard Brixton on WhatsApp (+) 1 807/ 234/ 0428 he got all my stolen funds recovered within a prior period of 48 hours, his technology actually works well and he prove him self to be the best hacker
    contact him now and recover all your lost funds Btc, Account ,cryptocurrency, and all platform you lost your funds ,Mobile cloning ,Social media hack contact him on email : Wizardbrixton@gmail.com he is a Real Wizard and Expert in Hacking filed

    ReplyDelete
  19. Wizard Brixton Group of Hacker save My Marriage I was a victim of Marriage cheats from my husband without knowing he has a family outside our Marriage and has been spending my money on them I never know he was capable of such but due thou the recently way he starts sneakily around I got suspicious of him and was in need of a Hacker to spy on him without no doubt my suspicious was true. Wizard Brixton Hacker got me proof of his message and calls and the address of other families where he goes frequently if you have such a cheating partner contact him via Wizardbrixton at Gmail dot com WhatsApp : (+1- /807-23 ) 4-0428 he is a Real Wizard

    ReplyDelete
  20. Do you need help to spy on someone or something? Are you worried about a cheating partner or spouse? Find out and catch a cheating partner with facts and evidence to back it up, do you need help recover lost or stolen passwords, track and monitor GPS location, etc; for all your spy and hack related services; find ( wizardbrixton at Gmail dot com ) on the internet for help and solution to all your spy and hack needs, Social media hacks Find them on online using your desktop or PC via your browsers URL box. They are the best, services rendered is 100% guaranteed to contact them on ( wizardbrixton at Gmail dot com ) on WhatsApp +1- 80723 40428

    ReplyDelete
  21. I Want to use this medium in appreciating Schwartz's hacking program, after being ripped off my money, he helped me in recovering the money back. have you ever made a wrong payment to Account, Bitcoin, Western Union, Money gram, PayPal, have someone rip you off a Gift card? are you suspecting your lover, do you want to get proof of what your lover/girlfriend is doing on her phone? contact: schwartzsoftwarehackingprogram@gmail.com he helped me in hacking into my cheating girlfriend phone I was able to read and access her chat conversation on every social media platform and I have proof of it .less than 12 hours Schwartz hacking program got the job done without excuse or delay you can as well reach out to him on: schwartzsoftwarehackingprogram@gmail.com / chat him on WhatsApp (+44- /744-82 ) 9-0030 ) Call and WhatsApp: +1(704)313-9661

    ReplyDelete
  22. I Want to use this medium in appreciating Schwartz's hacking program, after being ripped off my money, he helped me in recovering the money back. have you ever made a wrong payment to Account, Bitcoin, Western Union, Money gram, PayPal, have someone rip you off a Gift card? are you suspecting your lover, do you want to get proof of what your lover/girlfriend is doing on her phone? contact: schwartzsoftwarehackingprogram@gmail.com
    he helped me in hacking into my cheating girlfriend phone I was able to read and access her chat conversation on every social media platform and I have proof of it .less than 12 hours Schwartz hacking program got the job done without excuse or delay you can as well reach out to him on: schwartzsoftwarehackingprogram@gmail.com / chat him on WhatsApp (+1 704-313-9661

    ReplyDelete
  23. This is for persons seeking to recover all of their lost funds to online scams, you can contact Schwartz Software via the address--> [Schwartzsoftwarehackingprogram@gmail.com WhatsApp: (+1 704-313-9661) for a successful recovery and thank me later. I had my blockchain wallet spoofed by merciless rippers, due to lack of 2FA authorization, they were able to get away with my life saving (6 BTC) from my wallet, this made me very sad and depressed as I was desperately in need of help, I made my research online and came across a very credible and reliable recovery agent on this page. The hacker whom I learned is a partner with analysis and audits of where your stolen funds end up helped me recover all I lost and also revealed the identity of the perpetrators, that's why I'm most appreciative and also sharing the contact. For anyone in a similar situation seeking to recover funds lost to online scams, contact the recovery specialist he will attend to it Email:Schwartzsoftwarehackingprogram@gmail.com or chat him on WhatsApp (+1 704-313-9661)

    ReplyDelete
  24. Visual Hacker that always gives a perfect job I needed a Hacker who can help me to recover my investment plans, When they denied me the withdrawal of my investment, I saw a testimony about a Great Visual Hacker called GHOST CHAMPION HACKER so I contact him on GHOSTCHAMPIONWizard (at) Gmail dot com. He asks for the necessary information and I send it to him within a maximum of 48hours he was able to give me all the breakdown of my funds and he recovered my funds successfully were able to purchase my dream house and I want everyone to contact him GHOSTCHAMPIONWizard@GMAIL. COM for various type of Hacking. Mobile spy, Phone Hacking, Bitcoin Hacking, Account Hacking, Snapchat Hacking, Instagram Hacking. He is the perfect HACKER.

    ReplyDelete
  25. Hello Everyone have you heard of the latest Hacker in town I was down with a poor credit score and I was trying to upgrade it but to no avail, until I meet wizardbrixton@gmail.com he help me to upgrade and increase my credit score a wonderful Hacker you can ever imagine
    = Wizard in Social media hack

    =Remove Criminal Records

    = Recovery of your lost voicemail

    =Hack bank accounts

    =increase your credit score

    =increase your credit card limit

    = wipe your credit card debt

    =Mastercard, PayPal, Bitcoin, WU, Money Gram with untraceable

    =Top up your Bitcoin

    +He also hacked Facebook, Twitter, Instagram, Snapchat,

    = All social media hack mobile spy

    =Contact him on: WIZARDBRIXTON AT GMAIL DOT COM

    =Quick Respond on : +1- /807-23 ) 4-0428

    ReplyDelete
  26. Recovery Lost Funds From Online Scammer's/ Cryptocurrency/ Recovery of Stolen bitcoin / Bitcoin Mining/ Increase your Credit score/ MOBILE SPY REMOTECONTROL ACCESS AUTHORIZATION. Removing Bad Records from Both Public and Private database via Email: schwartzsoftwarehackins@gmail.com and WhatsApp contact : +16076220782

    ReplyDelete
  27. LARRY WIZARD SOFTWARE HACKING GROUP ★
    ★ THE SPECIAL SERVICES THEY OFFER ARE:
    * RECOVERY OF LOST FUND ON ANY CRYPTO WALLET (ATOMIC WALLET, TRUST WALLET, META MASK WALLET, EXODUS WALLET, COIN BASE, BLOCKCHAIN, BINANCE, ETC)
    * RECOVERY OF LOST FUNDS ON BINARY OPTIONS
    * Credit Cards Loading ( USA Only )
    * BANK Account Loading (USA Banks Only)
    * MOBILE SPY
    * MOBILE MESSAGE HACK ( SNAPCHAT, INSTAGRAM, SMS, VOICEMAIL CALL RETRIEVE, SPY ANY CHAT APP, CLONING A MOBILE AND HAVE ACCESS TO SMS AND READ IT ANYTIME )
    * TRACK YOUR PARTNER AND GET THEIR LOCATION WITHOUT THEM KNOWING
    * WE HAVE THE BEST TECHNICAL HACKING STRATEGIES WHICH SURPASSES ALL OTHER HACKERS

    ★ You can also contact us for other Cyber Attacks And Hijackings, we do All Hacking Services ★You can also contact him via Email(Larrywizardhacking57@gmail.com),via WhatsAppText:+971551744806

    ReplyDelete
  28. ‘’I need back my money’’.. ‘’ I need my family back’’ that was the only thoughts I had for months and thanks to Albert Gonzalez Wizard , I got back my family and my money .. I was depressed for months as my husband and 5year old left me to go live with his mum cos I used all our savings to invest in crypto investment company, took a loan and sold my car too in a bid to pay the withdrawal fees I was desperate very desperate and I nearly lost everything but thanks to Albert Gonzalez Wizard , he recovered my £861k from those heartless scammers .. it’s a long story but at the end I was happy , I am forever grateful to him.. GOD has made me to cross paths with him through a review on here and am writing this review here in hope that it will help someone out there , if you’ve been in a similar situation please reach out to Albert Gonzalez Wizard, he is a very competent and reliable hacker . The contact details are as follow , email: info@albertgonzalezwizard.online or albertgonzalezwizard@gmail.com whatsapp +31685248506 AND Telegram:  +31685248506

    ReplyDelete
  29. I lost all my money after falling victim to a cryptocurrency investment scam, I was logged out of my account and was told the account manager was sick and that I had to pay some certain amount to gain access to my accounts. I had invested some huge amounts of money into this platform Capital Express FX, a lady contacted me to invest in this platform so that I would make huge profits which I did but to my surprise, these were all scams and they have defrauded several others of their money through cryptocurrency. I was weak and broke, I couldn’t meet up with my bills until a friend of mine told me about Spyweb Cyber, a reputable and reliable recovery company. I contacted Spyweb and provided all the information to them, a few other things I couldn’t provide but this company did an amazing job to trace and recover my stolen money. I’m still amazed and excited that a company like Spyweb Cyber is out there helping victims of cryptocurrency scams recover their money. I’m truly grateful to their service and recommend them to everyone.
    Reach Spyweb at
    E-MAIL:spyweb@cyberdude.com
    E-MAIL:contact@spyweb.tech

    ReplyDelete
  30. 🔺Hello I greatly recommend you Via our ongoing Invitation to join our Great Illuminati and become Rich and Famous. Are you seeking for Wisdom and Knowledge? Are you a Business man/woman, Pastor,pianist,engineer,scientist, lawyer,Politician,Model,Music Teacher,Photographer,Musician,Doctor,fashion artist,Footballer,pilot,Swimmer, e.t.c? Do you want to be a Famous Artist or an Actor, and you want to be Rich, Powerful and Famous in the world? Join the Illuminati New World Order and let your Dreams come through, Become a new member today receive the sum of $1,500,000 USD to start a legitimate 10% guarantee business and with a car. We The Illuminati is an elite organization of world leaders, business authorities, innovators, artists, and other influential members of this planet. Our coalition unites influencers of all political, religious, and geographical backgrounds to further the prosperity of the human species as a whole, as the Elites 👁🔺. THIS IS YOUR ONE LIFE TIME OPPORTUNITY. WE'RE ALWAYS WATCHING OUT FOR YOU. Email illuminatisecretauthorities@gmail.com Note: There aren't any Human sacrifices and no bloody involvement.


    Please note, Kindly make sure all your responses are sent directly to the Illuminati secret Authorities email stated above only at: illuminatisecretauthorities@gmail.com or Call +1 (206) 895-6205 For more instructions on our membership process.

    Invite customers Get $50,000 USD reward 100% guaranteed and legitimacy

    ReplyDelete
  31. I can't express the gratitude I have towards SILVER HACK DIGITAL RECOVERY for figuring out my lost fund that I had considered very much gone. After I was robbed, I was on my dead end and SILVER HACK DIGITAL RECOVERY was my last hope, yours truly they helped me get all my lost funds. For anyone on the ropes, who feels like all hopes are gone and you are deciding if this can work for you, I gladly tell you not to worry, give SILVER HACK DIGITAL RECOVERY a try! They are Very professional and trustworthy!

    You can reach them via
    Email : silverhackaccessories @proton .me
    Signal : +16145683873
    Telegram: @silverhackdigital.

    ReplyDelete
  32. Are you in search of Recovery Professional?

    Montgomery elites truly live up to their name indeed! So I did invest with a fraud invest company bitcoin worth $94,800. Weeks after making that deposit, I was impressed by the sight of my dashboard showing it growing to about $140,000. Well, my joy was about to dwindle as I attempted withdrawing the profits and it was refuted. I continually emailed support severally but they weren't writing back. I wasn't about to let that go and so I started thinking of how it was to get back what's mine. I encountered folks on socials who also were victims to a similar investment plan and had it successfully reclaimed with the help of (montgomeryelites@) contractor.net). I emailed montgomery elites and they helped reclaim $81,330 of the deposit. The montgomeryelites_contractor _net pros are dazzling. Anyone requiring to recover money lost to swindlers, just test the montgomery elites, goodluck!

    ReplyDelete
  33. Cybergenie (@) Cyberservices (.) Com
    (+1-2-5-2 -5-1-2-0-3-9-1 - Whatsapp)
    I am putting this out here so others don't make the same mistake I made and if they have, there is still a chance for redemption. I entered a cryptocurrency scheme I knew nothing about because I was intrigued by the huge ROI numbers mentioned and how it has changed many lives, PS, I read those reviews from the scammer's website. This con artist I bumped into made me believe cryptocurrency trading and mining are so easy. All I had to do was register his crypto mining website, and make a deposit into my account while they sorted out the rest for me. After a few deposits, I was running into hundreds of thousands of profits, which motivated me to invest more, the more I invested, the more woes for me to access my invested funds. I had it enough and threatened to quit, and I was locked out of the account and discovered they were crypto scammers. Not many who had lost money to various scams were able to recover their stolen money back, but mother nature was fair to me as she directed my path with Cyber Genie Hack Pro. This team of professionals ensured I got back all I had invested in that platform along with the profits. I got help reclaiming my lost money back with the help of CYBER GENIE HACK PRO.

    ReplyDelete