Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: tipipliou on March 11, 2010, 01:00:50 PM
-
hi
i bought 2 hitec servos HS-422,and I would test them before modifying them
i made a test program ,but it doesn't work as it should >:(
i generated a 2 ms width pulse,repeated every 20 ms during 1 second, then a tempo of 2 seconds,then a 1.5ms width pulse,repeated every 20 ms during 1 second,i did the same with a 1 ms width pulse
with this program ,i think it should turn,wait 2 seconds,come back wait 2 seconds,then turn the other sens.
well ,IT DOES NOT !!!
sometimes ,it doesn't move at all,sometimes it moves really really slowly (just like a stepper) ???
so ,i wish somebody could help me,tell me what i have to check,or a mistake with the program .......... please :'(
PS : i do the tests in educational board,with a an old computer power supply,the microcontroler is a Pic16f877a,i use mikroC for prgramming
-
Hi,
then a tempo of 2 seconds,
I guess you mean a pause of 2 seconds?
No reason for a pause. Just go from one timing to another and hold each for at least as long as it takes the servo to go to that position.
Put a 'scope on the servo output to see if anything happens at all.
-
yes,i mean a pause
so there is no problem with the program?
ok,well, i'll keep on trying ,the problem provides probably from the wires and their connections
but could you explain why sometimes it turns very very slowly? ???
thanks
-
Hi,
so there is no problem with the program?
I never said that. I said check the servo signal with an oscilloscope, to see whether any pulses appear.
the problem provides probably from the wires and their connections
Are you perhaps using a solderless breadboard?
They're very prone to errors of the intermittent kind.
but could you explain why sometimes it turns very very slowly? ???
Again, it's hard to tell anything about a circuit thousand of miles away, no matter how far sighted I may be ;D
"Very very" is not the best way of describing rotational velocity, something like "45° in 10 seconds" is more descriptive.
Depending on the metric equivalent of "very very", it might be that it's when it's actually working as wanted.
You might consider making a simple servo tester in hardware. Something like this (http://www.sentex.ca/~mec1995/gadgets/servo4.htm)
It will help by reassuring servo functionality, both before and after modification.
-
hi
I finally found out the problem
it was MikroC,when i built projects ,it seemed fine but when i checked the microcontroler outputs ,it was 2V everywhere !!!!!
so i tried to build it in another directory(with the examples),it worked perfectly 8)
thank you for your advices
ciao