go away spammer

Author Topic: Issue modifying servo  (Read 1676 times)

0 Members and 1 Guest are viewing this topic.

Offline RedGolfTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Issue modifying servo
« on: September 18, 2011, 01:58:29 PM »
I recently bought some HS-311 Hitec Servos. I am trying to modify them, but when I use my microcontroller to tell it to go to 0, all I hear is clicking. I have tried other pulses also, and it still gives me the same clicking. I have tried multiple servos, and they all do the same thing. Can anyone help me with my problem?

Here is the code (modified from $50 robot)
Code: [Select]
int main(void)
{

configure_ports(); // configure which ports are analog, digital, etc.
a2dInit(); // initialize analog to digital converter (ADC)
a2dSetPrescaler(ADC_PRESCALE_DIV32); // configure ADC scaling
a2dSetReference(ADC_REFERENCE_AVCC); // configure ADC reference voltage



while(1)
{

servo_left(35);

delay_cycles(500);//a small delay to prevent crazy oscillations
}
/*********ADD YOUR CODE ABOVE THIS LINE **********/

return 0;
}

Should I build the microcontroller first and then modify the servos?
« Last Edit: September 18, 2011, 03:18:36 PM by RedGolf »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Issue modifying servo
« Reply #1 on: September 18, 2011, 06:01:09 PM »
Hi,

I recently bought some HS-311 Hitec Servos. I am trying to modify them, but when I use my microcontroller to tell it to go to 0, all I hear is clicking. I have tried other pulses also, and it still gives me the same clicking. I have tried multiple servos, and they all do the same thing. Can anyone help me with my problem?

Here is the code (modified from $50 robot)
Sorry, but this subset of a program tells me less than nothing
Where does the clicking come from (the servo or somewhere else)?
How fast is the clicking?
What happens if the servo only gets the supply (positive and negative battery voltage) and the servo signal wire is disconnected?
Does it happen on unmodified servos (that you have never opened)?


Should I build the microcontroller first and then modify the servos?
Either that, or find some other means of generating a 1.5ms positive pulse every 20ms.
If you have an oscilloscope (or access to same), check whatever you use to generate this pattern.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here