element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Servo Help
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 8 replies
  • Answers 1 answer
  • Subscribers 417 subscribers
  • Views 929 views
  • Users 0 members are here
  • servo
  • arduino
Related

Servo Help

e14 Contributor
e14 Contributor over 12 years ago

I'm trying to run two radio shack standard servos, that is there model, to make the catbot from Instructables.  The problem I'm having is that the servos do't move like they should.  I've used the sweep sketch to verify that it's not me.  It will run through the a few time then forget where its at and start over.  The link is below.

 

CatBot: Automated Cat Laser

  • Sign in to reply
  • Cancel

Top Replies

  • mcb1
    mcb1 over 12 years ago in reply to ntewinkel +1 verified
    Typically the Arduino resets because the spike from the servo drops the supply, enough to cause a reset. Motors tend to draw 2-4 times their running power when starting, hence they often overload the supply…
Parents
  • ntewinkel
    0 ntewinkel over 12 years ago

    I love that CatBot! I'll have to try that myself some time image

    Thanks for pointing it out.

     

    Is it possible that the Arduino is resetting, causing it to start over?

     

    Cheers,

    -Nico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • e14 Contributor
    0 e14 Contributor over 12 years ago in reply to ntewinkel

    How would I know if it is restarting?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ntewinkel
    0 ntewinkel over 12 years ago in reply to e14 Contributor

    You could print something to the serial port at startup. The serial monitor will then show if it restarted. More details on how to write to the serial port are in this Oomlout tutorial: products:ardx:circ-10[.:oomlout:.]

     

    The serial printing is also a good way of debugging, to see what else might be going on.

     

    Cheers,

    -Nico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 12 years ago in reply to ntewinkel

    Typically the Arduino resets because the spike from the servo drops the supply, enough to cause a reset.

    Motors tend to draw 2-4 times their running power when starting, hence they often overload the supply.

    The instruction provides no extra filtering and depending on what Arduino you get, the results will vary.

     

    The best way is to provide separate power to the servos, and join the ground together OR you can try adding a 1000uF (or larger) capacitor across the supply as close to the servos as you can.

     

    To check for a reset, I would connect a LED (through a resistor) you could flash it three times in the void setup() part of the code.

    This would easily let you know its doing a reset as this only runs once.

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
Reply
  • mcb1
    0 mcb1 over 12 years ago in reply to ntewinkel

    Typically the Arduino resets because the spike from the servo drops the supply, enough to cause a reset.

    Motors tend to draw 2-4 times their running power when starting, hence they often overload the supply.

    The instruction provides no extra filtering and depending on what Arduino you get, the results will vary.

     

    The best way is to provide separate power to the servos, and join the ground together OR you can try adding a 1000uF (or larger) capacitor across the supply as close to the servos as you can.

     

    To check for a reset, I would connect a LED (through a resistor) you could flash it three times in the void setup() part of the code.

    This would easily let you know its doing a reset as this only runs once.

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
Children
  • e14 Contributor
    0 e14 Contributor over 12 years ago in reply to mcb1

    I'll hook up a 9 volt to the servos.  Thank you for the help on this.  This will help with my other project, and animatronic tail for my kids.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 12 years ago in reply to e14 Contributor

    Glen

    Just be careful with the 9v to ensure the triggering still works with only 5v.

    In theory a HIGH is above the halfway point so should work.

     

     

    This power issue comes up often, so you aren't the first, and won't be the last to encounter it.

    A battery (which servos normally connect to) is a very large capacitor, but when you use a power pack and the on-board regulator, it isn't the same.

     

    A general rule of thumb is to have 1000uF per amp of load. So for a single servo adding 1000-2200 (or larger) will only help.

    If the load is high frequency (very short spikes, square wave or other digital) then adding 0.1uF (100nF) capacitors, across the supply, at the source (load) will stop it being a nuisance.

     

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • e14 Contributor
    0 e14 Contributor over 12 years ago in reply to mcb1

    It's working great.  I added a dedicated power supply for the servos, 2 of them, and a cap across their rail.  I only had to tweet the angles a little to get the range I wanted.  This will go a long way to making my other project go smoother.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 12 years ago in reply to e14 Contributor

    Glen

    That's good news.

    The advantage of this is that you'll probably never think twice about adding the caps, and your projects will be 'glitch free'.

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube