hi everybody i have this problem i couldnt tackle, i am building a mini robotic arm it has 3 servos to do 3 DOF. one is futaba, one is JR, the other is Hitec they are controlled by a 18f4550 chip that receives commands (servo delay time) via usb. i send 3 bytes 0-255 down usb through HID interface, the controller gets the bytes multiplies each by 10 to convert it to microseconds . for ex: i send 150 the controller makes it 1500 and use it like this: output_high(SERVO_1); delay_us((int16)(usb_buffer[0] * 10)); output_low(SERVO_1); .. same thing done to servo 2,3 .. while(t != 0) { usb_task(); } t = 1; repeat... variable t is a volatile int that is changed by timer 1, overflowes every 20000.012 us. the problem is that 2 of the servos shake to an unacceptable level. i checked the timing with the PICKIT2 and its within specification (as far as i know) pulse width off by max 10us, refresh rate is 20.01mS dead on every time. (checked the timing at the pins which the servo female headers mounts) i tried to remove the delay between pulses, measured the distance between pulses its ~5.6 - 5.9 ms apart, it works but not every time. the problem shouldnt be because of the power supply cause its a standard bench-top PS found in many labs. please help i dont know what do to now... thanks for you time..
problem solved !!!! the circuit board that the servos connects to didnt have a common ground with the PIC18F4550 controller board. can you belive that ! i am almost graduating with a degree in ECE and have good background in circuits and computers and still make silly mistakes that leaves me taring my hair for a while so dont feel bad the next time you make a mistake. case closed, over and out...
Ive made the exact same mistake, with a 16F819 (I believe) and some hobby servo that I was testing. I was powering the servo from my power supply and the ICD2 was powering the chip. Same symptoms as you too...
Thanks for sharing the fix as I would of said that it was because you were using 3 different servos. Thanks I'll add that to my memory for futuba reference (I mean future)