Arduino Forum

Topics => Robotics => Topic started by: aliyemek on Jul 20, 2011, 02:56 pm

Title: Problem with arduino uno moving giant servos
Post by: aliyemek on Jul 20, 2011, 02:56 pm
i have problem with moving my giant servo using a arduino uno,
i'm connecting the servo with arduino uno for Pulse and to a 6V battery for power
i'm afraid that it PWM of the arduino uno can't actuate a giant servo because my arduino can move normal size servos easily without any problem
thanks
ali yemek


Title: Re: Problem with arduino uno moving giant servos
Post by: johnwasser on Jul 20, 2011, 03:01 pm
It should work as long as you also connect the ground wire from the Arduino to the servo.
Title: Re: Problem with arduino uno moving giant servos
Post by: aliyemek on Jul 20, 2011, 03:10 pm
wouldn't that burn the arduino??? because i'm using a 6V battery and connecting it the servo to its red and black poles, so there will be no need to connect the ground (black wire) to the arduino
and dont think the arduino could handle that much current draining in it
Title: Re: Problem with arduino uno moving giant servos
Post by: johnwasser on Jul 20, 2011, 03:25 pm
The signal coming out of the Arduino is relative to the Arduino ground.  In order for that signal to get to the servo there has to be a return wire from the servo ground to the Arduino ground.  The +6V should not be a problem because it should not be able to reach the signal wire and therefore can't get to the Arduino even when the Arduino ground and battery '-' are both connected to the black wire of the servo.
Title: Re: Problem with arduino uno moving giant servos
Post by: aliyemek on Jul 20, 2011, 03:56 pm
ok i will try it
thank you
Title: Re: Problem with arduino uno moving giant servos
Post by: akshaykumar on Mar 26, 2012, 05:49 am
I am facing the same problem. I got 4 metal geared servo motor and i want to move it individually. i bought an arduino uno board. when i am adding single motor to board it is working perfectly to accurate angle. but when i am adding two or more motors to pwm pins power leds becoming dim since power is not sufficient. I am using power supply directly from usb. I even tried with 9v adapter power supply but facing same problem. SO can you help me out this problem
Title: Re: Problem with arduino uno moving giant servos
Post by: zoomkat on Mar 26, 2012, 06:00 am
Quote
I am using power supply directly from usb. I even tried with 9v adapter power supply but facing same problem. SO can you help me out this problem


Those power supplies are totally inadequate for powering servos. You need to get a larger power supply capable of supplying the servos at ~6vdc.
Title: Re: Problem with arduino uno moving giant servos
Post by: keeper63 on Mar 26, 2012, 06:27 am

Quote
I am using power supply directly from usb. I even tried with 9v adapter power supply but facing same problem. SO can you help me out this problem


Those power supplies are totally inadequate for powering servos. You need to get a larger power supply capable of supplying the servos at ~6vdc.


Figure about 1 amp per servo, so your power supply, when loaded, needs to be able to supply 6 volts DC at 4 amps to power 4 servos (this would be "worst case" scenario, with all servos powered and stalled).
Title: Re: Problem with arduino uno moving giant servos
Post by: keeper63 on Mar 26, 2012, 06:31 am
...on a side note...

I am starting to get sick of answering this question over and over again; I'd be willing to bet that you could find 50 threads (and likely a lot more) from the past year alone that address this very issue. I realize that there will always be newbies to the hobby, but in this day and age of google, why is it so hard for them to find answers?

Seriously: Is it a lack of trying, or is there really some other issue going on? I mean, I go to google, and type in "arduino servo power supply", and up comes numerous postings, threads, forums, blogs, etc - all detailing more than enough info in total for even a newbie to figure it out. I just don't understand it, and it is very frustrating to me...
Title: Re: Problem with arduino uno moving giant servos
Post by: dxw00d on Mar 26, 2012, 11:07 am
It's not just this question. There's the 'WProgram.h' question, and the 'multi-tasking' question and all the others that come up time and again. There seems to be a total lack of willingness to do any research, even though there is a search box on every page here. Some people seem incapable of reading the reference pages, or the release notes, or anything that might help them before just asking someone else to do it for them.

It's what led to this excellent article http://mattgemmell.com/2008/12/08/what-have-you-tried/
Title: Re: Problem with arduino uno moving giant servos
Post by: DuaneB on Mar 26, 2012, 02:57 pm
Hi,
   I saw 'code to ignore every sixth pulse' in the search terms directed to my blog recently. I am fairly confident that I know why the individual wanted to ignore the sixth pulse, most likely an overwrite of the value in an ISR, but the approach, find a ready built way to ignore it rather than 'what is it', 'why is it happening', 'can i fix it' is pretty sad.

Duane B.

rcarduino.blogspot.com (http://rcarduino.blogspot.com)
Title: Re: Problem with arduino uno moving giant servos
Post by: keeper63 on Mar 26, 2012, 06:42 pm

It's what led to this excellent article http://mattgemmell.com/2008/12/08/what-have-you-tried/


That's a great article and it sums up the issue well, while providing a framework for those needing real answers toward getting them, instead of nothing, or derision at worst.

I myself especially dislike those whose question basically boils down to "do my work for me" and "give me the code"; to my old ears they sound like script kiddies looking for "0-day passwordz", if you get my drift.

Those that look like the need a nudge, or genuine help, and have shown what they have tried - well, they'll get a -ton- of help from me; I think I proved that in that R/C car hacking thread not too long back - that was a fun one, and I'm glad it turned out well in the end. In that particular case, it was about something that didn't have a lot of info available on the internet, but the poster was clearly trying to figure it out from the first post - it just sorta rolled from there.

But some things, like questions on servos and power needs; they have been answered over and over - and over again. Then again, maybe the playground - in the servo library examples, tutorials, etc - maybe they don't mention anything (if not, they should). I did notice that they do seem to indicate "connect the grounds" which is a good thing. Even so, there are plenty of other references; there really is no need to post this question at all, unless the poser of the question did connect everything up right, and used a proper power supply, and was still having problems. If that were the case, and they presented evidence of it (code, schematics, pictures, video, debug output, etc) - then they have a legitimate case, and should seek help on a forum.

So often though - this isn't the case, and it is tiring to see. Maybe the article you posted will help some. I certainly hope it does...

:)
Title: Re: Problem with arduino uno moving giant servos
Post by: dxw00d on Mar 26, 2012, 07:04 pm
I think it was Nick Gammon that posted it first. Unfortunately, I suspect it will just be 'preaching to the choir'.
Title: Re: Problem with arduino uno moving giant servos
Post by: oric_dan on Mar 27, 2012, 01:08 am

Unfortunately, it doesn't help that, even if they did find the servo tutorial page, it "teaches"
them to connect the servo to the +5V buss on the Arduino board, and doesn't say anything
about servo power requirenments, or about connecting and powering 12 servos, or the
difference between Arduino power and servo power, or about ground paths.

http://arduino.cc/en/Tutorial/HomePage
http://arduino.cc/en/Tutorial/Knob
http://arduino.cc/en/Tutorial/Sweep

BAD DOG!!!

If the tutorial pages had some decent, ie "correct", information on them, we could just point
noobees over there. Oy.
Title: Re: Problem with arduino uno moving giant servos
Post by: DuaneB on Mar 27, 2012, 03:14 pm
Hi,
    There is also an amount of 'information fatigue'. I have been looking for a way to rescue some ATMega's I have locked myself out of and there are 100's of pages, suggestions, approaches and worst of all countless variations of each, I am drowning in these and quite literally have got to the point where i 'just want someone to give me the answer' :-(

    The playground is not a terribly useful resource, my guess is that people prefer to put their best and most upto date work in their own blogs (guilty). This needn't be a problem as many of us link to relevant blog content however I notice that the forum search facility seems to return older content more often than recent content, I assume that the algorithm give higher relevance based on previous visits rather than date. This is a major problem where improved and more uptodate content has been produced, but is being ignored by the search.

    Anyone else suffering from information fatigue or old search results ?

    Duane B.

rcarduino.blogspot.com (http://rcarduino.blogspot.com)

     

Title: Re: Problem with arduino uno moving giant servos
Post by: Jantje on Mar 27, 2012, 04:30 pm
To search I use google (I know about the other thread on links in google pinpointing privacy issues)
Add site:arduino.cc to your search text and you have the best search engine on the world returning only Arduino content at the price of your privacy

To handle the information overload stop reading and start doing. That is what helps with me.

Best regards
Jan
Title: Re: Problem with arduino uno moving giant servos
Post by: Jantje on Mar 27, 2012, 04:33 pm
I just tested it.
google for : giant servos site:arduino.cc/forum
And returned this very thread as very first hit.

Best regards
Jantje
Title: Re: Problem with arduino uno moving giant servos
Post by: DuaneB on Mar 27, 2012, 04:33 pm
Hi,
  I will take that onboard about adding the site to the search, I am not sure that I am in the 'reading not doing' camp though. Its doing that has locked me out of the chips !

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)
Title: Re: Problem with arduino uno moving giant servos
Post by: DuaneB on Mar 28, 2012, 08:50 pm
Some one had to do it, so here is a first draft, comments welcome -

http://rcarduino.blogspot.com/2012/03/how-to-connect-servo-to-arduino.html (http://rcarduino.blogspot.com/2012/03/how-to-connect-servo-to-arduino.html)

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)
Title: Re: Problem with arduino uno moving giant servos
Post by: oric_dan on Mar 29, 2012, 02:30 am
Quote

