go_away

Author Topic: 50$ Robot Servo Control  (Read 1671 times)

0 Members and 1 Guest are viewing this topic.

Offline spizzakTopic starter

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 1
50$ Robot Servo Control
« on: July 12, 2009, 04:33:01 PM »
For some reason my servo doesn't turn when sent a delay of 25, I need to drop it to 15 to be close to the 44 of the other one. Does anyone know why this might be?

Offline Conscripted

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
Re: 50$ Robot Servo Control
« Reply #1 on: July 13, 2009, 06:11:55 AM »
Maybe the potentiometer isn't centered. Did you modify them both the same way?

Conscripted

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: 50$ Robot Servo Control
« Reply #2 on: July 13, 2009, 06:24:26 AM »
id say the pot is off slightly, try centering the servo, can you get it to stop with the command it is supposed to?
Howdy

Offline spizzakTopic starter

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 1
Re: 50$ Robot Servo Control
« Reply #3 on: July 13, 2009, 10:36:10 AM »
I used the hold_sevo.hex or whatever its called to centre them and I tested with that file afterwards as well.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: 50$ Robot Servo Control
« Reply #4 on: July 13, 2009, 03:54:32 PM »
when you ran the servo hold program did the servo stop spinning at all?
if it still spins even slightly it probably means the pot isn't in the right position.
Howdy

Offline spizzakTopic starter

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 1
Re: 50$ Robot Servo Control
« Reply #5 on: July 13, 2009, 08:25:22 PM »
Okay so I pulled them apart, and reposititoned the pots, and reglued them, and as the glue was drying I guess it was turning the pots because every 5-10 mins or so the motor would start turning again. Anyway I think its nice and centred now but I'm noticing something else thats weird.

With the two servos connected and the hold_servo program running if I connect an LED to one of the other ports (say PD4), the servos start turning again. Can anyone explain this please?

Thanks for all the help!

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: 50$ Robot Servo Control
« Reply #6 on: July 13, 2009, 10:53:20 PM »
how did you connect the led, between which two pins?
Howdy

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: 50$ Robot Servo Control
« Reply #7 on: July 14, 2009, 05:29:05 AM »
This is an old problem with modifying servos for continuous rotation. After the mod is done and you are actually using the servo, you notice that it doesn't stay still at all times. This may be because you glued the pot a bit off center, but if it wasn't moving when you glued it and the servo functioned properly after the mod when you tested it, that is not the problem.

The real problem is the construction of the pot. It varies the resistance significantly in a small area where the swipper touches the resistive band. So it is sensitive to temperature, voltage, lenght of use and so on. To make sure that is not happening, you would have had to replace the pot with a multiturn pot, find the turn where the motor stops rotating, then keep turning the pot until the motor starts rotating again, then turn the pot back until you get half way between motor stop and motor start to be sure you're on the proper spot. That will make the servo stay still perfectly and it's the best method I know off.

Another method lays in the software. Everybody is using delay_cycles for the servo PWM, which is not perfect. Depending on the servo, you need to be more precise. The only way to be exactly on the spot for that particular servo, is to use a timer to generate the PWM signal. If you set it up so you can use microseconds to set the pulse, you have a lot of room to play with the values in the same fashion you would play with a multiturn pot. Set the pulse width to be in the middle of the area where the motor is stopped and you will be fine (well, because the pot may change it's value because of temperature, etc., you may still need to tweak the value from time to time).

Well, you get the idea. Good luck with your project!
Check out the uBotino robot controller!

Offline spizzakTopic starter

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 1
Re: 50$ Robot Servo Control
« Reply #8 on: July 14, 2009, 10:56:15 AM »
how did you connect the led, between which two pins?

Ground and 5V

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: 50$ Robot Servo Control
« Reply #9 on: July 14, 2009, 04:15:36 PM »
how did you connect the led, between which two pins? did you use a resistor?

Ground and 5V
does anything happen differently when you do this? because you said
Quote
With the two servos connected and the hold_servo program running if I connect an LED to one of the other ports (say PD4), the servos start turning again. Can anyone explain this please?
does the same thing happen here as with the +5v connection?
Howdy

Offline spizzakTopic starter

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 1
Re: 50$ Robot Servo Control
« Reply #10 on: July 15, 2009, 07:34:49 AM »
I'm not sure, I just tried it on the headers. But it seems that no matter what I do, after a couple of hours my servos just start spinning again.

 


Get Your Ad Here

data_list