Author Topic: Servo Problems - Troubleshooting?  (Read 3228 times)

0 Members and 1 Guest are viewing this topic.

Offline GosuSheepTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Servo Problems - Troubleshooting?
« on: April 03, 2012, 04:35:24 PM »
Greetings All,

I have an Arduino board that is meant to control multiple servos. I have 4 total: 2 of them were modified for continuation (poorly), and 2 have not been modified at all. The servos were purchased here: http://www.servocity.com/html/hs-311_standard.html

The 2 modified ones, when power and ground are applied, they continuously rotate and do not stop. They do not require any square wave applied to them. I believe this is because I screwed up on the modification. Perhaps I set the pot to be a little high, and now they are always at some speed when power is applied.

The other 2 ones that are not modified, I am having some troubles with. Using Arduino and Firmata libraries, I am able to successful apply power and (presumably) apply square waves to servos. However, the servos do not function correctly. If I physically move a servo to the one extreme, the servo command appears to move the gear all the way to the other side, and continue to TRY to move further, but can't because of the physical stop inside the servo. Sometimes the servos just try to move, but can't.

It's possible I messed around with them a bit and physically moved the wheel. I also know that these servos say they operate at 4.8V and I'm getting ~4.95V.

Can you guys help me troubleshoot the problems with these servos?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Servo Problems - Troubleshooting?
« Reply #1 on: April 03, 2012, 05:00:32 PM »
Hi,

The 2 modified ones, when power and ground are applied, they continuously rotate and do not stop. They do not require any square wave applied to them. I believe this is because I screwed up on the modification. Perhaps I set the pot to be a little high, and now they are always at some speed when power is applied.
You have to re-mod them then.


The other 2 ones that are not modified, I am having some troubles with. Using Arduino and Firmata libraries,
A link to the libs would be a good idea, but software questions goes in "Software" please!


Quote from: GosuSheep link=topic=15488.msg111580#msg111580
date=1333492524
I am able to successful apply power and (presumably) apply square waves to servos. However, the servos do not function correctly. If I physically move a servo to the one extreme, the servo command appears to move the gear all the way to the other side, and continue to TRY to move further, but can't because of the physical stop inside the servo. Sometimes the servos just try to move, but can't.

It's possible I messed around with them a bit and physically moved the wheel. I also know that these servos say they operate at 4.8V and I'm getting ~4.95V.
Did you open these too?
If not, your servo timing is wrong. Did you change the frequency (the crystal) from the standard.

To verify that the timing of the servo signal is correct, you need to measure it with an oscilloscope or build/buy a cheap servo tester for verifying that the servo works.
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

Offline GosuSheepTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Re: Servo Problems - Troubleshooting?
« Reply #2 on: April 03, 2012, 06:00:35 PM »
Thanks for your replies.

It would be difficult to remod the continuous servos as I super-glued the pot.

I currently don't have great tools to verify software, but everything else with that software has been clean, stable, and worked well, so I assume they are correct.

Can I not measure the voltage and get an estimate of the square wave? For instance, isn't some length of a 5V square wave some lower value like 3?

Also, with the non-continuous servos, I moved them from values that would give an angle of 0 to an angle of 180 and back. All of those values seem to just make the servo crash into the wall and continue to try to proceed.

Offline jkerns

  • Robot Overlord
  • ****
  • Posts: 270
  • Helpful? 12
Re: Servo Problems - Troubleshooting?
« Reply #3 on: April 03, 2012, 07:58:30 PM »
Moving the servo output by hand did nothing. That's no big deal.

Trying to figure out what the pulse duration is by measuring the average voltage is not going to work - that would be OK for a duty cycle modulation (which is percent time on vs time off) but not for servos where the important thing is the absolute time length of the pulses - and the off time isn't that critical.

If the servo is crashing to one end, then the duration of the pulse it is seeing is either too long or too short. Somewhere a timer is not at the right frequency or there is a wiring problem. You could try pulses that are 10 times bigger or smaller to see what happens. But it is going to be tough to debug without being able to find out what the actual pulse time is - perhaps you could connect the servo output to a digitial input and try measuring the pulse time in your Arduino?
I get paid to play with robots - can't beat that with a stick.

http://www.ltu.edu/engineering/mechanical/bachelor-science-robotics-engineering.asp

Offline GosuSheepTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Re: Servo Problems - Troubleshooting?
« Reply #4 on: April 03, 2012, 08:31:34 PM »
@Jkerns,

I think the problem is electrical. I have managed to get the servos to work almost fully. The headers I was using were part of the problem; they did not get a real solid electrical connection. I have put wires directly into the servo instead.

At this point, I am able to get the servos to rotate from 0 to 180 degrees no problem. However, ONE of them keeps trying to press on when I set it to 0 degrees. This is one of multiple reasons why I believe the software and PWM is correct, but the hardware has somehow become faulty.

My assumption is that it is reading something like 0.00001 degrees instead of 0. Do you know of any ways to fiddle around with the pot to correct such things?

EDIT: I was wrong. It does NOT continue to try to move forward after being set to 0. It just keep vibrating a little bit at any degree setting of 7 or less. Very strange.

EDIT2: When I do a for loop sweeping from 0degrees to 180degrees and back, the servos match up at 180degrees perfectly. However, when heading back to 0 degrees, the working one goes a LITTLE further than the one I'm having trouble with. So, there could be a problem with the pot or the physical stop not allowing the servo to go its full 180 degree range. Perhaps it only goes from 8 to 180 or something o_O
« Last Edit: April 03, 2012, 08:57:10 PM by GosuSheep »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Servo Problems - Troubleshooting?
« Reply #5 on: April 04, 2012, 03:17:32 AM »
Hi,

[...] You could try pulses that are 10 times bigger or smaller to see what happens. [...]
That will likely kill the servo, but that's another way of solving the problem of course ;)
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

Offline GosuSheepTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Re: Servo Problems - Troubleshooting?
« Reply #6 on: April 04, 2012, 05:44:46 PM »
I have decided to modify and see how it works. So far it is working as expected where pulses control speed instead of angle. Setting to 90 (the center) indeed stops the servo, but it's still vibrating.

Thoughts?

Offline jkerns

  • Robot Overlord
  • ****
  • Posts: 270
  • Helpful? 12
Re: Servo Problems - Troubleshooting?
« Reply #7 on: April 05, 2012, 09:28:37 AM »
Hi,

[...] You could try pulses that are 10 times bigger or smaller to see what happens. [...]
That will likely kill the servo, but that's another way of solving the problem of course ;)
From the description, he was already sending out of range signals to the servo...

I have no suggestions on the vibration problem.
I get paid to play with robots - can't beat that with a stick.

http://www.ltu.edu/engineering/mechanical/bachelor-science-robotics-engineering.asp

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Servo Problems - Troubleshooting?
« Reply #8 on: April 06, 2012, 06:24:33 PM »
Hi,

[...] but it's still vibrating.

Thoughts?
It is either timing jitter or power line noise getting into the signal line. How are the physical setup?
Twisting the power lines may be of some help if it's the latter and always keep the wires as short as possible.

You really need to 'scope the signal - no sense in trying to change stuff if you cannot see what the changes does to the signal.
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