comments welcome -


LOL, I hope you don't take this too critically, as we all have our own
perspectives. You did a lot of work there!

I would have:

1. used a lot fewer words.
2. drawn a couple of schematics, showing 1 servo and many, with special
    mention of power and grounds, servo current loops [lots of current] and
   signal current loops [little current].
3. written a complete Arduino sketch that people could simply cut'n'paste.

But that's just me. :-)
Title: Re: Problem with arduino uno moving giant servos
Post by: zoomkat on Mar 29, 2012, 06:35 am
Quote
Some one had to do it, so here is a first draft, comments welcome -


Glad that somebody is interested in providing more info on controlling/powering servos. My observations:

1) Pictures of setups are good, but electrical schematics would provide needed additional technical detail for the servo wiring and power supplies.

2) The idea that a 9v battery with a 7405 regulator chip needs a stronger disclamer that the battery life will be short.

3) The code section is weak, not sure it would be of use to a newbie. Simple copy/paste test code needs to be included instead of relying on more complex code like the sweep example.

4) Information on the various types of servos might be helpful (standard vs continous rotation, etc.).

5) I personally like technical information pages better than narritave blog types of pages.

6) Links to other servo info sites like below might also be helpful.

http://www.lynxmotion.net/viewtopic.php?f=31&t=3172

 

Title: Re: Problem with arduino uno moving giant servos
Post by: DuaneB on Mar 29, 2012, 07:07 am
Guys,

Lots of fair enough comments, but I am surprised about the code example comments, Sweep is available in the IDE 1.0 is it not available in earlier versions ?

As for detailed trouble shooting on the code, I don't think anyone could have a reasonable crack at that, my main intention is to give a method for determining whether its a code problem or a circuit problem, I think creating a test servo in the code that receives no further commands is a good way of loading the circuit with a servo to determine whether the problem is in the code or the power supply/circuit. If its the code, I don't have the mental capacity to second guess half of what gets written out there.

I will leave things as they are for a few days and then rework the whole thing adding some videos of the Arduino driving six or seven servos and some more pictures, diagrams and reworded explanations.

Interestingly I tested with both the LIPO and the 9V battery last night with 3 standard size servos, the 9V was better than I expected, I was able to hold one of the servos in a stall and the system was happy to carry on, I was expecting an instant brown out at stall currents.

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)
Title: Re: Problem with arduino uno moving giant servos
Post by: oric_dan on Mar 29, 2012, 06:52 pm
Quote

Interestingly I tested with both the LIPO and the 9V battery last night with 3 standard size servos, the 9V was better than I expected,


"better than I expected" is hardly a "useful" scheme is actual practice, just like
the Arduino tutorial showing a servo connected to the 5V buss. It can be done
isn't the same as recommending a good solution.

First off, hardly anyone will connect just one servo, and secondly, no one
wants their PP9 battery going dead after 10-minutes or so. One needs to
emphasize good portable power sources, such as NiMH AA-cells in a series
arrangement, 2200-2500 mAh and ability to push > 1Amp current, rather than
150 mAh and which will go dead quickly.

