Hi,
I bought a Futuba s3003 servo
They say with 20ms delay and range b/w 1-2 ms u can control the rotation.
Should the PWN be continously sent to the motor?..
doubt: if i do,the motor continously rotates till mechanical limits.
i believe 1.5 ms is the mid position.
This is the CODE sample for 1.5 ms
when external input to 3.2 pin of 89c51 is given,i enable the servo..
Yes, 1-2ms on, remainder of the 20ms off, sent continuously, 1.5ms is the center. If it runs to the limits, it means the timing is off. Are you using a 12mhz clock?
hi,
firstly ,thank you very much for the reply...
No i am using 11.0592 MHz..
if i send the pulse continously,how does it stop at ,lets say 90 degrees?..
in my above code...it doesnt stop at 90 degrees.
can u pls clarify this point.." the timing is off"..
does it mean..a 0 pulse should be sent from the microcontroller at all time to the motor?
One more note: the seller told me ..its a 24ms servo..
At 11mhz looks like your code is going to deliver a 1.37ms pulse. Shorter pulses = clockwise, looking at the top of the servo, so it is going to be more clockwise. You need to reduce
TH0 = 0xFA; // 1.5ms
TL0 = 0x24;
Also, check the pulse on a scope. Make sure you are sending what you think you are sending.
hi,
i did a try..there is problem..the servo keeps goin to its limits..
this is the code
pls do check..
this is what happens
whenever i insert zero to pin 3.2(variable n)
the servo rotates ,else no rotation.
how can i make it specific..like a defined rotation of 90 degrees?..its not happening here..
I see the problem - you have to set up a condition for that port pin INSIDE the timer interrupt. Don't make the timer itself conditional, it just runs continuously.
Hi again,
I tried the code..this is exactly what happens
Whenever the P3.2 ==0 the servo rotates clockwise,if i give continous zero without a break,the servo rotates clockwise to its limits
there is no counter clockwise rotation(2ms)
am i really missin any basic points here?..will it move anti clockwise in this case(the code above)?
duffy, i have one more file,which mite interest you...pls check it out..
iam gonna get a new breadboard to out this stuff in a day or two..
thanks again..have fun!
=========================
the code in the file is meant to run 8 servos using 89c51.the eg code given inthat is to run the servo in clockwise n anticlockwise upto the extremities w/o any defined timing..i.e.it runs irregularly relative to the timer..
If you have a scope, then check the output signal - it should be a pulse between 1mS and 2mS, repeated every 20mS or so (the 20mS doesn't need to be accurate, only the 1-2mS matters.
ok,
i will take it to my univ n check it up..only option i hav.
in keil,there is somethin called..logic view analyser..it shows waveforms from a port pin...any clue abt it?...
i was thinkin of switching to 12Mhz crystal...easy calculations perhaps..
hi..
sry for the late..
i had tried interchanging..but it din work..it still went clockwise when P3.2 = 0.
i even tried the exact value wrt 11.0592 Mhz..
most prolly my univ opens 2mrw..i will check it up there..
there must be some issue with the 1-2 ms..
if any other options...pls lemme knw...
sam
Well, that should tell you something right there. If you did that, it should be loading the OTHER timing variable and P3.2 should work the opposite way.
Try this - remove the conditional statement (the "if" clause) so that it just executes one of the timing variables all the time. Now P3.2 shouldn't make any difference. See what happens.
HELLO,
How r u.
please send me your final year project with circuit diagram,layout and other details.
u can send me other projects also with full details.
BUT I MAY WANT PROJECTS NOW IMEDIATELY.
I U WILL SEND ME NOW I WILL BE SO SO MUCH TANK FULL TO YOU.
my other E-MAIL ID SUEZMALIK@yahoo.com
YOU may have to send me on my both the E-MAIL.