go away spammer

Author Topic: MG995 modified servo center problem  (Read 16185 times)

0 Members and 1 Guest are viewing this topic.

Offline NoodleNogTopic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
MG995 modified servo center problem
« on: August 23, 2008, 08:07:32 PM »
I have modified a TowerPro MG995 standard servo for continuous rotation by drilling out the output gear where it drives the potentiometer and removing the mechanical stop. I used my Axon to send a 700Hz delay cycle long pulse on a button press to the servo and, just like the tutorial, found a position that stopped the motor. However whenever I pulse the servo at 700 again the servo regards this as slightly off center and rotates randomly in no specific direction, despite making sure that the pot stays exactly as adjusted. This can be a significant amount sometimes, and means that the wheels would turn when I don't want them to. Could this be caused by poor resolution (due to the sheer cheapness of the servo) or noise from the circuit? I understand that I would need the servo to have some kind of dead zone to solve this problem, but I have no idea how to go about doing this. or is there a simpler method used to solve this problem?

Thanks.
« Last Edit: August 23, 2008, 08:53:40 PM by NoodleNog »

Offline ArcMan

  • Supreme Robot
  • *****
  • Posts: 519
  • Helpful? 4
  • Mmmm... Plasma
Re: MG995 modified servo center problem
« Reply #1 on: August 23, 2008, 08:32:16 PM »
I'm not familiar with the MG995, but most hobby servos require a pulse train of approximately 50 Hz, not 700 Hz.  Are you 700 Hz is right for that servo?

Offline NoodleNogTopic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: MG995 modified servo center problem
« Reply #2 on: August 23, 2008, 08:49:15 PM »
Sorry about that. It was 700 axon delay cycles, my mistake.

Offline ArcMan

  • Supreme Robot
  • *****
  • Posts: 519
  • Helpful? 4
  • Mmmm... Plasma
Re: MG995 modified servo center problem
« Reply #3 on: August 24, 2008, 01:05:08 PM »
OK.  I don't have an Axon, so I don't know how long that is.  Be sure you're giving your servo a 1ms - 2ms pulse width every 20ms (assuming it's standard hobby servo timing).  Perhaps you're waiting longer than 20ms to give it the position pulse again.  This would likely cause unexpected servo movement.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: MG995 modified servo center problem
« Reply #4 on: September 01, 2008, 04:12:00 PM »
Quote
Could this be caused by poor resolution (due to the sheer cheapness of the servo)
Yeap, this.

Basically servos aren't designed to be modified, and some modify better than others.

The problem here is your servo 'deadband' is really small, and there isn't much you can do about it. You will just have to tweak the value in software to minimize it.

Only now are the servo companies even realizing there is an actual market for modified servos:
http://www.servocity.com/html/hsr-1425cr__continuous_rotatio.html

Offline BaseOverApex

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: MG995 modified servo center problem
« Reply #5 on: October 01, 2008, 12:00:31 PM »
I hope this is still pertinent. When I built the servo controller for this project: http://letsmakerobots.com/node/571, I noticed two things: Firstly, the servos didn't really care if the pulse came every 5ms or every 25 ms. Secondly, they DID care if the time between pulses repeatedly changed, even by a small amount. If there was a spurious 10us delay caused by a MCU interrupt, the servos would waggle pretty wildly!

Anyway, I came across this while I was trying to find an answer to a question of my own. I've just obtained a couple of MG995 servos brand new. I can't drive them! Do they still operate on a 1ms - 2ms pulse every 18.5ms?

I read elsewhere that the pulse was in the 300Hz region, but there's no way I can control a 300Hz PWM with a 20MHz MCU. Not with any decent resolution, anyway. Perhaps teh 300Hz refers to the PID frequency?

Any ideas?

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
Re: MG995 modified servo center problem
« Reply #6 on: October 01, 2008, 12:40:52 PM »
What does the MG995 datasheet say?

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: MG995 modified servo center problem
« Reply #7 on: October 01, 2008, 08:57:41 PM »
Lots of RC car guys use the MG995s. They aren't name brand high quality servos, just some random servo from a factory overseas. I doubt a proper datasheet even exists for it.

Offline jml

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: MG995 modified servo center problem
« Reply #8 on: September 16, 2011, 07:45:54 AM »
Apologies for bumping an ancient thread. I've been looking to do exactly the same thing, and since google was pretty fruitless for me I had to experiment myself.

So, for the benefit of people looking to find information about the PWM pulse width and period required for MG995 servos, here is what I found:

  • A PWM period of 20ms works brilliantly. I have not experimented with different values of period, but this is fine.
  • The minimum pulse width is ~675us (corresponds to -90 deg)
  • The maximum pulse width is ~2830us (corresponding to +90 deg)
  • When the pulse width is outside of this range, control of the servo becomes unresponsive

I also intend to modify mine for continuous rotation. Apparently the deadband width is 5us, which is pretty slender, but just within the resolution of my controller. I'll update with how I get on.

 


Get Your Ad Here