hi
i just received two metal gear servos i ordered two weeks ago from ebay
**broken link removed**
my problem is both servos only rotate in clock wise direction.that is they can move from 1500us--> 2200us but fail to move 2200us-->1500us. so i have to rotate arm manually by hand.
this is the code I'm using (CCS C v4.084 on 12F675)
I think the problem is your code. It appears to generate the same duty cycle, as the values for delay are hardcoded. To reverse your motors, you need to change those values. But I'm not an expert on whatever system you're using. Just what I see in the code.
What values are you using? I've only played with servo motors, but I've only used duty cycles of 10% or less. Maybe you're using too much high time. Try using aournd 5% - 15% duty cycles.
Looks like 2000us hight and 18000us low. Ok that looks about right. Well, I just don't know then. All I can say is make sure you're not doing something stupid, like forgetting for rebuild your code each time you change the settings. (by "stupid" I mean the kinds of things I do all the time) You can also try a program that moves from one position to another, with a long dealy in between. Here is my basic stamp program excerpt:
Code:
DO
DEBUG "Counterclockwise 10 o'clock"
FOR counter = 1 TO 150
PULSOUT 14, 1000
PAUSE 20
NEXT
DEBUG "Clockwise 2 o'clock"
FOR counter = 1 TO 150
PULSOUT 14, 500
PAUSE 20
NEXT
DEBUG "Center 12 o'clock"
FOR counter = 1 TO 150
PULSOUT 14, 750
PAUSE 20
NEXT
LOOP
First 5 lines uses 2ms high and 20ms low, does it 150 times ( see the "for" command )
next 5 lines uses 1ms high and 20ms low, also 150 times
next 5 lines uses 1.5ms high and 20ms low, also 150 times.
"Do" and "Loop" creates a forever loop, just as your while(1) does.
after executing
"next 5 lines uses 1.5ms high and 20ms low, also 150 times."
then infinite loop moves to
"First 5 lines uses 2ms high and 20ms low, does it 150 times ( see the "for" command )"
that is correct. It should change directions between the first-second position and second-third position. Don't know if that makes any sense. Show your new code.
Just let the damn thing run until you pull the plug. Then, try using the sequence, 2200us, 900us, 1500us, instead of what you presently have. That way, you have a change of direction programmed in every loop, and you should see at least 1 change of direction even if you forever loop isn't working.
Just let the damn thing run until you pull the plug. Then, try using the sequence, 2200us, 900us, 1500us, instead of what you presently have. That way, you have a change of direction programmed in every loop, and you should see at least 1 change of direction even if you forever loop isn't working.