Author Topic: Encoder Problem  (Read 2427 times)

0 Members and 1 Guest are viewing this topic.

Offline SomeSabaTopic starter

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 0
Encoder Problem
« on: January 01, 2008, 11:08:03 PM »
This question kind of involves both electrical and software but w/e

HAPPY NEW YEAR EVERYONE

I have a robot that uses 2 encoders, one on the left and on on the right side. I'm using the Wheel Watcher encoders on a GM8 from solarbotics, i uploaded a vid to youtube to help you guys better visualize my problem:

I've done many software tweeks and changes to confirm its not a software problem, but my robot isnt accurate, i dont know if it the encoders or something else, but sometimes the robot stops waaay too early (b4 the tennis ball) or it even goes so far as to knock/push the tennis ball away, so if you watch the video does that seem like a reasonable 5% of the enocoders or is there something like idk maybe noise from the motors affecting it? Coming here is my last resort, i will greatly appreciate any help i can get.

[youtube]http://www.youtube.com/v/9NsB7xIijIw[/youtube]

Now that i tihnk about it, when i run it, it goes the right distance for ALL twists and travels, but when it ramdomly messes up, i think every thing is off :O like all the parts of it travel
« Last Edit: January 01, 2008, 11:10:49 PM by SomeSaba »

Offline bulkhead

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 0
Re: Encoder Problem
« Reply #1 on: January 02, 2008, 01:13:09 AM »
Some things to check...

When it turns for a corner, does a motor ever go in reverse?
Does it happen when you run it slower? (what's the speed limit of the encoders?)
Motor noise could be an issue, what type of motor controller setup do you have?  You might need to add capacitors to the motor if it doesn't already have them.

Offline SomeSabaTopic starter

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 0
Re: Encoder Problem
« Reply #2 on: January 02, 2008, 01:59:15 AM »
When it turns for a corner, does a motor ever go in reverse?
Yes a motor does go in reverse, i think you asked this because of the encoder sending an "i am going backwards signal" and therefore my dist counter may be decrementing. If that is why you are asking, my encoder sends the same signal wether its going forward or backward, only it sets a separate direction pin, so i just ignore that, becuase i already know its going backwards lol

Does it happen when you run it slower? (what's the speed limit of the encoders?)
Yes ive run it at all sorts of speeds (including slow) and the problem persists, and i coult not find speed limit of encoders :(

Motor noise could be an issue, what type of motor controller setup do you have?  You might need to add capacitors to the motor if it doesn't already have them.
I am using the Sabertooth 2x10

Offline bulkhead

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 0
Re: Encoder Problem
« Reply #3 on: January 02, 2008, 02:19:48 AM »
Nevermind about the reverse part, I see that the wheel watchers is a quadrature encoder so it can determine direction.

I think it may be motor noise.  I've used the solarbotics motors before and they are quite noisy, especially the more powerful ones. Even the stock motors are pretty noisy.  Try disconnecting the motors power and pushing the bot for a known straightline distance to see if it works.

Offline Half Shell

  • Robot Overlord
  • ****
  • Posts: 225
  • Helpful? 0
Re: Encoder Problem
« Reply #4 on: January 02, 2008, 11:12:42 AM »
A possible reason for inaccurate encoders is wheel slippage - this is especially true when some robots turn. The wheel turns a number greater than the distance it actually went.

Offline SomeSabaTopic starter

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 0
Re: Encoder Problem
« Reply #5 on: January 02, 2008, 02:45:51 PM »
Thank you, i will consider all 3 suggestions, first i will adress noise

I found this:

http://www.kronosrobotics.com/an142/GAN142.shtml

and i will follow its guidelines

Offline Half Shell

  • Robot Overlord
  • ****
  • Posts: 225
  • Helpful? 0
Re: Encoder Problem
« Reply #6 on: January 02, 2008, 03:43:08 PM »
I generally do the 3 capacitor method. It works well for me.

Offline bulkhead

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 0
Re: Encoder Problem
« Reply #7 on: January 02, 2008, 04:08:15 PM »
If noise is the issue, theres several measures you can take to reduce or eliminate it completely.  First, try the capacitors like the link has it.  Also, have separate power sources for the motors/servos and the microcontroller.  If there's still noise going through the common ground, then you can use optoisolators going to the motor controller and servos so you don't even need a common signal ground.

Offline SomeSabaTopic starter

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 0
Re: Encoder Problem
« Reply #8 on: January 02, 2008, 04:27:20 PM »
I am going to go Radioshack and buy some capacitors, I will post again later today

Thank you everyone for your help so far

Offline SomeSabaTopic starter

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 0
Re: Encoder Problem
« Reply #9 on: January 02, 2008, 09:04:11 PM »
Interesting results!

I twisted every possible wire on my robot, then did the 3 capacitor thing on the 2 motors that carry the encoders, and only put 1 capacitor on the 2 motors that dont carry encoders.

Results:

First four runs were consistantly perfect (as in they ended in the exact same spot each time!) WOW!
The next run was a severe undershot and the next two were severely overtarget

Previously i was getting only 1st or first two runs as perfect, this is an improvement!

Interestingly, i think it consistantly works on the first couple runs (after the circuit has received no power for a long time) and after a few runs it starts to see trouble (does that mean heat issues?), im going to test this to make sure.

 


Get Your Ad Here