Title: Re: Problem with arduino uno moving giant servos
Post by: DuaneB on Mar 29, 2012, 07:16 pm
Hi
   Point taken, so while we are all on the subject, can we agree that if someone is unwilling or unable to make the fairly significant additional investment in a hobby quality battery, charger and some form of regulator, the next best option is -

Rechargeable Nimhs in AA, D or C cells
A fall back option is then general AA, D or C cells

With the qualification that the rechargeable Nimhs are more useful in the long run, will often have higher capacity and are able to deliver higher currents.

Duane B.

rcarduino.blogspot.com (http://rcarduino.blogspot.com)

Title: Re: Problem with arduino uno moving giant servos
Post by: oric_dan on Mar 29, 2012, 10:59 pm

Quote

someone is unwilling or unable to make the fairly significant additional investment in a hobby quality battery


Non-rechargeable batteries are so ... 1952 AD, not 2012 AD.

Expensive RC store batteries might be better, but I've been using 2200-2500 mAh
NiMH AA cells bought from Walmart and Target for years on my small robots, with
up to 16 standard servos, and they work fine. I also use 6V SLA batteries on
my heavier robots.

Many people only use Lipo, but that's more preference than actual necessity.

So, you might point out what works good in practice, what sorts of energy levels
they each produce, and what is miserable [eg, Arduino 5V buss, PP9], rather than
trying to sell the case for only what is "best". Engineering is about making good
compromises.
Title: Re: Problem with arduino uno moving giant servos
Post by: retrolefty on Mar 30, 2012, 01:50 am
2200-2500 mAh NiMH AA cells especially those that are rated or recommended for digital camera use are very good general purpose power source for arduino projects. Just series them up for desired output voltage and parallel them up for more duration if desired. They can provide very good peak current loads.

I will confess that I also still use some non-rechargeable AA alkaline batteries but do buy them in bulk quantities at my local Costco warehouse store, seems to work out to be about 24 cents per cell. Note that your average drugstore wants around $2.50 each for those small 9 volt batteries that 1.50 worth of AA cells would last probably 50 100 times longer, or whatever the math is and would have much larger normal and peak current capacity.

Once educated about it, one should laugh at anyone still using a 9vdc battery in anything other then a smoke alarm or garage door remote or other device that uses just microamps of current.

Lefty

Title: Re: Problem with arduino uno moving giant servos
Post by: zoomkat on Mar 30, 2012, 02:51 am
Not sure why all the battery stress. At walmart they have four rechargable AA or AAA batterys with a plugin wall charger for ~$13. Get a holder for the four batterys at radio shack (or DIY one). That should be enough to start tinkering with servos.
Title: Re: Problem with arduino uno moving giant servos
Post by: oric_dan on Mar 30, 2012, 06:33 am
Quote

Not sure why all the battery stress. At walmart they have four rechargable AA or AAA batterys with a plugin wall charger for ~$13.


The idea is that, if someone is going to write a page about good practices for
connecting servos to an Arduino, then talking about how to power them should
be a prime concern. Then, noobees won't be trying to power them off the
Arduino 5V buss [like on the Arduino tutorial page] or a PP9 battery, and coming
to the forum to ask why it doesn't work.

Also, be good to talk about different energy sources and their suitability for
powering multiple servos.

Also, buying NiMh AA cells at Walmart has already been suggested 2 or 3 times
on this thread.

These are all suggestions for someone writing a tutorial page on their own.



Title: Re: Problem with arduino uno moving giant servos
Post by: zoomkat on Mar 30, 2012, 07:04 am
Quote
Also, buying NiMh AA cells at Walmart has already been suggested 2 or 3 times on this thread.


I only see walmart once previously mentioned, and without a current price point (but maybe it seems like more). Anyhow, a trip to walmart and RS is quick, practical, and easy to do for a quick start.
Title: Re: Problem with arduino uno moving giant servos
Post by: Jantje on Mar 30, 2012, 11:46 am
Zoomkat

Quote
Also, buying NiMh AA cells at Walmart has already been suggested 2 or 3 times on this thread.


I only see walmart once previously mentioned, and without a current price point (but maybe it seems like more). Anyhow, a trip to walmart and RS is quick, practical, and easy to do for a quick start.

I guess this is true in your part of the world.
In my part there is no wallmart and RS is a "business only" company.


So, you might point out what works good in practice, what sorts of energy levels
they each produce, and what is miserable [eg, Arduino 5V buss, PP9], rather than
trying to sell the case for only what is "best". Engineering is about making good
compromises.


I fully agree with "Engineering is about making good compromises".
I (and I feel many engineers with me) say that for newbees you have to let them focus on 1 problem at the time. Power (in this case batteries) is number 1 in side issue creation.
So I'm proposing to make the compromise of spending to much on the power to allow to focus on 1 problem at the time.
Once it works you can always replace your good power by a cheaper alternative and reuse the good power for your next project.
I'd say it is really worth the money.

Best regards
Jantje
Title: Re: Problem with arduino uno moving giant servos
Post by: oric_dan on Mar 30, 2012, 05:43 pm
Walmart and Target are primary supermarket chains in the US. They
must have supermarkts in Belguim that sell AA cells. No?
Title: Re: Problem with arduino uno moving giant servos
Post by: zoomkat on Mar 30, 2012, 06:14 pm
Quote
I guess this is true in your part of the world.
In my part there is no wallmart and RS is a "business only" company.


Yes, it is often difficult to get parts and equipent in developing nations. The point of the walmart suggestion is that now in many common stores in the US, in the camera section, there are blister packs of AA and AAA rechargable batterys with a small charger for a reasonable price.
Title: Re: Problem with arduino uno moving giant servos
Post by: dxw00d on Mar 30, 2012, 06:21 pm
I don't think Belgium can be classed as a 'developing nation'.
Title: Re: Problem with arduino uno moving giant servos
Post by: retrolefty on Mar 30, 2012, 06:36 pm

I don't think Belgium can be classed as a 'developing nation'.


Does that mean they are as developed as they are ever going to be?  ;)
Title: Re: Problem with arduino uno moving giant servos
Post by: zoomkat on Mar 30, 2012, 07:10 pm

