servo motor resets 16f877a - Page 2


Closed Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 41 to 80 of 86
  1. #41
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by burak450 View Post

    but sometimes when i turned power on ,servo turned full left sometimes didnt.I think my servos are crazy .BTW I connected a capacitor.

    I have an idea.Can this error(full left error) occur because of my code that i wrote.too many PAUSEUS may make this error.Should I try DUTYCYLE or PWM codes???

    Or Is there any power problem???

    Always Place a:

    LOW PORTx.y

    just before the PULSIN command ...

    That's all !

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #42
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Always Place a:
    LOW PORTx.y
    just before the PULSIN command ...
    I've heard you say that a number of times...not bad advice by any stretch...but I'm wondering why I've never had to use it and others seem to have so much trouble with that particular 'gotcha'...

  3. #43
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Lightbulb

    Hi, Ski

    Because you connect thing properly !!! servo before mains ...

    just try to plug and unplug your servo with power on the driving circuit ...

    you'll get an inverted pulse !!! not every time ... but once is enough for the crash ...

    I' ve been caught some years ago ... servos do not like that at all !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #44
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Because you connect thing properly !!! servo before mains ...
    just try to plug and unplug your servo with power on the driving circuit ...
    you'll get an inverted pulse !!! not every time ... but once is enough for the crash ...
    I' ve been caught some years ago ... servos do not like that at all !!!
    Alain
    Ok, that makes sense... Not the connect things properly, but the 'servo before mains' part. One time is all it takes...

  5. #45
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Macgman2000 View Post
    If you have an oscilloscope look at your control pulses from the PIC to the servo as it moves. If you see that the wave form (1~2ms pulse) is wiggling around or changing amplitude then you have a power supply issue. Do as I suggested above, get a 9v power supply (AC/DC) and use TWO 7805 regulators in parallel for the servo ONLY. At the servo use 470uF across power and ground. Look at the scope again and make sure you see a "cleaned" up signal while servo is in motion.

    Nick
    I tried everything which is suggested.I changed code and put PAUSEUS before pulsout.Something wrong ,I got same error I decided to change power supply.That can cause this problem.

    I hope it will solve my problem...

    I will use two servos...(one for left-right one for up-down).I wrote the code just for left-right.I will make servos TWO if I am successful left-right position...

    Why did you say two parallel 7805? One for pic and one for servo?

    How many 7805 regulators should I use?
    Last edited by burak450; - 3rd October 2008 at 02:38.

  6. #46
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Wink

    Wow...not reading very well these days...
    Doubling up on servo's will only compound your power supply quality problem.
    Why did he say 2 parallel 7805's? If you'd re-read post #39, you'll see why.
    And while you're at it, you might want to actually READ all of the advice given to you up to this point. Lots of advice being given repeatedly...seems like not a lot of it taken.

  7. #47
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default

    Hi,


    Just a little Typo ...

    LOW Portx.y

    has to be placed before

    PULSOUT ... and not Pulsin.

    Everyone had understood ... of course !

    Alain


    PS:

    PAUSEUS before pulsout
    are you sure ???
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  8. #48
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    I saw it now.He wrote for servo only....

  9. #49
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Unhappy

    A voltage reg will probably need 6.5v++ input voltage. Also, I have driven 4 large servos off of 2 paralleled voltage regs and a low current reg for the pic....no problems at all.
    A low current reg?

    He said we used large servos and mine is not large but I have to ask it because after a hour i will go to buy (9v supply,7805..,)

    Should I buy a current regulator?

  10. #50
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    No current regulator.
    What he means is say one 7805 will run the PIC (7805 at best 1 amp) = low current.

    Power supply for motors are made from parallel 7805s or some other type to handle the amperage needed.
    Dave
    Always wear safety glasses while programming.

  11. #51
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    No current regulator.
    What he means is say one 7805 will run the PIC (7805 at best 1 amp) = low current.

    Power supply for motors are made from parallel 7805s or some other type to handle the amperage needed.
    thanks a lot i am gonna try it...

    hi Acetronics ,

    I am sure i changed code like that

    motor:
    for i=0 to 25
    PAUSEUS 20000-(T*10)
    PULSOUT PORTC.2,T

    next
    return

  12. #52
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    God bless you guys!

    1-I connected 9v 450ma(I hope 450ma is fine) power supply and connected two 7805 paralel and used a 470uf between vdd and vss.Mcu doesnt reset itself and works fine! But I think servo works a little bit slower than past.I dont know why? maybe changing power supply from 5.2 to 5 makes this difference...If its neccessary I can put here its video...

    2-I think I finished left-right position and wrote a new code to complete my project.I wrote this
    but That doesnt work and servo2(up-down) made some stupid moves (like vibration).Also left-right motion gets very very slower...I know I made too many mistakes.But I learned here this forum too many things that I dont know.Everybody wants to help here and I was a little suprised at the beginning of this Thread.I put my code here.

    Can you help me again? t for left-right j for up-down.I bounded "j" between 135 and 115

    My code is....


    Code:
    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 5
    DEFINE LCD_BITS  4
    DEFINE LCD_LINES 2
    DEFINE OSC 4                                                                       
    DEFINE ADC_BITS     8       'A/D çevirim sonucu kaç bit olacak
    DEFINE ADC_CLOCK  3       'Clock kaynağı (3=rc)
    DEFINE ADC_SAMPLEUS 100
    SYMBOL F=PORTA.0
    SYMBOL G=PORTA.1
    alta var byte
    usta var byte
    altb var byte
    ustb var byte
    sola var byte
    solb var byte
    saga var byte
    sagb var byte
    k var byte
    t var byte
    i var byte
    j var byte
    ADCON1=2
    TRISA=%00001111 
    TRISB=0
    PORTB=0
    TRISC=0
    LCDOUT $FE,1 
    pause 2000
    adcin  0,ALTa
    ADCin  1,usta
    adcin  2,sola
    adcin  3,saga
    
    T=150
    j=125
    yap:
    
    
    
    
    adcin  0,altb
    ADCin  1,ustb
    adcin  2,solb
    adcin  3,sagb
    
    
    
    
    
    
    if  ((((usta+10)*100)/(ustb+10)))>130 and (not (t>194)) then 
    T=T+15
    endif
    
    if (((alta*100)/altb))>130 AND (not (t<51)) then 
    T=T-15
    endif
    
    if  ((((sola+10)*100)/(solb+10)))>130 and (not (t>134))    then 
    j=j+10
    endif
    
    if (((saga*100)/sagb))>130 AND (not (j<116)) then 
    j=j-10
    endif
    
    gosub motor2
    gosub motor1
    
    
    
    
    
    
      
    
    LCDOUT $fe,2,#usta," ",#ustb," ",#altA," ",#altb
    lcdOUT $fe,$C0,#T,"  ",#j    
    
    goto yap
    
    motor1:
    for i=0 to 25
    PAUSEUS 20000-(T*10)
    PULSOUT PORTC.2,T
    
    next
    return
    
    motor2:
    for k=0 to 25
    PAUSEUS 20000-(j*10)
    PULSOUT PORTC.3,j
    
    next
    return
    
    end

  13. #53
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    The lower the voltage the slower the motor.

    Are the values displayed on the LCD what you expect, are they in range?
    Dave
    Always wear safety glasses while programming.

  14. #54


    Did you find this post helpful? Yes | No

    Default

    Most hobby servo's have a max voltage of 6v. The 450 mA should be OK for testing the servo unloaded.

    If you have it turning a platform with large weight/mass then you can easily exceed 1A. A rule of thumb, the closer you get to maxing out the capabilities of your power supply the more noise you will see, especially true with motors, which could lead to glitches. I usually don't go over 50%, if I use a 2A supply for example, I only pull 1A.

    Also, decoupling caps are a MUST! use inductors when feeding motors power with custom H-bridges. Use 0.1uf caps to filter out high frequency spikes at the motor and on your power supply to the PIC.

    Do a search online for good engineering practice guides for dealing with inductive loads. There are tons of things that will go wrong working with inductive loads, you can solve most of them with well placed caps and careful layout.

    Nick

  15. #55
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    The lower the voltage the slower the motor.

    Are the values displayed on the LCD what you expect, are they in range?

    Yes,I think,they are....

    I follow t and j values by using lcd...

  16. #56
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Try this...see if it's any faster
    Code:
    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 5
    DEFINE LCD_BITS  4
    DEFINE LCD_LINES 2
    DEFINE OSC 4                                                                       
    DEFINE ADC_BITS     8       'A/D çevirim sonucu kaç bit olacak
    DEFINE ADC_CLOCK  3       'Clock kaynağı (3=rc)
    DEFINE ADC_SAMPLEUS 100
    f var porta.0 : g var porta.0 : alta var byte : usta var byte : altb var byte
    ustb var byte : sola var byte : solb var byte : saga var byte : sagb var byte
    k var byte : t var byte : i var byte : j var byte : adcon1=2 : trisa=15
    trisb=0 : portb=0 : trisc=0 : pause 1000 : lcdout $fe,1 : adcin 0,alta
    adcin 1,usta : adcin 2,sola : adcin 3,saga : t=150 : j=125
    yap: adcin 0,altb : adcin 1,ustb : adcin 2,solb : adcin 3,sagb
    if ((((usta+10)*100)/(ustb+10)))>130 and (not (t>194)) then T=T+15
    if (((alta*100)/altb))>130 AND (not (t<51)) then  T=T-15
    if ((((sola+10)*100)/(solb+10)))>130 and (not (t>134)) then j=j+10
    if (((saga*100)/sagb))>130 AND (not (j<116)) then  j=j-10
    for i=0 to 25 : pauseus 20000-((t*10)+(j*10) : pulsout portc.2,t
    pulsout portc.3,j : next i
    lcdout $fe,2,#usta," ",#ustb," ",#altA," ",#altb, $fe,$C0,#T,"  ",#j
    goto yap
    end

  17. #57
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    The lower the voltage the slower the motor.
    Are the values displayed on the LCD what you expect, are they in range?
    How many extra loops is he executing between servo updates?

  18. #58
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    thanks for the code.I am sorry it doesnt work properly..

    First I get a error and I fixed code in compiler--------pauseus 20000-((t*10)+(j*10) you forgot a parenthesis

    Servo stiil slower than usual mode

    When I worked with your code even j values got out of range...Once I saw j as 195...

    I might have another power problem like Macgman2000 said or something about code???

    You are right above.I have too many extra loops.I am stuck dont know what to do
    Last edited by burak450; - 3rd October 2008 at 20:25.

  19. #59
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by burak450 View Post
    Servo stiil slower than usual mode
    Does it speed up if you disconnect one at a time?
    The PIC won't (i.e. shouldn't) care if there's 1, 2, or 3, or more servo's plugged in since it's not reading anything back from them.

  20. #60
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Does it speed up if you disconnect one at a time?
    The PIC won't (i.e. shouldn't) care if there's 1, 2, or 3, or more servo's plugged in since it's not reading anything back from them.

    When I used single servo and used this code.Everything was perfect.Object followed by servo perfecly.(left-right position)

    Code:
    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 5
    DEFINE LCD_BITS  4
    DEFINE LCD_LINES 2
    DEFINE OSC 4                                                                       
    DEFINE ADC_BITS     8       'A/D çevirim sonucu kaç bit olacak
    DEFINE ADC_CLOCK  3       'Clock kaynağı (3=rc)
    DEFINE ADC_SAMPLEUS 100
    SYMBOL F=PORTA.0
    SYMBOL G=PORTA.1
    alta var byte
    usta var byte
    altb var byte
    ustb var byte
    ADCON1=2
    TRISA=3
    TRISB=0
    PORTB=0
    TRISC=0
    LCDOUT $FE,1 
    pause 2000
    adcin  0,ALTa
    ADCin  1,usta
    
    t var byte
    i var byte
    T=150
    
    yap:
    
    
    
    
    adcin  0,altb
    ADCin  1,ustb
    
    
    
    
    
    
    if  ((((usta+10)*100)/(ustb+10)))>130 and (not (t>194)) then 
    T=T+15
    endif
    
    if (((alta*100)/altb))>130 AND (not (t<51)) then 
    T=T-15
    endif
    
    
    gosub motor
    
    
    
    
    
      
    
    LCDOUT $fe,2,#usta," ",#ustb," ",#altA," ",#altb
    lcdOUT $fe,$C0,#T   
    
    goto yap
    
    motor:
    for i=0 to 25
    PAUSEUS 20000-(T*10)
    PULSOUT PORTC.2,T
    
    next
    return
    
    end
    second servo and new code =trouble
    Now i unplugged a servo ,left-right position servo stiill slower and worked not properly..

    Something wrong about codes you and me wrote....

  21. #61
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Swap servos? What happens?
    Dave
    Always wear safety glasses while programming.

  22. #62
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by burak450 View Post
    second servo and new code =trouble
    Now i unplugged a servo ,left-right position servo stiill slower and worked not properly..
    still slower and worked not properly.
    That doesn't tell me much. Is your servo spitting out banana's again? Or is it making breakfast? both of which are not proper actions for a servo...

  23. #63


    Did you find this post helpful? Yes | No

    Default

    OK I have got to ask. What are you moving with your servo? As I said in my previous email, 450 mA is fine for testing UNLOADED servos. Possibly 2 servos. If you are using "standard" size servos then 450 mA is just adequate for turning 1 or 2 without a voltage compression under load. Again.....what are you moving with the servo?

    Nick

  24. #64
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    This video shows left-right perfect tracking...http://www.dailymotion.com/burak450/...orks-fine_tech

    This video shows two servos crazy at the beginning..http://www.dailymotion.com/burak450/...-to-servo_tech

    This video shows (when up and down motion)(no vibration in left-right motion) servo vibrates weirdly...http://www.dailymotion.com/burak450/...-of-servo_tech

    Finally this video shows work of two servos up-down-left-right motion...http://www.dailymotion.com/burak450/...two-servo_tech

    something like grrrrrrr sound means vibration

    Vibration when up-down motion and crazy servo at the beginning make problems...

    Thats why I said it didnt work (properly! )or well or correctly
    I hope I answered all questions with videos...
    Last edited by burak450; - 3rd October 2008 at 22:59.

  25. #65


    Did you find this post helpful? Yes | No

    Default

    OK...just as I thought. Your power supply is not big enough. The other thing is you may need to get a larger servo to hold the turret vertically. The oscillation you see is the servo struggling to hold position and causing voltage dips because it is stalling. Get a 3A power supply from surplus, use several voltage regulators in parallel, filter with caps and get a metal gear servo to hold up the turret, they tend to be more heavy duty.

    Nick
    Last edited by Macgman2000; - 3rd October 2008 at 23:17.

  26. #66
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    The other thing is you may need to get a larger servo to hold the turret vertically.
    I dont think so, it can hold upto 10 kilos....Turret isnt a heavy thing...

    Did I understand right?I need to have 9v 3A power supply...

    several 7805 ?how many?2 enough?What do you think?

  27. #67
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by burak450 View Post
    Did I understand right?I need to have 9v 3A power supply...
    Apparently not because we've been telling you and giving you advice to fix your power supply issues for about 50 or 60 posts now...
    You may very well have a 9v 3amp power supply right now...but that doesn't mean it's 9v @ 3 amps continuous, maybe a surge of 3 amps, maybe not...
    How about a picture of your 'power supply'...

  28. #68


    Did you find this post helpful? Yes | No

    Default

    It's not the weight necessarily its the mass. The servo was intended to pull on a throttle cable, or steering linkage etc.... it is not intended to hold up a mass with a lever arm that extends beyond the servo horn rigidly. The metal gear servo's are generally a bit slower and are heavier duty. If you stick to the current servos you will have to gear the turret with a worm gear to keep it from back driving the servo.

    You have a few issues to work out in addition to the power supply it seems.

    Nick

  29. #69
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Good thoughts...
    Maybe if that 'turret' was neutrally balanced, the whole thing might perform a lot better.
    In the video, it almost looks like it's hanging off the end of a crane arm or something. Kinda like trying to hold onto a concrete block with your arms straight out.

  30. #70
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Hi skimask,

    Maybe I am always wrong...

    Maybe my english isnt good enough...

    But I think, it is not shame not knowing it is shame not learning ...

    If you wont help me ,dont reply my words please...

    When I read your words,I feel like humiliated

    Thats all...
    Last edited by burak450; - 4th October 2008 at 00:25.

  31. #71
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by burak450 View Post
    Hi skimask,

    Maybe I am always wrong...

    Maybe my english isnt good enough...

    But I think, it is not shame not knowing it is shame not learning ...

    If you wont help me ,dont reply my words please...

    When I read your words,I feel like humiliated

    Thats all...
    No one is trying to humiliate you. In fact, it looks to me like skimask is giving you a lot of help. Complete code is not help.

    Let me ask you to do something. Imagine how hard it is to help someone long distance like this? Sure the code can be posted and looked at easy enough, but what about the hardware that wee can not see or test.

    Now think about the kind of person that will tale the time to work through the kind of problems that we see on this forum.

    Now think about how you might make the person that is trying to help feel with your last post.

    There are many many people here that could help, but only a few that take the time. No wonder there are so few willing to help.

    That all said.

    Try a battery pack on your servos. If it is noise from the power supply like Nick said, that will stop it.

    And like skimask ask, show a picture of you power supply. As you are finding out, power supplies can be tricky.
    Dave
    Always wear safety glasses while programming.

  32. #72
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by burak450 View Post
    Hi skimask,
    Maybe I am always wrong...
    Maybe my english isnt good enough...
    But I think, it is not shame not knowing it is shame not learning ...
    If you wont help me ,dont reply my words please...
    When I read your words,I feel like humiliated
    Thats all...
    Whoa, hey, back up a bit here... Your English is a lot better than my __________ (insert any language other than English here) and completely understandable (if not a bit grammatically incorrect, but that's ok).
    What I'm saying is that you aren't listening very well. We believe the core of the problem to be power issues and you keep talking everything but power issues (i.e. code problems, etc) thinking that your power is infallible, when judging from the problems described, it looks like a power issue...for the last 60-ish posts. How long did it take you to finally add a capacitor?
    Think what you want, but in the end, I'd bet on a power supply problem...

  33. #73
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Whoa, hey, back up a bit here... Your English is a lot better than my __________ (insert any language other than English here) and completely understandable (if not a bit grammatically incorrect, but that's ok).
    What I'm saying is that you aren't listening very well. We believe the core of the problem to be power issues and you keep talking everything but power issues (i.e. code problems, etc) thinking that your power is infallible, when judging from the problems described, it looks like a power issue...for the last 60-ish posts. How long did it take you to finally add a capacitor?
    Think what you want, but in the end, I'd bet on a power supply problem...

    It's not about not listening,its about not understanding..

    Sometimes i dont get what all people said because i dont know too much about power issue...

    I appreciated what you did for me up to now..But say your word please more polite...

    I swap the servos and tried first program(single servo program) which worked perfect...

    But stiill remained vibration on up_down servo.I think thats interesting..

    There is no vibration or oscillation whatever you called, on left-right servo...

    Is this servo broken?

    I have to tell you another things...

    I connected 9v battery same problems remained...

    I tried two parallel 7805 and it makes servo slow because when I tried a single 7805 ,it worked fast...

    Thats gonna be a weird question but i want to ask:

    Second servo wanna have more current? Or is it broken?

    I cant explain why it vibrates...

    Finally I tried to connect two servo and tried to work with program which skimask wrote..

    Speed was ok but up-down servo vibrated again.Left-right worked well...

    I think there is no error in program that you wrote skimask...

    But i dont know where the problem is...
    Last edited by burak450; - 4th October 2008 at 12:57.

  34. #74
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Try tipping your gizmo on its side, up and down becomes left and right. If that helps then counter balance.

    We realy need to see your power supply! Two 7805s slower than one?

    Swapping the servos had no change? The up and down servo worked correctly as the left and right servo? If so, the servo is not broken, yet.
    Dave
    Always wear safety glasses while programming.

  35. #75
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    I swapped the servos and up-down servo didnt work correctly.It goes up and down but it makes vibriation...maybe that means its broken...

    thats my power supply...




    and thats 7805 circuit...



    and thats two servos..



    I think there are two possibilities about my problem
    power problem or broken servo...
    Last edited by burak450; - 4th October 2008 at 14:15.

  36. #76
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    When I say swap the servos, I was meaning physically. If the up/down is used for the left/right, does the left/right action still work.

    I I was wanting to see the 7805s in parallel.

    But... I still think the problem is power.
    The one 9volt 450ma source does not provide enough power for tho whole setup, I think.

    That is 450 ma total, yes at 9 volt, start adding two or more 7805s to drop to 5 volt and try to run motors... the amps are just not available.

    Do you have another source?
    Dave
    Always wear safety glasses while programming.

  37. #77
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by burak450 View Post
    thats my power supply...
    I'd get rid of that...and I'd be willing to bet if you hooked up an o'scope to the output under a load, the output would drop off like a rock and just plain look ugly.
    You'd be better off with an 8 cell AA NiMH pack of batteries. I would definitely support the load of 2 servos a lot better.
    A single 9V battery (the little square ones) or even 2 connected in parallel... That just isn't going to support the load either.

    and thats 7805 circuit...
    And again, I see the one capacitor across what looks to be the output power and ground lines....ONE capacitor. Are there any more around there? A small cap across Vdd/Vss on the PIC? Another one across Vin/Gnd on the 7805, one across Vout/Gnd on the 7805, one on the main power input? Maybe even one across V+ and Gnd for the servo?
    You need more than one capacitor in a circuit for good performance...One somewhere in the circuit isn't good enough.
    http://en.wikipedia.org/wiki/Decoupling_capacitor
    http://www.repairfaq.org/sam/aapsfaq.htm

    I think there are two possibilities about my problem
    power problem or broken servo...
    Well, you can waste your time by swapping servo's, trying different code, and so on...or you can get a better power supply and start making progress on your project. Your choice...
    Last edited by skimask; - 4th October 2008 at 17:22.

  38. #78


    Did you find this post helpful? Yes | No

    Default

    I hope my explanation is helpful, it may be more than you are looking for but it is good to know why things are as they are.

    The servo's you are using is standard size, under light load they draw about 150 mA. If you hang a 6kg weight on a cable and attach it to the servo horn (about 1cm radius) then you are drawing about 500~800 mA. Since in your setup you don't quite have that much weight, what you have is an extended mass, because of inertia the mass will resist moving at the speed that the servo circuitry is setup for. So the servo struggles to draw more current to compensate. This slowing down and speeding up causes current surges and voltage drops. That is why you see the oscillation.

    The hobby servos are rated for 4.8v to 6v (grandfathered since NiCd 1.2v/cell). At 6v it will move faster than at 4.8v (0.20s/60 deg compared to 0.16s/60deg). So seeing a slowing down compared to using higher voltage is to be expected.

    What test equipment do you have? Oscilloscope? Multimeter? etc...? What country are you in? is it difficult to get 9v @ 3A for example? If it is difficult then Skimask is correct in using NiMh or NiCd, or maybe even sealed lead acid (alarm system battery usually 3~6A)

    Nick

  39. #79
    Join Date
    Sep 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    First of all I read everything you wrote.I will go to buy a new power supply (9V 3A or more) and will use more caps as soon as possible...I havent got Oscilloscope,i have only a multimeter...

    But tonight I found out a new thing...

    I wrote a code to test servo broken or not....

    Code:
    TRISC=0
    i var byte
    BASLA:
    
    for i=0 to 25
    PAUSEUS 19500
    pulsout PORTC.2,50
    
    next 
    pause 4000
    
    for i=0 to 25
    PAUSEUS 19000
    pulsout PORTC.2,100
    
    next 
    pause 4000
    
    for i=0 to 25
    PAUSEUS 18500
    pulsout PORTC.2,150
    
    next 
    pause 4000
    
    for i=0 to 25
    PAUSEUS 18650
    pulsout PORTC.2,135
    
    next 
    pause 4000
    
    for i=0 to 25
    PAUSEUS 18000
    pulsout PORTC.2,200
    
    next 
    pause 4000
    
    
    GOTO BASLA
    END
    I connected first power supply 5.2V 2.5 A without 7805 and saw that...

    Servo didnt vibrated at values pulsout 50 and 100 but at 150 and 135 made vibration and finally at 200 didnt make vibration...

    Thats its video:http://www.dailymotion.com/burak450/...-52-v-25a_tech

    Secondly,I connected power supply 9v 450mA with 7805.Servo came at 50 position and couldnt move 100 and 150 position.I was very very suprised here.After that servo moved 135 position and made vibration!!!!
    Finally moved 200 with no vibration!!!

    That its video http://www.dailymotion.com/burak450/...with-7805_tech

    What do you think gentlemen?

    Broken servo or only power problem???

  40. #80
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Tough to hear the servo's in those videos...sure the video is low quality, but I think the audio is more important here...
    As far as the servo's vibrating/not vibrating... I think when your servo hit there limits (which is where I hear the constant whining) you won't have any vibration because it can't vibrate.
    I think what you really have to do is take those servo's off of that 'turret' and figure out where the limits of those servo's really are so you don't confuse a 'no vibration' condition with a servo that's hit it's mechanical (and/or electrical) limit. A pulse width of 1000-2000us for this servo, might not be good for that servo...or it might be just fine.

Similar Threads

  1. More Servo Woes
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 13th May 2009, 08:40
  2. Problem with 12F629, servo and EEPROM
    By Atom058 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 1st March 2008, 09:53
  3. Servo does not move
    By ruijc in forum General
    Replies: 12
    Last Post: - 12th November 2007, 19:14
  4. Beginner + Servo
    By james in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st July 2007, 21:31
  5. Help with Servo Control Please!
    By wireman22 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th June 2007, 18:15

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts