Servos not serving


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: Servos not serving

    Alain,

    I guess I'm missing something in your "Pause Refresh - Pulse - Pulse - Pulse" statement.
    The "Pause" amount for loop # 1 will be "20 - 240 - 240 - 240 = 68ms"
    For loop #2 it will be "20 - 239 - 239 - 239 = 71ms"

    So to turn 90deg it will take 15.16 seconds?
    Is this right?

    Code:
    Total Pause (ms):	   15.16
    Total Pause(Value): 15160
    
    Pulse	Pause 
    Value Value
    ----- -----
    240	68
    239	71
    238	74
    237	77
    236	80
    235	83
    234	86
    233	89
    232	92
    231	95
    230	98
    229	101
    228	104
    227	107
    226	110
    225	113
    224	116
    223	119
    222	122
    221	125
    220	128
    219	131
    218	134
    217	137
    216	140
    215	143
    214	146
    213	149
    212	152
    211	155
    210	158
    209	161
    208	164
    207	167
    206	170
    205	173
    204	176
    203	179
    202	182
    201	185
    200	188
    199	191
    198	194
    197	197
    196	200
    195	203
    194	206
    193	209
    192	212
    191	215
    190	218
    189	221
    188	224
    187	227
    186	230
    185	233
    184	236
    183	239
    182	242
    181	245
    180	248
    179	251
    178	254
    177	1
    176	4
    175	7
    174	10
    173	13
    172	16
    171	19
    170	22
    169	25
    168	28
    167	31
    166	34
    165	37
    164	40
    163	43
    162	46
    161	49
    160	52
    159	55
    158	58
    157	61
    156	64
    155	67
    154	70
    153	73
    152	76
    151	79
    150	82
    149	85
    148	88
    147	91
    146	94
    145	97
    144	100
    143	103
    142	106
    141	109
    140	112
    139	115
    138	118
    137	121
    136	124
    135	127
    134	130
    133	133
    132	136
    131	139
    130	142
    129	145
    128	148
    127	151
    126	154
    125	157
    124	160
    123	163
    122	166
    121	169
    120	172
    Regards,
    TABSoft

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default Re: Servos not serving

    Quote Originally Posted by Tabsoft View Post
    Alain,

    I guess I'm missing something in your "Pause Refresh - Pulse - Pulse - Pulse" statement.
    you're right ! I missed time scaling

    should be
    Code:
    Pause Refresh - ((pulse + pulse + pulse)/100)
    note Refresh could simply be 15ms ( as precise 50 Hz repeating signal is not compulsory - only the 1.2 - 2.4 ms "1" level - )

    your travel time will simply be ...

    (240-120)* 20ms = 2.4 seconds ...
    Last edited by Acetronics2; - 5th May 2015 at 13:38.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  3. #3
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: Servos not serving

    Just wanted to say thanks to all for your insightful comments and programming hints. I printed off the stuff for later perusal and comparison to my program. I'm a "minimalist", I program with the least amount of code required (thus don't always initialize) and even build circuits with low parts counts. That's where I get into trouble...

    Thanks again.

  4. #4
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: Servos not serving

    If you want the duty cycle to be as close to 50Hz you can do this to account for the Pulsout statements, Low xx statements, For/next logic and the Pause statement.

    Change the Refresh constant value to 20000 'microseconds

    Then use this for the pause.

    Pauseus Refresh - (((pulse + pulse) + (pulse / 3)) * 10)

    This should keep the total duty cycle time to 20ms +/- (~100) microseconds.
    Regards,
    TABSoft

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Servos not serving

    Queenidog, Here is a program I wrote some time ago for a couple of kids to test some servos for there robot in the FIRST competition. It is a minimalist program I wrote during lunch one day. It might help. Oh I forgot, Also attached is a schematic I updated a couple of years ago. Enjoy...
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Dave; - 6th May 2015 at 12:03.
    Dave Purola,
    N8NTA
    EN82fn

Similar Threads

  1. Connecting PIC to servos
    By The Master in forum Off Topic
    Replies: 6
    Last Post: - 4th February 2015, 01:56
  2. Servos and Plusin math
    By Ramius in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st May 2012, 09:28
  3. Problem with servos
    By ncet20 in forum General
    Replies: 6
    Last Post: - 11th October 2011, 14:22
  4. Hot Servos
    By The Master in forum Off Topic
    Replies: 37
    Last Post: - 6th August 2010, 18:32

Members who have read this thread : 0

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