Author Topic: 50$ Robot Servos Not Responding Right  (Read 4900 times)

0 Members and 1 Guest are viewing this topic.

Offline AKnickolaiTopic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
50$ Robot Servos Not Responding Right
« on: February 19, 2009, 11:36:46 PM »
I am building a $50 robot in conjunction with someone else, and we are both having similar issues.  We decided to save the hassle of modifying servos and bought some continuous rotation servos at the local hobby store instead of models with fixed limits.  Construction of the robot went fine, passed the smoke test.  But when powered up the robot pretty much spins in circles.

I checked the wiring (used a bread board) and it is all ok.  I modified the code that comes with the tutorial, so that all it does is turn the LED on/off at a certain interval and pulse the left/right servos.  The LED pulses, and duration of the left/right servo motions are fine.  But the speeds the servos turn at are very different, one servo spins very slow.  The strange thing is that if I swap the signal wires from the chip to opposite servos, the servos spin at the same speeds they did before the swap.  So, the signal from the chip has no effect on the speed the servos spin.

This lead me to believe my servos where bad.  I have since tried new servos and my friend's chip all with the same results.  I made a suicide cord out of a 5V 1A AC adapter.  Total current draw is never an issue, but the "slow" spinning servo always draws more current.  Any thoughts on why I can't get my servos to spin the same speeds?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: 50$ Robot Servos Not Responding Right
« Reply #1 on: February 20, 2009, 04:19:40 PM »
Hi,

Check for mechanical friction on the slow side.
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

paulstreats

  • Guest
Re: 50$ Robot Servos Not Responding Right
« Reply #2 on: February 20, 2009, 05:36:04 PM »
Have you made sure that the servos are flipped correctly according to the tutorial

Offline AKnickolaiTopic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
Re: 50$ Robot Servos Not Responding Right
« Reply #3 on: February 20, 2009, 07:26:11 PM »
The servos are flipped and there doesn't seem to be any added friction with on servo vs. the other.  I currently have a "test" set up that has two brand new (not the ones already fixed to my robot body) and am experiencing the same difference in rotational speed.

Given that I have 2 sets of servos that exhibit the same problems, I'm pretty sure it can't be a problem with them.  I've checked the voltage output from the pins of the controller and it is the same, so I don't think its a problem with the chip.

paulstreats

  • Guest
Re: 50$ Robot Servos Not Responding Right
« Reply #4 on: February 20, 2009, 07:40:49 PM »
Maybe the servos you bought havent being centered consistantly. try loading the servo centering code from the $50 robot onto your microcontroller and see if they both stand still or not

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: 50$ Robot Servos Not Responding Right
« Reply #5 on: February 20, 2009, 08:55:39 PM »
When you say it 'spins' - is one servo going forward and the other backwards, or are they both turning the same way but at different speeds?
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline AKnickolaiTopic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
Re: 50$ Robot Servos Not Responding Right
« Reply #6 on: February 20, 2009, 10:55:19 PM »
@ Webbot:

Both rotate clockwise, the only difference is the speed.

@ paulstreats:

I'll try the centering code, but would that be applicable to a servo that is made for continuous rotation?

Going to try and play with it again tonight if I have time.  I'll let you know if the centering code helps.

Offline Jdog

  • Robot Overlord
  • ****
  • Posts: 259
  • Helpful? 3
Re: 50$ Robot Servos Not Responding Right
« Reply #7 on: February 21, 2009, 01:26:59 AM »
Try changing it in code(I know programming-eeek). See which wheel is going forward and which wheel is going backward. Then open up Photovore_v1.c. In there you should see lines of code like this:
Code: [Select]
//detects more light on left side of robot
if(sensor_left > sensor_right && (sensor_left - sensor_right) > threshold)
{//go left
servo_left(44);
servo_right(44);
}

//detects more light on right side of robot
else if(sensor_right > sensor_left && (sensor_right - sensor_left) > threshold)
{//go right
servo_left(25);
servo_right(25);
}

//light is about equal on both sides
else
{//go straight
servo_left(25);
servo_right(44);
}
If the left wheel is going backwards when the light is even on both sides then reverse the values of the left wheel in the code. i.e.
Code: [Select]
//detects more light on left side of robot
if(sensor_left > sensor_right && (sensor_left - sensor_right) > threshold)
{//go left
servo_left(25);
servo_right(44);
}

//detects more light on right side of robot
else if(sensor_right > sensor_left && (sensor_right - sensor_left) > threshold)
{//go right
servo_left(44);
servo_right(25);
}

//light is about equal on both sides
else
{//go straight
servo_left(44);
servo_right(44);
}
If the right wheel is going backwards then do the opposite. i.e.
Code: [Select]
//detects more light on left side of robot
if(sensor_left > sensor_right && (sensor_left - sensor_right) > threshold)
{//go left
servo_left(44);
servo_right(25);
}

//detects more light on right side of robot
else if(sensor_right > sensor_left && (sensor_right - sensor_left) > threshold)
{//go right
servo_left(25);
servo_right(44);
}

//light is about equal on both sides
else
{//go straight
servo_left(25);
servo_right(25);
}

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: 50$ Robot Servos Not Responding Right
« Reply #8 on: March 01, 2009, 07:56:47 AM »
Maybe the servos you bought havent being centered consistantly. try loading the servo centering code from the $50 robot onto your microcontroller and see if they both stand still or not
I agree. They didn't center the servos as specified in the $50 Robot tutorial ;D

So you either do what Jdog said by changing it in code, or you remodify the servos.

 

SMF spam blocked by CleanTalk