(urgent) how to move a servo

Discussion in 'General Electronics Chat' started by nipkap, Mar 27, 2009.

  1. nipkap

    Thread Starter Member

    Mar 27, 2009
    12
    0
    Please help me (urgent)
    i have bought Gws servos (GWS S777CG 6BB) from ELE model .
    but i have no idea how to work these things.
    i even don't know how to move them, or what is required to mive them.
    and i am working on a project to build a humanoid, so please help me guys, as soon as possible.
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  3. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    As beenthere has indicated, you can consult the information on the datasheet for the servo you are using. Here is a general application note that I found on the gws website.

    hgmjr
     
  4. CoolbeaN

    New Member

    Mar 26, 2009
    9
    0
    Last edited: Mar 27, 2009
  5. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    I was hoping Bill Marsden, our guru on 555's, would have replied by now. See this thread: http://forum.allaboutcircuits.com/showthread.php?t=21032

    It is post #2. You need a base frequency of 50 to 120 Hz and a duty cycle of 1 to 2 ms. Ideally, model servos center on a pulse width of 1.5 ms repeated every 20 ms (50Hz); however, every servo I have dealt with is quite tolerant of the PWM being off frequency. It is the pulse width that is important.

    John
     
  6. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    It's funny, I've played with RC, and I've played with 555's galore, but I've never mixed the two. I'll have to try it sometime, but the advice so far looks good to me. I'm pretty ignorant about RC signals, fortunately a curable condition.

    I bookmarked your reply to a similar thread on my blog, because I'm planning on getting back to it sometime.

    http://forum.allaboutcircuits.com/showpost.php?p=104945&postcount=4
     
  7. nipkap

    Thread Starter Member

    Mar 27, 2009
    12
    0
    actually they did'nt send any datasheet thats why we are having so much of trouble.
    i have also given this type of pulses to them ...
    initially i used astable multivibrator(555) , and now m using mu=c for this ....
    but still not getting the expected output ....
    intially when we gave series of pulses to it using 555 ckt. the motr was moving to all 180 degree ...and was comming back to -180 degrees .

    now am giving serial pulses one after the another from 1 to 2ms it moving to one dircn. and stops the same happens wahen i give 1-2 and 2-1 ms.

    guys m very much frustrated with this thing ...
    plz help me. is there any probability that these servos follows any other rule .
     
  8. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Here is just one of a number of links to servo tutorials on the Internet.

    Provided it is a genuine servo which I believe it is, then it will certainly obey the standard set of servo control signals.

    hgmjr
     
  9. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    To me, it is not exactly clear what you are doing or what you have tried. For example, a "series of pulses" tells me very little. Similarly, 1-2 and 2-1 ms doesn't mean much. Were the signals to which you refer 1.2 ms and 2.1 ms? What was the repeat rate? You mention it went + and - 180°. That is unusual for a model servo. I have never seen one that did that. What voltage are you using?

    Could you post your circuit and/or code? John
     
  10. nipkap

    Thread Starter Member

    Mar 27, 2009
    12
    0
    sorry can't post the circuit due to some problems, but we used 555 and diode to build the astable circuit to produce small +ve pulse and bigger _ve pulses. initially when we gave this o/p to the servo instead of moving to the desired position it mived to and fro.

    now, when we are using the microconroller it moves for 180 degree in anticlockwise and stops and starts humming...

    we gave 1) 1.2ms with 18ms space
    2) 1.5 and same
    3 1.75 ms and same
    4) incresing series of pulses from 1.0 to 2 ms with spacing of 18 ms
    5)increasing to 2ms and then decreasing to 1ms with 18ms spacing

    please help ..
     
  11. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Have you measured the times on a scope or logic probe?

    It might be getting .15ms with a 2ms delay, etc...
     
  12. nipkap

    Thread Starter Member

    Mar 27, 2009
    12
    0
    i am using micro controller and the wave i have checked properly ... should i use any servo controller... and which one should i use for GWS S777CG 6BB
     
  13. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    Something doesn't make sense. You claim the wave is "proper" and presumably the servo is OK. Thus it should work, but it doesn't.

    We are trying to help you. An extra set of eyes to review what you think is proper may help, but we can't get you to post your circuit, describe how you measured the wave, or provide screen prints of anything. So, we are left to just guessing, which is unlikely to get to a workable solution.

    As for a servo controller, there are many examples on the Internet. Just search on RC servo controller. Some are MCU based, but most are based on the 555 timer.

    John
     
  14. nipkap

    Thread Starter Member

    Mar 27, 2009
    12
    0
    this is one of the programs we used .

    org 0000h
    LJMP main
    ORG 0030h
    main:mov TMOD,#01H
    back: mov TL0,#0ccH
    mov TH0,#0fch
    mov p2,#0ffH
    acall delay
    mov TL0,#0ffH
    mov TH0,#0b7H
    mov p2,#00H
    acall delay
    sjmp back
    org 0100h
    delay: setb TR0
    again: jnb TF0,again
    clr TR0
    clr TF0
    ret
    end
     
  15. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    For the code above:
    What frequency was the clock?
    What microcontroller?
    Was it running in debug mode?
    What did the code posted above do? What was it intended to do?
    Can you post images of the waveform you are generating? Include time/div and v/div.

    Otherwise, we are simply running in circles, and have no more usable information than we did at the start of the thread.
     
  16. nipkap

    Thread Starter Member

    Mar 27, 2009
    12
    0
    ok sir, i'll post the things u need ...
    tell me one thing if i won't give the required pulses then what will be the servo's movement .....is it that it will move to a particular point and will be stuck to that point...

    waitin for your reply
     
  17. nipkap

    Thread Starter Member

    Mar 27, 2009
    12
    0
    freq. is : 11.0592
    mu-c is : phillips 89v51rd2
    and one cycle of the wave is of :- .889 +ve
    and 19.99 -ve
    output voltage is 5 volts from the mu-c.

    hope this helps ...
    and will post the waveform soon
     
  18. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    One other quite significant information that is lacking is the hardware between the uC and the servo. No amount of programming is going to make up for a bad or incorrect interface.
     
  19. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    1) 11 Hz is way too slow. That could be part of the jitter problem.

    2) I don't understand the data you give for the wave. Are you saying the wave goes negative?


    Don't know what you mean by that. As I interpret it, in all likelihood the servo will pin, particularly with a 91 mS pulse (1/11 Hz).

    Obvious question: Do you have a common ground for the servo and pulse generator?

    John
     
  20. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    The servo isn't receiving the right pulses, both frequency and polarity.

    They need to be 5-10V pulses, 1-2ms in duration (square wave pulse), with 15-20mS "Dead Time" in between pulses. 90mS dead time usually makes the servo either old position, or return to center, as it assumes radio contact is lost. (airplane servos)

    Just to be sure, you have the supply, 6V typical, on the red and black wires with black being -/ground, and the signal pulse feeding the 3rd (often middle) wire with reference to the black wire (ground), right?

    The Power lines need to be connected to power All The Time, and only signal on the 3rd wire makes it move. It sounds like you are applying signal to the power wire.
     
Loading...