go away spammer

Author Topic: Still can't get this servo modification thing!!!!!!!!!!!!!!!!  (Read 2730 times)

0 Members and 1 Guest are viewing this topic.

Offline Hawaii00000Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 347
  • Helpful? 2
Still can't get this servo modification thing!!!!!!!!!!!!!!!!
« on: January 28, 2009, 12:03:09 AM »
I replaced the potentiometer with two 2.2k resistor (I soldered the common ends to the red wire and the other ends to the yellow and green wires) ,but when I run the program the motor just keeps on rotating at the same speed. The program has different values so the servo should rotate at different speeds. What am I doing Wrong!?!?!?
"God chose to make the world according to very beautiful mathematics."
-Paul Dirac
**************************************************************
Its Hawaii Five-O. Get it?

Offline cosminprund

  • Robot Overlord
  • ****
  • Posts: 284
  • Helpful? 8
Re: Still can't get this servo modification thing!!!!!!!!!!!!!!!!
« Reply #1 on: January 28, 2009, 12:37:18 AM »
I'd first try sending the servo an 1 ms and then an 2 ms pulse. The servo should rotate in opposite directions. If it does then start with the 1ms pulse and increase it until it reverses direction. Before you get to the point where it reverses direction you'll find the spot where the servo is standing still (the new "center" position)! You'll need to do this to compensate for the differences in the two resistors values (they're both 2k2 but they're likely of 5% precision). IF the two resistors would have been perfect (and there's no such thing) your servo center would be at exactly 1.5 ms.

The best way to do what I've described here is to use an "Divide and Conquer" algorithm.
Here's an example:

_delay_ms(1) => makes the servo turn clockwise
_delay_ms(2) => makes the servo turn counter clockwise
(1+2)/2 = 1.5 => I'll next try the 1.5 ms pulse

_delay_ms(1.5) => makes the servo trun clockwise (just an example) => 1.5 takes the place of "1" so now I have:

_delay_ms(1.5) => makes the servo turn clockwise
_delay_ms(2) => makes the servo turn counter clockwise

(1.5 + 2)/2 = 1.75 => I'll next try the 1.75 ms pulse

_delay_ms(1.75) => makes the servo turn counter clockwise => 1.75 takes the place of "2" sonow I have:

_delay_ms(1.5) => makes the servo turn clockwise
_delay_ms(1.75) => makes the servo turn counter clockwise

(1.5 + 1.75)/2 = 1.625; I'll next try the 1.625 ms pulse

As you can see the interval you're looking at gets divided in half with every single test! With a maximum of 7 tests you should find your servo's center point. Once you've got the servo's center point, sending an pulse that's shorter makes the servo turn one way, sanding an longer pulse makes the servo go the other way!

Offline Hawaii00000Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 347
  • Helpful? 2
Re: Still can't get this servo modification thing!!!!!!!!!!!!!!!!
« Reply #2 on: January 28, 2009, 01:35:59 AM »
The code I'm using sends a signal for 0, 180, and 360 degrees and I nknow It works because I tried on the another servo. Another site did say that you need 2.4k resistors and I haven't put the gears back in yet, but It should still work without the gears.
"God chose to make the world according to very beautiful mathematics."
-Paul Dirac
**************************************************************
Its Hawaii Five-O. Get it?

Offline cosminprund

  • Robot Overlord
  • ****
  • Posts: 284
  • Helpful? 8
Re: Still can't get this servo modification thing!!!!!!!!!!!!!!!!
« Reply #3 on: January 28, 2009, 05:46:41 AM »
You're saying the servo is rotating at the same speed and in the same direction for all 3 signals: 0, 180, 360? I care more about direction then speed: for my servos speed varies very little in a very narrow band around the midpoint: the motor is stopped at 180, moves slowly a 183, faster at 185, full speed at 190 (just an example, I'm using milliseconds, not degrees to set up my servos)

If 0 and 360 make the motor turn in the same direction and you have checked with an other servo and with the other servo it works as expected (makes the servo turn all the way to one side and then all the way to the other side) then it must be related to your soldering.

Offline Hawaii00000Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 347
  • Helpful? 2
Re: Still can't get this servo modification thing!!!!!!!!!!!!!!!!
« Reply #4 on: January 28, 2009, 10:30:51 AM »
I have checked it and there's nothing wrong with the program that I know of. I can't see how I could have gone wrong when soldering its not that hard. Maybe I soldered the resistors to the wrong wires.
"God chose to make the world according to very beautiful mathematics."
-Paul Dirac
**************************************************************
Its Hawaii Five-O. Get it?

Offline Hawaii00000Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 347
  • Helpful? 2
Re: Still can't get this servo modification thing!!!!!!!!!!!!!!!!
« Reply #5 on: January 28, 2009, 08:18:46 PM »
Heres a picture if that helps the resistors are 2.2k
« Last Edit: January 28, 2009, 08:25:07 PM by Hawaii00000 »
"God chose to make the world according to very beautiful mathematics."
-Paul Dirac
**************************************************************
Its Hawaii Five-O. Get it?

Offline Hawaii00000Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 347
  • Helpful? 2
Re: Still can't get this servo modification thing!!!!!!!!!!!!!!!!
« Reply #6 on: January 28, 2009, 08:26:27 PM »
The common side goes to the red and the individual sides go to the yellow and green.
"God chose to make the world according to very beautiful mathematics."
-Paul Dirac
**************************************************************
Its Hawaii Five-O. Get it?

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Still can't get this servo modification thing!!!!!!!!!!!!!!!!
« Reply #7 on: January 28, 2009, 08:39:10 PM »
you didnt use precision ( 1% to 2% tolerance) resistors .

You used resistors with a precision band of gold - 5% tolerance
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline Hawaii00000Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 347
  • Helpful? 2
Re: Still can't get this servo modification thing!!!!!!!!!!!!!!!!
« Reply #8 on: January 28, 2009, 08:44:31 PM »
Is that the only problem? Are the 2.2k resistors and all the rest right, because I don't wanna keep going to radio shack! This project is getting kind of expensive. :-[
"God chose to make the world according to very beautiful mathematics."
-Paul Dirac
**************************************************************
Its Hawaii Five-O. Get it?

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: Still can't get this servo modification thing!!!!!!!!!!!!!!!!
« Reply #9 on: January 28, 2009, 09:23:56 PM »
Just adjust the values in the code until the servo stops spinning. It's not the best way but it works if you don't want to spend more money.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Still can't get this servo modification thing!!!!!!!!!!!!!!!!
« Reply #10 on: February 07, 2009, 07:28:49 AM »
What servo did you use?

The resistor value is very important to get exact.

 


Get Your Ad Here