I don't think Belgium can be classed as a 'developing nation'.


Well, if they don't have stores that sell the rechargable AA and AAA batterys used in digital cameras, then they still have some work to do.  ;) 
Title: Re: Problem with arduino uno moving giant servos
Post by: DuaneB on Mar 30, 2012, 07:21 pm
As I understand it, Belgium no longer has a government in which case they could be the most developed of all nations.

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)
Title: Re: Problem with arduino uno moving giant servos
Post by: Jantje on Mar 30, 2012, 07:26 pm
I'm glad to have helped put Belgium on your maps.  :D

Greetings from Belgium
Jantje
Title: Re: Problem with arduino uno moving giant servos
Post by: dxw00d on Mar 30, 2012, 07:34 pm
A Belgian invented Bakelite. What more do you need?

And, of course, Hergé was Belgian too.
Title: Re: Problem with arduino uno moving giant servos
Post by: Jantje on Mar 30, 2012, 07:37 pm
The number of people who don't know this and the number of people who don't know bakelite are countless.
I guess Jean-Claude van Damme is better known than the previous 2 "nice to knows"

Greetings from Belgium
Jantje
Title: Re: Problem with arduino uno moving giant servos
Post by: dxw00d on Mar 30, 2012, 07:40 pm
Everyone knows what Bakelite is, don't they? The early TV, Radio and Telephone industries were based on it.
Title: Re: Problem with arduino uno moving giant servos
Post by: Jantje on Mar 30, 2012, 07:53 pm
I don't think so.
Anyone younger than 40 not holding a engineering degree is very unlikely to know this material.
Shall we organize a poll? 8)
Title: Re: Problem with arduino uno moving giant servos
Post by: dxw00d on Mar 30, 2012, 07:59 pm
You're probably right. I'm certainly not in the under 40 bracket.
Title: Re: Problem with arduino uno moving giant servos
Post by: DuaneB on Mar 30, 2012, 09:04 pm
Hi,
   Going back to an earlier response RE Information Fatigue, I am certainly fatigued but have finally found the information and managed to get blink onto an optiboot ATMega8, solution here if your interested -

http://arduino.cc/forum/index.php/topic,99134.msg743041.html#msg743041 (http://arduino.cc/forum/index.php/topic,99134.msg743041.html#msg743041)

Duane B.

rcarduino.blogspot.com (http://rcarduino.blogspot.com)